path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
.storybook/components/FooterStory.js
hellobrian/carbon-components-react
import React from 'react'; import { storiesOf, action } from '@storybook/react'; import Footer from '../../components/Footer'; import Checkbox from '../../components/Checkbox'; const additionalProps = { onClick: action('onClick'), className: 'some-class', labelOne: 'Need Help?', linkTextOne: 'Contact Bluemix S...
src/applications/static-pages/health-care-manage-benefits/refill-track-prescriptions-page/index.js
department-of-veterans-affairs/vets-website
// Node modules. import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; export default (store, widgetType) => { const root = document.querySelector(`[data-widget-type="${widgetType}"]`); if (root) { import(/* webpackChunkName: "refill-track-prescriptions-page" */ ...
app/index.js
ivtpz/brancher
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router, hashHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import routes from './routes'; import configureStore from './store/configureStore'; import { resetTree } f...
src/common/form/fields/TextAreaField.js
fastmonkeys/respa-ui
import React from 'react'; import PropTypes from 'prop-types'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import ControlLabel from 'react-bootstrap/lib/ControlLabel'; import FormControl from 'react-bootstrap/lib/FormControl'; const TextAreaField = ({ onChange, onKeyPress, label, placeholder, valu...
packages/icons/src/md/maps/LocalAtm.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdLocalAtm(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M22 34h4v-2h2c1.1 0 2-.9 2-2v-6c0-1.1-.9-2-2-2h-6v-2h8v-4h-4v-2h-4v2h-2c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2h-8v4h4v2zM40 8c2.21 0 4 1.79 4 4v24c0 2....
src/svg-icons/device/bluetooth-disabled.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBluetoothDisabled = (props) => ( <SvgIcon {...props}> <path d="M13 5.83l1.88 1.88-1.6 1.6 1.41 1.41 3.02-3.02L12 2h-1v5.03l2 2v-3.2zM5.41 4L4 5.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l4.29-4.29 2.3 2.29...
src/containers/Header.js
ashmaroli/jekyll-admin
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; export class Header extends Component { render() { const { config, admin } = this.props; return ( <div className="header"> <h3 className="title"> <Link target="_blank" t...
src/main.js
guileen/react-forum
import React from 'react' import ReactDOM from 'react-dom' import createBrowserHistory from 'history/lib/createBrowserHistory' import { useRouterHistory } from 'react-router' import { syncHistoryWithStore } from 'react-router-redux' import makeRoutes from './routes' import Root from './containers/Root' import configure...
consoles/my-joy-instances/src/containers/instances/user-script.js
yldio/joyent-portal
import React from 'react'; import { compose, graphql } from 'react-apollo'; import { Margin } from 'styled-components-spacing'; import get from 'lodash.get'; import { ViewContainer, Message, MessageTitle, MessageDescription, StatusLoader } from 'joyent-ui-toolkit'; import Editor from 'joyent-ui-toolkit/dist...
modules/react-move/src/components/Move.js
JunisphereSystemsAG/react-color
'use strict'; import React from 'react'; import ReactCSS from 'reactcss'; export class Move extends ReactCSS.Component { classes() { return { 'default': { outer: { opacity: this.props.inStartOpacity, transform: this.props.inStartTransform, transition: this.props.inSt...
src/svg-icons/av/closed-caption.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvClosedCaption = (props) => ( <SvgIcon {...props}> <path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.5...
actor-apps/app-web/src/app/components/common/AvatarItem.react.js
jamesbond12/actor-platform
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import React from 'react'; import classNames from 'classnames'; class AvatarItem extends React.Component { static propTypes = { className: React.PropTypes.string, image: React.PropTypes.string, placeholder: React.PropTypes.string.isRequired, ...
src/js/index.js
thomas-lack/patchwork-planner
import React from 'react'; import ReactDom from 'react-dom'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import patchworkPatternApp from './reducers'; import PatchworkPlannerApp from './components/PatchworkPlannerApp'; // import index.html to import webpack bundling import 'file-loader?...
src/components/widgets/A_H/index.js
humaniq/humaniq-pwa-website
import React from 'react'; import * as T from "prop-types"; import './styles.scss'; import {cssClassName} from 'utils' const cn = cssClassName('A_H') const A_H = ({type, icon, children, center , mix}) =>{ let tagType switch(type){ case 'animated-hero': case 'video-hero': tagType = 'h1' break; ...
examples/counter/containers/Root.js
Gazler/redux
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import CounterApp from './CounterApp'; import configureStore from '../store/configureStore'; const store = configureStore(); export default class Root extends Component { render() { return ( <Provider store={store}> ...
src/pages/my.js
ChrisMichaelPerezSantiago/CodetrotterFinalProject
// npm packages import _ from 'lodash'; import React from 'react'; import {Observable} from 'rxjs'; // my packages import db from '../db'; import {Crunchyroll} from '../api'; // my components import Navbar from '../components/navbar'; import Series from '../components/series'; export default class MyStuff extends Re...
app/javascript/mastodon/features/notifications/components/filter_bar.js
masto-donte-com-br/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Icon from 'mastodon/components/icon'; const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: '...
src/SafeAnchor.js
wjb12/react-bootstrap
import React from 'react'; import createChainedFunction from './utils/createChainedFunction'; /** * Note: This is intended as a stop-gap for accessibility concerns that the * Bootstrap CSS does not address as they have styled anchors and not buttons * in many cases. */ export default class SafeAnchor extends React...
src/svg-icons/av/sort-by-alpha.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSortByAlpha = (props) => ( <SvgIcon {...props}> <path d="M14.94 4.66h-4.72l2.36-2.36zm-4.69 14.71h4.66l-2.33 2.33zM6.1 6.27L1.6 17.73h1.84l.92-2.45h5.11l.92 2.45h1.84L7.74 6.27H6.1zm-1.13 7.37l1.94-5.18 1.94 ...
packages/material-ui/src/Form/FormGroup.js
cherniavskii/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import withStyles from '../styles/withStyles'; export const styles = { root: { display: 'flex', flexDirection: 'column', flexWrap: 'wrap', }, row: { flexDirection: 'row', }, }; /** * `FormGroup...
packages/docs/pages/plugin/static-toolbar/index.js
draft-js-plugins/draft-js-plugins
// eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no-duplicates import customExampleCode from '!!raw-loader!../../../components/Examples/static-toolbar/CustomToolbarEditor'; // eslint-disable-next-line import/no-unresolved import customExampleEditorStylesCode from '!!raw-loader!../../....
app/imports/client/Pages/Article/Components/Informations.js
FractalFlows/Emergence
import React from 'react' import { pure } from 'recompose' import { RaisedButton, } from 'material-ui' // Components import { Panel, PanelHeader, PanelBody, PanelHeaderButton, } from '/imports/client/Components/Panel' import KnowledgeBit from '/imports/client/Components/KnowledgeBit' // Helpers import requi...
example/index.android.js
q6112345/react-native-google-place-picker
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import WelcomeScreen from './WelcomeScreen'; AppRegistry.registerComponent('example', () => WelcomeScreen);
modules/IndexRedirect.js
mattkrick/react-router
import React from 'react' import warning from './warning' import invariant from 'invariant' import Redirect from './Redirect' import { falsy } from './PropTypes' const { string, object } = React.PropTypes /** * An <IndexRedirect> is used to redirect from an indexRoute. */ const IndexRedirect = React.createClass({ ...
frontend/app_v2/src/components/Alphabet/AlphabetPresentation.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' import { Link } from 'react-router-dom' // FPCC import AlphabetPresentationSelected from 'components/Alphabet/AlphabetPresentationSelected' import SectionTitle from 'components/SectionTitle' function AlphabetPresentation({ characters, selectedData, kids, li...
actor-apps/app-web/src/app/components/modals/create-group/Form.react.js
xiaotaijun/actor-platform
import _ from 'lodash'; import Immutable from 'immutable'; import keymirror from 'keymirror'; import React from 'react'; import { Styles, TextField, FlatButton } from 'material-ui'; import CreateGroupActionCreators from 'actions/CreateGroupActionCreators'; import ContactStore from 'stores/ContactStore'; import Cont...
.storybook/stories/LoadingOverlay.js
derrickpelletier/react-loading-overlay
import React from 'react' import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import styled from 'styled-components' import LoadingOverlay from '../../src/LoadingOverlay.js' const wrapped = ( <div style={{padding: '20px', background: '#FFF'}}> <p>Lorem ipsum dolor sit...
src/components/Header/Header.js
jhines2k7/react-starter-one
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import styles from './Header.css'; import withStyles from '../../decorators/withStyles'; import Link from '../Link'; import Navigation from '../Navigation'; @withStyles(styles) class Header extends Compo...
ui/src/components/common/Header.js
d3sw/conductor
import React, { Component } from 'react'; import { Link } from 'react-router' import { Navbar, Nav, NavItem, NavDropdown, MenuItem, Input, Button, Tabs, Tab } from 'react-bootstrap'; import http from '../../core/HttpClient'; import d3 from 'd3'; import update from 'react-addons-update'; import { connect } from 'react-r...
client/src/app-components/topic-viewer.js
ivandiazwm/opensupports
import React from 'react'; import ReactDOM from 'react-dom'; import _ from 'lodash'; import classNames from 'classnames'; import {Link} from 'react-router'; import i18n from 'lib-app/i18n'; import API from 'lib-app/api-call'; import ModalContainer from 'app-components/modal-container'; import TopicEditModal from 'app-...
src/parser/paladin/holy/modules/beacons/DirectBeaconHealing.js
sMteX/WoWAnalyzer
import React from 'react'; import { Trans } from '@lingui/macro'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage } from 'common/format'; import Statistic from 'interface/statistics/Statistic'; import STATISTIC_ORDER from 'interface/others/STATISTIC_ORDER'; impor...
src/js/component/Clickable.js
drexelieee/dragonhacks
import 'css/Clickable.css'; import React, { Component } from 'react'; import classNames from 'classnames'; export default class Clickable extends Component { render() { let rootClasses = classNames('clickable', { 'clickable--border': this.props.border, 'clickable--link': this.props.link, 'clic...
packages/lore-react-forms-material-ui/src/fields/custom.js
lore/lore-forms
import React from 'react'; import _ from 'lodash'; import { Field } from 'lore-react-forms'; export default function(form, props, name) { return ( <Field name={name}> {(field) => { return props.render(field, props); }} </Field> ); }
pootle/static/js/shared/components/FormSelectInput.js
evernote/zing
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import React from 'react'; import Select from 'react-selec...
web/src/SuggestTweets.js
remeh/smartwitter
import React, { Component } from 'react'; import { Button, Container, Divider, Tab, } from 'semantic-ui-react' import XHR from './xhr.js'; import TweetCard from './TweetCard.js'; import './App.css'; class SuggestTweets extends Component { constructor(props) { super(props); this.refreshTimeout = null...
examples/HighstockPlotBands/index.js
AlexMayants/react-jsx-highcharts
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( <App />, document.getElementById('root') );
examples/01 Dustbin/Restaurant Host/index.js
tylercollier/react-dnd-demo
import React, { Component } from 'react'; import Container from './Container'; export default class RestaurantHost extends Component { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/01%20Dustbin/Multiple%20Targets'>Browse the Source</a>...
src/pages/SettingPage.js
LinDing/two-life
import React, { Component } from 'react'; import { StyleSheet, Navigator, Dimensions, TouchableOpacity, AlertIOS, Alert, AsyncStorage, Modal, TextInput, TouchableHighlight } from 'react-native'; import { createAnimatableComponent, View, Text } from 'react-native-animatable'; import CommonNav from '...
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
ebihara99999/mastodon
import React from 'react'; import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, emoji_se...
app/javascript/mastodon/components/column_back_button.js
MastodonCloud/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class ColumnBackButton extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; handleClick = () => { if (window.history && window.history.length === 1)...
App/Components/ListItem.js
bretth18/bison
import { View, Text, TouchableHighlight, StyleSheet} from 'react-native'; import React, { Component } from 'react'; import moment from 'moment'; import { Icon } from 'native-base'; import { Card, CardImage, CardTitle, CardContent, CardAction } from 'react-native-card-view'; const styles = StyleSheet....
client/login.js
BillZito/greenfield
import React from 'react'; import { StyleSheet, Text, View, Image, AlertIOS, AsyncStorage } from 'react-native'; import { Font } from 'exponent'; import { Container, Header, Title, Content, Footer, Button, List, ListItem, Input, InputGroup } from 'native-base'; import { Ionicons } from '@exponent/vector-ico...
examples/js/custom/csv-button/fully-custom-csv-button.js
echaouchna/react-bootstrap-tab
/* eslint max-len: 0 */ /* eslint no-unused-vars: 0 */ /* eslint no-alert: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn, InsertButton } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; ...
examples/js/pagination/custom-pagination-table.js
pvoznyuk/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; i++) { const id = startId + i; products.push({ id: id, ...
classic/src/scenes/mailboxes/src/Components/Backed/ServiceAvatar.js
wavebox/waveboxapp
import React from 'react' import PropTypes from 'prop-types' import { accountStore } from 'stores/account' import shallowCompare from 'react-addons-shallow-compare' import Resolver from 'Runtime/Resolver' import ACAvatarCircle2 from 'wbui/ACAvatarCircle2' export default class ServiceAvatar extends React.Component { ...
packages/react-art/src/ReactART.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. */ import React from 'react'; import ReactVersion from 'shared/ReactVersion'; import {LegacyRoot} from 'shared/ReactRootTags'; import...
src/svg-icons/action/settings-input-component.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettingsInputComponent = (props) => ( <SvgIcon {...props}> <path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2....
src/components/Header.js
ecovirtual/dclv-calculator
import React from 'react'; import { Link } from 'react-router'; import { Menu } from 'semantic-ui-react'; const Header = () => { return ( <Menu> <Menu.Item as={Link} to="/" name="inicio" content="Inicio" /> <Menu.Item as={Link} to="/about" name="about" ...
docs/src/Root.js
laran/react-bootstrap
import React from 'react'; import Router from 'react-router'; const Root = React.createClass({ statics: { /** * Get the list of pages that are renderable * * @returns {Array} */ getPages() { return [ 'index.html', 'introduction.html', 'getting-started.html',...
application/components/calendar/Calendar.js
buildreactnative/assemblies-tutorial
import moment from 'moment'; import Icon from 'react-native-vector-icons/Ionicons'; import NavigationBar from 'react-native-navbar'; import React, { Component } from 'react'; import { View, Text, ListView, TouchableOpacity } from 'react-native'; import { uniq, flatten, find } from 'underscore'; import { getSectionData,...
src/components/navbar/index.js
jamjar919/bork
import React from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { toggleMenuAction } from '../../actions'; const NavbarItem = props => ( <li className="list-group-item list-group-item-action"> { props.children } </l...
modules/RouteUtils.js
MattSPalmer/react-router
import React from 'react' import warning from 'warning' function isValidChild(object) { return object == null || React.isValidElement(object) } export function isReactChildren(object) { return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)) } function checkPropTypes(componentName, p...
modules/Link.js
okcoker/react-router
import React from 'react' import warning from 'warning' const { bool, object, string, func } = React.PropTypes function isLeftClickEvent(event) { return event.button === 0 } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) } function isEmptyObject(obj...
src/components/componentWithPopup.js
markup-app/markup
'use strict'; import React from 'react'; import {generatePid} from '../utilities/general'; const propTypes = { children: React.PropTypes.node.isRequired, message: React.PropTypes.node, style: React.PropTypes.object, forceHide: React.PropTypes.bool }; const defaultProps = { message: '', forceHide: false }...
.history/src/components/InstaCelebs/index_20171001004543.js
oded-soffrin/gkm_viewer
import React from 'react'; import { connect } from 'react-redux' import _ from 'lodash' const InstaCelebs = ({instaCeleb}) => { console.log('instaCeleb', instaCeleb) const stats = _.map(instaCeleb.stats, (x,y) => <div>{y} - {x.like}</div>) return ( <div className="stats"> <h1>Stats</h1> {stats...
src/apps/dynamicUI/component/grid/sequenceColumn.js
ziaochina/reactMonkey
import React from 'react' import {Table, Column, Cell} from 'fixed-data-table' export function appendSequenceColumn(columns, gridProps){ columns.splice(0,0,( <Column key= "sequence" width = {40} fixed = {true} cell = {props => ( <Cell> {props.rowIndex + ''} </Ce...
src/main/viz/FeatureTrack.js
snaheth/pileup.js
/** * Visualization of features, including exons and coding regions. * @flow */ 'use strict'; import type {Feature, FeatureDataSource} from '../sources/FeatureDataSource'; import type {DataCanvasRenderingContext2D} from 'data-canvas'; import type {VizProps} from '../VisualizationWrapper'; import type {Scale} from ...
client/modules/Post/components/PostListItem/PostListItem.js
Hashnode/mern-starter
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { FormattedMessage } from 'react-intl'; // Import Style import styles from './PostListItem.css'; function PostListItem(props) { return ( <div className={styles['single-post']}> <h3 className={styles[...
src/svg-icons/communication/call.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationCall = (props) => ( <SvgIcon {...props}> <path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-...
app/src/components/common/KortCoin.js
kort/kort-native
import React, { Component } from 'react'; import { Text } from 'react-native'; import * as Animatable from 'react-native-animatable'; class KortCoin extends Component { renderKoin() { let animationEffect = ''; if (this.props.animationStyle === 'normal') { animationEffect =...
frontend/src/components/frame/components/Progress.js
jf248/scrape-the-plate
import React from 'react'; import { Loading } from 'controllers/loading'; import ProgressPres from './ProgressPres'; function Progress() { return ( <Loading render={({ isLoading }) => <ProgressPres {...{ isLoading }} />} /> ); } export default Progress;
bunbunbakeshop/src/Products.js
jzheng13/SSUI-Homework-4
import React, { Component } from 'react'; import './styles/index.css'; import './styles/font-awesome.min.css'; import Item from './Item'; import Menu from './Menu'; class Products extends Component { constructor(props) { super(props); this.state = { item: -1, } this.ch...
actor-apps/app-web/src/app/components/common/MessageItem.react.js
bunnyblue/actor-platform
import _ from 'lodash'; import React from 'react'; import { PureRenderMixin } from 'react/addons'; import memoize from 'memoizee'; import classNames from 'classnames'; import emojify from 'emojify.js'; import hljs from 'highlight.js'; import marked from 'marked'; import emojiCharacters from 'emoji-named-characters'; ...
app/containers/RepoListItem/index.js
w01fgang/react-boilerplate
/** * RepoListItem * * Lists the name and the issue count of a repository */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { FormattedNumber } from 'react-intl'; import { selectCurrentUser } from 'containers/App/selectors'; import ListItem from...
entry_types/scrolled/package/src/frontend/layouts/TwoColumn.js
codevise/pageflow
import React from 'react'; import classNames from 'classnames'; import {ContentElements} from '../ContentElements'; import {useNarrowViewport} from '../useNarrowViewport'; import styles from './TwoColumn.module.css'; function availablePositions(narrow) { if (narrow) { return ['inline', 'wide', 'full']; } e...
app/src/components/ProductList.js
jluangphasy/shop
import React, { Component } from 'react'; import Product from './Product'; class ProductList extends Component { /** * Render <Product /> * * @param: {id} * - id (string): product id * @return: {JSX} */ renderProduct(id) { const quantity = this.props.order[id] || 0; return ( <P...
app/javascript/src/components/UserProfileCard.js
michelson/chaskiq
import React from 'react' import { withRouter, Link } from 'react-router-dom' import { connect } from 'react-redux' import Moment from 'react-moment' import Accordeon from './Accordeon' import Badge from './Badge' import { compact } from 'lodash' function UserProfileCard ({ app, app_user }) { function getPropertiesI...
src/render-react.js
abramz/gulp-render-react
/*! Gulp Render React | MIT License */ import gutil from 'gulp-util'; import through from 'through2'; import React from 'react'; import ReactDOMServer from 'react-dom/server'; /** * Requires a file containing a React component and create an instance of it * @param {String} filePath file path to the React component...
examples/counter/index.js
omnidan/redux-devtools
import React from 'react'; import App from './containers/App'; React.render( <App />, document.getElementById('root') );
app/components/checkbox.js
garth/material-components
import React from 'react'; import { connect } from '@cerebral/react'; import Example from './example'; import { Checkbox } from '../../lib'; import { state, signal } from 'cerebral/tags'; const CheckboxDemo = ({ checkbox, checkboxChanged }) => ( <div> <Example code={` import { Checkbox } from 'material-com...
src/Glyphicon.js
mmartche/boilerplate-shop
import React from 'react'; import classNames from 'classnames'; const Glyphicon = React.createClass({ propTypes: { /** * bootstrap className * @private */ bsClass: React.PropTypes.string, /** * An icon name. See e.g. http://getbootstrap.com/components/#glyphicons */ glyph: Re...
tests/react/createElementRequiredProp_string.js
mroch/flow
// @flow import React from 'react'; class Bar extends React.Component<{test: number}> { render() { return ( <div> {this.props.test} </div> ) } } class Foo extends React.Component<{}> { render() { const Cmp = Math.random() < 0.5 ? 'div' : Bar; return (<Cmp/>); } }
src/components/icons/close.js
ipfs-shipyard/peerpad
import React from 'react' export default ({ className, style }) => ( <svg width='16' height='16' viewBox='0 0 149 146.7' xmlns='http://www.w3.org/2000/svg' className={className} style={style}> <path d='M74.5 11a62.3 62.3 0 1 0 62.3 62.3A62.37 62.37 0 0 0 74.5 11zm55 62.39a55 55 0 1 1-55-55 55.11 55.11 0 0 1 55.0...
src/components/Feedback/Feedback.js
amit242/antyka
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.less'; import withStyles from '../../decorators/withStyles'; import withViewport from '../../decorators/withViewport'; @withViewport @withStyles(styles) class Feedback { render() { ...
packages/cf-component-dropdown/example/basic/component.js
koddsson/cf-ui
import React from 'react'; import { Dropdown, DropdownLink, DropdownSeparator } from 'cf-component-dropdown'; import { Button, ButtonGroup } from 'cf-component-button'; class DropdownComponent extends React.Component { constructor(props) { super(props); this.state = { dropdown1Open: false, ...
example_components/RadioInput.react.js
blueberryapps/react-bluekit
import Component from '../src/app/PureRenderComponent.react'; import Radium from 'radium'; import React from 'react'; import RPT from 'prop-types'; import ToolTip from '../src/app/atoms/ToolTip.react'; @Radium export default class RadioInput extends Component { static propTypes = { horizontal: RPT.bool, nam...
src/components/NotAuthenticated.js
react-auth/react-auth
import React from 'react'; import utils from '../utils'; export default class NotAuthenticated extends React.Component { static contextTypes = { user: React.PropTypes.object }; render() { var user = this.context.user; var authenticated = user !== undefined; if (this.props.inGroup) { if (...
src/Enigma/UI/Component/WiredWheel/Reflector.js
minkiele/EnigmaUI
import React from 'react'; import EventEmitter from 'events'; import FormControl from 'react-bootstrap/lib/FormControl'; import ControlLabel from 'react-bootstrap/lib/ControlLabel'; export const INITIAL_REFLECTOR_TYPE = ''; export default class Reflector extends React.Component { updateType (type) { this.props...
src/svg-icons/places/child-friendly.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesChildFriendly = (props) => ( <SvgIcon {...props}> <path d="M13 2v8h8c0-4.42-3.58-8-8-8zm6.32 13.89C20.37 14.54 21 12.84 21 11H6.44l-.95-2H2v2h2.22s1.89 4.07 2.12 4.42c-1.1.59-1.84 1.75-1.84 3.08C4.5 20.43...
src/components/MapState.js
neontribe/gbptm
import React from 'react'; import config from '../config'; const MapStateContext = React.createContext(); const reducer = (state, newState) => { return { ...state, ...newState, }; }; export const MapStateProvider = ({ children }) => { const [state, setState] = React.useReducer(reducer, { center: co...
src/SpringFitnessRedux.js
mrbjoern/SpringFitnessMobile
import React from 'react'; import { Provider, connect } from 'react-redux' import { AppRegistry, Text } from 'react-native'; import StartPage from './components/page/StartPage'; import LoginPage from './components/page/LoginPage'; import HomePage from './components/page/HomePage'; import WorkoutPage from './components...
src/interface/icons/ScrollFilled.js
yajinni/WoWAnalyzer
import React from 'react'; // https://thenounproject.com/jngll2/uploads/?i=1219368 // Created by jngll from the Noun Project const Icon = ({ ...other }) => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="icon" {...other}> <path d="M80.64,10.87l-.52,0-.26,0H30.64A11.24,11.24,0,0,0,19.42...
react/features/mobile/navigation/screenOptions.js
gpolitis/jitsi-meet
// @flow import { TransitionPresets } from '@react-navigation/stack'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { Platform } from 'react-native'; import { Icon, IconClose, IconHelp, IconHome, IconInfo, IconSettings } from '../../base/icons'; import BaseT...
app/jsx/account_course_user_search/NewCourseModal.js
venturehive/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...
docs/src/app/components/pages/components/FloatingActionButton/Page.js
mmrtnz/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 floatingButtonReadmeText from './README'; import floatingButtonExampleSim...
ignite/Examples/Containers/ignite-ir-boilerplate/RowExample.js
Ezeebube5/Nairasense
import React from 'react' import { View, Text, ListView } from 'react-native' import { connect } from 'react-redux' // Styles import styles from './Styles/RowExampleStyle' class RowExample extends React.Component { constructor (props) { super(props) // If you need scroll to bottom, consider http://bit.ly/2b...
js/App/Components/SensorDetails/SubViews/CalendarModalComponent.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 *...
client/scripts/components/WordCloud.js
ahoarfrost/metaseek
import React from 'react'; import { TagCloud } from 'react-tagcloud'; import ReactTooltip from 'react-tooltip'; var WordCloud = React.createClass({ getInitialState : function() { return {} }, showHover : function(value, event) { this.setState({"hoverValue":value}); }, render : function() { // C...
client/gatsby-browser.js
HKuz/FreeCodeCamp
import React from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import { createStore } from './src/redux/createStore'; import AppMountNotifier from './src/components/AppMountNotifier'; import GuideNavContextProvider from './src/contexts/GuideNavigationContext'; const store = cre...
fields/types/html/HtmlField.js
wustxing/keystone
import _ from 'underscore'; import Field from '../Field'; import React from 'react'; import tinymce from 'tinymce'; import { FormInput } from 'elemental'; /** * TODO: * - Remove dependency on underscore */ var lastId = 0; function getId() { return 'keystone-html-' + lastId++; } module.exports = Field.create({ ...
src/components/stock/Stock.js
sebalopez111/countdown
import React, { Component } from 'react'; import moment from 'moment'; var embeddedScript = '<!-- TradingView Widget BEGIN -->' + ' <script type="text/javascript" src="https://d33t3vvu2t2yu5.cloudfront.net/tv.js"></script>' + ' <script type="text/javascript">' + ' new TradingView.widget({'...
src/Parser/Priest/Shadow/Modules/Features/AlwaysBeCasting.js
enragednuke/WoWAnalyzer
import React from 'react'; import { formatPercentage } from 'common/format'; import { STATISTIC_ORDER } from 'Main/StatisticBox'; import CoreAlwaysBeCasting from 'Parser/Core/Modules/AlwaysBeCasting'; import SPELLS from 'common/SPELLS'; class AlwaysBeCasting extends CoreAlwaysBeCasting { static ABILITIES_ON_GCD = ...
js/containers/NewChallengeContainer.js
SamyZ/BoomApp
import React from 'react'; import { connect } from 'react-redux'; import { Navigator } from 'react-native'; import { createChallenge } from '../actions/challengesActions'; import SportView from '../views/newChallenge/SportView'; import ExerciseView from '../views/newChallenge/ExerciseView'; import FriendsView fro...
admin/client/App/shared/FlashMessages.js
pr1ntr/keystone
/** * Render a few flash messages, e.g. errors, success messages, warnings,... * * Use like this: * <FlashMessages * messages={{ * error: [{ * title: 'There is a network problem', * detail: 'Please try again later...', * }], * }} * /> * * Instead of error, it can also be hilight, info, ...
step8-unittest/node_modules/enzyme/src/ShallowTraversal.js
jintoppy/react-training
import React from 'react'; import isEmpty from 'lodash/isEmpty'; import isSubset from 'is-subset'; import { coercePropValue, propsOfNode, splitSelector, isCompoundSelector, selectorType, AND, SELECTOR, nodeHasType, } from './Utils'; export function childrenOfNode(node) { if (!node) return []; cons...
dashboard/client/src/js/components/modules/EventVariationLineGraph.js
jigarjain/sieve
import React from 'react'; import {ResponsiveContainer, LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend} from 'recharts'; import Loader from './base/Loader'; import Helpers from '../../utils/helpers'; /** * Renders a Line graph of for control & variations for each goal * * @param {Array} graphData *...
src/bundles/Story/scenes/StoryScene/index.js
CharlesMangwa/Chloe
/* @flow */ import React from 'react' import StoryContainer from '@Story/containers/StoryContainer' type Props = { current: Object, pages: Array<Object>, period: string, } const StoryScene = (props: Props): React$Element<any> => ( <StoryContainer current={props.current} pages={props.pages} period...
src/components/picker-core/index.js
summerstream/react-practise
import React, { Component } from 'react'; import styles from './styles.js'; class PickerCore extends Component{ constructor(props){ super(props); this._startPosition = 0; this._dist = 0; this._translateY = 0; this._initValue = this.props.current; this._current = thi...
packages/demo/src/components/RaisedButtonWithTooltip.js
hoschi/yode
import React from 'react' import RaisedButton from 'material-ui/RaisedButton' import Tooltip from 'material-ui/internal/Tooltip' class RaisedButtonWithTooltip extends React.Component { constructor(props) { super(props) this.state = { showTooltip: false } } showTooltip =...
components/Footer/Footer.js
andeemarks/conf-gen-div-react
import React from 'react'; import Link from '../Link'; import { html } from './index.md'; function Footer() { return ( <footer className="mdl-mini-footer" style={{ backgroundColor: '#000000' }}> <div className="mdl-mini-footer__left-section"> <div dangerouslySetInnerHTML={{ __html: html }} /> ...