path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
docs/src/app/components/pages/components/IconButton/ExampleSimple.js
pradel/material-ui
import React from 'react'; import IconButton from 'material-ui/IconButton'; const IconButtonExampleSimple = () => ( <div> <IconButton iconClassName="muidocs-icon-custom-github" /> <IconButton iconClassName="muidocs-icon-custom-github" disabled={true} /> </div> ); export default IconButtonExampleSimple;
ui/src/main/js/components/TaskConfigSummary.js
thinker0/aurora
import moment from 'moment'; import React from 'react'; import { RelativeTime } from 'components/Time'; import { isNully } from 'utils/Common'; import { formatMb } from 'utils/Quota'; import { constraintToString, getResource, getResources, instanceRangeToString } from 'utils/Task'; import { COLLISION_POLICY } from 'u...
app/src/Index.js
darjanin/xp-library
import React from 'react' export default class Index extends React.Component { constructor(props) { super(props) this.state = { count: 0 } } sayHello(name = 'Martin') { return `Hello ${name}` } render() { return ( <main className="content"> <h1>Welcom...
client/index.js
zivkaziv/MazorTech
/** * Client entry point */ import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import App from './App'; import { configureStore } from './store'; // Initialize store const store = configureStore(window.__INITIAL_STATE__); const mountApp = document.getEleme...
src/renderer/bootstrap.js
ksoichiro/er
'use strict'; import React from 'react'; React; import { render } from 'react-dom'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import App from './containers/App'; import erApp from './reducers'; let store = createStore(erApp); render( <Provider store={store}> <App /> </Provi...
src/ItemView.js
jdaudier/Timo-Plato
import React, { Component } from 'react'; import { Button } from './Button'; import { styles } from './styles/styles'; export class ItemView extends Component { constructor(props) { super(props); this.state = { editMode: false, origProjectName: this.props.projectName, ...
WasteApp/js/components/newitem/Result.js
airien/workbits
import React from 'react'; import { View, Text } from 'react-native'; export default function Result({ type, date }) { return ( <View> <Text>{`Type: ${type}`}</Text> <Text>{`Date: ${date}`}</Text> </View> ); }
examples/chat/src/containers/App.js
nakamura-to/joiny
import React, { Component } from 'react'; import ChatApp from './ChatApp'; import { createStore, applyMiddleware, combineReducers } from 'redux'; import { Provider } from 'react-redux'; import thunk from 'redux-thunk'; import * as reducers from '../reducers'; const reducer = combineReducers(reducers); const createStor...
server/sonar-web/src/main/js/apps/overview/meta/MetaLink.js
lbndev/sonarqube
/* * SonarQube * Copyright (C) 2009-2017 SonarSource SA * mailto:info AT sonarsource DOT com * * This program 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 3 of the License, o...
src/components/Search.js
nayed/hanews
import React from 'react' import Button from './Button' import { Form, FormGroup, Input } from 'reactstrap' import "../styles/Search.sass" const Search = ({ value, onChange, onSubmit, className = '', children }) => <Form onSubmit={onSubmit}> <FormGroup className="search-area"> <Input type="text" ...
who_paid_what_2/imports/stats.js
bburscher/who_paid_what
// TODO: WIP import Chart from 'chart.js'; import React, { Component } from 'react'; import { createContainer } from 'meteor/react-meteor-data'; import { withTracker } from 'meteor/react-meteor-data'; import Payments from './api/Payments.js'; import Remainders from './api/Remainders'; import { VictoryChart, VictoryAre...
src/svg-icons/action/thumb-down.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionThumbDown = (props) => ( <SvgIcon {...props}> <path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.5...
internals/templates/containers/NotFoundPage/index.js
mattmanske/react-baseplate
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
storybook/config.js
koteitan/googoldon
import { configure, setAddon } from '@kadira/storybook'; import IntlAddon from 'react-storybook-addon-intl'; import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import { addLocaleData } from 'react-intl'; import en from 'react-intl/locale-data/en'; import '../app/assets/stylesheets/compone...
app/components/atoms/Divider/Divider.js
altiore/webpack_config_example
import React from 'react' import PropTypes from 'prop-types' const Divider = ({ styles }) => ( <div className={styles.divider} /> ) Divider.propTypes = { styles: PropTypes.object, } export default Divider
src/components/CodeSnippet/CodeSnippet-story.js
joshblack/carbon-components-react
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { withKnob...
src/components/common/svg-icons/device/battery-std.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryStd = (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 4z"/> </SvgIcon> ); D...
src/components/Scene/index.js
afoninsky/cerebral-bolierplate
import React from 'react'; import ReactDOM from 'react-dom' import { Decorator as cerebral } from 'cerebral-react' import Scene from './src/scene' import common from './src/common' import Circle from './src/circleSprite' @cerebral({ spheres: ['spheres'], selected: ['selected'], sphereResources: ['sphereResources'...
index.js
jokeyrhyme/wow-healer-bootcamp
'use strict'; // foreign modules import React from 'react'; // local modules import Root from './containers/Root'; // this module React.render(<Root />, document.body);
classic/src/scenes/mailboxes/src/Scenes/AppScene/Sidelist/SidelistMailboxes/SidelistItemMailbox/SidelistCommon/SidelistAvatar.js
wavebox/waveboxapp
import PropTypes from 'prop-types' import React from 'react' import shallowCompare from 'react-addons-shallow-compare' import ACAvatarCircle2 from 'wbui/ACAvatarCircle2' import { withStyles } from '@material-ui/core/styles' import classNames from 'classnames' import Resolver from 'Runtime/Resolver' import Color from 'c...
packages/react-events/src/Press.js
VioletLife/react
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type { ReactResponderEvent, ReactResponderContext, } from 'shared/ReactTypes'; import type {EventPriority} ...
src/lib/timeline/TimelineStateContext.js
namespace-ee/react-calendar-timeline
import React from 'react' import PropTypes from 'prop-types' import createReactContext from 'create-react-context' import { calculateXPositionForTime, calculateTimeForXPosition } from '../utility/calendar' /* this context will hold all information regarding timeline state: 1. timeline width 2. visible time sta...
src/Grid/Col.js
react-fabric/react-fabric
import React from 'react' import cx from 'classnames' import flatten from 'lodash.flatten' import { colSizeType } from '../propTypes' import fabricComponent from '../fabricComponent' import style from './Grid.scss' const breakpoints = ['sm', 'md', 'lg', 'xl', 'xxl', 'xxxl'] const breakpointPropKeys = flatten(breakpo...
app/components/signin.js
BZhawaii/ArtStorm
import React from 'react'; class SignIn extends React.Component { render() { return ( <div class="row"> <form class="col s12"> <div class="row"> <div class="input-field col s12"> <input id="email" type="email" class="validate"/> <label for="email"...
src/index.js
Babbins/fullstalker
import React, { Component } from 'react'; import axios from 'axios'; import {Router, Route, hashHistory, IndexRedirect, IndexRoute} from 'react-router'; import ReactDOM from 'react-dom'; import Start from './components/Start'; import Flashcard from './components/Flashcard'; // Create a new component class App extends...
app/components/Content/index.js
czy0729/react-alumni
/** * generate textarea value * @version 170215 1.0 */ 'use strict'; import React from 'react'; import classNames from 'classnames'; import { emojify } from 'react-emoji'; import './index.less'; const prefixCls = 'components__content'; const Content = (props) => { const { className, value, ...other } = props;...
docs/src/Playground.js
vandreleal/react-social-github
import React, { Component } from 'react'; import { Github } from 'react-social-github'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; import SelectField from 'material-ui/SelectField'; import MenuItem from 'material-ui/MenuItem'; import Toggle from 'material-ui/Tog...
src/components/about/about.js
ahaditio/journal-frontend
import React, { Component } from 'react'; export default class About extends Component{ render() { return ( <div class="row outerDiv"> <div class="col-xs-3 col-md-2 imageDiv" > <img src="/assets/img/ny.jpg" alt="" class="img-responsive" /> </div> <div> <h2>ABOUT Bookwid...
src/Inter.js
DangrMiao/House
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ 'use strict'; import React, { Component } from 'react'; import { StyleSheet, View, Text, Image, ScrollView, Navigator, Dimensions, InteractionManager, TouchableOpacity, } from 're...
src/client/scripts/client.js
pmontesinos/testreactapp
import Debug from 'debug'; import App from '../../app'; import React from 'react'; import ReactDOM from 'react-dom'; var attachElement = document.getElementById('app'); var app; Debug.enable('myApp*'); // Create new app and attach to element app = new App(); app.renderToDOM(attachElement);
app/javascript/mastodon/features/ui/components/column_header.js
rekif/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class ColumnHeader extends React.PureComponent { static propTypes = { icon: PropTypes.string, type: PropTypes.string, active: PropTypes.bool, onClick: PropTypes.func, columnHeaderId...
client/modules/comments/components/comment_list.js
mantrajs/meteor-mantra-kickstarter
import React from 'react'; import CreateComment from '../containers/create_comment.js'; const CommentList = ({comments, postId}) => ( <div className="comments"> <div> <CreateComment postId={postId}/> </div> <div className="comment-list"> {comments.length === 0 ? <p>No Comments Yet!</p> : null...
src/components/sidebar/SidebarMenu.js
entria/entria-components
import React from 'react'; import { List, makeSelectable } from 'material-ui/List'; const SelectableList = makeSelectable(List); const SidebarMenu = ({ children }) => <div style={styles().wrapper}> <SelectableList> {children} </SelectableList> </div>; const styles = () => ({ wrapper: { margin...
ajax/libs/recompose/0.20.2/Recompose.js
wout/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...
programming/javascript/react/src/modal.js
at-ishikawa/samples
import React from 'react'; import ReactDOM from 'react-dom'; import Draggable from 'react-draggable'; import Modal from 'react-modal'; class App extends React.Component { constructor(props) { super(props); this.state = { activeDrags: 0, modalOpened: false }; this.onStart = this.onStart.bi...
common/routes/Score/containers/Score.js
AndrewGibson27/react-scoreboard
import { provideHooks } from 'redial'; import { connect } from 'react-redux'; import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import loadScore from '../actions'; import { selectCurrentScore } from '../reducer'; import { ErrorMessage, Loader, Block } from '../../.....
app/javascript/mastodon/features/standalone/community_timeline/index.js
blackle/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import StatusListContainer from '../../ui/containers/status_list_container'; import { expandCommunityTimeline } from '../../../actions/timelines'; import Column from '../../../components/column'; import ColumnHeader fr...
src/js/pages/template/Template.js
mikka22pl/glossa
import React from 'react'; import { connect } from "react-redux"; import { bindActionCreators } from 'redux'; import { Link, withRouter } from 'react-router'; import { Glyphicon } from "react-bootstrap"; import { fetchTemplate } from '../../actions/template/fetchTemplate'; import { fetchSpecs } from '../../actions/slo...
src/routes.js
luandro/hapi-universal-redux
import React from 'react'; import { Router, Route } from 'react-router'; import StargazersContainer from './containers/StargazersContainer'; import Header from './components/Header'; import Home from './components/Home'; import About from './components/About'; /** * The React Routes for both the server and th...
test/index.js
rojobuffalo/formsy-material-ui
/* global chai */ import 'babel-polyfill'; import React from 'react'; import sinonChai from 'sinon-chai'; import chaiEnzyme from 'chai-enzyme'; import injectTapEventPlugin from 'react-tap-event-plugin'; window.React = React; window.expect = chai.expect; chai.use(sinonChai); chai.use(chaiEnzyme()); injectTapEventPlugi...
react-flux-mui/js/material-ui/src/svg-icons/toggle/check-box-outline-blank.js
pbogdan/react-flux-mui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleCheckBoxOutlineBlank = (props) => ( <SvgIcon {...props}> <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/> </SvgIcon> ); ToggleCheckBoxOutlineBlank =...
client/index.js
Danjavia/ReatJS-Apollo-Starter-Kit
/** * External resources * */ require('offline-plugin/runtime').install(); import React from 'react'; import ReactDOM from 'react-dom'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import { Router, useRouterHistory } from 'react-router'; import ApolloClient, { createNetworkInterface } from 'apo...
lib/components/MapCallout.js
lelandrichardson/react-native-maps
import PropTypes from 'prop-types'; import React from 'react'; import { StyleSheet, ViewPropTypes, View } from 'react-native'; import decorateMapComponent, { SUPPORTED, USES_DEFAULT_IMPLEMENTATION, } from './decorateMapComponent'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)...
packages/@lyra/form-builder/src/inputs/Slug/SlugInput.js
VegaPublish/vega-studio
import PropTypes from 'prop-types' import React from 'react' import speakingurl from 'speakingurl' import {get} from 'lodash' import Button from 'part:@lyra/components/buttons/default' import FormField from 'part:@lyra/components/formfields/default' import TextInput from 'part:@lyra/components/textinputs/default' impor...
src/components/ShareMenu/MemberListItem.js
Charlie9830/pounder
import React from 'react'; import { ListItem, ListItemText, ListItemSecondaryAction, ListItemIcon } from '@material-ui/core'; import MemberStatusIcon from './MemberStatusIcon'; import KickUserButton from './KickUserButton'; import ChangeRankButton from './ChangeRankButton'; const MemberListItem = (props) => { let ...
tp-3/recursos/react-slingshot/src/index.js
jpgonzalezquinteros/sovos-reactivo-2017
/* eslint-disable import/default */ import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import Root from './components/Root'; require('./favicon.ico'); // Tell webpack to load favicon.ico render( <AppContainer> <Root/> </AppContainer>, document.ge...
globe/js/app.js
Toseben/arttukoskela
import React from 'react'; import ReactDOM from 'react-dom'; import AFrameGlobe from './containers/AFrameGlobe'; ReactDOM.render( <AFrameGlobe/>, document.querySelector('.scene-container') );
screens/ProductDetailScreen/PriceText.js
nattatorn-dev/expo-with-realworld
import React from 'react' import { StyleSheet, Text, View } from 'react-native' import PropTypes from 'prop-types' import { Colors } from 'constants' import { string } from 'utilities' const styles = StyleSheet.create( { price: { color: Colors.tintColor, fontSize: 16, fontWeight: '600', marginRight: ...
extensions/mailtracking/server.js
axax/lunuc
import schema from './gensrc/schema' import resolver from './gensrc/resolver' import Hook from 'util/hook' import {deepMergeToFirst} from 'util/deepMerge' import React from 'react' import {trackMail} from './track' // Hook to add mongodb resolver Hook.on('resolver', ({db, resolvers}) => { deepMergeToFirst(resolve...
admin/client/App/shared/InvalidFieldType.js
frontyard/keystone
/** * Renders an "Invalid Field Type" error */ import React from 'react'; const InvalidFieldType = function (props) { return ( <div className="alert alert-danger"> Invalid field type <strong>{props.type}</strong> at path <strong>{props.path}</strong> </div> ); }; InvalidFieldType.propTypes = { path: Reac...
packages/material-ui-icons/src/BubbleChart.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><circle cx="7.2" cy="14.4" r="3.2" /><circle cx="14.8" cy="18" r="2" /><circle cx="15.2" cy="8.8" r="4.8" /></g> , 'BubbleChart');
admin/client/components/RelatedItemsList.js
codevlabs/keystone
import React from 'react'; import Columns from '../columns'; import { Alert, Spinner } from 'elemental'; const RelatedItemsList = React.createClass({ propTypes: { list: React.PropTypes.object.isRequired, refList: React.PropTypes.object.isRequired, relatedItemId: React.PropTypes.string.isRequired, relationship...
src/routes/LoginResult/containers/AuthRouter.js
hrnik/roofbar
import React from 'react' import { connect } from 'react-redux' import { browserHistory } from 'react-router' import Loader from 'components/Loader' const mapStateToProps = state => ({ ...state.auth }) class AuthRouter extends React.Component { componentWillMount () { this.route(this.props) } componentWil...
actor-apps/app-web/src/app/components/common/Banner.react.js
gale320/actor-platform
import React from 'react'; import BannerActionCreators from 'actions/BannerActionCreators'; class Banner extends React.Component { constructor(props) { super(props); if (window.localStorage.getItem('banner_jump') === null) { BannerActionCreators.show(); } } onClose = () => { BannerActionC...
sampleApps/react/src/main/webapp/app/about.js
willbuck/g3-2016-grails-gradle-node
import React from 'react'; import Immutable from 'immutable' import autobind from './util/autobind' import {Modal, Button} from 'react-bootstrap'; class About extends React.Component { constructor(props) { super(props); // must call before "this" is accessed autobind(this, 'toggle'); ...
src/addons/dragAndDrop/WeekWrapper.js
intljusticemission/react-big-calendar
import PropTypes from 'prop-types' import React from 'react' import * as dates from '../../utils/dates' import { getSlotAtX, pointInBox } from '../../utils/selection' import { findDOMNode } from 'react-dom' import { eventSegments } from '../../utils/eventLevels' import Selection, { getBoundsForNode } from '../../Selec...
django/webcode/webcode/frontend/node_modules/react-bootstrap/es/PaginationButton.js
OpenKGB/webcode
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 ...
ui/src/main/js/components/InstanceHistoryItem.js
medallia/aurora
import moment from 'moment'; import React from 'react'; import Icon from 'components/Icon'; import StateMachine from 'components/StateMachine'; import { getClassForScheduleStatus, getDuration, taskToStateMachine } from 'utils/Task'; import { SCHEDULE_STATUS } from 'utils/Thrift'; export function InstanceHistor...
src/Popover.js
aabenoja/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; const Popover = React.createClass({ mixins: [BootstrapMixin], propTypes: { placement: React.PropTypes.oneOf(['top', 'right', 'bottom', 'left']), positionLeft: React.PropTypes.number, position...
shared/components/Equilab/Footer/Footer.js
thehink/equilab-web
import React, { Component } from 'react'; import ImageLink from 'Equilab/ImageLink'; import equilabIcon from 'assets/images/logo.png'; import facebookIcon from 'assets/images/facebook.png'; import instagramIcon from 'assets/images/instagram.png'; import styles from './Footer.scss'; class Footer extends Component { ...
.history/src/components/GKM/Item_20170624171210.js
oded-soffrin/gkm_viewer
import React from 'react'; import Input from '../Common/Input' import _ from 'lodash' import '../../styles/gkm-item.scss'; const Item = ({ item, updateItem, deleteItem }) => { const onAddingHashtag = (hashtag) => { item.hashtags.add(hashtag) updateItem(item) } const onUpdateField = (update) => { _...
client/views/LandingPage/UserList/UserList.js
lakshyaranganath/pwa
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { compose } from 'redux'; import { connect } from 'react-redux'; import cn from 'classnames'; import Flex from '../../../components/Flex/Flex'; import LoaderHOC from '../../../components/LoaderHOC/LoaderHOC'; import * as userModel from...
app/javascript/mastodon/features/compose/index.js
Ryanaka/mastodon
import React from 'react'; import ComposeFormContainer from './containers/compose_form_container'; import NavigationContainer from './containers/navigation_container'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { mountCom...
src/shared/components/Header/Header.js
Mike1Q84/react-ssr-simple
import React from 'react'; import PropTypes from 'prop-types'; import t from './_lang.json'; import { Link } from 'react-router-dom' import './Header.sass'; const Header = ({lang, languages}) => { return ( <div className="header"> <h1 className="header__title">{t[lang.id].name}</h1> <span className=...
admin/client/components/Popout/PopoutHeader.js
tony2cssc/keystone
import React from 'react'; import Transition from 'react-addons-css-transition-group'; var PopoutHeader = React.createClass({ displayName: 'PopoutHeader', propTypes: { leftAction: React.PropTypes.func, leftIcon: React.PropTypes.string, title: React.PropTypes.string.isRequired, transitionDirection: React.Prop...
templates/rubix/rails/rails-example/src/routes/EditTodo.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import React from 'react'; import ReactDOM from 'react-dom'; import { withRouter } from 'react-router'; import { Row, Col, Grid, Form, Panel, Button, Checkbox, PanelBody, FormGroup, FormControl, ControlLabel, PanelContainer } from '@sketchpixy/rubix'; import client from '@sketchpixy/rubix/lib...
src/components/Html.js
OlegVitiuk/Majsternia
import React from 'react'; import PropTypes from 'prop-types'; import serialize from 'serialize-javascript'; import config from '../config'; /* eslint-disable react/no-danger */ class Html extends React.Component { static propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequ...
es/components/catalog-view/catalog-item.js
vovance/3d-demo
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des...
examples/custom-server-koa/pages/index.js
arunoda/next.js
import React from 'react' import Link from 'next/link' export default () => ( <ul> <li><Link href='/b' as='/a'><a>a</a></Link></li> <li><Link href='/a' as='/b'><a>b</a></Link></li> </ul> )
src-client/scripts/app.js
jordanledford/Expresso
import ReactDOM from 'react-dom'; import React from 'react'; import Backbone from 'backbone'; import $ from 'jquery'; import SubmitView from './submit-view.js' import AuthView from './auth-view.js' import {HomeView, ProductView} from './home-view.js' import {UserModel, ShopModel, UserCollection} from './user-models.js...
src/encoded/static/components/cart/context.js
ENCODE-DCC/encoded
import React from 'react'; /** * Context to pass data from main cart view component to grandchild components. */ const CartViewContext = React.createContext({}); export default CartViewContext;
src/svg-icons/device/screen-lock-rotation.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceScreenLockRotation = (props) => ( <SvgIcon {...props}> <path d="M23.25 12.77l-2.57-2.57-1.41 1.41 2.22 2.22-5.66 5.66L4.51 8.17l5.66-5.66 2.1 2.1 1.41-1.41L11.23.75c-.59-.59-1.54-.59-2.12 0L2.75 7.11c-.59...
src/app/component/location-field/location-field.story.js
all3dp/printing-engine-client
import React from 'react' import {storiesOf} from '@storybook/react' import {withState} from '@dump247/storybook-state' import LocationField from '.' import {googleMapsApiKey} from '../../../../stories/util/data' storiesOf('LocationField', module) .add( 'default (no test)', withState({value: ''}, store => ...
Mr.Mining/MikeTheMiner/Santas_helpers/Sia_wallet/resources/app/plugins/Hosting/js/components/warningmodal.js
patel344/Mr.Miner
import React from 'react' const WarningModalModal = ({ title, message, actions }) => { const handleAccept = () => actions.acceptModal() const handleDecline = () => actions.declineModal() return ( <div className={'modal'}> <div className="modal-message"> <div className="close-button" onClick={handleDeclin...
frontend/src/Activity/History/HistoryEventTypeCell.js
Radarr/Radarr
import PropTypes from 'prop-types'; import React from 'react'; import Icon from 'Components/Icon'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import { icons, kinds } from 'Helpers/Props'; import styles from './HistoryEventTypeCell.css'; function getIconName(eventType) { switch (eventType) { ...
app/artist/components/ArtistList.js
Raymond-Zhu/music-video-app
import React, { Component } from 'react'; import Artist from './Artist'; import Dialog from 'material-ui/Dialog'; import TrackList from '../../track/components/TrackList'; import { hashHistory } from 'react-router'; const handleOnTouch = (artist, selectArtist) => { selectArtist(artist); hashHistory.push('/track');...
App/Components/ChannelPanels/Panel/index.spec.js
okmttdhr/YoutuVote
// @flow import test from 'ava'; import React from 'react'; import { shallow } from 'enzyme'; import { Panel } from './index'; import { channelStoreMock, channelActionsMock } from '../../../../Tests/mock/'; const likesPostRequestMock = () => {}; const wrapper = shallow( <Panel channel={channelStoreMock(1)} ...
examples/basic-mapUrlToProps/src/App.js
pbeshai/react-url-query
import React, { Component } from 'react'; import MainPage from './MainPage'; import history from './history'; class App extends Component { componentDidMount() { // force an update if the URL changes history.listen(() => this.forceUpdate()); } render() { return ( <div> <h3>react-url-qu...
test/frontend/app/components/test-footer.js
LINKIWI/linkr
import React from 'react'; import {mount} from 'enzyme'; import sinon from 'sinon'; import test from 'tape'; import authentication from '../../../../frontend/app/util/authentication'; import browser from '../../../../frontend/app/util/browser'; import {Footer} from '../../../../frontend/app/components/footer'; const ...
tripwreck_mobile/src/Router.js
CupNCup/tripwreck
import React from 'react'; import { Scene, Router, Actions } from 'react-native-router-flux'; import SearchPage from './components/Search_Components/SearchPage'; import LoginForm from './components/Login_Components/LoginForm'; import DetailPage from './components/Details_Components/DetailPage'; import ActiveList from '...
app/components/MainContainer/Main/TabController/AlarmsStackController/index.js
reubn/atomic
import React from 'react' import {Ionicons} from '@expo/vector-icons' import CustomStackNavigator from '../../../../CustomStackNavigator' import AlarmsContainer from './AlarmsContainer' import AlarmEditContainer from './AlarmEditContainer' export default class extends CustomStackNavigator({ Alarms: {screen: Alarms...
docs/pages/CustomComponents/AlternativeMedia/Poster.js
jossmac/react-images
// @flow // @jsx glam import glam from 'glam' import React from 'react' import Icon from './Icon' import type { ViewShape } from './View' type Props = { data: ViewShape, onClick: any => void } const ratio = `${((9 / 16) * 100) / 2}%` const gutter = 2 export const Posters = (props: any) => ( <div css={{ ...
src/containers/weather_list.js
StephanYu/modern_redux_weather_forecast
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Chart from '../components/chart'; import GoogleMap from '../components/google_map'; class WeatherList extends Component { renderWeather(cityData) { const name = cityData.city.name; const temps = cityData.list.map(weather ...
app/assets/scripts/components/info-button.js
openaq/openaq.org
import React from 'react'; import T from 'prop-types'; import ReactTooltip from 'react-tooltip'; import styled from 'styled-components'; const StyledTooltip = styled(ReactTooltip)` width: ${({ width }) => width || 'auto'}; max-width: 20rem; /* Z index set to 1000 to go over shadow scroll bar * which has z-ind...
client/pages/Contact.js
drewhan90/andrewyhan
import React from 'react'; class Contact extends React.Component { render(){ return ( <div id="Contact"> </div> ) } } export default Contact;
docs/app/Examples/modules/Progress/States/ProgressExampleWarning.js
aabustamante/Semantic-UI-React
import React from 'react' import { Progress } from 'semantic-ui-react' const ProgressExampleWarning = () => ( <Progress percent={100} warning> I am warning you </Progress> ) export default ProgressExampleWarning
src/parser/shared/modules/resources/mana/ManaUsageGraph.js
fyruna/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import { FlexibleWidthXYPlot as XYPlot, DiscreteColorLegend, XAxis, YAxis, VerticalGridLines, HorizontalGridLines, AreaSeries, LineSeries, } from 'react-vis'; import { formatDuration, formatThousands } from 'common/format'; import './ManaU...
docs/src/js/prettify.js
tanbo800/react-ui
'use strict' import React from 'react' export default function prettify (Component) { class Prettify extends React.Component { static displayName = 'Prettify' static propTypes = { children: React.PropTypes.array } componentDidMount () { window.prettyPrint(null, React.findDOMNode(this.r...
packages/ringcentral-widgets-docs/src/app/pages/Components/DialButton/Demo.js
ringcentral/ringcentral-js-widget
import React from 'react'; // eslint-disable-next-line import DialButton from 'ringcentral-widgets/components/DialButton'; const props = {}; props.btn = { value: '1', }; /** * A example of `DialButton` */ const DialButtonDemo = () => ( <div style={{ height: '100px', width: '100px', }} > ...
src/pages/aquarella.js
vitorbarbosa19/ziro-online
import React from 'react' import BrandGallery from '../components/BrandGallery' export default () => ( <BrandGallery brand='Aquarella' /> )
src/08-search-focus/ResultsItem.js
benmvp/react-workshop
import React from 'react' import PropTypes from 'prop-types' const ResultsItem = ({ id, title, url, rating, previewUrl }) => { return ( <section key={id} className="card" style={{ width: '300px', display: 'inline-block', marginRight: '16px', }} > <video s...
src/components/Pricing.js
liron-navon/liron-navon.github.io
import React from 'react' import PropTypes from 'prop-types' const Pricing = ({ data }) => ( <div className="columns"> {data.map(price => ( <div key={price.plan} className="column"> <section className="section"> <h4 className="has-text-centered has-text-weight-semibold"> {pric...
examples/todos-with-undo/index.js
javascriptjedi/redux-select
import 'babel-polyfill' import React from 'react' import { render } from 'react-dom' import { createStore } from 'redux' import { Provider } from 'react-redux' import App from './components/App' import todoApp from './reducers' const store = createStore(todoApp) const rootElement = document.getElementById('root') ren...
lib/index.js
tuchk4/forgekit
import React from 'react'; import { isObject, isFunction } from './utils/types'; import ForgekitError from './forgekit-error'; import collectProps from './utils/collect-props'; import getProps from './utils/get-props'; // Feature validation import normalizeFeatures from './features/normalize-features'; import splitFe...
src/components/OverflowMenu/OverflowMenu-story.js
carbon-design-system/carbon-components-react
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { withKnob...
src/js/ui/components/loading.js
hiddentao/heartnotes
import React from 'react'; import Icon from './icon'; module.exports = React.createClass({ render: function() { let text = !this.props.text ? null : ( <span className="text">{this.props.text}</span> ); return ( <span className="loading"> <Icon name="cog" spin={true} /> {tex...
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/es/Tooltip.js
GoogleCloudPlatform/prometheus-engine
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import classNames from 'classnames'; import TooltipPopoverWrapper, { propTypes } from './TooltipPopoverWrapper'; var defaultProps = { placement: 'top', autohide: true, placementPrefix: 'bs-tooltip', trigger: 'hover focus' }; ...
packages/wix-style-react/src/Input/docs/Input.demo.js
wix/wix-style-react
import React from 'react'; import Input from '..'; export default () => ( <div style={{ width: '50%' }}> <Input /> </div> );
universal/components/testimonials/Testimonials.js
Amazing-Space-Invader/outline
/** * Created by invader on 11.07.16. */ import React from 'react' import s from './testimonials.pcss' import {Grid, Row, Col} from 'react-flexgrid' import 'react-flexgrid/lib/flexgrid.css' import Carousel from 'react-slick' import './lib/slick.css' import user1img from './images/user.jpg' import user2img from '....
source/app/app.js
u9520107/mqtt-chat-test
import React from 'react'; import Application from 'meepworks/application'; import Component from 'meepworks/component'; import mqtt from 'mqtt'; import 'normalize.css/normalize.css!'; import uuid from 'uuid'; import fetch from 'node-fetch'; export default class App extends Application { constructor(...args) { ...