path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
examples/cancel/App.js
sskyy/redux-task
'use strict' import React from 'react' import {Message,Input, Indicator} from './components' const App = React.createClass({ render(){ return <div> <Input /> <Message /> <Indicator /> </div> } }) export default App
docs/pages/components/about-the-lab.js
lgollut/material-ui
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown'; const pageFilename = 'components/about-the-lab'; const requireDemo = require.context( 'docs/src/pages/components/about-the-lab', false, /\.(js|ts...
Example/Example.js
wehriam/react-native-camera
import React from 'react'; import { Image, StatusBar, StyleSheet, TouchableOpacity, View, } from 'react-native'; import Camera from 'react-native-camera'; const styles = StyleSheet.create({ container: { flex: 1, }, preview: { flex: 1, justifyContent: 'flex-end', alignItems: 'center', ...
src/components/TodoPage.js
pekkis/trollo
import React from 'react'; const TodoPage = props => { const { todos, params } = props; const currentTodo = todos.find(todo => todo.id === params.uuid); if (!currentTodo) { return ( <div>Not found</div> ); } return ( <div> {currentTodo.text} ...
react/ReadMore/ReadMore.demo.js
seek-oss/seek-style-guide
import React from 'react'; import omit from 'lodash/omit'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import ReadMore from './ReadMore'; import Text from '../Text/Text'; import Card from '../Card/Card'; import Section from '../Section/Section'; import styles from './ReadMore.demo.less'; ...
tests/layouts/CoreLayout.spec.js
okmttdhr/aupa
import React from 'react' import TestUtils from 'react-addons-test-utils' import CoreLayout from 'layouts/CoreLayout/CoreLayout' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) return renderer.getRenderOutput() } function shallowRenderWithProps (props...
app/components/LinkBox/LinkBox.js
mfi-dev/jag-kiosk
/* global $ */ import React from 'react' import { hashHistory } from 'react-router' import './LinkBox.styl' class LinkBox extends React.Component { componentDidMount () { $('.LinkBox').on('touchstart, click', function (e) { e.preventDefault() const href = $(this).attr('href') $(this).addClass('...
src/components/Calc/Custom/Custom.js
belchior/calc
/* eslint max-len:off */ import React from 'react'; import PropTypes from 'prop-types'; import { setColorTheme } from '../../../util/theme'; import './Custom.css'; const Custom = (props) => { setColorTheme('custom'); let className = 'Custom'; if (props.error) { className += ' shake-horizontal'; props.d...
common/routes/Rebate/components/FileInput.js
chrisfitkin/redeem-3
import React from 'react' class FileInput extends React.Component { constructor (props) { super(props) this.onChange = this.onChange.bind(this) } onChange (e) { const { input: { onChange } } = this.props onChange(e.target.files[0]) } render () { const { input: { value } } = this.props ...
src/component/tileTitle.spec.js
sjcrank/viz-data-generator
import test from 'ava'; import { shallow } from 'enzyme'; import React from 'react'; import { StyleSheetTestUtils } from 'aphrodite'; import TileTitle from './tileTitle'; test.beforeEach('disable style injection', () => { StyleSheetTestUtils.suppressStyleInjection(); }); test.afterEach('resume style injection', (...
src/app.js
adamw523/ssh-tunnel-manager
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux' import { createStore } from 'redux' import { ipcRenderer } from 'electron'; import sshTunnelApp from './reducers' import App from './components/app' import * as actions from './actions' import manager from './manager'...
test/specs/cartesian/ZAxisSpec.js
recharts/recharts
import React from 'react'; import { expect } from 'chai'; import { Surface, ZAxis } from 'recharts'; import { mount, render } from 'enzyme'; describe('<ZAxis />', () => { it('Don\'t render anything', () => { const wrapper = render( <Surface width={500} height={500}> <ZAxis dataKey={'x'} name="statu...
12_ReactJS Fundamentals/04_routing/src/components/user/Logout.js
akkirilov/SoftUniProject
import React, { Component } from 'react'; import { Redirect } from 'react-router-dom'; import WithNotifications from '../../hocs/WithNotifications' import observer from '../../infrastructure/observer'; class LogoutBase extends Component { componentDidMount() { if (!sessionStorage.getItem('authtoken')) { ...
src/svg-icons/communication/ring-volume.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationRingVolume = (props) => ( <SvgIcon {...props}> <path d="M23.71 16.67C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71 0 .28.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0...
src/components/Elements/Checkbox/index.js
jmikrut/keen-2017
import React, { Component } from 'react'; import './Checkbox.css'; class Checkbox extends Component { constructor() { super(); this.state = { checked: false } this.handleChange = (e) => { this.setState({ checked: !this.state.checked }) } } render() { return ( <div className={`checkbox ${thi...
examples/huge-apps/routes/Calendar/components/Calendar.js
brownbathrobe/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> ...
src/js/components/input_error_list.js
frig-js/frigging-bootstrap
import React from 'react' import InputError from './input_error' export default class InputErrorList extends React.Component { static propTypes = { errors: React.PropTypes.array, } render() { const { errors } = this.props if (!errors) return null return ( <div> { errors.m...
tests/routes/Home/components/SequenceView.spec.js
mklinga/potatoro
import React from 'react' import { Link } from 'react-router' import SequenceView from 'routes/Home/components/SequenceView' import { LABELS } from 'utils/constants.js' import { shallow } from 'enzyme' describe('(Component) SequenceView', () => { let _props, _spies, _wrapper beforeEach(() => { _props = { ...
src/shared/components/teamCard/teamCard.js
NestorSegura/operationcode_frontend
import React from 'react'; import PropTypes from 'prop-types'; import styles from './teamCard.css'; const TeamCard = ({ name, role, slackUsername, email, isBoard, description, imageSrc }) => ( <div className={styles.teamCard}> {imageSrc && (<img src={imageSrc} alt={`Headshot of ${name}`} />)} <h6 className={...
test-files/js-fail.js
dabapps/eslint-config
import $ from 'jquery'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import foo from './imports-pass'; import { maFunction } from './ts-pass'; const CONSTANT = 'CONSTANT'; const backtick = 'back\ntick'; const backtickVar = `back${backtick}tick`; const unused = 'warning'; class App exte...
internals/templates/containers/NotFoundPage/index.js
vinhtran19950804/procure_react
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
node_modules/react-bootstrap/es/Radio.js
soniacq/LearningReact
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 ...
frontend/src/components/Navigation/Clickable.js
loicbaron/nutrition
import React from 'react'; import PropTypes from 'prop-types'; import './Clickable.css'; import { anyNumberOfChildren } from '../miscellaneousProps'; const ENTER = 13; class Clickable extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); this.hand...
client/pages/adminpage/dashboard.js
mickael-kerjean/nuage
import React from 'react'; import { FormBuilder, Icon, Input } from "../../components/"; import { Backend, Config } from "../../model/"; import { FormObjToJSON, notify, format, createFormBackend } from "../../helpers/"; import "./dashboard.scss"; export class DashboardPage extends React.Component { constructor(pr...
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleReversedComputerVertically.js
clemensw/stardust
import React from 'react' import { Grid } from 'semantic-ui-react' const GridExampleReversedComputerVertically = () => ( <Grid reversed='computer vertically'> <Grid.Row> <Grid.Column>Computer Row 4</Grid.Column> </Grid.Row> <Grid.Row> <Grid.Column>Computer Row 3</Grid.Column> </Grid.Row> ...
tests/routes/Home/components/HomeView.spec.js
sqdron/sqdron.UI
// import React from 'react' // import { HomeView } from 'routes/Home/components/HomeView' // import { render } from 'enzyme' // // describe('(View) Home', () => { // let _component // // beforeEach(() => { // _component = render(<HomeView />) // }) // // it('Renders a welcome message', () => { // const...
src/layouts/Home.js
JuanLeo83/base-admin-reactmd
import React from 'react'; import logo from '../logo.svg'; export default class Home extends React.Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> </div> </di...
src/routes.js
kaizensauce/campari-app
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import PomodoroPage from './containers/PomodoroPage'; export default ( <Route path="/" component={App}> <IndexRoute component={PomodoroPage}/> </Route> );
src/components_youtube_p/video_list.js
vikasv/ReactWithRedux
import React from 'react'; import VideoListItem from './video_list_item'; const VideoList = (props) => { // const videos = props.videos; const videoItems = props.videos.map((video) => {return ( <VideoListItem onVideoSelect = {props.onVideoSelect} key={video.etag} video={video} />) });...
src/components/views/user-details-board-market-table.js
HuangXingBin/goldenEast
import React from 'react'; import { Table,Button } from 'antd'; import weiGuDong from '../../appConstants/assets/images/微股东.png'; import normalCard from '../../appConstants/assets/images/普卡.png'; import silverCard from '../../appConstants/assets/images/银卡.png'; import goldenCard from '../../appConstants/assets/images/金...
src/components/UserToolbar/user-toolbar.js
Mesamo/dva-admin
import React from 'react' import PropTypes from 'prop-types' import { Form, Button } from 'antd' import UserModal from '../UserModal' import styles from './user-toolbar.less' const UserToolbar = ({ mode, initUser, modalVisible, onShowAddModal, onHideModal, onCreate, onEdit, form, loading, message...
src/components/Loading/index.js
BeAce/expressjs-react-blog
import React from 'react'; import './index.css'; const Loading = () => (<div className="spinner"> <div className="rect1"></div> <div className="rect2"></div> <div className="rect3"></div> <div className="rect4"></div> <div className="rect5"></div> </div>); export default Loading;
src/containers/Root.js
LBenzahia/arabicstemmer_frontend
// TODO: integrating DevTools import React from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import App from './AppStem'; import DevTools from './DevTools'; const Root = ({}) => ( <MuiThemeProvider> <P...
src/components/passphrase/passphrase.js
LiskHQ/lisk-nano
import React from 'react'; import Input from 'react-toolbox/lib/input'; import grid from 'flexboxgrid/dist/flexboxgrid.css'; import styles from './passphrase.css'; import InfoParagraph from '../infoParagraph'; import PassphraseGenerator from './passphraseGenerator'; import PassphraseVerifier from './passphraseVerifier'...
examples/website/contour/app.js
uber-common/deck.gl
import React from 'react'; import {render} from 'react-dom'; import {StaticMap} from 'react-map-gl'; import DeckGL from '@deck.gl/react'; import {ContourLayer} from '@deck.gl/aggregation-layers'; const DATA_URL = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/contour/covid-by-county.json'; // ...
re-grid/src/index.js
NourEldin275/reGrid
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
frontend/src/components/eois/modals/deleteClarificationAnswer/deleteClarificationAnswerModal.js
unicef/un-partner-portal
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Typography } from 'material-ui'; import { withStyles } from 'material-ui/styles'; import PaddedContent from '../../../common/paddedContent'; import ControlledModal from '../../../common/modals/c...
src/app/components/Modal.js
vivekhnz/today-in-destiny
import React from 'react'; export default class Modal extends React.Component { constructor(props) { super(props); this.onClick = this.onClick.bind(this); } componentDidMount() { document.body.classList.toggle('noScroll', this.props.isOpen); } componentWillReceiveProps(new...
packages/material-ui-icons/src/Info.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" /></g> , 'Info');
node_modules/react-router/es/RouteUtils.js
furgat/sabertoot
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; }; import React from 'react'; function isValidChild(object) { ...
examples/real-world/index.js
nverba/redux
import 'babel-core/polyfill'; import React from 'react'; import Root from './containers/Root'; import BrowserHistory from 'react-router/lib/BrowserHistory'; React.render( <Root history={new BrowserHistory()} />, document.getElementById('root') );
daily-frontend/src/components/Orderer/OrdererList.js
zooyalove/dailynote
import React from 'react'; import { Scrollbars } from 'react-custom-scrollbars'; const renderThumb = ({style, ...props}) => { const thumbStyle = { backgroundColor: 'rgba(255, 255, 255, .65)', borderRadius: '2px' }; return ( <div style={{ ...style, ...thumbStyle }} {...props}/> ); }; const OrdererList ...
src/utils/children.js
mikedklein/material-ui
import React from 'react'; import createFragment from 'react-addons-create-fragment'; export default { create(fragments) { let newFragments = {}; let validChildrenCount = 0; let firstKey; //Only create non-empty key fragments for (let key in fragments) { const currentChild = fragments[key...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/PropsConstructorNoArgs.js
gabelevi/flow
// @flow import React from 'react'; class MyComponent extends React.Component { constructor() {} defaultProps: T; static state: T; a: T; b = 5; c: T = 5; method() {} } const expression = () => class extends React.Component { constructor() {} defaultProps: T; static state: T; a: T; ...
src/encoded/static/components/item-pages/QualityMetricView.js
hms-dbmi/fourfront
'use strict'; import React from 'react'; import _ from 'underscore'; import memoize from 'memoize-one'; import { console, object, schemaTransforms, valueTransforms } from '@hms-dbmi-bgm/shared-portal-components/es/components/util'; import { Collapse } from '@hms-dbmi-bgm/shared-portal-components/es/components/ui/Colla...
src/components/folderDialog.js
mintlin/foreman
import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; /** * A modal dialog can only be closed by selecting one of the actions. */ export default class DialogModal extends React.Component { construc...
src/InputGroupAddon.js
HPate-Riptide/react-bootstrap
import classNames from 'classnames'; import React from 'react'; import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; class InputGroupAddon extends React.Component { render() { const { className, ...props } = this.props; const [bsProps, elementProps] = splitBsProps(props); const ...
src/components/header/index.js
strongharris/Dashboard
import React from 'react'; export default ({ title }) => ( <h1>{title}</h1> );
app/src/index.js
neibarros/kanban_react
import React from 'react' import ReactDom from 'react-dom' import { Provider } from 'react-redux' import { Route } from 'react-router' import { ConnectedRouter } from 'react-router-redux' import Home from './containers/Home' import cfg from './store' import './index.scss' const store = cfg.configStore() ReactDom.re...
app/components/ReleaseTitle.js
jackokerman/react-discogs-dj
import React from 'react'; const ReleaseTitle = (props) => { const { artist, title, url } = props; const header = `${artist} - ${title}`; return ( <h3> <a href={url}>{header}</a> </h3> ); }; ReleaseTitle.propTypes = { artist: React.PropTypes.string.isRequired, title: React.PropTypes.string.i...
newclient/scripts/components/user/manual/manual-relation-dialog/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...
src/route/configureRoute.js
dvwzj-smcl/schedule
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import { UserAuthWrapper } from 'redux-auth-wrapper'; import { routerActions } from 'react-router-redux'; import App from '../components/App'; import HomePage from '../components/HomePage'; import CalendarPage from '../components/CalendarPage...
packages/cf-component-input/example/basic/component.js
jroyal/cf-ui
import React from 'react'; import { Input } from 'cf-component-input'; class InputComponent extends React.Component { constructor(props) { super(props); this.state = { inputValue: 'Hello World' }; this.handleChange = this.handleChange.bind(this); } handleChange(e) { const value = e.tar...
src/parser/hunter/shared/modules/features/TimeFocusCapped.js
fyruna/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import Icon from 'common/Icon'; import { formatPercentage } from 'common/format'; import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox'; import SPECS from 'game/SPECS'; import Tooltip from '...
src/svg-icons/action/card-travel.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCardTravel = (props) => ( <SvgIcon {...props}> <path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H...
shorten_my_link/client/components/header.js
tpechacek/learn-react-native
import React from 'react'; const Header = () => { return ( <nav className="nav navbar-default"> <div className="navbar-header"> <a className="navbar-brand" href="">ShortenMyLink</a> </div> </nav> ); }; export default Header;
js/components/button/block.js
ChiragHindocha/stay_fit
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text, H3 } from 'native-base'; import { Actions } from 'react-native-router-flux'; import { actions } from 'react-native-navigation-redux-helpers'; import { ope...
src/packages/@ncigdc/uikit/Banner/index.js
NCI-GDC/portal-ui
import React from 'react'; import Markdown from 'react-markdown'; import { compose, pure, setDisplayName, withPropsOnChange, } from 'recompose'; import Row from '@ncigdc/uikit/Flex/Row'; import BannerLink from './BannerLink'; import './styles.scss'; const levelToIcon = { error: <span className="fa fa-exclam...
demo/tooltip/tooltip.js
darkyen/react-mdl
import React from 'react'; import Icon from '../../src/Icon'; import Tooltip from '../../src/Tooltip'; class Demo extends React.Component { render() { return ( <div> <p>Simple tooltip</p> <Tooltip label="Follow"> <Icon name="add" /> ...
react-router/components/Application.js
jeffreywescott/flux-examples
/** * Copyright 2014, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ import React from 'react'; import Nav from './Nav'; import Timestamp from './Timestamp'; import ApplicationStore from '../stores/ApplicationStore'; import {connectToStores, provideContex...
web/src/components/Changelog.js
Ding-Jun/Analysis
/** * Created by admin on 2016/10/10. */ import React from 'react' import {Card, Timeline,Alert} from 'antd' class Changelog extends React.Component { render() { return ( <Card title="更新日志" bordered={false}> <Timeline> <Timeline.Item> <h2>V1.3.1</h2> <p>2016-03-30...
examples/react-native/index.android.js
natew/rxdb
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import { AppRegistry, } from 'react-native'; import React, { Component } from 'react'; import App from './src' AppRegistry.registerComponent('reactNative', () => App);
src/svg-icons/social/sentiment-neutral.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialSentimentNeutral = (props) => ( <SvgIcon {...props}> <path d="M9 14h6v1.5H9z"/><circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C1...
src/parser/shared/modules/resourcetracker/ResourceSuggest.js
sMteX/WoWAnalyzer
import React from 'react'; import { formatPercentage } from 'common/format'; import SpellLink from 'common/SpellLink'; function suggest(when, tracker, suggestion) { const tracked = tracker.buildersObj[suggestion.spell.id]; if (!tracked) { return; } const maxGenerated = tracked.generated + tracked.wasted; ...
examples/huge-apps/components/Dashboard.js
rubengrill/react-router
import React from 'react' import { Link } from 'react-router' class Dashboard extends React.Component { render() { const { courses } = this.props return ( <div> <h2>Super Scalable Apps</h2> <p> Open the network tab as you navigate. Notice that only the amount of you...
src/components/Table/TableTotals/TableTotals.stories.js
auth0-extensions/auth0-extension-ui
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import TableTotals from './'; storiesOf('TableTotals', module) .add('default view', () => { const field = { currentCount: 5, totalCount: 10 }; return (<TableTotals currentCount={field.currentCount} totalCount={...
src/packages/@ncigdc/modern_components/ProjectCounts/ProjectCountsExpStrategy.js
NCI-GDC/portal-ui
import React from 'react'; import { scaleOrdinal, schemeCategory20 } from 'd3'; import { compose, branch, renderComponent } from 'recompose'; import SummaryCard from '@ncigdc/components/SummaryCard'; import { makeFilter, mergeQuery } from '@ncigdc/utils/filters'; import Link from '@ncigdc/components/Links/Link'; import...
react-flux-mui/js/material-ui/src/svg-icons/av/fiber-dvr.js
pbogdan/react-flux-mui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberDvr = (props) => ( <SvgIcon {...props}> <path d="M17.5 10.5h2v1h-2zm-13 0h2v3h-2zM21 3H3c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h18c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zM8 13.5c0 .85-.65 1.5-1.5 1.5H3V9h3.5c.8...
packages/cf-component-modal/test/ModalBody.js
manatarms/cf-ui
import React from 'react'; import renderer from 'react-test-renderer'; import { ModalBody } from 'cf-component-modal'; test('should render', function() { const component = renderer.create(<ModalBody>ModalBody</ModalBody>); expect(component.toJSON()).toMatchSnapshot(); });
jenkins-design-language/src/js/components/material-ui/svg-icons/navigation/fullscreen.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const NavigationFullscreen = (props) => ( <SvgIcon {...props}> <path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/> </SvgIcon> ); NavigationFullscreen.displayName = 'NavigationFullscreen'; NavigationFullscreen...
react/features/base/react/components/web/SectionList.js
bgrozev/jitsi-meet
// @flow import React, { Component } from 'react'; import Container from './Container'; import type { Section } from '../../Types'; type Props = { /** * Rendered when the list is empty. Should be a rendered element. */ ListEmptyComponent: Object, /** * Used to extract a unique key for a ...
node_modules/react-bootstrap/es/MediaList.js
NickingMeSpace/questionnaire
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/components/common/WordImageWithSounds.js
serlo-org/serlo-abc
import { filter, identity } from 'ramda'; import React from 'react'; import loadImage from '../../assets/images'; import { PlaySounds } from '../helpers/PlaySounds'; import RoundImageWithButton from './RoundImageWithButton'; const speakerImage = loadImage['speaker'](); const doNothing = () => { // do nothing }; co...
src/containers/Profile/index.js
korabh/quran.com-frontend
import React, { Component } from 'react'; import * as customPropTypes from 'customPropTypes'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import Image from 'react-bootstrap/lib/Image'; import Tabs from 'react-bootstrap/lib/Tabs'; import Tab from 'react-...
fixtures/attribute-behavior/src/App.js
yiminghe/react
import React from 'react'; import {createElement} from 'glamor/react'; // eslint-disable-line /* @jsx createElement */ import {MultiGrid, AutoSizer} from 'react-virtualized'; import 'react-virtualized/styles.css'; import FileSaver from 'file-saver'; import { inject as injectErrorOverlay, uninject as uninjectError...
src/containers/Home/Home.js
unam3/oshop_i
import React from 'react'; import { Link } from 'react-router'; import Helmet from 'react-helmet'; const styles = {}; export default function() { require('./Home.css'); return ( <div className={styles.home}> <Helmet title="Oshop"/> <div className={styles.masthead}> <h1>Oshop</h1> ...
src/svg-icons/notification/phone-missed.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPhoneMissed = (props) => ( <SvgIcon {...props}> <path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71...
pkg/ui/src/components/ConfirmationDialog.js
matt-deboer/kuill
import React from 'react' import Dialog from 'material-ui/Dialog' import FlatButton from 'material-ui/FlatButton' import RaisedButton from 'material-ui/RaisedButton' import { grey300, grey800 } from 'material-ui/styles/colors' import { Link } from 'react-router-dom' export default class ConfirmationDialog extends Reac...
__tests__/index.ios.js
TimurAsayonok/ContentApplication
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 /> ); });
floodwatch/src/js/components/comparison_modal/CountrySelector.js
O-C-R/floodwatch
// @flow import React, { Component } from 'react'; import Autocomplete from 'react-autocomplete'; import CountryData from 'country-data'; import type { FilterRequestItem } from '../../api/types'; type Country = { name: string, alpha2: string, alpha3: string, status: 'assigned' | 'reserved' | 'user assigned' ...
docs/src/pages/components/slider/DiscreteSliderMarks.js
lgollut/material-ui
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import Slider from '@material-ui/core/Slider'; const useStyles = makeStyles((theme) => ({ root: { width: 300, }, margin: { height: theme.spacing(3), }, })); const ma...
test/NavbarSpec.js
omerts/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Navbar from '../src/Navbar'; import Nav from '../src/Nav'; describe('Nav', function () { it('Should create nav element', function () { let instance = ReactTestUtils.renderIntoDocument( <Navbar /> ); let nav = ...
src/Speed.js
adamjking3/react-typing-animation
import React from 'react'; const Speed = () => <noscript />; Speed.updateCursor = (cursor, { ms }) => { return { ...cursor, speed: ms, }; }; Speed.getName = () => 'Speed'; export default Speed;
assets/javascripts/archon.js
panli889/archon
import 'es5-shim'; import 'whatwg-fetch'; import _ from 'lodash'; window._ = _; import React from 'react'; import ReactDOM from 'react-dom'; import ArchonApp from './archon/App'; let domReady = () => { ReactDOM.render(<ArchonApp />, document.getElementById("archon")); } if (typeof document.onreadystatechange === "...
src/routes/contact/index.js
bigwaterconsulting/to_dash_live
/** * 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 Layout from '../../co...
src/layouts/CoreLayout/CoreLayout.js
gazab/togglol
import React from 'react' import Header from '../../components/Header' import classes from './CoreLayout.scss' import '../../styles/core.scss' export const CoreLayout = ({ children }) => ( <div className='container'> <Header /> <div className={classes.mainContainer}> {children} </div> </div> ) C...
src/components/TimePicker/Header.js
mberneti/react-datepicker2
import React from 'react'; import momentJalaali from 'moment-jalaali'; import PropTypes from 'prop-types'; class Header extends React.Component { static propTypes = { format: PropTypes.string, prefixCls: PropTypes.string, disabledDate: PropTypes.func, placeholder: PropTypes.string, name: PropType...
packages/next-codemod/transforms/__testfixtures__/add-missing-react-import/class-component.output.js
flybayer/next.js
import React from 'react' export default class Home extends React.Component { render() { return <div>Hello World</div> } }
packages/reactor-kitchensink/src/examples/DragAndDrop/Data/Data.js
sencha/extjs-reactor
import React, { Component } from 'react'; import { Panel } from '@extjs/ext-react'; import './styles.css'; Ext.require(['Ext.drag.*']); export default class Data extends Component { render() { return ( <Panel ref="mainPanel" padding={5} shadow...
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-bricks-language-selector.js
UnicornCollege/ucl.itkpd.configurator
import React from 'react'; import Environment from '../environment/environment.js'; import {BaseMixin, ElementaryMixin, ScreenSizeMixin, LsiMixin} from '../common/common.js'; import Dropdown from './dropdown.js'; import DropdownItem from './dropdown-item.js'; import Image from './image.js'; import {Div, Button, Modal...
src/javascript/components/top-bar.js
openfin/Hyperblotter
import React, { Component } from 'react'; import childWindow from './child-window'; import _ from 'underscore'; import fin from '../vendor/openfin'; const childWindowConfigBase = () => { return { autoShow: false, width: 350, maxWidth: 350, frame: false, maximizable: false, height: 594 / 3, ...
examples/fluxible-router/components/Page.js
pablolmiranda/fluxible
/** * Copyright 2014, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ import React from 'react'; import PageStore from '../stores/PageStore'; import { connectToStores } from 'fluxible-addons-react'; @connectToStores([PageStore], (context) => context.getSt...
Tutorial/ReactVersion/src/LoadingIndicatorComponent.js
tableau/extensions-api
import React from 'react'; import Spinner from 'react-spinkit'; import './styles/LoadingIndicator.css'; function LoadingIndicatorComponent (props) { return ( <div className='loadingIndicator'> <h3>{props.msg}</h3> <Spinner name='three-bounce' fadeIn='none' /> </div> ); } export default Loading...
src/components/Link/index.js
scottdj92/t7-chicken-native
import React, { Component } from 'react'; import { View, Text, ScrollView, Linking, StyleSheet } from 'react-native'; import { yellow, redSecondary } from '../../style/vars/colors'; // Link component const Link = ({url, name, textStyle, children}) => ( <Text style={[Styles.link, textStyle]} onPress={()=> Li...
src/svg-icons/action/assignment.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAssignment = (props) => ( <SvgIcon {...props}> <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-...
src/pages/GameNew/components/BasicGameInfo.js
iGameLab/teleport-client
import React from 'react' import PropTypes from 'prop-types' // import config from '../../../config' export default class UploadThumbnail extends React.Component{ static propTypes = { onSubmit: PropTypes.func.isRequired } constructor(){ super() this.state = { name...
src/containers/footer.js
MichalKononenko/OmicronClient
/** * Created by Michal on 2016-03-03. * Contains the website footer */ import React from 'react'; import github_logo from '../../static/img/GitHub-Mark-64px.png'; import {github_repo_url, waffle_url, esdoc_url} from '../../master_config'; import {Panel} from 'react-bootstrap'; import waffle_logo from "../../static/...
app/components/ListItem/index.js
jwarning/react-ci-test
import React from 'react'; import Item from './Item'; import Wrapper from './Wrapper'; function ListItem(props) { return ( <Wrapper> <Item> {props.item} </Item> </Wrapper> ); } ListItem.propTypes = { item: React.PropTypes.any, }; export default ListItem;
src/lib/Sprd.js
constantoduol/Sprd
import React from 'react'; import {merge} from 'lodash'; import Mousetrap from 'mousetrap'; import connectToStores from 'alt-utils/lib/connectToStores'; import {Map} from 'immutable'; import Footer from './components/Footer'; import HeaderContainer from './components/HeaderContainer'; import CellContainer from './comp...
functional-tests/app/client/hoc/components/Routes.js
reimagined/resolve
import React from 'react' import { Route, Redirect, Switch } from 'react-router' const Routes = ({ path, component: Component, routes, exact, redirectTo }) => { if (redirectTo) { return <Redirect from={path} to={redirectTo} /> } return routes ? ( <Route path={path} exact={exact} render...