path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
client/src/components/systems/Container.js
DjLeChuck/recalbox-manager
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import { grep, translatableConf, save } from '../../api'; import { promisifyData, cancelPromises } from '../../utils'; import Systems from './Systems'; class SystemContainer extends Component { st...
assets/javascripts/archon/pages/AppDetailPage.js
panli889/archon
import React from 'react'; import {History} from 'react-router'; import * as AppActions from '../models/actions/Apps'; import MDL from '../components/MdlComponents'; import AppSummaryCard from '../components/AppSummaryCard'; import CreateAppCard from '../components/CreateAppCard'; import AppProcDetailCard from '../com...
src/components/Header/index.js
jahammo2/portfolio-web_client
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './index.scss'; import MenuBar from '../../components/MenuBar'; import { Link } from 'react-router'; const propTypes = { children: PropTypes.node, handleOpenSideBar: PropTypes.func, sideBarShown: PropTypes.func, sideBarShowing...
src/svg-icons/content/text-format.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentTextFormat = (props) => ( <SvgIcon {...props}> <path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/> </SvgIcon> ); ContentTextFormat = pure(C...
react/src/components/dashboard/tools/toolsTxPush.js
pbca26/EasyDEX-GUI
import React from 'react'; import translate from '../../../translate/translate'; import addCoinOptionsCrypto from '../../addcoin/addcoinOptionsCrypto'; import addCoinOptionsAC from '../../addcoin/addcoinOptionsAC'; import Select from 'react-select'; import { triggerToaster, copyString, apiToolsBalance, apiTools...
src/svg-icons/content/send.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentSend = (props) => ( <SvgIcon {...props}> <path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/> </SvgIcon> ); ContentSend = pure(ContentSend); ContentSend.displayName = 'ContentSend'; ContentSend.muiName = ...
app/scripts/TilesetFinder.js
hms-dbmi/higlass
import React from 'react'; import PropTypes from 'prop-types'; import slugid from 'slugid'; import CheckboxTree from 'react-checkbox-tree'; import { tileProxy } from './services'; import '../styles/TilesetFinder.css'; import withPubSub from './hocs/with-pub-sub'; // Configs import { TRACKS_INFO } from './configs'; ...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/DefaultPropsInferred.js
mroch/flow
// @flow import React from 'react'; class MyComponent extends React.Component { static defaultProps = {}; props: Props; defaultProps: T; static props: T; static state: T; a: T; b = 5; c: T = 5; method() {} } const expression = () => class extends React.Component { static defaultProps = {}; ...
sms_sponsorship/webapp/src/components/Message.js
maxime-beck/compassion-modules
import React from 'react'; export default class extends React.Component { render() { let styles = { loadingContainer: { verticalAlign: 'middle', marginTop: '120px', textAlign: 'center' }, loadingTextContainer: { ...
src/layouts/index.js
H3yfinn/finbarmaunsell.com
import React from 'react' import PropTypes from 'prop-types' import Link from 'gatsby-link' import Helmet from 'react-helmet' import './index.css' const Header = () => ( <div style={{ background: '#2452c2', marginBottom: '1.45rem', }} > <div style={{ display: '-ms-flexbox', ...
src/components/EditCheckInItem/messages.links.js
transitlinks/web-app
import React from 'react'; import { defineMessages } from 'react-intl'; export default defineMessages({ 'links-title': { id: 'account.links.linksTitle', defaultMessage: 'User links', description: 'User links' } });
src/svg-icons/action/track-changes.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionTrackChanges = (props) => ( <SvgIcon {...props}> <path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s...
frontend/src/components/controls/SidebarUI/index.js
webrecorder/webrecorder
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { dispatchEvent, inStorage, getStorage, setStorage } from 'helpers/utils'; import Resizable from 'components/Resizable'; import './style.scss'; class SidebarUI extends Component { static prop...
packages/ringcentral-widgets-docs/src/app/pages/Components/AlertDisplay/Demo.js
u9520107/ringcentral-js-widget
import React from 'react'; // eslint-disable-next-line import AlertDisplay from 'ringcentral-widgets/components/AlertDisplay'; import styles from './styles.scss'; const props = {}; props.dismiss = () => null; props.currentLocale = 'en-US'; props.messages = [ { id: '111', level: 'success', message: 'succe...
js/components/deckswiper/index.js
LetsBuildSomething/vmag_mobile
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Image, View } from 'react-native'; import { Container, Header, Title, Button, IconNB, DeckSwiper, Card, CardItem, Icon, Thumbnail, Text, Left, Right, Body, Content } from 'native-base'; import { openDrawer } from '../../actions/...
examples/3-complex/src/login/index.js
chikara-chan/react-power
import React from 'react' import { render } from 'react-dom' import { AppContainer } from 'react-hot-loader' import App from './components/App' function renderHTML() { render( <AppContainer> <App /> </AppContainer>, document.getElementById('root') ) } renderHTML() if (module.hot) { module.hot...
app/components/IssueIcon/index.js
Zurico/t7
import React from 'react'; function IssueIcon(props) { return ( <svg height="1em" width="0.875em" className={props.className} > <path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v...
src/Main/PlayerSelecter.js
enragednuke/WoWAnalyzer
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import ReactTooltip from 'react-tooltip'; import { getReport } from 'selectors/report'; import { getCombatants } from 'selectors/combatants'; import PlayerSelec...
entry_types/scrolled/package/spec/frontend/inlineEditing-spec.js
codevise/pageflow
import React from 'react'; import '@testing-library/jest-dom/extend-expect' import {render} from '@testing-library/react' jest.mock('frontend/inlineEditing/components', () => ({ TestDecorator({text, children}) { return <div>{text} Decorator<div>{children}</div></div>; }, TestAlternative({text, children}) {...
app/App.js
albybarber/blackpanda
import React from 'react' import Hello from './components/hello/hello' import Grid from './components/grid/grid' // import IconPage from './atoms/icons/docs/IconPage' export default class App extends React.Component { render () { return ( <div> <Hello /> <grid /> </div> ) } }...
node_modules/react-bootstrap/es/DropdownToggle.js
chenjic215/search-doctor
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/server/html.js
matystl/shopping_list
import React from 'react'; export default class Html extends React.Component { render() { // Only for production. For dev, it's handled by webpack with livereload. const linkStyles = this.props.isProduction && <link href={`/build/app.css?v=${this.props.version}`} rel="stylesheet" ...
app/routes.js
ayqy/ready-to-work
import React from 'react'; import { Switch, Route } from 'react-router'; import MainPage from './containers/MainPage'; import LoginPage from './containers/LoginPage'; import HistoryPage from './containers/HistoryPage'; import SettingPage from './containers/SettingPage'; export default ( <Switch> <Route exact pa...
src/components/RestaurantList.js
rgdelato/instantly-lunch
import React, { Component } from 'react'; import { TransitionMotion, spring } from 'react-motion'; import RestaurantItem from '../containers/RestaurantItem'; import RestaurantAdd from '../containers/RestaurantAdd'; export default class RestaurantList extends Component { constructor (props) { super(props); this...
src/App.js
michael-lowe-nz/trigMeOnce
import React, { Component } from 'react'; import Main from './components/Main' import Nav from './components/Nav' class App extends Component { render() { return ( <div className="App"> <Nav /> <Main state={this.props.state} dispatch={this.props.dispatch}/> </div> ) } } export...
src/containers/DevTools.js
oldsaratov/postcards-spa
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; export default createDevTools( <DockMonitor toggleVisibilityKey='ctrl-h' changePositionKey='ctrl-q' > <LogMonitor /> </...
code/workspaces/web-app/src/components/common/buttons/PrimaryActionButton.spec.js
NERC-CEH/datalab
import React from 'react'; import { render } from '@testing-library/react'; import PrimaryActionButton from './PrimaryActionButton'; describe('PrimaryActionButton', () => { it('overrides variant and color props', () => { const props = { variant: 'contained', color: 'secondary' }; expect(render(<PrimaryAction...
examples/03 Nesting/Drag Sources/Container.js
longlho/react-dnd
import React, { Component } from 'react'; import SourceBox from './SourceBox'; import TargetBox from './TargetBox'; import Colors from './Colors'; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd-html5-backend'; @DragDropContext(HTML5Backend) export default class Container extends Compo...
src/js/Root.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Router, Route, applyRouterMiddleware } from 'react-router'; import { useScroll } from 'react-router-scroll'; import App from './App'; import HomePage from './pages/HomePage'; import AnswerUsernamePage from './pages/AnswerUsernamePag...
src/page/Contacts.js
munyrasirio/mss-chat
import React, { Component } from 'react'; import { StyleSheet, Text, View, Image, TouchableOpacity, FlatList } from 'react-native'; import { Menu, Name, MenuItem, Contact } from '../component'; import logo from '../img/icon.png'; import avatar2 from '../img/avatar2.jpg'; import avatar1 from '../img/avatar1.jpg'; exp...
react-router/components/Routes.js
JonnyCheng/flux-examples
import React from 'react'; import { DefaultRoute, Route } from 'react-router'; import Application from './Application'; import Home from './Home'; import About from './About'; const routes = ( <Route name="app" path="/" handler={Application}> <Route name="about" handler={About}/> <DefaultRoute name...
src/Parser/DeathKnight/Blood/Modules/Features/WastedDeathAndDecay.js
enragednuke/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import AbilityTracker from 'Parser/Core/Modules/AbilityTracker'; import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox'; import Combatants from 'Parser/Core/Mo...
src/cms/preview-templates/post-preview.js
bapti/blog
// @flow strict import React from 'react'; import type { Entry, WidgetFor } from '../../types'; type Props = { entry: Entry, widgetFor: WidgetFor }; const PostPreview = ({ entry, widgetFor }: Props) => { const body = widgetFor('body'); const title = entry.getIn(['data', 'title']); return ( <div classNa...
src/parser/priest/shadow/modules/spells/Dispersion.js
sMteX/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import Analyzer from 'parser/core/Analyzer'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import calculateMaxCasts from 'parser/core/calculateMaxCasts'; import Voidform from './Voidform'; const DISPERSION_...
step7-unittest/node_modules/react-router/es6/Lifecycle.js
jintoppy/react-training
'use strict'; import warning from './routerWarning'; import React from 'react'; import invariant from 'invariant'; var object = React.PropTypes.object; /** * The Lifecycle mixin adds the routerWillLeave lifecycle method to a * component that may be used to cancel a transition or prompt the user * for confirmation...
app/pages/resource/resource-header/ResourceHeader.js
fastmonkeys/respa-ui
import PropTypes from 'prop-types'; import React from 'react'; import Button from 'react-bootstrap/lib/Button'; import Grid from 'react-bootstrap/lib/Grid'; import { FormattedNumber } from 'react-intl'; import round from 'lodash/round'; import injectT from '../../../i18n/injectT'; import FavoriteButton from '../../../...
src/components/articles.js
mazairaj/thejulianmaz
import React from 'react'; const Articles = function () { return ( <div style={{ backgroundColor: 'orange', flex: 1 }}> <h1>My Articles</h1> </div> ); }; export default Articles;
client/views/room/contextualBar/RoomFiles/components/FileItemIcon.stories.js
VoiSmart/Rocket.Chat
import React from 'react'; import FileItemIcon from './FileItemIcon'; export default { title: 'room/contextualBar/RoomFiles/FileItemIcon', component: FileItemIcon, }; const options = [ '', 'application/vnd.ms-excel', 'audio', 'video', 'application/msword', 'application/x-zip-compressed', 'application/pdf', ...
redux/js/todo/containers/RouteVisibleTodoList.js
quiaro/js-playground
import React, { Component } from 'react'; import { connect } from 'react-redux' import { withRouter } from 'react-router'; import * as actions from '../actions/todo' import TodoList from '../components/TodoList' import FetchTodosError from '../components/errors/FetchTodosError' import { getVisibleServerTodos, getIsFet...
docs/src/app/components/pages/components/TimePicker/ExampleInternational.js
rhaedes/material-ui
import React from 'react'; import TimePicker from 'material-ui/TimePicker'; const TimePickerInternational = () => ( <div> <TimePicker hintText="Custom Labels" okLabel="确定" cancelLabel="取消" /> </div> ); export default TimePickerInternational;
client/router.js
bmathews/menubar-calendar
import React from 'react'; import { render } from 'react-dom'; import { Router, Route, hashHistory } from 'react-router'; import App from './app.js'; render(( <Router history={hashHistory}> <Route path="/" component={App} /> </Router> ), document.getElementById('react-root'));
js/jqwidgets/demos/react/app/scheduler/resourceswithcustomcolumnwidths/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js'; class App extends React.Component { componentDidMount () { this.refs.myScheduler.ensureAppointmentVisible('id1'); } render () { let appointments = new Arr...
packages/cf-component-label/example/basic/component.js
jroyal/cf-ui
import React from 'react'; import { Label } from 'cf-component-label'; const LabelComponent = () => ( <p> <Label type="default">Default</Label> <Label type="info">Info</Label> <Label type="success">Success</Label> <Label type="warning">Warning</Label> <Label type="error">Error</Label> </p> ); ...
src/client/story_box.js
xieyunzi/hacker-menu
import React from 'react' import _ from 'lodash' import Client from 'electron-rpc/client' import StoryList from './story_list.js' import Spinner from './spinner.js' import Menu from './menu.js' import StoryType from '../model/story_type' export default class StoryBox extends React.Component { constructor (props) { ...
test/specs/views/Item/ItemImage-test.js
koenvg/Semantic-UI-React
import React from 'react' import ItemImage from 'src/views/Item/ItemImage' import * as common from 'test/specs/commonTests' describe('ItemImage', () => { common.implementsCreateMethod(ItemImage) it('renders Image component', () => { shallow(<ItemImage />) .should.have.descendants('Image') }) it('i...
client/src/javascript/components/general/SortableList.js
stephdewit/flood
import classnames from 'classnames'; import {DragDropContext} from 'react-dnd'; import {injectIntl} from 'react-intl'; import HTML5Backend from 'react-dnd-html5-backend'; import React from 'react'; import SortableListItemDragLayer from './SortableListItemDragLayer'; import SortableListItem from './SortableListItem'; ...
demo/src/DataTables.js
kiloe/ui
import React from 'react'; import Doc from './Doc'; import View from '../../package/View'; export default class DataTables extends React.Component { //[ { id: 232, dessert: 'Bakewell tart', type: 'pastry' }, { id: 111, dessert: 'Chocolate Sundae', type: 'ice cream' }, { id: 9, dessert: 'Soggy biscuit', type: 'past...
frontend/app/js/components/rules_v2/edit/addnode.js
serverboards/serverboards
import React from 'react' import i18n from 'app/utils/i18n' function AddNode(props){ const {AddNode, gotoStep, onUpdate, id, section, addNode} = props console.log(props) let input_id="AddNode_"+id.join("_") return ( <div className="ui extend with padding"> <h2 className="ui centered header"> ...
packages/react-scripts/fixtures/kitchensink/src/index.js
gutenye/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. */ import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById(...
examples/with-webpack-bundle-analyzer/pages/index.js
giacomorebonato/next.js
import React from 'react' import Link from 'next/link' export default class Index extends React.Component { static getInitialProps ({ req }) { if (req) { // Runs only in the server const faker = require('faker') const name = faker.name.findName() return { name } } // Runs only in...
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/__tests__/Popover.spec.js
GoogleCloudPlatform/prometheus-engine
import React from 'react'; import { mount } from 'enzyme'; import Popover from '../Popover'; describe('Tooltip', () => { it('should apply popperClassName to popper component', () => { const div = document.createElement('div'); div.setAttribute("id", "tooltip-target"); document.body.appendChild(div); ...
examples/todomvc/containers/Root.dev.js
calesce/redux-slider-monitor
import React from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import TodoApp from './TodoApp'; import DevTools from './DevTools'; const Root = ({ store }) => ( <Provider store={store}> <div> <TodoApp /> <DevTools /> </div> </Provider> ); Root.propTypes ...
src/app/containers/SubmitButton.js
pingwing/travel-guide-las-palmas
import React from 'react'; import {Component} from 'react'; export default class SubmitButton extends Component { render() { return ( <button className="submit">Submit</button> ) } }
app/containers/PartnerPage/index.js
openactive/open-sessions
import React from 'react'; import Banner from '../../components/Banner'; import Button from '../../components/Button'; import styles from './styles.css'; export default class PartnerPage extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return (<div className={styles.p...
src/containers/Home/index.js
hasibsahibzada/quran.com-frontend
import React, { Component } from 'react'; import * as customPropTypes from 'customPropTypes'; import styled from 'styled-components'; import Helmet from 'react-helmet'; import IndexHeader from 'components/IndexHeader'; import cookie from 'react-cookie'; import { asyncConnect } from 'redux-connect'; import { connect } f...
src/components/Feedback/Feedback.js
lycandjava/react-starter-kit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback { render() { return ( <div className="Feedback"> <div className="Feedba...
node_modules/react-bootstrap/es/Checkbox.js
cmccandless/SolRFrontEnd
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/icons/GlyphCalendar.js
ipfs/webui
import React from 'react' const GlyphCalendar = props => ( <svg viewBox='0 0 100 100' {...props}> <path d='M73.09 22.24h-5.43v-1.69a3.8 3.8 0 0 0-7.59 0v1.69H39.93v-1.69a3.8 3.8 0 0 0-7.59 0v1.69h-5.43a6.65 6.65 0 0 0-6.64 6.64v47.71a6.66 6.66 0 0 0 6.64 6.65h46.18a6.66 6.66 0 0 0 6.64-6.65V28.88a6.65 6.65 0 0 0...
Libraries/Image/ImageBackground.js
Guardiannw/react-native
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
src/docs/components/chart/MarkerDoc.js
karatechops/grommet-docs
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import Chart, { Base, Marker, Layers } from 'grommet/components/chart/Chart'; import Anchor from 'grommet/components/Anchor'; import DocsArticle from '../../../components/DocsArticle'; import BackControl from...
src/components/common/alert.js
lq782655835/ReactDemo
import React from 'react'; import { Modal, Alert } from 'antd'; import OrderDetail from '../isdbooking/components/orderdetail'; let QRCode = require('qrcode.react'); class CtripAlert { constructor(){ } show(title='this is title', content='this is content'){ this.showModelLayer(title, content); } showWinXi...
src/svg-icons/content/clear.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentClear = (props) => ( <SvgIcon {...props}> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> </SvgIcon> ); ContentClear = pure(ContentClea...
src/svg-icons/action/flight-takeoff.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionFlightTakeoff = (props) => ( <SvgIcon {...props}> <path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-....
examples/todomvc-react/src/index.js
Anaphalis/ds
import React from 'react' import { render } from 'react-dom' import App from './containers/App' import 'todomvc-app-css/index.css' render( <App />, document.getElementById('root') )
src/@ui/RelatedContent/RelatedContentWithoutData.js
NewSpring/Apollos
import React from 'react'; import { View } from 'react-native'; import PropTypes from 'prop-types'; import { compose, pure, setPropTypes, defaultProps, branch, withProps } from 'recompose'; import { times } from 'lodash'; import { Link } from '@ui/NativeWebRouter'; import { getLinkPath, getItemImages } from '@utils/co...
__tests__/index.android.js
atixlabs/atm-mobileapp
import 'react-native'; import React from 'react'; import Index from '../index.android.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/index.js
tobias2801/app_gestoria
import './sass/main.scss'; import React from 'react'; import ReactDOM from 'react-dom'; import Main from './MainComposition'; let elemToRender = document.querySelector('#main-container'); ReactDOM.render( <Main />, elemToRender );
source/containers/Accounts.js
mpalmer685/DebtPayoffCalculator
import React from 'react' import { Grid, Row, Col } from 'react-bootstrap' import { connect } from 'react-redux' import Account from 'models/Account' import validateAccount from 'models/AccountFormValidation' import { updateForm, resetForm, addAccount, deleteAccount } from 'actions/AccountActionCreators' import { Accou...
src/components/__tests__/general/error-test.js
elarasu/roverz-chat
/** * Test to check if the component renders correctly */ /* global it expect */ import { Alert } from 'react-native'; import React from 'react'; import renderer from 'react-test-renderer'; import Error from '@components/general/Error'; it('Error renders correctly', () => { const tree = renderer.create( <Erro...
examples/star-wars/js/app.js
SBUtltmedia/relay
/** * This file provided by Facebook is for non-commercial 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, * FITNES...
src/app/components/forms/editors/Summernote.js
backpackcoder/world-in-flames
import React from 'react' import 'script-loader!summernote/dist/summernote.min.js' export default class Summernote extends React.Component { componentDidMount() { $(this.refs.editor).summernote({ height: this.props.height || 270 }) } componentWillUnmount() { $(this.refs.editor).summernote('de...
src/js/About.js
vincentleung1/PersonalPage
import React, { Component } from 'react'; import '../css/ContentStyle.css'; class About extends Component { render() { return ( <div className="content-body"> <h1 className="title"> About me </h1> <div className="about"> <p> I am a new Software Engineering (B...
src/components/AboutPage.spec.js
rafurr/react-material-ui-components
import React from 'react'; import {shallow} from 'enzyme'; import {expect} from 'chai'; import AboutPage from './AboutPage'; describe('<AboutPage />', () => { it('should have a header called \'About\'', () => { const wrapper = shallow(<AboutPage />); const actual = wrapper.find('h2').text(); const expect...
src/layouts/CoreLayout/CoreLayout.js
weixing2014/iTodo
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 text-center'> <Header /> <div className={classes.mainContainer}> {children} </div> ...
blueocean-material-icons/src/js/components/svg-icons/device/battery-charging-full.js
jenkinsci/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const DeviceBatteryChargingFull = (props) => ( <SvgIcon {...props}> <path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13 7v5.5h2L11 20z"/> </SvgIco...
test/helpers/shallowRenderHelper.js
harrydu2014/gallery-by-react
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
src/__tests__/LoadProgressBar.spec.js
video-react/video-react
import React from 'react'; import { shallow, mount } from 'enzyme'; import LoadProgressBar from '../components/control-bar/LoadProgressBar'; describe('LoadProgressBar', () => { it('should render with "div" tag', () => { const wrapper = mount( <LoadProgressBar buffered={{ length: 1, ...
js/components/App/index.js
mxstbr/postcss.parts
import React, { Component } from 'react'; import withRouter from 'react-router/lib/withRouter'; import { connect } from 'react-redux'; import Wrapper from './Wrapper'; import Header from '../Header'; import PluginList from '../PluginList'; import SearchField from '../SearchField'; import ListHeading from '../ListHeadi...
src/helpers/__tests__/getDataDependencies-test.js
captainill/react-redux-universal-hot-example
import { expect } from 'chai'; import React from 'react'; import { div } from 'react-dom'; import getDataDependencies from '../getDataDependencies'; describe('getDataDependencies', () => { let getState; let dispatch; let location; let params; let CompWithFetchData; let CompWithNoData; let CompWithFetchDa...
node_modules/npm/docs/src/components/seo.js
giovannic/giovannic.github.com
/** * SEO component that queries for data with * Gatsby's useStaticQuery React hook * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ import React from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import { useStaticQuery, graphql } from 'gatsby' function SEO ({ descript...
code/fluxible-isomorphic/components/ResetButton.js
DJCordhose/react-playground
import React from 'react'; export default class ResetButton extends React.Component { render() { return ( <button onClick={this.props.resetHandler}>Clear </button> ); } }
pootle/static/js/admin/components/Project/ProjectEdit.js
Finntack/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 React from 'react'; import ProjectForm from './Pro...
node_modules/react-router/es/Router.js
Sweetgrassbuffalo/ReactionSweeGrass-v2
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; }; function _classCallCheck(instance, Constructor) { if (!(insta...
src/layouts/CoreLayout/CoreLayout.js
Lily418/Realtime-News-Client
import React from 'react' import Header from '../../components/Header' import './CoreLayout.scss' import '../../styles/core.scss' export const CoreLayout = ({ children }) => ( <div className='container text-center'> <Header /> <div className='core-layout__viewport'> {children} </div> </div> ) Co...
src/Components/ShowParkingDetailsModal.js
gourie/ParkingPlaza
/* * Author: Joeri Nicolaes * version: alpha */ import React from 'react'; import { Button, Modal } from 'react-bootstrap'; /** * React Component: ShowParkingDetailsModal */ export default class ShowParkingDetailsModal extends React.Component { /** * Standard ES6 method */ constructor(props) ...
src/views/components/RoomsScreen.js
physiii/open-automation
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import {compose} from 'redux'; import {Switch, Redirect} from 'react-router-dom'; import {Route, withRoute} from './Route.js'; import NavigationScreen from './NavigationScreen.js'; import List from './List.js'; import Bl...
src/main/app/src/component/DetailView/DetailView.js
p632-sp-2017/microservice-catalog-frontend
import React from 'react'; import './DetailView.css'; import ServiceTable from './ServiceTable' /** * Component to display all fields of a microservice * @param {[type]} serviceDetails [description] */ const DetailView = (serviceDetails) => { let detailHtml = []; let data = serviceDetails; let keys = Object....
examples/huge-apps/app.js
levjj/react-router
import React from 'react'; import { Router } from 'react-router'; import stubbedCourses from './stubs/COURSES'; var rootRoute = { component: 'div', childRoutes: [{ path: '/', component: require('./components/App'), childRoutes: [ require('./routes/Calendar'), require('./routes/Course'), ...
frontend/test/app/containers/LoadingPage-test.js
mozilla/testpilot
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import LoadingPage from '../../../src/app/containers/LoadingPage'; describe('app/containers/LoadingPage', () => { const subject = shallow(<LoadingPage />); it('should render expected default content', () => { expect(s...
src/DetailsSection/CardList/TableBody.js
conferenceradar/list
import React from 'react'; import { ListWrapper } from './styles'; import NoResults from '../NoResults'; const CustomTableBody = ({ rowIds, Row, className }) => ( <ListWrapper> { (!rowIds || rowIds.size === 0) && <NoResults /> } { rowIds && rowIds.map(r => <Row key={r} griddleKey={r} />) } </ListWrapper> )...
app/javascript/spec/ops-tenant-form/ops-tenant-form.spec.js
ManageIQ/manageiq-ui-classic
import React from 'react'; import { act } from 'react-dom/test-utils'; import fetchMock from 'fetch-mock'; import { mount } from '../helpers/mountForm'; import OpsTenantForm from '../../components/ops-tenant-form/ops-tenant-form'; import MiqFormRenderer from '../../forms/data-driven-form'; import miqRedirectBack from '...
docs/app/Examples/elements/Segment/Groups/SegmentExamplePiledSegments.js
vageeshb/Semantic-UI-React
import React from 'react' import { Segment } from 'semantic-ui-react' const SegmentExamplePiledSegments = () => ( <Segment.Group piled> <Segment>Top</Segment> <Segment>Middle</Segment> <Segment>Bottom</Segment> </Segment.Group> ) export default SegmentExamplePiledSegments
src/components/Home/Banner.js
tilgram/tilgram-frontend
import React from 'react'; const Banner = ({ appName, token }) => { if (token) { return null; } return ( <div className="banner"> <div className="container"> <h1 className="logo-font"> {appName.toLowerCase()} </h1> <p>A place to share your knowledge.</p> </di...
src/svg-icons/image/vignette.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageVignette = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"/> </SvgIcon>...
src/svg-icons/device/bluetooth-disabled.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBluetoothDisabled = (props) => ( <SvgIcon {...props}> <path d="M13 5.83l1.88 1.88-1.6 1.6 1.41 1.41 3.02-3.02L12 2h-1v5.03l2 2v-3.2zM5.41 4L4 5.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l4.29-4.29 2.3 2.29...
docs/src/pages/premium-themes/onepirate/modules/withRoot.js
lgollut/material-ui
import React from 'react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import theme from './theme'; export default function withRoot(Component) { function WithRoot(props) { return ( <ThemeProvider theme={theme}> {/* CssBaseline ...
src/components/Footer/index.js
sioked/ecomchicago
import React from 'react'; import { Footer as BFooter, Container, Columns, Column, Title, Content, } from 'bloomer'; import content from '../../constants/content'; function Footer() { return ( <BFooter> <Container> <Columns> <Column isSize="1/2"> <Title isSize="6"...
tests/components/InterstitialMessage/InterstitialMessage.spec.js
nicklee1990/CompanyIdeas
import React from 'react' import { Navigation } from 'components/Navigation/Navigation' import { IndexLink, Link } from 'react-router' import { shallow } from 'enzyme' import style from 'components/Navigation/Navigation.scss' describe('(Component) InterstitialMessage', () => { let _wrapper beforeEach(() => { ...
src/svg-icons/maps/local-bar.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalBar = (props) => ( <SvgIcon {...props}> <path d="M21 5V3H3v2l8 9v5H6v2h12v-2h-5v-5l8-9zM7.43 7L5.66 5h12.69l-1.78 2H7.43z"/> </SvgIcon> ); MapsLocalBar = pure(MapsLocalBar); MapsLocalBar.displayName ...
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js
zipongo/react-router
/*globals COURSES:true */ import React from 'react' import { Link } from 'react-router' class AnnouncementsSidebar extends React.Component { render() { let { announcements } = COURSES[this.props.params.courseId] return ( <div> <h3>Sidebar Assignments</h3> <ul> {announcements....