path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
docs/app/Examples/modules/Dropdown/Usage/DropdownExampleRemoveNoResultsMessage.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Dropdown } from 'semantic-ui-react' const DropdownExampleRemoveNoResultsMessage = () => ( <Dropdown options={[]} search selection placeholder='No message...' noResultsMessage={null} /> ) export default DropdownExampleRemoveNoResultsMessage
test/UserList.spec.js
dylanavery720/shoot-the-breeze
import React from 'react'; import Sinon from 'sinon'; import { shallow, mount, render } from 'enzyme'; import { assert, expect } from 'chai'; import { fakeMessages } from './helpers/stubData' import UserList from '../lib/components/UserList'; require('locus'); describe('<UserList />', () => { it('renders as a <div>...
app/views/Watches/main.js
herereadthis/redwall
import React from 'react'; import Router from 'react-router'; import FluxComponent from 'flummox/component'; import AppFlux from 'AppFlux'; import AppStore from 'AppStore'; import Watches from './Watches'; var {DefaultRoute, Route} = Router, routes; const flux = new AppFlux(); routes = ( <Route> <Route...
docs/src/app/components/pages/components/Checkbox/ExampleSimple.js
skarnecki/material-ui
import React from 'react'; import Checkbox from 'material-ui/Checkbox'; import ActionFavorite from 'material-ui/svg-icons/action/favorite'; import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border'; const styles = { block: { maxWidth: 250, }, checkbox: { marginBottom: 16, }, }; c...
dist/react-calendar-icon.esm.js
kkostov/react-calendar-icon
import React from 'react'; import styled from '@emotion/styled'; var themedConfig = (theme => ({ textColor: 'white', // text color of the header and footer primaryColor: '#e85650', // used as background of the header and footer backgroundColor: '#fafafa', ...(theme === null || theme === void 0 ? void 0 : t...
src/views/Home/index.js
JounQin/1stg
import React from 'react' import PropTypes from 'prop-types' import { Grid } from './Grid' import styles from './index.scss' const GRIDS = [ { title: 'GitHub', link: 'https://github.com/JounQin', className: 'github', }, { title: 'Rubick', text: 'Vue SSR + TS', link: 'https://rubick.1stg....
app/assets/scripts/components/Curves/index.js
bartoszkrawczyk2/curves.js
import React, { Component } from 'react'; import { drawSpline } from '../../core'; import './style.scss'; class Curves extends Component { componentDidMount() { this.canvas = this.refs.canvas; this.canvas.width = 280; this.canvas.height = 280; this.ctx = this.canvas.getContext('2d')...
src/modules/Rooms/components/Chat/Chat.js
prjctrft/mantenuto
/* eslint-disable */ import React from 'react'; import Messages from './Messages'; export default (props) => { const styles = require('./Chat.scss'); return ( <div className={styles.Chat}> <div className={styles.ChatHeader}> <button className={styles.closeChat} onClick={props.toggleChat}> ...
client/views/omnichannel/components/Label.js
VoiSmart/Rocket.Chat
import { Box } from '@rocket.chat/fuselage'; import React from 'react'; const Label = (props) => <Box mbe='x8' fontScale='p2' color='default' {...props} />; export default Label;
node_modules/react-router-dom/es/NavLink.js
rwarr/futaba-db
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.i...
examples/src/Examples.js
BD2KGenomics/react-autosuggest
require('./Examples.less'); require('./Autosuggest.less'); import React, { Component } from 'react'; import { findDOMNode } from 'react-dom'; import BasicExample from './BasicExample/BasicExample'; import CustomRenderer from './CustomRenderer/CustomRenderer'; import MultipleSections from './MultipleSections/MultipleSe...
src/containers/App.js
zackbleach/react-transform-boilerplate
import React, { Component } from 'react'; import { compose, createStore, combineReducers } from 'redux'; import { Provider } from 'react-redux'; import { devTools, persistState } from 'redux-devtools'; import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'; import CounterApp from './CounterApp';...
src/Alert.js
collinwu/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; const Alert = React.createClass({ mixins: [BootstrapMixin], propTypes: { onDismiss: React.PropTypes.func, dismissAfter: React.PropTypes.number, closeLabel: React.PropTypes.string }, getD...
src/helpers/__tests__/makeRouteHooksSafe-test.js
gregsabo/redux-decagon
import { expect } from 'chai'; import React from 'react'; import { IndexRoute, Route } from 'react-router'; import makeRouteHooksSafe from '../makeRouteHooksSafe'; describe('makeRouteHooksSafe', () => { it('should work with JSX routes', () => { const onEnter = () => { throw new Error('Shouldn\'t call onEn...
examples/redux-saga/cancellable-counter/src/components/Counter.js
ioof-holdings/redux-subspace
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { INCREMENT, DECREMENT, INCREMENT_IF_ODD, INCREMENT_ASYNC, CANCEL_INCREMENT_ASYNC } from '../actionTypes' function Counter({counter, countdown, dispatch}) { const action = (type, value) => () => ...
src/App.js
omerak/webpack-react-less-mocha-css-modules
import React, { Component } from 'react'; import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import router from './router'; import 'ui/less/main.less'; export default class App extends Component { constructor() { super(); this.state = { currentRoute: { component: 'div' } }...
docs/src/app/components/pages/components/DropDownMenu/Page.js
spiermar/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import dropDownMenuReadmeText from './README'; import DropDownMenuSimpleExample ...
packages/neos-ui-editors/src/Editors/Boolean/index.js
neos/neos-ui
import React from 'react'; import PropTypes from 'prop-types'; import mergeClassNames from 'classnames'; import CheckBox from '@neos-project/react-ui-components/src/CheckBox/'; import Label from '@neos-project/react-ui-components/src/Label/'; import I18n from '@neos-project/neos-ui-i18n'; import style from './style.c...
src/shared/Home/Home.js
kashisau/enroute
/** * Home.js * */ import React from 'react'; import ArticleHero from '../ArticleHero/ArticleHero'; import HeroPicker from '../HeroPicker/HeroPicker'; import classnames from 'classnames'; import './Home.scss'; class Home extends React.Component { constructor(props) { super(props); this.stat...
app/javascript/mastodon/features/compose/index.js
tri-star/mastodon
import React from 'react'; import ComposeFormContainer from './containers/compose_form_container'; import NavigationContainer from './containers/navigation_container'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { mountCom...
docs/tutorial/DO_NOT_TOUCH/09/src/index.js
idream3/cerebral
import React from 'react' import {render} from 'react-dom' import {Controller} from 'cerebral' import App from './components/App' import {Container} from 'cerebral/react' import Devtools from 'cerebral/devtools' import HttpProvider from 'cerebral-provider-http' import {set, debounce} from 'cerebral/operators' import {s...
login/__tests__/index.ios.js
bobmacneal/react-native-firebase-auth
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 /> ); });
src/components/tooltips/Tooltips.js
metasfresh/metasfresh-webui-frontend
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; /** * @file Class based component. * @module Filters * @extends Component */ class Tooltips extends Component { constructor(props) { super(props); this.state = { opacity: 0, }; ...
client/src/containers/AssetAdmin/AssetAdminRouter.js
silverstripe/silverstripe-asset-admin
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import AssetAdmin from 'containers/AssetAdmin/AssetAdmin'; import { decodeQuery } from 'lib/DataFormat'; import qs from 'qs'; import CONSTANTS from 'constan...
src/Hidden/HiddenJs.spec.js
dsslimshaddy/material-ui
// @flow weak /* eslint-disable no-loop-func */ import React from 'react'; import { assert } from 'chai'; import { createShallow } from '../test-utils'; import HiddenJs from './HiddenJs'; import type { Breakpoint } from '../styles/breakpoints'; import Typography from '../Typography'; describe('<HiddenJs />', () => { ...
app/ecoModules/forms/static-input.js
aoshmyanskaya/tko
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; class StaticInput extends Component { render() { const formControl = <FormControl.Static> {this.props.value} </FormControl.Static>; return...
src/router.js
mansters/fetch-request
import React from 'react'; import { Router, Route } from 'dva/router'; import IndexPage from './routes/IndexPage'; function RouterConfig ( { history } ) { return ( <Router history={ history }> <Route path="/" component={ IndexPage }/> </Router> ); } export default RouterConfig;
app/javascript/mastodon/components/avatar_overlay.js
alarky/mastodon
import React from 'react'; import PropTypes from 'prop-types'; export default class AvatarOverlay extends React.PureComponent { static propTypes = { staticSrc: PropTypes.string.isRequired, overlaySrc: PropTypes.string.isRequired, }; render() { const { staticSrc, overlaySrc } = this.props; cons...
stories/shared/Spinner.stories.js
buildkite/frontend
/* global module */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { boolean, number } from '@storybook/addon-knobs'; import Spinner from '../../app/components/shared/Spinner'; storiesOf('Spinner', module) .add('Standard', () => <Spinner color={boolean('Color', true)} size={number(...
src/main.js
gravitron07/brentayersV6
/** * App entry point */ // Polyfill import 'babel-polyfill'; // Libraries import React from 'react'; import ReactDOM from 'react-dom'; import { Router, browserHistory } from 'react-router'; // Routes import Routes from './common/components/Routes'; // Base styling import './common/base.css'; // ID of the DOM e...
src/mongostick/frontend/src/screens/Settings.js
RockingRolli/mongostick
import React from 'react' import { Menu, Icon, Row, Col } from 'antd' import { Link, Route, withRouter } from 'react-router-dom' import { TransitionGroup } from 'react-transition-group' import OperationSettings from './OperationSettings' import SettingsHome from './SettingsHome' class Settings extends React.Component...
src/index.js
panlw/react-lab
import './theme'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import App from './app/app'; import { configStore, getDevTools } from './lib/createStore'; const store = configStore(); const DevTools = getDevTools(); render( <Provider store={store}> <div>...
packages/material-ui-icons/src/SmokingRooms.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let SmokingRooms = props => <SvgIcon {...props}> <path d="M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.5 7....
index.android.js
octopitus/RNAnimatedBarChart
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import ChartContainer from './src/ChartContainer' export default class RNBarChart extends Component { render(...
app/js/typer.js
mattiaslundberg/typer
import React from 'react' import Input from './components/input' import StatusDisplay from './components/status-display' import ResultDisplay from './components/result-display' export default class Typer extends React.Component { constructor(props) { super(props) this.state = { typedSequence: "", ...
src/components/stories/Icon.js
radekzz/netlify-cms-test
import React from 'react'; import { Icon } from '../UI'; import { storiesOf } from '@kadira/storybook'; const style = { width: 600, margin: 20, fontSize: 30 }; storiesOf('Icon', module) .add('Default View', () => ( <div style={style}> <Icon type="bold"/> <Icon type="italic"/> <Icon type=...
app/app/pages/fetch/component.js
snowkeeper/systemjs-reactjs-hot-reload
import React from 'react'; import Fetch from './fetch'; import Debug from 'debug' let debug = Debug('lodge:app:pages:fetch:component'); export default (page, returnType, options) => { class GenericFetch extends React.Component { constructor(props) { super(props) this.displayName = 'Generic ' + page this.s...
node_modules/rc-hammerjs/es/Hammer.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, { Component } from 'react'; im...
node_modules/react-router/modules/RouteUtils.js
Maxwelloff/react-football
import React from 'react' import warning from './routerWarning' function isValidChild(object) { return object == null || React.isValidElement(object) } export function isReactChildren(object) { return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)) } function checkPropTypes(componen...
src/development/index.js
RedgooseDev/react-photo-layout-editor
import React from 'react'; import ReactDOM from 'react-dom'; import PhotoLayoutEditor from '../PhotoLayoutEditor'; import * as util from './util'; import '../PhotoLayoutEditor/style/app.scss'; import './index.scss'; class App extends React.Component { constructor(props) { super(props); this._photoLayoutEditor ...
src/views/syllabus/Aspect.js
bostontrader/senmaker
// @flow import React from 'react' import LessonNavigator from './LessonNavigator' import {VerbdPanelLevel} from '../../data/dictionary/verbd/VerbdConstants' function Aspect(props:Object):Object { const style:Object = { border: '1px solid black', margin: '5px' } const q:Object = props....
react/life-cycle/src/LifeCycle.js
kobeCan/practices
import React from 'react'; class LifeCycle extends React.Component { constructor (props) { super(props); } state = { color: 'red' } /* 当组件第一次挂载的时候 */ // 1. componentWillMount = () => { console.log('componentWillMount'); } // 2. 在render之后执行 componentDidMount = () => { console.log('componentDidMount');...
src/components/ChartBase.js
somonus/react-echarts
import React, { Component } from 'react'; export default class ChartBase extends Component { static propTypes = { hasChart: React.PropTypes.bool, }; constructor(props) { super(props); if (this.props.hasChart !== true) { throw new Error('There is no Chart wrapper.'); } } render() { ...
egghead-redux/redux-app/src/components/app2.js
Mad-Labs/open-lab
import React, { Component } from 'react'; import Debug from './debug'; import {runTestSuite} from '../reducers/multipleCountersReducer'; class App2 extends Component { render() { return ( <div> <h1>Test add/remove counters</h1> <Debug result={runTestSuite()} /> </div> ); } } e...
node_modules/react-sparklines/src/SparklinesCurve.js
aleksandrsmolin/react-redux-weather
import React from 'react'; export default class SparklinesCurve extends React.Component { static propTypes = { color: React.PropTypes.string, style: React.PropTypes.object }; static defaultProps = { style: {} }; render() { const { points, width, height, margin, co...
src/svg-icons/hardware/sim-card.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareSimCard = (props) => ( <SvgIcon {...props}> <path d="M19.99 4c0-1.1-.89-2-1.99-2h-8L4 8v12c0 1.1.9 2 2 2h12.01c1.1 0 1.99-.9 1.99-2l-.01-16zM9 19H7v-2h2v2zm8 0h-2v-2h2v2zm-8-4H7v-4h2v4zm4 4h-2v-4h2v4zm0...
webui/components/users/FormInsurance.js
stiftungswo/izivi_relaunch
import React from 'react'; import { Grid } from 'semantic-ui-react'; import AutoField from 'uniforms-semantic/AutoField'; import SubmitField from 'uniforms-semantic/SubmitField'; import ErrorsField from 'uniforms-semantic/ErrorsField'; import AutoForm from 'uniforms-semantic/AutoForm'; import FormMaskedInput from '../....
pootle/static/js/admin/components/Search.js
translate/pootle
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import cx from 'classnames'; import React from 'react'; i...
geonode/contrib/monitoring/frontend/src/components/cels/geonode-data/index.js
simod/geonode
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { getResponseData } from '../../../utils'; import AverageResponseTime from '../../molecules/average-response-time'; import MaxResponseTime from '../../molecules/max-response-time'; import TotalRequests from '../...
admin/client/components/ItemsTable/ItemsTable.js
Tangcuyu/keystone
import React from 'react'; import classnames from 'classnames'; import Columns from '../../columns'; import CurrentListStore from '../../stores/CurrentListStore'; import ListControl from '../List/ListControl'; import TableRow from './ItemsTableRow'; import DrapDrop from './ItemsTableDragDrop'; const TABLE_CONTROL_COL...
dataTool/stories/examples/index.js
bitmoremedia/mygi
import React from 'react' import { storiesOf } from '@kadira/storybook' import globalStyles from '../../src/global-styles'; globalStyles(); import ButtonToggle from './ButtonToggle' import ButtonToggleModal from './ButtonToggleModal' import SearchUtility from './SearchUtility' storiesOf('Toggle Display', module) ....
front/app/app/rh-components/rh-Spinner.js
nudoru/React-Starter-2-app
import React from 'react'; const Spinner = ({type}) => { let cls = ['spinner']; if(type) { cls.push(type); } return (<div className={cls.join(' ')}></div>) }; export default Spinner;
test/FadeMixinSpec.js
roderickwang/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import FadeMixin from '../src/FadeMixin'; let Component; describe('FadeMixin', function () { beforeEach(function() { Component = React.createClass({ mixins: [ FadeMixin ], render() { return ( <div {....
src/pages/404.js
jgaehring/jgaehring.github.io
import React from 'react'; import Layout from '../components/Layout'; const NotFoundPage = () => ( <Layout> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </Layout> ) export default NotFoundPage
app/javascript/mastodon/features/explore/links.js
musashino205/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Story from './components/story'; import LoadingIndicator from 'mastodon/components/loading_indicator'; import { connect } from 'react-redux'; import { fetchTrendingLinks } from 'mastodon/act...
src/components/amount-input.js
mozilla/donate.mozilla.org
import React from 'react'; var AmountInput = React.createClass({ contextTypes: { intl: React.PropTypes.object }, getInitialState: function() { var amount = this.props.amount; if (amount) { amount = this.context.intl.formatNumber(amount); } return { inputValue: amount }; }, ...
src/svg-icons/maps/terrain.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsTerrain = (props) => ( <SvgIcon {...props}> <path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/> </SvgIcon> ); MapsTerrain = pure(MapsTerrain); MapsTerrain.displayName = 'MapsTerr...
src/containers/app.js
mrGGoodbye/react-redux-API-unsplash
// подключаем необходимые модули React и Unsplash import React from 'react'; import { connect } from 'react-redux' import { action_SET_list_photos } from '../actions'; import {unsplash} from '../../src/index.js'; import {Router, Route, hashHistory, Link} from 'react-router'; // счетчик страниц и количества фоток на ка...
src/pages/components/Books/utils.js
H3yfinn/finbarmaunsell.com
// @flow import React from 'react' import type { _Book } from './types' // Note that this is different from `renderWiki` in the Elm, // as we cannot return an Html.Attribute msg (attribute assignment) // as a single value in JS in the same way that we can in Elm. export const deduceUrl = (book: _Book) => book.wiki || ...
app/javascript/mastodon/components/animated_number.js
tri-star/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedNumber } from 'react-intl'; import TransitionMotion from 'react-motion/lib/TransitionMotion'; import spring from 'react-motion/lib/spring'; import { reduceMotion } from 'mastodon/initial_state'; const obfuscatedCount = count => { if (co...
examples/todomvc/containers/Root.js
ariporad/redux
import React, { Component } from 'react'; import TodoApp from './TodoApp'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import rootReducer from '../reducers'; const store = createStore(rootReducer); export default class Root extends Component { render() { return ( <Provider...
WorldMoodTracker/js/components/Header.js
kavithaenair/kavithaenair.github.io
import React from 'react'; import styles from '../../../css/bootstrap.min.css'; import customStyles from '../../css/style.css'; export default class Header extends React.Component { render() { return ( <nav className={[styles.navbar].join(' ')}> <div className={styles.container}...
src/js/components/dailyTracker/UnitTimer.js
angelm/sinuous
import React from 'react'; class UnitTimer extends React.Component { constructor(props) { super(props); let time = new Date(); time.setMinutes(props.unitDuration || 25); time.setSeconds(0); this.state = { timeoutId: null, remainingTime: time ...
__tests__/index.ios.js
J1aDong/Fleet
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/App.js
Trulsabe/reactLinuxMern
/** * Root Component */ import React from 'react'; import { Provider } from 'react-redux'; import { Router, browserHistory } from 'react-router'; import IntlWrapper from './modules/Intl/IntlWrapper'; // Import Routes import routes from './routes'; // Base stylesheet require('./main.css'); export default function A...
src/LabelNumberDisplay/index.js
christianalfoni/ducky-components
import React from 'react'; import PropTypes from 'prop-types'; import Icon from '../Icon'; import Typography from '../Typography'; import classNames from 'classnames'; import styles from './styles.css'; function LabelNumberDisplay(props) { return ( <div className={classNames(styles.outerWrapper, props.classNam...
Backup/AwesomeProject/components/TaskList.js
victorditadi/IQApp
import React, { Component } from 'react'; import { View, TextInput, Text, Button, AlertIOS } from 'react-native'; import HeaderIQMail from './Faixa'; import { Container, Content, InputGroup, Input } from 'native-base'; export default class TaskList extends Component{ constructor(){ super(); this.state = { ...
src/components/header/ThemeSwitcher.js
TechyFatih/Nuzlog
import React from 'react'; import { ToggleButton, ToggleButtonGroup } from 'react-bootstrap' const stylesheet = document.getElementById('bootstrap'); export default class ThemeSwitcher extends React.Component { constructor(props) { super(props); this.state = {value: 'default'}; this.onChange = this.onCh...
part4/src/components/Button/index.js
vulcan-estudios/web-testing
import React from 'react'; function Button (props = {}) { const { className, icon } = props; let { children } = props; let cls = 'mybutton'; if (className) { cls += ` ${className}`; } if (icon) { children = ( <i className='myicon' /> ); } return ( <button className={cls}> ...
src/svg-icons/action/schedule.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSchedule = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H...
pkg/interface/groups/src/js/components/lib/group-sidebar.js
ngzax/urbit
import React, { Component } from 'react'; import { Route, Link } from 'react-router-dom'; import { GroupItem } from '/components/lib/group-item'; import { Sigil } from '/components/lib/icons/sigil'; import { SidebarInvite } from '/components/lib/sidebar-invite'; import { Welcome } from '/components/lib/welcome'; impor...
src/svg-icons/navigation/fullscreen-exit.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationFullscreenExit = (props) => ( <SvgIcon {...props}> <path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/> </SvgIcon> ); NavigationFullscreenExit = pure(NavigationF...
src/components/Main.js
diaotai/gallery
require('normalize.css/normalize.css'); require('styles/App.scss'); var imageDatas=require("../data/imageDatas.json") import React from 'react'; // let yeomanImage = require('../images/1.jpg'); //将图片名信息转化为图片URL信息 function genURLImageData(datas){ for(let i=0;i<datas.length;i++) { let singleImageData=datas[i];...
src/index.js
alexras/truepeacein.space
import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './views/App'; import DocumentTitle from 'react-document-title'; import './index.css'; ReactDOM.render( ( <DocumentTitle title='truepeacein.space | Metroid Password Generator'> <App /> </Document...
examples/huge-apps/routes/Calendar/components/Calendar.js
moudy/react-router
import React from 'react'; class Calendar extends React.Component { render () { var events = [{ id: 0, title: 'essay due' }]; return ( <div> <h2>Calendar</h2> <ul> {events.map(event => ( <li key={event.id}>{event.title}</li> ))} </ul> ...
consoles/my-joy-instances/src/containers/instances/__tests__/summary.spec.js
yldio/joyent-portal
import React from 'react'; import renderer from 'react-test-renderer'; import 'jest-styled-components'; import { Summary } from '../summary'; import Theme from '@mocks/theme'; it('renders <Summary /> without throwing', () => { expect( renderer .create( <Theme> <Summary /> </Theme...
__tests__/components.spec.js
serkansokmen/connect4
import expect from 'expect' import React from 'react' import TestUtils from 'react-addons-test-utils' import { SplashScreenComponent, Game, Board, Piece } from '../app/Components' const setup = () => { let props = { onNewGame: expect.createSpy() } let renderer = TestUtils.createRenderer() renderer.render(<...
src/components/Select/Select-story.js
jzhang300/carbon-components-react
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import Select from '../Select'; import SelectItem from '../SelectItem'; import SelectItemGroup from '../SelectItemGroup'; const selectProps = { onChange: action('onChange'), className: 'some-...
app/javascript/mastodon/features/community_timeline/components/column_settings.js
sylph-sin-tyaku/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, FormattedMessage } from 'react-intl'; import SettingToggle from '../../notifications/components/setting_toggle'; export default @injectIntl class ColumnSettings extends React....
client/src/components/UploadField/UploadFieldItem.js
open-sausages/silverstripe-asset-admin
import i18n from 'i18n'; import React, { Component } from 'react'; import CONSTANTS from 'constants'; import fileShape from 'lib/fileShape'; import { fileSize } from 'lib/DataFormat'; import PropTypes from 'prop-types'; class UploadFieldItem extends Component { constructor(props) { super(props); this.handle...
frontend/src/Settings/DownloadClients/DownloadClients/DownloadClients.js
Radarr/Radarr
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Card from 'Components/Card'; import FieldSet from 'Components/FieldSet'; import Icon from 'Components/Icon'; import PageSectionContent from 'Components/Page/PageSectionContent'; import { icons } from 'Helpers/Props'; import translate f...
src/routes.js
tylerchilds/pokedex
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './pages/app'; import Type from './pages/type'; import PokemonList from './pages/pokemon-list'; import Pokemon from './pages/pokemon'; const routes = ( <Route path="/" component={ App }> <IndexRoute component={ PokemonL...
javascript/ShareAdmin/AuthKeyForm.js
AppStateESS/stories
'use strict' import React from 'react' import PropTypes from 'prop-types' import InputField from '@essappstate/canopy-react-inputfield' const AuthKeyForm = ({host, update, save}) => { if (!host) { return <div></div> } return (<div> <InputField value={host.authkey} change={update} placeholder="Paste in au...
node_modules/semantic-ui-react/src/elements/List/ListContent.js
SuperUncleCat/ServerMonitoring
import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' import { childrenUtils, createShorthandFactory, customPropTypes, getElementType, getUnhandledProps, META, SUI, useValueAndKey, useVerticalAlignProp, } from '../../lib' import ListDescription from './ListDescripti...
docs/src/components/Playground/Playground.js
seekinternational/seek-asia-style-guide
import styles from './Playground.less'; import React, { Component } from 'react'; import { Alert, TextField, Button, ButtonGroup, StarIcon, MailIcon, PageBlock, Section, AsidedLayout, Columns, Card, CardGroup, Text, Positive, Critical, Secondary, Strong, Footer } from 'seek-asia-st...
pages/index.js
turntwogg/final-round
import React from 'react'; import { Row, Col, useTheme } from '@turntwo/react-ui'; import LazyLoad from 'react-lazyload'; import { FaAngleDoubleRight } from 'react-icons/fa'; import Page from '../components/Page'; import PageContent from '../components/PageContent'; import Container from '../components/Container'; imp...
src/routes/error/index.js
AntonyKwok/react-starter-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import ErrorPage from './Err...
information/blendle-frontend-react-source/app/modules/issue/components/Region.js
BramscoChill/BlendleParser
import React from 'react'; import PropTypes from 'prop-types'; import Link from 'components/Link'; function getStyle({ region }) { return { left: `${region.position[0]}%`, right: `${100 - region.position[2]}%`, top: `${region.position[1]}%`, bottom: `${100 - region.position[3]}%`, position: 'abso...
src/components/upload-form.js
coding-lemur/nodefilestore
import React from 'react'; import Dropzone from 'react-dropzone'; import AddFilesButton from './add-files-button'; import EmptyFiles from './empty-files'; import FilesList from './files-list'; import FilesActionArea from './files-action-area'; import ResultContainer from './result-container'; import DataService from '...
newclient/scripts/components/modal/index.js
kuali/research-coi
/* The Conflict of Interest (COI) module of Kuali Research Copyright © 2005-2016 Kuali, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the Lic...
jest-integration/tests/cleanup/2-remove-test-and-update/ClickCounter.spec.js
bruderstein/unexpected-react
import React from 'react'; import ClickCounter from '../ClickCounter'; import TestRenderer from 'react-test-renderer'; import Unexpected from 'unexpected'; import jestSnapshot from 'jest-snapshot'; import UnexpectedReact from '../../unexpected-react-test-renderer'; const expect = Unexpected.clone().use(UnexpectedReac...
rallyboard-v2/client/src/LoadingStatus.js
tylerjw/rallyscores
import React, { Component } from 'react'; import { Progress, Segment, Header } from 'semantic-ui-react'; class LoadingStatus extends Component { render() { const { status } = this.props; let percent = 0; if (status === 'started') { percent = 25; } else if (status === 'pending') { p...
redux/todoList/src/main.js
yuanzhaokang/myAwesomeSimpleDemo
import AppContainer from './appContainer'; import ReactDOM from 'react-dom'; import React from 'react'; ReactDOM.render(<AppContainer />, document.getElementById('app'));
app/src/components/Footer/Social/index.js
AlexandreBourdeaudhui/abourdeaudhui.fr
/* * Package Import */ import React from 'react'; /* * Local Import */ /* * Code */ const links = [ { label: 'Twitter', url: 'https://twitter.com/qlex_', img: '/images/twitter.svg', }, { label: 'LinkedIn', url: 'https://www.linkedin.com/in/alexandrebourdeaudhui/', img: '/images/l...
src/components/Sidebar/Contacts/Contacts.js
ryanermita/ryanermita.github.io
// @flow strict import React from 'react'; import { getContactHref, getIcon } from '../../../utils'; import Icon from '../../Icon'; import styles from './Contacts.module.scss'; type Props = { contacts: { [string]: string, }, }; const Contacts = ({ contacts }: Props) => ( <div className={styles['contacts']}>...
modules/experimental/AsyncProps.js
jeffreywescott/react-router
import React from 'react'; import invariant from 'invariant'; var { func, array, shape, object } = React.PropTypes; var contextTypes = { asyncProps: shape({ reloadComponent: func, propsArray: array, componentsArray: array }) }; var _serverPropsArray = null; function setServerPropsArray(array) { inv...
src/svg-icons/action/copyright.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCopyright = (props) => ( <SvgIcon {...props}> <path d="M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-...
src/svg-icons/content/flag.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentFlag = (props) => ( <SvgIcon {...props}> <path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/> </SvgIcon> ); ContentFlag = pure(ContentFlag); ContentFlag.displayName = 'ContentFlag'; ContentFlag.muiName = '...
node_modules/react-bootstrap/es/NavItem.js
skinsshark/skinsshark.github.io
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
src/decorators.js
rgerstenberger/nuka-carousel
'use strict'; import React from 'react'; const DefaultDecorators = [ { component: React.createClass({ render() { return ( <button style={this.getButtonStyles(this.props.currentSlide === 0)} onClick={this.props.previousSlide}>PREV</button> ) }, ...