path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
dapp/src/shared/components/common/spin/index.js
airalab/DAO-IPCI
import React from 'react' import styles from './style.css' const Spin = props => ( (<div className={props.btn ? styles.spinner + ' ' + styles['spinner-btn'] : styles.spinner}> <div className={styles.bounce1} /> <div className={styles.bounce2} /> <div className={styles.bounce3} /> </div>) ) export defa...
src/components/listen/components/timer.js
cannoneyed/tmm-glare
import React from 'react' import classnames from 'classnames' let { PropTypes, Component } = React class Timer extends Component { static prettyTime(time) { let hours = Math.floor(time / 3600) let mins = '' + Math.floor((time % 3600) / 60) let secs = '0' + Math.floor((time % 60)) mins = mins.substr...
src/client/components/hoc/Recommender/withInteractionsToPids.hoc.js
DBCDK/content-first
import React from 'react'; import {connect} from 'react-redux'; import withPidsToPids from './withPidsToPids.hoc'; /** * A HOC that makes the enhanced component download recommendations using * the recent interactions from the logged in user. * * @param {React.Component} WrappedComponent The component to be enhanc...
src/Chip/index.js
szchenghuang/react-mdui
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import ClassNames from 'classnames'; import Delete from './Delete'; import Icon from './Icon'; import Title from './Title'; class Chip extends React.Component { render() { const { className, children, styleIcon, ...
pages/versions/v20.0.0/sdk/svg.js
ccheever/expo-docs
import markdown from 'markdown-in-js' import withDoc, { components } from '~/lib/with-doc' import { expoteam } from '~/data/team' import SnackEmbed from '~/components/plugins/snack-embed' // prettier-ignore export default withDoc({ title: 'Svg', authors: [expoteam], })(markdown(components)` ### Expo.Svg() A ...
app/javascript/mastodon/features/ui/components/column_header.js
primenumber/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; export default class ColumnHeader extends React.PureComponent { static propTypes = { icon: PropTypes.string, type: PropTypes.string, active: PropTypes.bool, ...
src/svg-icons/action/home.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHome = (props) => ( <SvgIcon {...props}> <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/> </SvgIcon> ); ActionHome = pure(ActionHome); ActionHome.displayName = 'ActionHome'; ActionHome.muiName = 'SvgIcon...
node_modules/react-navigation/lib-rn/views/Transitioner.js
RahulDesai92/PHR
import React from 'react'; import { Animated, StyleSheet, View } from 'react-native'; import invariant from 'fbjs/lib/invariant'; import NavigationScenesReducer from './ScenesReducer'; import TransitionConfigs from './TransitionConfigs'; var babelPluginFlowReactPropTypes_proptype_NavigationTransitionSpec = require(...
src/svg-icons/action/favorite.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionFavorite = (props) => ( <SvgIcon {...props}> <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6...
src/containers/LanguageProvider/index.js
alimek/scrum-poker-react
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { IntlProvider } from 'react-intl'; class LanguageProvider extends React.Component { render() { return ( <IntlProvider locale={this.props.locale} messages={this.props.messages[this.props.locale]}> ...
src/components/search-page/PostContainer.js
CodeDraken/IdeaZone
import _ from 'lodash'; import React from 'react'; import Post from './Post'; // container for all the stickies const PostContainer = (props) => { // const startAddFavorite = (ID) => { // console.log('post container starting to add favorite'); // props.handleAddFavorite(ID); // } // color classes, add...
src/svg-icons/social/cake.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialCake = (props) => ( <SvgIcon {...props}> <path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l...
form/HiddenField.js
ExtPoint/yii2-frontend
import React from 'react'; export default class HiddenField extends React.Component { render() { return null; } }
src/index.js
mikecanann/grid
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('root')); registerServiceWorker();
packages/giu-examples/components/playLogin.js
guigrpa/giu
/* eslint-disable */ import React from 'react'; import { Floats, TextInput, PasswordInput } from '../src'; const Component = class extends React.Component { // componentDidMount() { // setTimeout(() => { // this.refUserName && this.refUserName._blur(); // this.refPassword && this.refPassword._blur()...
example/src/screens/transitions/sharedElementTransitions/Cards/Cards.js
yusufyildirim/react-native-navigation
import React from 'react'; import {ScrollView, TouchableHighlight, StyleSheet, Image, Text, View, ScrolView} from 'react-native'; import {SharedElementTransition} from 'react-native-navigation'; const IMAGE_HEIGHT = 190; class CardScreen extends React.Component { goToCard = (index) => { this.props.navigator.pu...
app/imports/ui/admin/LoginWarning.js
raiden-network/raiden-token
import React, { Component } from 'react'; export default class LoginWarning extends Component { render() { let { account } = this.props; return account ? null : React.createElement('div', {}, React.createElement('span', {}, 'Log in with MetaMask') ) } }
fields/types/number/NumberFilter.js
vokal/keystone
import React from 'react'; import { findDOMNode } from 'react-dom'; import { Form, FormField, FormInput, FormSelect, Grid, } from '../../../admin/client/App/elemental'; const MODE_OPTIONS = [ { label: 'Exactly', value: 'equals' }, { label: 'Greater Than', value: 'gt' }, { label: 'Less Than', value: 'lt' }, { ...
src/svg-icons/device/battery-charging-30.js
spiermar/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryCharging30 = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v9.17h2L13 7v5.5h2l-1.07 2H17V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M11 20v-5.5H7...
docs/src/app/components/pages/components/FontIcon/ExampleSimple.js
mtsandeep/material-ui
import React from 'react'; import FontIcon from 'material-ui/FontIcon'; import {blue500, red500, greenA200} from 'material-ui/styles/colors'; const iconStyles = { marginRight: 24, }; const FontIconExampleSimple = () => ( <div> <FontIcon className="muidocs-icon-action-home" style={iconStyles} /...
src/svg-icons/notification/event-note.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationEventNote = (props) => ( <SvgIcon {...props}> <path d="M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v...
example/v9.x.x/react-icu/src/ComponentUsingMacro.js
i18next/react-i18next
import React from 'react'; import { withNamespaces } from 'react-i18next'; // importing the macro components from react-i18next import { Trans, Plural, Select } from 'react-i18next/icu.macro'; // as we "bend" some es-lint rules we need to disable those // this let us write "{ trainersCount, number }" or "{ catchDate,...
docs/src/app/components/pages/components/LinearProgress/Page.js
skarnecki/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import linearProgressReadmeText from './README'; import LinearProgressExampleSim...
examples/query-params/app.js
littlefoot32/react-router
import React from 'react'; import { Router, Route, Link } from 'react-router'; var User = React.createClass({ render() { var { query } = this.props.location; var age = query && query.showAge ? '33' : ''; var { userID } = this.props.params; return ( <div className="User"> <h1>User id: {u...
app/javascript/mastodon/features/status/components/detailed_status.js
anon5r/mastonon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import StatusContent from '../../../components/status_content'; import MediaGallery from...
frontend/src/Components/Menu/PageMenuButton.js
lidarr/Lidarr
import PropTypes from 'prop-types'; import React from 'react'; import Icon from 'Components/Icon'; import MenuButton from 'Components/Menu/MenuButton'; import styles from './PageMenuButton.css'; function PageMenuButton(props) { const { iconName, indicator, text, ...otherProps } = props; return (...
local-cli/generator/templates/index.ios.js
hayeah/react-native
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; class <%= name %> extends Component { render() { return ( <View style={styles.container}> <T...
lib/views/git-timings-view.js
atom/github
import {TextBuffer} from 'atom'; import {Emitter, CompositeDisposable} from 'event-kit'; import {remote} from 'electron'; const {dialog} = remote; import React from 'react'; import ReactDom from 'react-dom'; import PropTypes from 'prop-types'; import memoize from 'lodash.memoize'; import fs from 'fs-extra'; import Oct...
src/client/spinner.js
jingweno/hacker-menu
import React from 'react' export default class Spinner extends React.Component { render () { return ( <div className='spinner'> Loading... </div> ) } }
client/components/Single.js
iamcaleberic/smoke-signal
import React from 'react'; import Photo from './Photo'; import Comments from './Comments'; const Single = React.createClass({ render(){ // index of post const { postId } = this.props.params; const i = this.props.posts.findIndex((post) => post.code === postId); const post = this.props.posts[i]; ...
mobile_app/index.android.js
youennPennarun/agorask
// @flow import './src/utils/Reactotron'; import React from 'react'; import { AppRegistry, } from 'react-native'; import App from './src/components/App'; export default function agorask(): Object { return <App />; } AppRegistry.registerComponent('agorask', (): string => agorask);
src/Assignments/DeleteForm.js
esharp054/SwimmingFishWeb
import React, { Component } from 'react'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; import MenuItem from 'material-ui/MenuItem'; const styles = { buttonStyle: { marginBottom: 12, marginTop: 12 }, dropStyle: { width: '100%', ...
packages/node_modules/@cerebral/react/src/Container.js
cerebral/cerebral
import React from 'react' import PropTypes from 'prop-types' import { throwError } from 'cerebral' import { DEPRECATE } from 'cerebral/internal' class Container extends React.Component { getChildContext() { const { app, controller } = this.props if (controller) { DEPRECATE( 'Container', ...
src/pages/admin/CustomersRepeatAdminPage.js
ihenvyr/react-app
import React from 'react'; import Helmet from 'react-helmet'; import { withRouter } from 'react-router'; const CustomersRepeatAdminPage = () => { return ( <div> <Helmet title="Repeat Customers - Admin" meta={[ { name: "description", content: "Repeat Customers - Admin" } ...
es/components/UserList/UserRow.js
welovekpop/uwave-web-welovekpop.club
import _jsx from "@babel/runtime/helpers/builtin/jsx"; import cx from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; import Avatar from '../Avatar'; import Username from '../Username'; var UserRow = function UserRow(_ref) { var className = _ref.className, user = _ref.user; retur...
node_modules/antd/es/form/FormItem.js
ZSMingNB/react-news
import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possib...
actor-apps/app-web/src/app/components/sidebar/ContactsSection.react.js
yaoliyc/actor-platform
import _ from 'lodash'; import React from 'react'; import { Styles, RaisedButton } from 'material-ui'; import ActorTheme from 'constants/ActorTheme'; import ContactStore from 'stores/ContactStore'; import ContactActionCreators from 'actions/ContactActionCreators'; import AddContactStore from 'stores/AddContactStore'...
blueprints/smart/files/__root__/containers/__name__/__name__.js
LaunchAcademy/name-game
import React from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' type Props = { } export class <%= pascalEntityName %> extends React.Component { props: Props; render () { return ( <div></div> ) } } const mapStateToProps = (state) => { return {} } const...
examples/huge-apps/components/GlobalNav.js
stanleycyang/react-router
import React from 'react'; import { Link } from 'react-router'; const styles = {}; class GlobalNav extends React.Component { static defaultProps = { user: { id: 1, name: 'Ryan Florence' } }; constructor (props, context) { super(props, context); this.logOut = this.logOut.bind(this);...
src/components/video_list_item.js
scepticulous/react-video-player
import React from 'react'; const VideoListItem = ({video, onVideoSelect}) => { const imageUrl = video.snippet.thumbnails.default.url; return ( <li onClick={() => onVideoSelect(video)} className="list-group-item"> <div className="video-list media"> <div className="media-left"> ...
examples/planout-example/isomorphic/variations/layer_1_bucket_A/components/body.js
yahoo/mendel
/* Copyright 2015, Yahoo Inc. Copyrights licensed under the MIT License. Contributed by Shalom Volchok <shalom@digitaloptgroup.com> See the accompanying LICENSE file for terms. */ import React from 'react'; const style = { margin: "20px 0", padding: "20px", backgroundColor: "#F39C12" } export de...
docs/src/examples/elements/Button/GroupVariations/ButtonExampleGroupIconSize.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Button } from 'semantic-ui-react' const ButtonExampleGroupIconSize = () => ( <Button.Group basic size='small'> <Button icon='file' /> <Button icon='save' /> <Button icon='upload' /> <Button icon='download' /> </Button.Group> ) export default ButtonExampleGroupIco...
6.2.1/examples/syncValidation/dist/bundle.js
erikras/redux-form-docs
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/dist/",t(0)}([function(e,t,n){n(265),e.exports=n(264)},function(e,t,n){var r=n(4),o=n(35),i=n(20),a=n(21),u=n(36),s="prototype",...
client/src/components/Preview/Preview.js
silverstripe/silverstripe-admin
import React, { Component } from 'react'; import i18n from 'i18n'; import ActionMenu from '../ActionMenu/ActionMenu'; import classnames from 'classnames'; import { inject } from 'lib/Injector'; import PropTypes from 'prop-types'; /** * Renders the right-hand collapsable change preview panel */ class Preview extends ...
src/Settings/Deleteform.js
MLsandbox/MLsandbox
import React, { Component } from 'react'; class Pwchangeform extends Component { constructor(props) { super(props); } render() { return ( <fieldset className="user-settings-form"> <legend className="user-settings-legend">Delete Account:</legend> <div className="del-form-input">Usern...
docs/src/examples/elements/Header/Variations/index.js
Semantic-Org/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection' import { Message } from 'semantic-ui-react' const HeaderVariationsExamples = () => ( <ExampleSection title='Variations'> <Compone...
src/svg-icons/editor/format-line-spacing.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatLineSpacing = (props) => ( <SvgIcon {...props}> <path d="M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm4-2v2h12V5H10zm0 14h12v-2H10v2zm0-6h12v-2H10v2z"/> </SvgIcon> ); EditorFormatLineSpacing =...
src/components/Sidebar/Menu.js
zksailor534/react-adminlte
/* eslint-disable react/jsx-filename-extension */ import React from 'react'; import styled from 'styled-components'; import MenuItem from './MenuItem'; const StyledHeader = styled.li` -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; display: ${props => (props.collapse ? 'no...
packages/docs/pages/plugin/linkify/index.js
nikgraf/draft-js-plugin-editor
import React, { Component } from 'react'; // eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no-duplicates import simpleExampleCode from '!!raw-loader!../../../components/Examples/linkify/SimpleLinkifyEditor'; // eslint-disable-next-line import/no-unresolved import simpleExampleEditorS...
app/components/Settings/SettingsPage.js
TheCbac/MICA-Desktop
// @flow /* ********************************************************** * File: sensorSettingsComponent.js * * Brief: React component for changing settings on sensors. * this is a poor name - consider renaming as this component * also includes generators. * * Authors: Craig Cheney * * 2017.09.25 CC - Changed name to...
example/src/screens/types/tabs/TabOne.js
yusufyildirim/react-native-navigation
import React from 'react'; import {View, Text} from 'react-native'; class TabOne extends React.Component { render() { return ( <View> <Text>Tab One</Text> </View> ); } } export default TabOne;
src/@ui/BlockQuote/index.js
NewSpring/Apollos
import React from 'react'; import { compose, pure, setPropTypes } from 'recompose'; import PropTypes from 'prop-types'; import { StyleSheet, View } from 'react-native'; import styled from '@ui/styled'; import { withThemeMixin } from '@ui/theme'; import { BodyText } from '@ui/typography'; const enhance = compose( pu...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/PropsConstructorAlias.js
ylu1317/flow
// @flow import React from 'react'; class MyComponent extends React.Component { constructor(props: {a: number, b: number, c: number}) {} defaultProps: T; static props: T; static state: T; a: T; b = 5; c: T = 5; method() {} } const expression = () => class extends React.Component { constructor(...
src/application/components/Operation.js
movio/apidoc-ui
// @flow import React from 'react'; import { Link } from 'react-router'; import Markdown from 'components/Markdown'; import Header from 'application/components/Header'; import Request from 'application/components/Request'; import Response from 'application/components/Response'; import ResourceCard from 'application/com...
client/components/Page/Page.js
Art404/platform404
import React from 'react' import Banner from '../Banner/Banner' import Row from '../Row/Row' import {getLayout} from './layouts' import Grid from '../Grid/Grid' class Page extends React.Component { static displayName = 'Page'; static propTypes = { 'main': React.PropTypes.object, 'agent': React.PropTypes.s...
spec/support/setup.mocha.js
shivg/HireOrbit
import jsdom from 'jsdom'; import jquery from 'jquery'; import TestUtils from 'react-addons-test-utils'; import ReactDOM from 'react-dom'; import chai, { expect } from 'chai'; import React from 'react'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import reducers from '../../client/reduc...
examples/user-dashboard/src/pages/.umi/umi.js
dvajs/dva
import React from 'react'; import ReactDOM from 'react-dom'; import createHistory from 'umi/_createHistory'; import FastClick from 'umi-fastclick'; document.addEventListener( 'DOMContentLoaded', () => { FastClick.attach(document.body); }, false ); // create history window.g_history = createHistory({ bas...
src/components/Dice/Dice.js
dontexpectanythingsensible/random-utils
import React from 'react'; import { getRandomInt } from 'services/utils'; export default class Dice extends React.Component { static propTypes = { max: React.PropTypes.number } state = { value: 1, max: 1 }; componentWillMount () { this.roll(this.props.max); this.setState({ max: this.pro...
examples/sidebar/app.js
shunitoh/react-router
import React from 'react' import { render } from 'react-dom' import { browserHistory, Router, Route, Link } from 'react-router' import withExampleBasename from '../withExampleBasename' import data from './data' import './app.css' const Category = ({ children, params }) => { const category = data.lookupCategory(par...
frontend/src/InteractiveSearch/InteractiveSearchContent.js
Radarr/Radarr
import PropTypes from 'prop-types'; import React from 'react'; import Icon from 'Components/Icon'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; import { icons, sortDirections } from 'Helpers/Props'; im...
client/header/components/nav.js
jmeas/finance-app
import React from 'react'; import classNames from 'classnames'; import {Link} from 'react-router'; import FirstChild from '../../common/components/first-child'; import ReactCSSTransitionGroup from '../../vendor/css-transition-group'; export default function Nav({isOverlayNavVisible, toggleOverlayNav}) { // This ensu...
jekyll-strapi-tutorial/api/plugins/upload/admin/src/containers/HomePage/index.js
strapi/strapi-examples
/* * * HomePage * */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; // import { createStructuredSelector } from 'reselect'; import { injectIntl } from 'react-intl'; import { bindActionCreators, compose } from 'redux'; import { isEmpty } from 'lodash'; // You ...
app/javascript/mastodon/features/explore/suggestions.js
musashino205/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import AccountCard from 'mastodon/features/directory/components/account_card'; import LoadingIndicator from 'mastodon/components/loading_indicator'; import { connect } from 'react-redux'; import { ...
src/utils/childrenValueInputValidation.js
mcraiganthony/react-bootstrap
import React from 'react'; import { singlePropFrom } from './CustomPropTypes'; const propList = ['children', 'value']; const typeList = [React.PropTypes.number, React.PropTypes.string]; export default function valueValidation(props, propName, componentName) { let error = singlePropFrom(propList)(props, propName, co...
Libraries/CustomComponents/Navigator/Navigator.js
nickhudkins/react-native
/** * Copyright (c) 2013-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. * * Facebook,...
src/svg-icons/maps/terrain.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsTerrain = (props) => ( <SvgIcon {...props}> <path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/> </SvgIcon> ); MapsTerrain = pure(MapsTerrain); MapsTerrain.displayName = 'MapsTerr...
App/Components/AccountInfo/DisplayName/index.spec.js
okmttdhr/YoutuVote
// @flow import test from 'ava-spec'; import React from 'react'; import {TextInput} from 'react-native'; import { shallow } from 'enzyme'; import { spy } from 'sinon'; import { defaultUserMock } from '../../../../Tests/mock'; import { DisplayName } from './index'; const updateProfileMock = () => { console.log('upda...
src-client/scripts/pack-auth-view.js
Dolpator/iLuggit
import React from 'react' import Backbone from 'backbone' import $ from 'jquery' import ACTIONS from './ACTIONS.js' const PackAuthView = React.createClass({ _submitLogin: function(evt){ console.log('evt', evt); evt.preventDefault() let newLogin = { useruser: this.refs.user_name2...
source/client/Root.js
isairz/beehive
import React from 'react' import { Provider } from 'react-redux' import routes from './routes' import store from './store' import './containers/globals.css' export default () => ( <Provider store={store}> {routes} </Provider> )
src/walk-path.js
sgrj/berlin-walks
import React from 'react'; import { Polyline } from 'react-leaflet'; import { DomEvent } from 'leaflet'; import './walk-path.css'; class WalkPath extends React.Component { render() { var className = 'walk-path'; if (this.props.selected) { className += ' selected'; } if (this.props.highlighted) ...
demo/src/index.js
mir3z/react-virtual-list
import React from 'react'; import ReactDOM from 'react-dom'; import './reset.css'; import './list.css'; import './styles.css'; import DemoApp from './DemoApp'; ReactDOM.render(<DemoApp />, document.querySelector('#app'));
demo/components/TodosList.js
dsibiski/cerebral
import React from 'react'; import Todo from './Todo.js'; import {Decorator as Cerebral} from './../CustomController.js'; @Cerebral({ todos: ['visibleTodos'], isAllChecked: ['isAllChecked'], tod: ['todos'] }) class TodosList extends React.Component { renderTodo(todo, index) { return <Todo key={index} index=...
examples/query-params/app.js
omerts/react-router
import React from 'react'; import { history } from 'react-router/lib/HashHistory'; import { Router, Route, Link } from 'react-router'; var User = React.createClass({ render() { var { query } = this.props.location; var age = query && query.showAge ? '33' : ''; var { userID } = this.props.params; retur...
src/views/LoadingView.js
tielan/react-native-go
import React from 'react'; import { ActivityIndicator, Text, StyleSheet, View } from 'react-native'; const LoadingView = () => ( <View style={styles.loading}> <ActivityIndicator size="large" color="#e9423c" /> </View> ); const styles = StyleSheet.create({ loading: { flex: 1, ...
ignore this code/src/index.js
AngularJS-Angular2-Angular4/react-learning-2
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('root')); registerServiceWorker();
react-starter/src/index.js
wefine/reactjs-guide
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('root')); registerServiceWorker();
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js
mozillo/react-router
import React from 'react' class Assignments extends React.Component { render() { return ( <div> <h3>Assignments</h3> {this.props.children || <p>Choose an assignment from the sidebar.</p>} </div> ) } } export default Assignments
preact/preact_firebase/src/components/MultiSelectSort/MultiSelectSort_useContext_ver.js
cywhale/simple-test-bigmemory
//https://github.com/preactjs/preact/issues/2790 //https://codesandbox.io/s/preactsortablemultiselect-forked-zw50w?file=/src/MultiSelectSort.js:70-149 //ref: https://react-select.com/advanced //import React from 'react'; import React, { createContext, useCallback, useContext } from "preact/compat"; //import ReactDOM fr...
docs-ui/components/hovercard.stories.js
looker/sentry
import React from 'react'; import {storiesOf} from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import {text} from '@storybook/addon-knobs'; import Hovercard from 'app/components/hovercard'; storiesOf('Hovercard', module).add( 'default', withInfo( 'Good luck if your container element is...
packages/core/src/icons/components/Takeout.js
iCHEF/gypcrete
import React from 'react'; export default function SvgTakeout(props) { return ( <svg width="1em" height="1em" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <path clipRule="evenodd" d="M12.555 18.62l1.948 2.887-.758 1....
src/containers/App.js
TekkenChicken/t7-chicken-native
import React, { Component } from 'react'; import { Provider, connect } from 'react-redux'; import { View, StatusBar, Text, StyleSheet, Platform } from 'react-native'; // dependencies import { StackNavigator } from 'react-navigation'; // redux setup import Store from '../redux/store'; // components import Toolbar fro...
linksa/panainfosa.js
liuhui219/linksa
import React from 'react'; import { View, StyleSheet, Navigator, TouchableOpacity, TouchableHighlight, Text, ScrollView, Modal, CameraRoll, Animated, ActivityIndicator, InteractionManager, TextInput, Dimensions, BackAndroid, Image, RefreshControl, ListView, ToastAndroid, NativeModules, } from ...
src/routes/home/index.js
xugy0926/shuoriyu
/** * 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 React from 'react'; import Home from './Home'; impo...
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js
gale320/actor-platform
import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; const {addons: { PureRenderMixin }} = addons; @ReactMixin.decorate(PureRenderMixin) class ActivityHeader extends React.Component { static propTypes = { close: React.PropTypes.func, title: React.PropTypes.stri...
pages/_document.js
djhi/dpc
import React from 'react'; import Document, { Head, Main, NextScript } from 'next/document'; import { ServerStyleSheet } from 'styled-components'; export default class MyDocument extends Document { render() { const sheet = new ServerStyleSheet(); const main = sheet.collectStyles(<Main />); ...
src/views/Root/index.js
montemishkin/mishkin_com
// third party imports import React from 'react' import Helmet from 'react-helmet' // local imports import styles from './styles.css' class Root extends React.Component { constructor(...args) { super(...args) this.state = { isExpanded: false, } } toggleExpanded = () =...
app/templates/src/common/decorators/withViewport.js
jermspeaks/generator-react-redux
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars import EventEmitter from 'eventemitter3'; import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; let EE; let viewport = {width: 1366, height: 768}; // Default size for server-side rendering const RESIZE_EVENT = 'resize'; function hand...
pages/application.js
Aleyasen/DarshanVis-UI
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; import MainContainer from '../components/MainContainer' export default class extends Component { render() { return ( ...
client/src/components/surveys/SurveyField.js
CodeDraken/Mail-Draken
// SurveyField - renders a single label and text input import React from 'react' export default ({ input, label, _name, meta: { error, touched } }) => { const valid = touched && error ? 'invalid' : '' return ( <div> <label htmlFor={_name}> { label } </label> <input className={'valida...
node_modules/react-router/es6/Router.js
PanJ/SimplerCityGlide
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 _objectWithoutProperties(obj, keys) { var target = {...
client/src/index.js
misha-slyusarev/invoices
import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; import 'semantic-ui-css/semantic.css' import './styles/index.css'; ReactDOM.render( <App />, document.getElementById('root') );
docs/src/CodeExample.js
zerkms/react-bootstrap
import React from 'react'; export default class CodeExample extends React.Component { render() { return ( <pre className="cm-s-solarized cm-s-light"> <code> {this.props.codeText} </code> </pre> ); } componentDidMount() { if (CodeMirror === undefined) { ret...
src/index.js
MeKyleH/ReactPortfolioStuff
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import reducers from './reducers'; import ReduxPromise from 'redux-promise'; import App from './components/app'; const createStoreWithMiddleware = applyMiddleware(...
src/svg-icons/content/gesture.js
mit-cml/iot-website-source
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentGesture = (props) => ( <SvgIcon {...props}> <path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3....
src/components/CardValue.js
fateseal/react-mtg-playtester
import React from 'react'; import NumberInput from './NumberInput'; const CardValue = ({ id, label, name, value, decrementCardValue, incrementCardValue, setCardValue }) => ( <div className="rmp--card-value"> <label className="rmp--label">{label}</label> <NumberInput value={value} o...
src/index.js
KaiWedekind/react-boilerplate
import React from 'react'; import { render } from 'react-dom'; import 'normalize.css'; import './styles.scss'; render( <div> <header className="app__title">React Boilerplate</header> <label className="app__author">by Kai Wedekind</label> </div>, document.querySelector('#app') )
test/integration/css-fixtures/url-global/pages/_app.js
flybayer/next.js
import React from 'react' import App from 'next/app' import '../styles/global1.css' import '../styles/global2.css' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
app/components/AsyncExample/index.js
anorudes/redux-easy-boilerplate
import React from 'react'; import Helmet from 'react-helmet'; /* component styles */ import s from './styles.css'; function AsyncExample() { return ( <section className={s.root}> <Helmet title="async example" /> <h1>Async page</h1> example<br /> example<br /> example<...
src/components/reusable/ListEntry.js
iovar/sleep_cycle_alarm
import React from 'react'; import { View } from 'react-native'; import { itemBgColor, borderColor } from '../../Colors'; const ListEntry = ({ children }) => ( <View style={styles.viewStyle}> {children} </View> ); const styles = { viewStyle: { alignItems: 'center', justifyContent: 'space-between', ...
src/components/Exchange.js
yaswanthsvist/openCexTrade
import React from 'react'; import { StyleSheet, Text,Button,Dimensions, View,ScrollView,StatusBar,Image } from 'react-native'; import LineChart from './ui/LineChart'; import mockData from './../assets/mockData'; import * as exchangeActions from './../actions/exchange' import * as public_dataActions from './../actions/p...