path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/src/pages/WechatRedirect.js | wujichao/wencheng | import React from 'react'
import Ajax from '../util/ajax';
import Page from '../component/page';
import auth from '../util/auth.js';
import { withRouter } from 'react-router'
import getQueryParameter from '../util/getQueryParameter';
class WechatRedirect extends React.Component {
componentDidMount() {
var ... |
startReact/src/components/start/StartPage.js | filinils/FrontEndSeries | import React from 'react';
class StartPage extends React.Component {
render(){
return(
<div className="layout-content">
Hello from start page!
</div>
);
}
}
export default StartPage; |
docs/src/examples/collections/Grid/ResponsiveVariations/GridExampleReversedComputer.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Grid } from 'semantic-ui-react'
const GridExampleReversedComputer = () => (
<Grid reversed='computer' columns='equal'>
<Grid.Row>
<Grid.Column>Computer A Fourth</Grid.Column>
<Grid.Column>Computer A Third</Grid.Column>
<Grid.Column>Computer A Second</Grid.Colu... |
src/components/status-tag.js | openregister/specification | import React from 'react';
import PropTypes from 'prop-types';
import { css } from 'emotion';
const wipStyle = css`
background-color: tomato;
color: ivory;
font-variant: small-caps;
line-height: 1.1;
padding: 0 2px;
font-size: 12px;
border-bottom: none;
`;
const expStyle = css`
background-color: deep... |
src/CheckboxGroup/index.js | narqo/react-islands | import React from 'react';
import Component from '../Component';
class CheckboxGroup extends Component {
constructor(props) {
super(props);
this.onChildCheck = this.onChildCheck.bind(this);
}
render() {
const { theme, size, type, name, disabled, value } = this.props;
con... |
packages/react-dom/src/test-utils/ReactTestUtils.js | silvestrijonathan/react | /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import {findCurrentFiberUsingSlowPath} from 'shared/ReactFiberTreeReflectio... |
examples/huge-apps/routes/Course/routes/Announcements/components/Announcements.js | fanhc019/react-router | import React from 'react';
class Announcements extends React.Component {
render () {
return (
<div>
<h3>Announcements</h3>
{this.props.children || <p>Choose an announcement from the sidebar.</p>}
</div>
);
}
}
export default Announcements;
|
frontend/js/components/molecules/IconButton.js | ttavenner/okcandidate-platform | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Icon from './../atoms/Icon';
class IconButton extends Component {
render() {
return (
<button
onClick={this.props.onClick}
className={`icon-button ${this.props.square ? 'square'... |
react/gameday2/components/embeds/EmbedTwitch.js | verycumbersome/the-blue-alliance | import React from 'react'
import { webcastPropType } from '../../utils/webcastUtils'
const EmbedTwitch = (props) => {
const channel = props.webcast.channel
const iframeSrc = `https://player.twitch.tv/?channel=${channel}`
return (
<iframe
src={iframeSrc}
frameBorder="0"
scrolling="no"
... |
apps/shared/form/LinkInput.js | AusDTO/dto-digitalmarketplace-frontend | /* eslint-disable react/jsx-no-bind */
import React from 'react'
import PropTypes from 'prop-types'
import times from 'lodash/times'
import Textfield from './Textfield'
import './scss/LinkInput.scss'
import { validLink } from '../../validators'
class LinkInput extends React.Component {
constructor(props) {
supe... |
src/Router.js | thesyllable/wom2 | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... |
src/components/nodes/NodeList.js | ahonn/v2exRN | import React, { Component } from 'react';
import {
Text,
View,
ListView,
StyleSheet
} from 'react-native';
class NodeList extends Component {
constructor(props) {
super(props);
let ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
this.state = {
ds: ds,
};
}
co... |
js/JsPractice.js | zcs0843021123/Ranger | /**
* Created by zhangchunsheng on 17/4/24.
*/
import React, { Component } from 'react';
import { View, Text, Platform, InteractionManager, NativeModules } from 'react-native';
function alertObj(obj) {
alert(JSON.stringify(obj));
}
export default class JsPractice extends Component {
constructor(props) {
... |
src/components/chatrooms/chatroomsList/ChatroomForm.js | AleksandrRogachev94/chat-vote-go-frontend | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { addChatroom } from '../../../actions/chatroomActions'
import PrimaryButton from '../../common/PrimaryButton'
class ChatroomForm extends React.Component {
constructor(props) {
super(props)
this.state =... |
docs/src/pages/components/tabs/VerticalTabs.js | lgollut/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
function TabPanel(pro... |
src/ProgressBar.story.js | prometheusresearch/react-ui | /**
* @flow
*/
import React from 'react';
import {storiesOf} from '@kadira/storybook';
import ProgressBar from './ProgressBar';
storiesOf('<ProgressBar />', module)
.add('0%', () => <ProgressBar />)
.add('33%', () => <ProgressBar progress={0.33} />)
.add('66%', () => <ProgressBar progress={0.66} />)
.add('1... |
docs/src/components/Surface.js | tannerlinsley/react-move | // @flow weak
import React from 'react'
import PropTypes from 'prop-types'
export default function Surface(props) {
const { className, view, trbl, style, children, ...other } = props
const paddingBottom = `${Math.round((view[1] / view[0]) * 100)}%`
// uses bottom-padding hack. See https://css-tricks.com/scale-... |
frontend/src/components/settings/index.js | Kilte/cindy | import React from 'react';
import {DragDropContext} from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import Category from './category';
import CategoryCreate from './category-create';
const Settings = ({data}) => <div>
<CategoryCreate />
{data.map(item => <Category key={item.get('id')} da... |
src/pay/Pay.js | tsengkasing/LottoStar | /**
* Created by Think on 2017/5/20.
*/
import React from 'react';
import { Redirect } from 'react-router-dom';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
TableFooter
} fr... |
app/containers/BuildingPage/index.js | medevelopment/UMA | import React from 'react';
import ReactDOM from 'react-dom';
import * as toastify from '../../functions/Toastify';
import axios from 'axios';
import { propertySections } from '../../functions/propertiesFuncs';
import Helmet from 'react-helmet';
import TextField from 'material-ui/TextField';
import Units from '../../c... |
FPL.DraftLeague.APP/src/client.js | olehhe/fpl-draft-league | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './redux/create';
import ApiClient from './helpers/ApiClient';
import io from 'socket.io-client';
import... |
stories/TumblrPostButton.js | uraway/react-social-sharebuttons | import React from 'react';
import { select } from '@storybook/addon-knobs';
import { TumblrPostButton } from '../dist/index.es.js'
export default {
title: 'TumblrPostButton',
};
const colorOptions = {
blue: 'blue',
black: 'black',
white: 'white',
};
const notesOptions = {
none: 'none',
top: 'top',
righ... |
node_modules/antd/es/date-picker/Calendar.js | prodigalyijun/demo-by-antd | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import CalendarLo... |
src/modules/store/createTransformPropsContainer.js | scrollback/pure | /* @flow */
import React, { Component } from 'react';
type TransformFunction = (props: any) => any;
export default function(transformFunction: TransformFunction) {
return function(ChildComponent: ReactClass<any>): ReactClass<any> {
class TransformPropsContainer extends Component<void, any, void> {
render() {
... |
src/components/Main.js | bjacobel/rak | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { data as dataStyle, logo } from '../stylesheets/main.css';
import { link } from '../stylesheets/link.css';
import { getDataAsync } from '../actions/data';
const mapStateToProps = state => ... |
example/src/test_buttonlist.js | flywingdevelopers/rn-naive | /**
* Buttonlist Test
* Kevin Lee 20 Aug 2017
**/
import React from 'react'
import { Device, Screen, Block, Bar, Text, CheckBox, ButtonList } from 'rn-naive'
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = {Message:''}
}
iconclickcash() {
this.setS... |
es6/Form/FormItem.js | yurizhang/ishow | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
app/src/pages/GeoSpatialPage/index.js | JaySmartwave/palace-bot-sw | import React from 'react';
import cssModules from 'react-css-modules';
import styles from './index.module.scss';
import { GeospatialViewContainer } from 'containers';
const GeoSpatialPage = () => (
<div className={styles.container}>
<GeospatialViewContainer />
</div>
);
export default cssModules(GeoSpatialPag... |
src/svg-icons/places/pool.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesPool = (props) => (
<SvgIcon {...props}>
<path d="M22 21c-1.11 0-1.73-.37-2.18-.64-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.46.27-1.07.64-2.18.64s-1.73-.37-2.18-.64c-.37-.22-.6-.36-1.15-.36-.56 0-.78... |
app/javascript/mastodon/features/notifications/components/clear_column_button.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
export default class ClearColumnButton extends React.PureComponent {
static propTypes = {
onClick: PropTypes.func.isRequired,
};
render () {
return (
<button className='text-btn column-he... |
react/features/overlay/components/native/PageReloadOverlay.js | bgrozev/jitsi-meet | // @flow
import React from 'react';
import { Text } from 'react-native';
import { appNavigate, reloadNow } from '../../../app';
import { ColorSchemeRegistry } from '../../../base/color-scheme';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { connect } fro... |
client/index.js | Jchinonso/PostIt | import React from 'react';
import { render } from 'react-dom';
import jwtDecode from 'jwt-decode';
import { browserHistory, Router } from 'react-router';
import { Provider } from 'react-redux';
import 'jquery/dist/jquery';
import 'materialize-css/dist/css/materialize.css';
import 'materialize-css/dist/js/materialize';
... |
src/app_components/spinner_replacer.js | Dewire/dehub-react-native |
import PropTypes from 'prop-types';
import React from 'react';
import { View, ActivityIndicator } from 'react-native';
const SpinnerReplacer = ({ isSpinning, children }) => (
(isSpinning ? (
<ActivityIndicator />
) : (
<View>
{children}
</View>
))
);
SpinnerReplacer.propTypes = {
isSpinning... |
src/svg-icons/hardware/security.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareSecurity = (props) => (
<SvgIcon {...props}>
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
</SvgIcon>
);
Hardwa... |
lesson-4/src/components/Note.js | msd-code-academy/lessons | import React from 'react'
import EditNoteModal from './EditNoteModal'
import '../styles/Note.css'
class Note extends React.Component {
state = {
showMore: false,
}
handleShowMore = () => {
this.setState({
showMore: !this.state.showMore,
})
}
render() {
const { noteId, title, text, re... |
app/containers/ProcessViewPage/components/Cfc/index.js | BrewPi/brewpi-ui | import React from 'react';
import styles from './styles.css';
import { Liquids } from '../Liquids';
import { FlowArrows, FlowArrowsCfc, pickLiquid } from '../Flows';
const SvgCfc = require('./svg/tubes_cfc.svg?tag=g');
const SvgLiquidCfcTop = require('./svg/liquid_cfc_top.svg?tag=g');
const SvgLiquidCfcBottom = requir... |
src/index.js | kinseyost/immutable-redux | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory, IndexRoute } from 'react-router';
import store from './store';
import App from './App';
import Home from './components/SignUpForm.js';
import Users from 'components/ViewUsers.js';... |
src/components/KeystoreUploader/Actions.js | ens-bid/ens-bid-dapp | import React from 'react';
import Button from 'material-ui/Button';
const ReUploadButton = (props) => {
return props.dragDisabled ? (
<Button
raised
className="KeystoreUploader-button-reupload"
onClick={props.enableDrag}>
Reupload
</Button>
): null;
};
const UnlockButton = (prop... |
project/react-ant/src/containers/AssetMgmt/List/form.js | FFF-team/generator-earth | import moment from 'moment'
import React from 'react'
import { Input, DatePicker, Button, Form, Select } from 'antd'
import BaseContainer from 'ROOT_SOURCE/base/BaseContainer'
import { mapMoment } from 'ROOT_SOURCE/utils/fieldFormatter'
import DateRangePicker from 'ROOT_SOURCE/components/DateRangePicker'
const { Mo... |
src/js/routes.js | akornatskyy/sample-blog-react | import React from 'react';
import Reflux from 'reflux';
import {Switch, Route} from 'react-router-dom';
import {Container} from 'react-bootstrap';
import SignIn from './membership/components/signin';
import SignUp from './membership/components/signup';
import AuthInfo from './membership/components/auth-info';
import ... |
src/components/Code/index.js | tannerlinsley/react-story | import React from 'react'
import Markdown from 'react-smackdown'
import syntax from '../../utils/syntax'
export default ({ source }) => {
return <Markdown source={source} syntax={syntax} />
}
|
node_modules/enzyme/src/ShallowWrapper.js | abcdef506819/mantra-meteor-blog | import React from 'react';
import flatten from 'lodash/flatten';
import unique from 'lodash/uniq';
import compact from 'lodash/compact';
import cheerio from 'cheerio';
import {
nodeEqual,
containsChildrenSubArray,
propFromEvent,
withSetStateAllowed,
propsOfNode,
typeOfNode,
} from './Utils';
import {
debu... |
src/components/elements/HiddenTextfield.js | dynamicform/dynamicform-react-client | import React from 'react';
import {connect} from 'react-redux';
import {Form, Input} from 'antd';
import {initFormData,initDynamicFormData,updateFormData,updateDynamicFormData} from '../../actions/formAction';
import _ from 'lodash';
import Base from './Base';
import {MapStateToProps} from '../../utility/common';
cons... |
mobile/__tests__/index.ios.js | livesmoking/livesmoking | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
client/src/components/dashboard/Community/CertLinks.js | no-stack-dub-sack/alumni-network | import { Icon } from './SocialLinks';
import propTypes from 'prop-types';
import React from 'react';
const FCC_URL = "https://freecodecamp.org/";
const CertLinks = ({ handleClick, fccCerts, username }) => {
return(
<div className="right floated">
<span>
{ fccCerts.Front_End &&
<a
... |
components/Message/index.js | praida/admin | import React from 'react'
import PropTypes from 'prop-types'
import './styles.scss'
const Message = (props) => {
const classes = props.className.split(' ')
classes.push('message')
if (props.level) {
classes.push(`message-level-${props.level}`)
}
return (
<div className={classes.join(' ')}>
<bu... |
client/src/nav/index.js | AlTavares/babos.ios-server | import React from 'react'
import { Link } from 'react-router'
import routes from '../routes'
import User from '../services/user'
class Nav extends React.Component {
constructor(props) {
super(props)
this.handleLogout = this.handleLogout.bind(this);
this.state = { userLogged: User.isLogged... |
definitions/npm/@testing-library/jest-dom_v4.x.x/flow_v0.80.x-v0.103.x/test_jest-dom_v4.x.x.js | flowtype/flow-typed | // @flow
import { describe, it } from 'flow-typed-test';
import React from 'react';
import {
toBeInTheDocument,
toBeVisible,
toBeEmpty,
toBeDisabled,
toBeEnabled,
toBeInvalid,
toBeRequired,
toBeValid,
toContainElement,
toContainHTML,
toHaveAttribute,
toHaveClass,
toHaveFocus,
toHaveFormVal... |
ui/src/main/js/components/JobHistory.js | crashlytics/aurora | import React from 'react';
import PanelGroup from 'components/Layout';
import { Tab } from 'components/Tabs';
import TaskList from 'components/TaskList';
import { sort } from 'utils/Common';
import { getLastEventTime, isActive } from 'utils/Task';
export default function ({ tasks }) {
const terminalTasks = sort(ta... |
src/components/CheckboxToggle/CheckboxToggle.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { FormElement } from '../Form';
const hiddenWhen = hidden => ({ 'slds-assistive-text': hidden });
const CheckboxToggle = (props) => {
const {
checked,
disabled,
hideStatusLabels,
hideLabel,
id,
... |
src/Components/FooterFormButtons.js | TaylorRayHoward/ReactReduxMessageBoard | import React from 'react';
import { browserHistory } from 'react-router-dom';
const FooterButtons = (props) => {
const { submitLabel, otherLabel, goToLink } = props;
return (
<div className="d-flex justify-content-between">
<button type="submit" className="btn btn-primary">{submitLabel || 'Submit'}</butto... |
client/src/pages/NotFound/NotFound.js | patferguson/solitaire-react | import React, { Component } from 'react';
class NotFound extends Component {
render() {
return (
<div>
<p>404 - Page not found.</p>
</div>
);
}
}
export default NotFound;
|
src/svg-icons/hardware/laptop.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptop = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/>
</SvgIcon>
);
HardwareLaptop = pure(Hardwa... |
server/sonar-web/src/main/js/components/ui/Rating.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, o... |
src/sidebar/app/components/ListPanel.js | cedricium/notes | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import INITIAL_CONTENT from '../data/initialContent';
import { SEND_TO_NOTES, FROM_SEND_TO_NOTE, FROM_LIST_VIEW } from '../utils/constants';
import NewIcon from './icons/NewIcon';
import { setFocusedNote, createNote ... |
app/packs/src/components/CollectionSubtree.js | ComPlat/chemotion_ELN | import React from 'react';
import PropTypes from 'prop-types';
import Aviator from 'aviator';
import { Glyphicon, OverlayTrigger } from 'react-bootstrap';
import UIStore from './stores/UIStore';
import ElementStore from './stores/ElementStore';
import CollectionStore from './stores/CollectionStore';
import CollectionAc... |
src/index.js | AndrewCMartin/idb | import React from 'react';
import ReactDOM from 'react-dom';
import { render } from 'react-dom'
import { BrowserRouter } from 'react-router-dom'
import './index.css';
import 'bootstrap/dist/css/bootstrap-theme.css';
import 'bootstrap/dist/css/bootstrap.css';
import App from './App';
import registerServiceWorker from... |
src/sentry/static/sentry/app/icons/icon-stack.js | gencer/sentry | import React from 'react';
import Icon from 'react-icon-base';
function IconStack(props) {
return (
<Icon viewBox="0 0 24 24" {...props}>
<g fill="currentColor">
<path
d="M11.9952835,4 L3.51000214,8.48528137 L11.9952835,12.9705627 L20.4805649,8.48528137 L11.9952835,4 Z M12.9299314,2.23182... |
docs/app/Examples/elements/Input/Variations/InputExampleTransparent.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Input } from 'semantic-ui-react'
const InputExampleTransparent = () => (
<Input transparent placeholder='Search...' />
)
export default InputExampleTransparent
|
examples/components/RadioGroup.js | track0x1/formsy-react | import React from 'react';
import Formsy from 'formsy-react-es6';
class MyRadioGroup extends React.Component {
state = {};
componentDidMount() {
const value = this.props.value;
this.props.setValue(value);
this.setState({ value });
}
changeValue = (value) => {
this.props.setValue(value);
t... |
js/components/MessageComposer.js | transedward/relay-chat | /**
* This file is provided by Facebook for testing and evaluation purposes
* only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICUL... |
client/node_modules/uu5g03/dist-node/bricks/table-tbody.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, ContentMixin, ColorSchemaMixin, Tools} from './../common/common.js';
import './table-tbody.less';
export default React.createClass({
//@@viewOn:mixins
mixins: [
BaseMixin,
ElementaryMixin,
ContentMixin,
ColorSchemaMixin
],
//@@vie... |
app/javascript/mastodon/features/ui/components/drawer_loading.js | masto-donte-com-br/mastodon | import React from 'react';
const DrawerLoading = () => (
<div className='drawer'>
<div className='drawer__pager'>
<div className='drawer__inner' />
</div>
</div>
);
export default DrawerLoading;
|
packages/react-error-overlay/src/components/ErrorOverlay.js | amido/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* @flow */
import React, { Component } from 'react';
import { black } from '../styles';
import type { Node as ReactNode } from 'react'... |
src/components/dataVisualization/eCharts/EchartsPie.js | SmiletoSUN/react-redux-demo | import React from 'react';
import ECharts from 'echarts-for-react';
const option = {
title: {
text: 'Customized Pie',
left: 'center',
top: 20,
textStyle: {
color: '#777',
},
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
visualMap: {
show: fa... |
app/pages/share/share.js | hichameyessou/blip | import _ from 'lodash';
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import update from 'react-addons-update';
import * as actions from '../../redux/actions';
import Patient from '../patient';
/**
* Expose "Smart" Component that is connect-ed to Redux... |
src/parser/warlock/destruction/modules/talents/Eradication.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Enemies from 'parser/shared/modules/Enemies';
import Events from 'parser/core/Events';
import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage';
import SPELLS from 'common/SPELLS';
import SpellLink f... |
app/shared/resource-calendar/ResourceCalendarOverlay.js | fastmonkeys/respa-ui | import PropTypes from 'prop-types';
import React from 'react';
import injectT from '../../i18n/injectT';
function ResourceCalendarOverlay({ children }) {
return (
<div className="app-ResourceCalendarOverlay">
<div className="app-ResourceCalendarOverlay__overlay">
<div className="app-ResourceCalend... |
src/components/video_detail.js | albertchanged/YouTube-Topics | import React from 'react';
import VideoList from './video_list';
const VideoDetail = ({video, videoId}) => {
if (!video) {
return <div>Loading...</div>
}
videoId = video.id.videoId;
console.log(videoId);
const url = "https://www.youtube.com/embed/" + videoId + "?vq=hd1080?rel=0;&autoplay=1&loop=1&playli... |
examples/custom-validation/app.js | gullitmiranda/formsy-react | import React from 'react';
import ReactDOM from 'react-dom';
import Formsy from 'formsy-react';
import MyInput from './../components/Input';
const currentYear = new Date().getFullYear();
const validators = {
time: {
regexp: /^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])(:([0-5]?[0-9]))?$/,
message: 'Not valid ... |
docs/app/Examples/elements/Reveal/Variations/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealVariationsExamples = () => (
<ExampleSection title='Variations'>
<ComponentExample
title='Instant'
descr... |
app/app.js | boogunote/mevoco-client | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
/* eslint-disable import/no-unresolved */
// Load the favicon, the manifest.json file and the .htaccess file
import 'file?name=[name].[ext]!./... |
docs/app/Examples/elements/Image/Types/index.js | mohammed88/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'semantic-ui-react'
const ImageTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
... |
boilerplates/app/src/routes/user/detail/index.js | hexagonframework/antd-admin-cli | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import styles from './index.less'
const Detail = ({ userDetail }) => {
const { data } = userDetail
const content = []
for (let key in data) {
if ({}.hasOwnProperty.call(data, key)) {
content.push(<div key={key} c... |
src/components/Header/Header.js | CasualBot/react-twitbot | import React, { Component } from 'react';
import styles from './Header.css';
import FaTwitter from 'react-icons/lib/fa/twitter';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
class Header extends Component {
render() {
return (
<div className="Header">
<div className=... |
examples/stress-test/app.js | peterox/react-redux-form | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
window.React = require('react/lib/ReactWithAddons');
import { Provider, connect } from 'react-redux';
import {
Control,
Field,
Form,
} from 'react-redux-form';
import store from './store.js';
const UPDATE_ON = 'change';
class Rows ex... |
src/svg-icons/action/launch.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLaunch = (props) => (
<SvgIcon {...props}>
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
</SvgIcon>
);
Ac... |
src/Metronome/TempoControl.js | nadavspi/react-shed | import React from 'react';
export const TempoControl = ({ handleChange, value }) => {
return (
<label>
Tempo: {' '}
<input
max="400"
min="40"
onChange={(e) => handleChange(e.target.value)}
step="10"
type="number"
value={value}
/>
{' '}
BPM
<input
max="400"
min="40"
o... |
src/components/ContainerProgress.react.js | FrenchBen/kitematic | import React from 'react';
/*
Usage: <ContainerProgress pBar1={20} pBar2={70} pBar3={100} pBar4={20} />
*/
var ContainerProgress = React.createClass({
render: function () {
var pBar1Style = {
height: this.props.pBar1 + '%'
};
var pBar2Style = {
height: this.props.pBar2 + '%'
};
va... |
test/TransitionSpec.js | brentertz/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import { render } from './helpers';
import Transition, {UNMOUNTED, EXITED, ENTERING, ENTERED, EXITING} from
'../src/Transition';
describe('Transition', function () {
it('should not transition on mount', function(){
let instance =... |
examples/js/column-filter/number-filter.js | pvoznyuk/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
src/parser/priest/holy/modules/spells/azeritetraits/PermeatingGlow.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox';
import { calculateAzeriteEffects } from 'common/stats';
import ItemHealingDone from 'interface/ItemHealingDone';
import { ... |
src/components/icons/Pug.js | dtjv/dtjv.github.io | import React from 'react'
export const PugIcon = ({ className, ...props }) => (
<svg
{...props}
className={`text-pug ${className}`}
role="img"
fill="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<title>Pug</title>
<path d="M12.0938 4.6358c-2.0663 0-3.6817.20... |
src/svg-icons/device/airplanemode-active.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceAirplanemodeActive = (props) => (
<SvgIcon {...props}>
<path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/... |
src/client/containers/Profile/Profile.js | eliasmeire/hz-pictionary | import React from 'react';
import { connect } from 'react-redux';
import { Headline } from 'grommet';
import Header from '../../components/Header/Header';
import { logout, setUsername } from '../../redux/actions';
import ProfileForm from './ProfileForm';
const Profile = ({ user, logout, setUsername }) => (
<div clas... |
lib/loader/RotationHoleLoader.js | wangdicoder/react-native-indicator | import React from 'react';
import PropTypes from 'prop-types';
import { Animated, Easing } from 'react-native';
import { Surface, Group } from '@react-native-community/art';
import AnimatedCircle from '../animated/AnimatedCircle';
import { color } from '../const';
export default class RotationHoleLoader extends React.... |
client/src/components/ListingCard.js | casey-chow/tigertrade | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import {
Link,
withRouter,
propTypes as routerPropTypes,
} from 'react-router-dom';
import moment from 'moment-timezone';
import Radium, { Style } from 'radium';
import {
Card,
CardActions,
CardHeader,
C... |
example/src/components/YelpBusiness.js | zordius/reservice | import React from 'react'
import PropTypes from 'prop-types'
const YelpSearchBusiness = ({ yelp }) => {
const item = yelp.business
return (
<div>
<h2>{item.name}</h2>
{item.image_url ? <img src={item.image_url} alt='main' /> : null}
<p>
<span><img src={item.rating_img_url_small} alt='... |
app/components/Header/index.js | ReelTalkers/reeltalk-web | /**
*
* Header
*
*/
import React from 'react'
import styles from './styles.css'
function Header(props) {
return (
<div className={ styles.header }>
{props.children}
</div>
)
}
export default Header
|
src/parser/deathknight/unholy/modules/features/checklist/Component.js | sMteX/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Checklist from 'parser/shared/modules/features/Checklist';
import Rule from 'parser/shared/modules/features/Checklist/Rule';
import Requirement from 'parser/shared/modules... |
src/common/components/SwitchTheme.js | sikhote/davidsinclair | // @flow
import type { State } from '../../common/types';
import Box from './Box';
import Button from './Button';
import React from 'react';
import Text from './Text';
import { compose } from 'ramda';
import { connect } from 'react-redux';
import { setTheme } from '../app/actions';
type SwitchThemeProps = {
currentT... |
react/features/invite/components/callee-info/CalleeInfoContainer.js | jitsi/jitsi-meet | // @flow
import React, { Component } from 'react';
import { connect } from '../../../base/redux';
import CalleeInfo from './CalleeInfo';
/**
* The type of the React {@code Component} props of {@code CalleeInfoContainer}.
*/
type Props = {
/**
* The indicator which determines whether {@code CalleeInfo} i... |
ui/src/components/Footer_test.js | gimite/personfinder | import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import React from 'react';
import Footer from './Footer';
import {mountWithIntl} from '../testing/enzyme-intl-helper';
Enzyme.configure({adapter: new Adapter()});
test('footer should contain "PLEASE NOTE"', () => {
const wrapper = mountWit... |
Native/Learn_TextInput/index.android.js | renxlWin/React-Native_Demo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Learn_TextInput extends Component {
render() {
return (
<View style={styles.con... |
src/components/Web/web.js | pritchardtw/ReactPersonalSite | import React, { Component } from 'react';
import SectionBreak from '../sectionbreak';
import ReactRedux from './reactredux';
import ReactReduxApps from './reactreduxapps';
import Baywatch from './baywatch';
import CodeAcademy from './codeacademy';
import PersonalSite from './personalsite';
import ReactPersonalSite from... |
client/src/components/App.js | jondcoleman/book-trader | import React from 'react'
import Main from '../containers/MainCont'
import Spinner from './Spinner'
const App = React.createClass({
propTypes: {
authenticateUser: React.PropTypes.func,
authPending: React.PropTypes.bool,
authenticated: React.PropTypes.bool
},
componentDidMount: function() {
... |
test/integration/production/components/hello-context.js | nelak/next.js | import React from 'react'
import PropTypes from 'prop-types'
export default class extends React.Component {
static contextTypes = {
data: PropTypes.object
}
render () {
const { data } = this.context
return (
<div>{data.title}</div>
)
}
}
|
example/views/src/components/Index.js | Lanfei/webpack-isomorphic | 'use strict';
import React from 'react';
export default class IndexPage extends React.Component {
render() {
return <div>
<p>This plugin allows you to use the same codes on both server side and client side.</p>
</div>;
}
}
|
src/svg-icons/device/signal-cellular-connected-no-internet-2-bar.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet2Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/>
</SvgIcon>
);
Devi... |
src/components/setting/index.js | DarwinSmith/tentara-pelajar-client | import React, { Component } from 'react';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
import { connect } from 'react-redux'
import FineUploaderS3 from 'fine-uploader-wrappers/s3'
import Gallery from 'react-fine-uploader'
import { fetchProfile, patchProfile, fetchSkills, removeSkills, pos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.