path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/components/modal-form.js
beniblc/Recipe-box
import React, { Component } from 'react'; import {Button, ButtonGroup, Modal, FormControl} from 'react-bootstrap'; import update from 'immutability-helper'; class ModalForm extends Component { constructor(props) { super(props); this.state={ showModal: false, title: '', ...
frontend/src/containers/DesktopSettings/DesktopSettings.js
webrecorder/webrecorder
import React from 'react'; import { asyncConnect } from 'redux-connect'; import { load as loadAuth } from 'store/modules/auth'; import { load as loadUser, updateUser } from 'store/modules/user'; import DesktopSettingsUI from 'components/siteComponents/DesktopSettingsUI'; const preloadData = [ { promise: ({ st...
definitions/npm/@reach/dialog_v0.2.x/flow_v0.84.x-/test_dialog_v0.2.x.js
splodingsocks/FlowTyped
// @flow import React from 'react'; import { Dialog, DialogContent, DialogOverlay } from '@reach/dialog'; import { it, describe } from 'flow-typed-test'; describe('@reach/dialog', () => { describe('Dialog', function () { it('accepts isOpen flag', function () { <Dialog isOpen>foo</Dialog>; // $FlowEx...
testClient/components/CurrStats.js
DougCal/ServerHive
import React from 'react'; import Bar from './Bar'; const normalizeBars = (keys, currStats) => { let divisor = 1; for (let i = 0; i < keys.length; i += 1) { // console.log('yo', currStats[keys[i]]); if (currStats[keys[i]] > 75 && currStats[keys[i]] / 75 > divisor) divisor = Math.floor(currStats[keys[i]] / ...
src/entypo/ChevronSmallLeft.js
cox-auto-kc/react-entypo
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--ChevronSmallLeft'; let EntypoChevronSmallLeft = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M12.141,13.418c0.268,0.271,0.268,0.709,0,0.978c-0.268,0.27-0.701,0.272-0.969,0l-3...
src/app.js
kangseoncho/Dear-Diary
import React, { Component } from 'react'; import Book from './book.js'; import axios from 'axios'; import moment from 'moment'; class App extends Component { constructor() { super(); this.state = { title: "", user: document.cookie.slice(5), entry: "", date: "" }; this.updateTi...
docs/app/Examples/elements/Label/Types/LabelExampleTag.js
ben174/Semantic-UI-React
import React from 'react' import { Label } from 'semantic-ui-react' const LabelExampleTag = () => ( <div> <Label as='a' tag>New</Label> <Label as='a' color='red' tag>Upcoming</Label> <Label as='a' color='teal' tag>Featured</Label> </div> ) export default LabelExampleTag
docs/app/Examples/collections/Form/States/FormExampleLoading.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Button, Form, Input } from 'semantic-ui-react' const FormExampleLoading = () => ( <Form loading> <Form.Input label='Email' placeholder='joe@schmoe.com' /> <Button>Submit</Button> </Form> ) export default FormExampleLoading
src/main/resources/static/main-noie.js
beeant0512/springboot-react-uxcore-ie8
/** * CANNOT use `import` to import `react` or `react-dom`, * because `import` will run `react` before `require('es5-shim')`. */ // import React from 'react'; // import ReactDOM from 'react-dom'; require('uxcore/assets/blue.css'); const React = require('react'); const ReactDOM = require('react-dom'); const Request...
src/svg-icons/av/equalizer.js
verdan/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvEqualizer = (props) => ( <SvgIcon {...props}> <path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"/> </SvgIcon> ); AvEqualizer = pure(AvEqualizer); AvEqualizer.displayName = 'AvEqualizer'; AvEqualizer...
app/routes.js
JoraCardan/MailBuilder
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import FilterableTable from './containers/FilterableTable'; import About from './components/About'; export default ( <Route path="/" component={App}> <IndexRoute component={FilterableTable} /> <Route p...
client/src/components/Explorer/ExplorerItem.js
nealtodd/wagtail
import PropTypes from 'prop-types'; import React from 'react'; import { ADMIN_URLS, STRINGS } from '../../config/wagtailConfig'; import Icon from '../../components/Icon/Icon'; import Button from '../../components/Button/Button'; import PublicationStatus from '../../components/PublicationStatus/PublicationStatus'; // ...
src/components/Events/Events.js
griffsauce/SportsStats
import React from 'react' import EventItems from '../../components/EventItems/EventItems' type Props = { }; export class Events extends React.Component { props: Props; render () { console.log(this.props) return ( <ul> {this.props.game.events.map((item) => { return( <EventItem...
packages/bonde-admin/src/components/title/title.js
ourcities/rebu-client
import PropTypes from 'prop-types' import React from 'react' import classnames from 'classnames' var styles = require('exenv').canUseDOM ? require('./title.scss') : {} const Title = ({ children, size, className }) => ( <span className={classnames(styles[`is-${size}`], className)}> {children} </span> ) Title....
src/containers/PokemonList.js
rodrigo-puente/poke-nostalgia
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchPokedex } from '../actions/Pokedex'; import PokemonList from '../components/Pokedex/PokemonList'; class PokemonListContainer extends Component { componentDidMount() { this.props.fetchPokedex(2); } render() { ...
docs/src/app/components/pages/components/Divider/ExampleForm.js
andrejunges/material-ui
import React from 'react'; import Divider from 'material-ui/Divider'; import Paper from 'material-ui/Paper'; import TextField from 'material-ui/TextField'; const style = { marginLeft: 20, }; const DividerExampleForm = () => ( <Paper zDepth={2}> <TextField hintText="First name" style={style} underlineShow={fal...
step07c_redux_connect_to_ui/src/index.js
panacloud/learn-react
import React from 'react'; import ReactDOM from 'react-dom'; import App from './containers/app/App'; import './index.css'; import { createStore } from 'redux' import { Provider } from 'react-redux' //value is state, but we need to use state property in component // that's why i have changed variable name here functi...
imports/startup/client/router.js
keenethics/pelorus
import { Meteor } from 'meteor/meteor'; import React from 'react'; import { FlowRouter } from 'meteor/kadira:flow-router'; import Pelorus from '/imports/ui/Pelorus'; import { render } from 'react-dom'; FlowRouter.route('/', { subscriptions() { this.register('Stages', Meteor.subscribe('Stages')); }, name: 'pe...
app/javascript/mastodon/features/video/index.js
cobodo/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { is } from 'immutable'; import { throttle, debounce } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../...
examples/auth-with-shared-root/components/Login.js
rdjpalmer/react-router
import React from 'react' import auth from '../utils/auth.js' const Login = React.createClass({ contextTypes: { router: React.PropTypes.object }, getInitialState() { return { error: false } }, handleSubmit(event) { event.preventDefault() const email = this.refs.email.value c...
src/components/name.js
lucasflores/lucasflores.github.io
import React from 'react' import styled, { css } from 'styled-components' const Base = styled.a` font-size: 20pt; font-family: 'Pacifico', cursive; color: #fff; margin: 20px 0; width: fit-content; white-space: nowrap; transition-property: transform; transition-duration: 0.8s; &:hover { cursor: p...
app/components/slider/SingleSlider.js
Hirico/supic
/** * Created by wshwbluebird on 2017/8/3. */ import React, { Component } from 'react'; import { Slider, Icon, Row, Col } from 'antd'; import styles from './SingleSlider.css'; class SingleSlider extends Component { constructor(props) { super(props); this.state = { value: 1 }; } /** * deal...
src/applications/static-pages/health-care-manage-benefits/view-test-and-lab-results-page/components/App/index.unit.spec.js
department-of-veterans-affairs/vets-website
// Dependencies. import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; // Relative imports. import AuthContent from '../AuthContent'; import UnauthContent from '../UnauthContent'; import { App } from './index'; describe('Get Medical Records Page <App>', () => { it('renders what ...
node_modules/react-sparklines/src/SparklinesLine.js
TheeSweeney/ComplexReactReduxMiddlewareReview
import React from 'react'; export default class SparklinesLine extends React.Component { static propTypes = { color: React.PropTypes.string, style: React.PropTypes.object }; static defaultProps = { style: {} }; render() { const { points, width, height, margin, col...
modules/__tests__/isActive-test.js
rubengrill/react-router
import expect from 'expect' import React from 'react' import { render, unmountComponentAtNode } from 'react-dom' import createHistory from 'history/lib/createMemoryHistory' import IndexRoute from '../IndexRoute' import Router from '../Router' import Route from '../Route' import qs from 'qs' describe('isActive', functi...
sampleone/src/index.js
arunkumar-s/react-training
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('reactroot')); registerServiceWorker();
lavalab/html/node_modules/react-bootstrap/es/CarouselItem.js
LavaLabUSC/usclavalab.org
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 ...
app/javascript/mastodon/features/follow_recommendations/components/account.js
Ryanaka/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import { makeGetAccount } from 'mastodon/selectors'; import Avatar from 'mastodon/compone...
src/svg-icons/action/list.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionList = (props) => ( <SvgIcon {...props}> <path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/> </SvgIcon> ); ActionList = pure(ActionList); ActionList.displa...
src/components/welcome.js
mdunnegan/ReactFrontEndAuthentication
import React, { Component } from 'react'; import { connect } from 'react-redux'; class Welcome extends Component { render() { if (this.props.authenticated) { return <div>Thanks for being a part of this experiment!</div> } else { return <div>Welcome to DrumKernel! Log in or create an account to st...
src/client.js
TodoWishlist/TodoWishlist
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 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 'babel-polyfill'; import React from 'react'; import...
src/components/charts/charts/table/tbody.js
noahehall/udacity-corporate-dashboard
import React from 'react'; import Tr from './tr.js'; export const Tbody = ({ data, id }) => { const rows = []; data.forEach((datum, idx) => rows.push(<Tr fields={datum} id={id} idx={idx} key={`row${id}${idx}`} />)); return ( <tbody> {rows} </tbody> ); }; Tbody.propTypes= { d...
node_modules/react-router/es6/RouteUtils.js
Zach417/churchetto-web
'use strict'; 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; }; export { isReactChildren }; export { createRou...
src/components/seo.js
mnbbrown/mnbbrown.github.io
/** * 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({ descr...
example/examples/ImageOverlayWithAssets.js
zigbang/react-native-maps
import React, { Component } from 'react'; import { StyleSheet, View, Dimensions, } from 'react-native'; import MapView from 'react-native-maps'; import flagPinkImg from './assets/flag-pink.png'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 35.679976;...
src/components/rows/presentation/EmployerPhoneContribution.js
hikurangi/day-rate-calculator
import React from 'react'; import { TableRow, TableRowColumn } from '@material-ui/core/Table'; const EmployerPhoneContribution = ({ style, phoneContribution }) => { return ( <TableRow> <TableRowColumn> <h3>Employer yearly cellphone contribution</h3> </TableRowColumn> <TableRowC...
ui/js/router.js
beni55/spigo
'use strict'; import React from 'react'; import Router from 'ampersand-router'; import SimianViz from 'simianviz'; import FourOhFour from 'four-oh-four'; import indexOf from 'lodash.indexof'; const archs = ['fsm', 'migration', 'netflixoss', 'lamp']; export default Router.extend({ routes: { '': 'default', ':arch...
src/components/ReplOutputArray.js
antonyr/Mancy
import React from 'react'; import _ from 'lodash'; import ReplOutput from '../common/ReplOutput'; import ReplOutputObject from './ReplOutputObject'; import ReplCommon from '../common/ReplCommon'; export default class ReplOutputArray extends React.Component { constructor(props) { super(props); this.state = { ...
examples/index.js
ikanedo/react-redux-simple-validate
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import store from './basicStore'; import BasicForm from './basicForm'; import BasicFormGroup from './formGroupAsync/basicFormGroup'; ReactDOM.render( <Provider store={store}> <BasicForm name="Basic" /> </Provid...
app/javascript/flavours/glitch/components/avatar_overlay.js
im-in-space/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { autoPlayGif } from 'flavours/glitch/util/initial_state'; export default class AvatarOverlay extends React.PureComponent { static propTypes = { account: ImmutablePropTypes.map.isReq...
fields/types/name/NameColumn.js
cermati/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; import displayName from 'display-name'; var NameColumn = React.createClass({ displayName: 'NameColumn', propTypes: { col: React.PropTypes.object, data: React.Pr...
components/ViroButton.js
viromedia/viro
/** * Copyright (c) 2017-present, Viro Media, 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. * * @provid...
app/components/views/todo-item.js
joawan/todo-ui-react
import React from 'react'; import style from 'todomvc-app-css/index.css'; import classNames from 'classnames'; function TodoItem(props) { return ( <li className={ classNames({ [style.completed]: props.todo.done }) }> <div className={style.view}> <input type="checkbox" checked={p...
app/jsx/navigation_header/MobileGlobalMenu.js
djbender/canvas-lms
/* * Copyright (C) 2015 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas 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, version 3 of the License. * * Canvas is distribut...
src/main/resources/ui/components/JobEditor.js
motusllc/chronos
import React from 'react' import { observer } from 'mobx-react' import JobForm from '../models/JobForm' import Select from 'react-select' import $ from 'jquery' $(document).ready(function() { $('.collapse').on('shown.bs.collapse', function() { $(this).parent().find('.glyphicon-chevron-down').removeClass('glyphic...
src/svg-icons/hardware/keyboard.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareKeyboard = (props) => ( <SvgIcon {...props}> <path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v...
actor-apps/app-web/src/app/components/ActivitySection.react.js
Rogerlin2013/actor-platform
import React from 'react'; import classNames from 'classnames'; import { ActivityTypes } from 'constants/ActorAppConstants'; //import ActivityActionCreators from 'actions/ActivityActionCreators'; import ActivityStore from 'stores/ActivityStore'; import UserProfile from 'components/activity/UserProfile.react'; import...
tests/views/HomeView.spec.js
availabs/kauffman-atlas
import React from 'react' import TestUtils from 'react-addons-test-utils' import { bindActionCreators } from 'redux' import { HomeView } from 'views/HomeView/HomeView' import { mount } from 'enzyme' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) retur...
test/withFullWidth.ava.js
ohtake/sanrio-wardrobe
import React from 'react'; import PropTypes from 'prop-types'; import test from 'ava'; import { mount } from 'enzyme'; import withFullWidth from '../src/withFullWidth'; /** @test {withFullWidth} */ test('withFullWidth should set default width prop and pass other props', t => { let widthReceived = 0; function Com...
fields/types/html/editor/base/editing-bt.js
nickhsine/keystone
import React from 'react'; export default ({ onClick }) => { return ( <i className="fa fa-pencil-square-o" onClick={onClick} style={{ position: 'absolute', fontSize: '50px', top: 0, bottom: 0, left: 0, right: 0, width: '55px', height: '50px', margin: 'auto', backgroundColor: '#FFF', ...
node_modules/react-bootstrap/es/BreadcrumbItem.js
FoxMessenger/nyt-react
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 ...
packages/@lyra/form-builder/src/inputs/BlockEditor/nodes/Span.js
VegaPublish/vega-studio
// @flow import type { BlockContentFeatures, SlateValue, Type, SlateChange, Marker } from '../typeDefs' import type {Node} from 'react' import React from 'react' import {Inline} from 'slate' import {FOCUS_TERMINATOR} from '../../../utils/pathUtils' import styles from './styles/Span.css' type Props = { a...
actor-apps/app-web/src/app/components/dialog/MessagesSection.react.js
bradparks/actor-platform___im_client_cross_platform
import React from 'react'; import _ from 'lodash'; import VisibilityStore from 'stores/VisibilityStore'; import MessageActionCreators from 'actions/MessageActionCreators'; import MessageItem from 'components/common/MessageItem.react'; let _delayed = []; let flushDelayed = () => { _.forEach(_delayed, (p) => { ...
src/shared/element-react/dist/npm/es6/src/select/Option.js
thundernet8/Elune-WWW
import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import React from 'react'; import { Component, PropTypes, View } from '../../libs'; var Option = function...
examples/todomvc/index.js
Bjvanminnen/redux-devtools
import React from 'react'; import App from './containers/App'; import 'todomvc-app-css/index.css'; React.render( <App />, document.getElementById('root') );
Js/Skeleton/Modules/UserAccount/UserAccountForm.js
Webiny/Webiny
import React from 'react'; import Webiny from 'webiny'; import TwoFactorAuthConfirmation from './Components/TwoFactorAuthConfirmation'; /** * @i18n.namespace Webiny.Skeleton.UserAccount */ class UserAccount extends Webiny.Ui.View { constructor(props) { super(props); this.bindMethods('twoFactorA...
node_modules/rc-table/es/ExpandIcon.js
yhx0634/foodshopfront
import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import React from 'react'; import PropTypes ...
src/Collapse.js
bvasko/react-bootstrap
import React from 'react'; import Transition from 'react-overlays/lib/Transition'; import domUtils from './utils/domUtils'; import CustomPropTypes from './utils/CustomPropTypes'; import deprecationWarning from './utils/deprecationWarning'; import createChainedFunction from './utils/createChainedFunction'; let capitali...
Example/index.android.js
rayshih/react-native-image-picker
import React from 'react'; import { AppRegistry } from 'react-native'; import App from './App'; class Example extends React.Component { render() { return ( <App /> ); } } AppRegistry.registerComponent('Example', () => Example);
client/modules/App/components/Footer/Footer.js
thanhdatvo/tuoihoctro.react
import React from 'react'; import { FormattedMessage } from 'react-intl'; // Import Style import styles from './Footer.css'; // Import Images import bg from '../../header-bk.png'; export function Footer() { return ( <div className={styles.footer} style={{ background: `#FFF url(${bg}) center` }}> <div > ...
app/javascript/mastodon/components/__tests__/display_name-test.js
maa123/mastodon
import React from 'react'; import renderer from 'react-test-renderer'; import { fromJS } from 'immutable'; import DisplayName from '../display_name'; describe('<DisplayName />', () => { it('renders display name + account name', () => { const account = fromJS({ username: 'bar', acct: 'bar@baz', ...
tests/components/GlobalMenu.spec.js
franferdez/fuga-challenge
import React from 'react' import GlobalMenu from 'components/GlobalMenu/GlobalMenu' describe('(Component) GlobalMenu', () => { it('should exist', () => { }) })
admin/client/App/screens/List/components/Filtering/ListFiltersAddForm.js
brianjd/keystone
import React from 'react'; import { findDOMNode } from 'react-dom'; import Popout from '../../../../shared/Popout'; import { Filters } from 'FieldTypes'; var ListFiltersAddForm = React.createClass({ propTypes: { field: React.PropTypes.object.isRequired, maxHeight: React.PropTypes.number, onApply: React.PropTyp...
src/App/shared/obj.Block/index.js
ProvoJS/i-choose-you
/*** @jsx React.DOM */ import React from 'react' const BASE_STYLE = { block: { display: 'block', }, head: { verticalAlign: 'middle', marginLeft: 'auto', marginRight: 'auto', display: 'inline-block' }, body: { display: 'block', textAlign: 'left' } } const SPACING = { flush: '0...
src/containers/DevTools/DevTools.js
leifdalan/vega-june
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 /> </D...
app/javascript/mastodon/features/bookmarked_statuses/index.js
Nyoho/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from '../../actions/bookmarks'; import Column from '../ui/components/column'; import ColumnHeader...
test/e2e/prerender/pages/something.js
zeit/next.js
import React from 'react' import Link from 'next/link' import { useRouter } from 'next/router' export async function getStaticProps({ params }) { return { props: { world: 'world', params: params || {}, time: new Date().getTime(), random: Math.random(), }, revalidate: false, } } ...
homepage/src/App.js
dirathea/ytschatbot
import React, { Component } from 'react'; import { Switch, Route } from 'react-router-dom'; import { MuiThemeProvider, createMuiTheme } from 'material-ui'; import * as firebase from 'firebase'; // Required for side-effects import 'firebase/firestore'; import './App.css'; import HomePage from "./pages/HomePage"; import ...
client/analytics/components/partials/filter/popUps/FilterItemRoute.js
Haaarp/geo
import React from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {filter} from './../../../../actions'; import ToggleButtonList from 'konux/common/components/ToggleButtonList'; class RouteList extends React.Component { onClick(route) { const isRouteSelected =...
src/components/toggleButton.js
auth0/webtask-widget
import React from 'react'; import 'styles/toggleButton.less'; export default class ToggleButton extends React.Component { constructor(props) { super(props); this.state = { id: 'a0-toggle-' + ToggleButton.seq++, checked: !!props.checked, }; } re...
app/javascript/mastodon/components/column_back_button_slim.js
abcang/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import ColumnBackButton from './column_back_button'; import Icon from 'mastodon/components/icon'; export default class ColumnBackButtonSlim extends ColumnBackButton { render () { return ( <div className='column-back-button--slim'> ...
client/src/App.js
FCC-Alumni/alumni-network
import './styles/App.css'; import '../node_modules/flag-icon-css/css/flag-icon.css'; import AppContainer from './components/AppContainer'; import FlashMessagesList from './components/flash/FlashMessagesList'; import HomePage from './components/HomePage'; import LoginPage from './components/signup/LoginPage'; import Na...
src/ckeditor.js
codeslayer1/react-ckeditor
import React from 'react'; import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; const loadScript = require('load-script'); var defaultScriptUrl = 'https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js'; /** * @author codeslayer1 * @description CKEditor component to render a CKEditor textarea with def...
js/jqwidgets/demos/react/app/toolbar/nonminimizabletools/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxToolBar from '../../../jqwidgets-react/react_jqxtoolbar.js'; import JqxWindow from '../../../jqwidgets-react/react_jqxwindow.js'; class App extends React.Component { render () { let tools = 'toggleButton toggleButton toggleButton | tog...
src/svg-icons/notification/airline-seat-flat-angled.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatFlatAngled = (props) => ( <SvgIcon {...props}> <path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19....
stories/liqen-line.js
CommonActionForum/liqen-face
import React from 'react' import { storiesOf } from '@storybook/react' // import { action } from '@storybook/addon-actions' import LiqenLine from '../client/components/lists/liqen-line' storiesOf('Liqen Line', module) .add('basic usage', () => ( <LiqenLine answer={[ { tag: { ...
js/App/Components/TabViews/SubViews/DeviceHeader.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or *...
src/server.js
splashapp/starterkit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import 'babel/polyfill'; import _ from 'lodash'; import fs from 'fs'; import path from 'path'; import express from 'express'; import React from 'react'; import './core/Dispatcher'; import './stores/AppStore'; import db from './core/Database'; imp...
pkg/users/accounts-list.js
martinpitt/cockpit
/* * This file is part of Cockpit. * * Copyright (C) 2020 Red Hat, Inc. * * Cockpit is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any l...
src/index.js
JamesBliss/react-flickity
import React, { Component } from 'react'; import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; import PropTypes from 'prop-types'; let Flickity; if (canUseDOM) { Flickity = require('flickity'); Flickity.prototype._createResizeClass = function() { this.element.classList.add('flickity-resize'); }; F...
test/unit/testHelper.js
richbai90/CS2810
import jq from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import ReactTestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import createHistory from 'react-router/lib/browserHistory'; import { Provider...
src/utils/text-to-paragraphs.js
sievins/sarahs-footsteps
import React from 'react' export default text => () => ( <div> { text.split('\n\n').map(paragraph => ( <p key={paragraph}>{paragraph}</p> )) } </div> )
tests/routes/Counter/components/Counter.spec.js
loliver/anz-code-test
import React from 'react' import { bindActionCreators } from 'redux' import { Counter } from 'routes/Counter/components/Counter' import { shallow } from 'enzyme' describe('(Component) Counter', () => { let _props, _spies, _wrapper beforeEach(() => { _spies = {} _props = { counter : 5, ...bindA...
src/index.js
bayo-jsc/fb-hackathon-2016
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery' window.$ = $ window.jQuery = $ import { Router, Route, hashHistory } from 'react-router' import 'materialize-css' import App from './App'; import 'materialize-css/dist/css/materialize.min.css' import './css/style.css' ReactDOM.rend...
src/containers/user-center/about-us/ContributorProfile.js
phodal/growth-ng
import React from 'react'; import { Linking, ScrollView } from 'react-native'; import { List, ListItem } from 'react-native-elements'; import AppStyle from '../../../theme/styles'; import Label from '../../../components/Label'; const profileItemRenders = { github: value => ( <ListItem key="github" ti...
src/components/menu.js
victormoya/lavergeweb
import React from 'react'; class Menu extends React.PureComponent { render() { return ( <div className="only-desktop"> <ul className="list"> <li className="list__item"> <a href="/" className="line"></a> <a href=...
actor-apps/app-web/src/app/components/dialog/MessagesSection.react.js
JamesWatling/actor-platform
import React from 'react'; import _ from 'lodash'; import VisibilityStore from '../../stores/VisibilityStore'; import MessageActionCreators from '../../actions/MessageActionCreators'; import MessageItem from '../common/MessageItem.react'; let _delayed = []; let flushDelayed = () => { _.forEach(_delayed, (p) => ...
client/canx-client/src/views/Logo.js
uros-stegic/canx
import React from 'react' function Logo() { return ( <div> <figure> <img src="static/img/logo_white_on_transparent.png" alt="CANX" className="logo"/> </figure> </div> ) } export default Logo
lib/components/MapPolygon.js
parkling/react-native-maps
import PropTypes from 'prop-types'; import React from 'react'; import { ViewPropTypes, } from 'react-native'; import decorateMapComponent, { USES_DEFAULT_IMPLEMENTATION, SUPPORTED, } from './decorateMapComponent'; const propTypes = { ...ViewPropTypes, /** * An array of coordinates to describe the polygon...
ajax/libs/recompose/0.20.1/Recompose.js
dc-js/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); else if(typeof exports === 'object') exports["Recompose"] = facto...
boilerplates/app/src/routes/dashboard/components/user.js
hexagonframework/antd-admin-cli
import React from 'react' import PropTypes from 'prop-types' import { Button } from 'antd' import CountUp from 'react-countup' import styles from './user.less' import { color } from '../../../utils' const countUpProps = { start: 0, duration: 2.75, useEasing: true, useGrouping: true, separator: ',', } functi...
test/server/ModalSpec.js
PeterDaveHello/react-bootstrap
import React from 'react'; import {assert} from 'chai'; import Modal from '../../src/Modal.js'; describe('Modal', () => { it('Should be rendered on the server side', function () { let noOp = () => {}; assert.doesNotThrow(function renderOnServerSide() { return React.renderToString( <Modal onHid...
frontend/src/pages/admin/AdminCustomersPage.js
jirkae/BeerCheese
import React from 'react'; import { Container, Button, Table, Jumbotron } from 'reactstrap'; import localizedTexts from '../../text_localization/LocalizedStrings'; import { connect } from 'react-redux'; import { openModal } from '../../actions/openModal'; import api from '../../api'; class AdminCustomersPage extends R...
settings.js
vohoailen/prework-repo
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Picker, TouchableOpacity, AsyncStorage, Navigator } from 'react-native'; export default class Setting extends Component { constructor(props){ super(props); this.state = { sceneTransition: 0 }; ...
frontend/src/components/navigation/PackageCreationNav.js
jirkae/BeerCheese
import React, { Component } from 'react'; import { Link } from 'react-router'; import { Row, Col, Button, NavLink, Nav, ButtonGroup } from 'reactstrap'; import localizedTexts from '../../text_localization/LocalizedStrings'; const links = [ { name: localizedTexts.PackageCreationNav.beer, link: "/create-packag...
src/components/theme/material-ui/MSearch.js
GigaTables/reactables
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styles from '../../../css/styles.css'; import TextField from '@material-ui/core/TextField'; import classNames from 'classnames/bind'; const Lang = require('../../Lang'); const classes = theme => ({ container: { display: '...
js/signin/src/index.js
fogfish/oauth2
import React from 'react' import ReactDOM from 'react-dom' import App from './app' ReactDOM.render(<App />, document.getElementById('root'))
__tests__/components/TodoList.js
epicsharp/react-boilerplate
jest.unmock('components/TodoList/TodoList') jest.unmock('components/Spinner') import React from 'react' import { shallow } from 'enzyme' import { ListGroup } from 'react-bootstrap' import TodoList from 'components/TodoList/TodoList' import Spinner from 'components/Spinner/Spinner' describe('<TodoList />', () => { ...
src/components/thumbnail/index.js
MichaelQQ/Oyasumi
import React from 'react'; import PropTypes from 'prop-types'; const Thumbnail = ({ ...props }) => { const { thumbnail } = props; return ( <div className="thumbnail"> <div className="thumbnail-img"> <img src={thumbnail.imgsrc} alt={thumbnail.name} /> </div> <div className="thumbnail...
packages/web/src/components/range/MultiRange.js
appbaseio/reactivesearch
import React, { Component } from 'react'; import { updateQuery, setQueryOptions, setCustomQuery } from '@appbaseio/reactivecore/lib/actions'; import hoistNonReactStatics from 'hoist-non-react-statics'; import { isEqual, checkValueChange, checkSomePropChange, getClassName, updateCustomQuery, getOptionsFromQuery, ...