path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
test/NavbarSpec.js
chris-gooley/react-materialize
/* global describe, it, expect */ import React from 'react'; import { shallow, mount } from 'enzyme'; import Navbar from '../src/Navbar'; import NavItem from '../src/NavItem'; describe('<Navbar />', () => { let wrapper; it('renders a navbar', () => { wrapper = shallow( <Navbar brand='Logo' right> ...
src/components/Nav.js
jakedeichert/react-starter
import React from 'react'; import styled from 'styled-components'; import Link from 'components/Link'; const Wrapper = styled.div` margin: 0 auto 50px; text-align: center; a { color: #ff670f; margin: 0 10px; } `; const Nav = () => ( <Wrapper> <Link to="/">/home</Link> <Link to="/about">/abo...
modules/__tests__/transitionHooks-test.js
arbas/react-router
/*eslint-env mocha */ /*eslint react/prop-types: 0*/ import expect, { spyOn } from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import execSteps from './execSteps' import Router from '../Router' describe('When a router enters a branch', function () { let node, Dashb...
geonode/monitoring/frontend/monitoring/src/components/organisms/header/index.js
tomkralidis/geonode
/* ######################################################################### # # Copyright (C) 2019 OSGeo # # This program is free software: 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 # ...
app/containers/home/HomePage.js
robogroves/ebp
import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import Home from '../../components/home/Home'; import * as HomeActions from '../../actions/home/home'; function mapStateToProps(state) { return { counter: state.counter }; } function mapDispatchToProps(dispatch) { return bind...
examples/real-world/containers/Root.js
tcoopman/redux
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { Router, Route } from 'react-router'; import configureStore from '../store/configureStore'; import App from './App'; import UserPage from './UserPage'; import RepoPage from './RepoPage'; const store = configureStore(); export de...
src/static/components/Loader/index.js
samrose3/eventhunt
import React from 'react'; import './style.scss'; export default (props) => { return ( <div className="loader"> <div className="dot"></div> <div className="dot"></div> <div className="dot"></div> </div> ); };
src/components/switch-button/switch-button.story.js
dima-bu/b2b.core
import React from 'react'; import {storiesOf, action} from '@kadira/storybook'; import SwitchButton from './switch-button'; const styles = { padding: '20px', 'backgroundColor': '#deecee', 'height': '80vh' }; storiesOf('SwitchButton', module) .addDecorator(getStory => ( <div style={styles}>{getStory()}</di...
packages/cmf/src/bootstrap.js
Talend/ui
import React from 'react'; import { render } from 'react-dom'; import createSagaMiddleware from 'redux-saga'; import { batchedSubscribe } from 'redux-batched-subscribe'; import { spawn } from 'redux-saga/effects'; import compose from 'redux'; import App from './App'; import actionCreator from './actionCreator'; import...
packages/wix-style-react/src/StyledNestableList/Arrow.js
wix/wix-style-react
import React from 'react'; export function Arrow({ className = undefined }) { return ( <svg className={className} xmlns="http://www.w3.org/2000/svg" width={24} height={8} viewBox="0 0 24 8" > <defs> <filter id="zaxo0jk8xa" width="110.4%" ...
src/containers/subscription/SubscriptionFormScreen.js
GustavoKatel/franz
import { remote } from 'electron'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import PaymentStore from '../../stores/PaymentStore'; import SubscriptionForm from '../../components/subscription/SubscriptionForm'; const { BrowserWindow } ...
src/components/Disc.js
pjkarlik/Radial
import React from 'react'; import ReactDOM from 'react-dom'; import TweenMax, { Bounce } from 'gsap'; import Draggable from 'gsap/src/uncompressed/utils/Draggable'; /** Comments here */ /* eslint no-console: 0 */ /* eslint arrow-body-style: 0 */ /* eslint react/jsx-no-bind: 0 */ export default class Disc extends Reac...
jenkins-design-language/src/js/components/material-ui/svg-icons/action/bookmark.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ActionBookmark = (props) => ( <SvgIcon {...props}> <path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/> </SvgIcon> ); ActionBookmark.displayName = 'ActionBookmark'; ActionBookmark.muiName = 'SvgIcon'; export default Actio...
web/src/js/components/Authentication/FirebaseAuthenticationUIAction.js
gladly-team/tab
import React from 'react' import { checkIfEmailVerified } from 'js/authentication/helpers' class FirebaseAuthenticationUIAction extends React.Component { componentDidMount() { // See if the user verified their email address so that we can // log the verification. It would be better to user a cloud // fun...
packages/mangojuice-react/__tests__/React.spec.js
mangojuicejs/mangojuice
import AbstractTests from 'mangojuice-react-core/tests'; import React from 'react'; import ReactDOM from 'react-dom'; import Subscribe from 'mangojuice-react'; AbstractTests(React, ReactDOM, Subscribe, 'React');
client/components/dashboard.js
olegccc/10cards
import React from 'react' import {connect} from 'react-redux' import CardActions from '../actions/card' import Card from './card' import { withRouter } from 'react-router' import Answer from './answer' import CardState from '../redux/cardState' import { Button } from 'react-toolbox/lib/button' class Dashboard extends ...
app/components/ToggleOption/index.js
projectcashmere/web-server
/** * * ToggleOption * */ import React from 'react'; import { injectIntl, intlShape } from 'react-intl'; const ToggleOption = ({ value, message, intl }) => ( <option value={value}> {message ? intl.formatMessage(message) : value} </option> ); ToggleOption.propTypes = { value: React.PropTypes.string.isRequir...
addons/viewport/src/manager/index.js
rhalff/storybook
import React from 'react'; import addons from '@storybook/addons'; import { Panel } from './components/Panel'; import { ADDON_ID, PANEL_ID } from '../shared'; const addChannel = api => { const channel = addons.getChannel(); addons.addPanel(PANEL_ID, { title: 'Viewport', render() { return <Panel ch...
client/node_modules/uu5g03/dist-node/forms-v3/internal/text-input.js
UnicornCollege/ucl.itkpd.configurator
import React from 'react'; import {BaseMixin, ElementaryMixin, LsiMixin} from './../../common/common.js'; import Glyphicon from './../../bricks/glyphicon.js'; import Link from './../../bricks/link.js'; import './text-input.less'; const INPUT_TYPE_TEXT = 'text'; const INPUT_TYPE_PASSWORD = 'password'; const INPUT_TY...
counter/test/containers/App.spec.js
samlatif-uk/redux-tdd-hw
import expect from 'expect' import React from 'react' import TestUtils from 'react-addons-test-utils' import { Provider } from 'react-redux' import App from '../../containers/App' import configureStore from '../../store/configureStore' function setup(initialState) { const store = configureStore(initialState) const...
src/client/components/ConvoList.js
janicduplessis/imessage-client
import React from 'react'; import StyleSheet from 'react-style'; import { Paper, } from 'material-ui'; import colors from '../utils/colors'; class ConvoList extends React.Component { render() { let convos = this.props.convos.map((c) => { let selected = this.props.curConvo && c.id === this.props.curConv...
lib/cli/src/generators/REACT_NATIVE/template-csf/storybook/stories/Button/Button.stories.js
storybooks/storybook
import { action } from '@storybook/addon-actions'; import { text } from '@storybook/addon-knobs'; import { storiesOf } from '@storybook/react-native'; import React from 'react'; import { Text } from 'react-native'; import Button from '.'; import CenterView from '../CenterView'; storiesOf('Button', module) .addDecora...
App/Platform/Back.android.js
taskrabbit/ReactNativeSampleApp
import React from 'react'; import { BackAndroid, } from 'react-native'; import AppActions from '../Actions/AppActions'; // import DrawerStore from '../Stores/DrawerStore'; const Back = { setNavigator(navigator) { BackAndroid.addEventListener('hardwareBackPress', () => { // if (DrawerStore.get().op...
src/components/common/svg-icons/content/flag.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentFlag = (props) => ( <SvgIcon {...props}> <path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/> </SvgIcon> ); ContentFlag = pure(ContentFlag); ContentFlag.displayName = 'ContentFlag'; ContentFlag.muiName = '...
src/components/InteriorLeftNav/InteriorLeftNav-test.js
jzhang300/carbon-components-react
import React from 'react'; import InteriorLeftNav from '../InteriorLeftNav'; import InteriorLeftNavList from '../InteriorLeftNavList'; import InteriorLeftNavItem from '../InteriorLeftNavItem'; import { mount } from 'enzyme'; describe('InteriorLeftNav', () => { describe('Renders as expected', () => { const wrappe...
src/svg-icons/action/code.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCode = (props) => ( <SvgIcon {...props}> <path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/> </SvgIcon> ); ActionCode = pure(ActionCode); ActionCode.di...
src/svg-icons/image/brightness-4.js
mit-cml/iot-website-source
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBrightness4 = (props) => ( <SvgIcon {...props}> <path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13...
src/app/components/media/BulkActionsMenu.js
meedan/check-web
import React from 'react'; import Relay from 'react-relay/classic'; import { QueryRenderer, graphql } from 'react-relay/compat'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Button from '@material-ui/core/Button'; import CircularProgress from '@material-ui/core/CircularProgr...
src/native/home/HomePage.react.js
abelaska/este
import React, { Component } from 'react'; import { CenteredContainer, Text } from '../app/components'; import { Platform } from 'react-native'; export default class HomePage extends Component { render() { return ( <CenteredContainer> <Text style={{ textAlign: 'center' }}> {Platform.selec...
analysis/warlockdemonology/src/modules/talents/DemonicConsumption.js
yajinni/WoWAnalyzer
import React from 'react'; import Analyzer, { SELECTED_PLAYER, SELECTED_PLAYER_PET } from 'parser/core/Analyzer'; import Events from 'parser/core/Events'; import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage'; import { formatThousands } from 'common/format'; import SPELLS from 'common/SPELLS'; ...
node_modules/react-router/es6/Lifecycle.js
ASIX-ALS/asix-final-project-frontend
import warning from './routerWarning'; import React from 'react'; import invariant from 'invariant'; var object = React.PropTypes.object; /** * The Lifecycle mixin adds the routerWillLeave lifecycle method to a * component that may be used to cancel a transition or prompt the user * for confirmation. * * On stan...
src/svg-icons/action/assignment-return.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAssignmentReturn = (props) => ( <SvgIcon {...props}> <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 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-2zm-7 0c.55 0 1 .45...
map/src/components/Dashboard/DashDates.js
Vizzuality/care_usa
'use strict'; import './dash-dates-styles.postcss'; import React from 'react'; import moment from 'moment'; import _ from 'underscore'; import utils from '../../scripts/helpers/utils'; class DashboardDates extends React.Component { constructor(props) { super(props); this.props = props; this.state = {};...
src/common/components/user-avatar/index.js
canonical-ols/build.snapcraft.io
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { HeadingOne, HeadingThree } from '../vanilla-modules/heading'; import styles from './user-avatar.css'; export class UserAvatarView extends Component { render() { const { auth, user } = t...
src/Containers/RootContainer.js
Ezeebube5/Nairasense
import { connect } from 'react-redux'; import React, { Component } from 'react'; import { View, StatusBar } from 'react-native'; import Navigation from '../Navigation/AppNavigation'; import StartupActions from '../Redux/StartupRedux'; import ReduxPersist from '../Config/ReduxPersist'; // Styles import styles from './...
App/AddEvent.js
adnanhemani/RideApp
import NavigationBar from 'react-native-navbar'; 'use strict'; var CheckBox = require('react-native-checkbox'); import React, { Component } from 'react'; import { StyleSheet, Text, View, Navigator, TextInput, Picker, ScrollView, Alert, } from 'react-native' import { Platform, TouchableHighlight, ...
server.js
llaine/react-isomorphic
import fs from 'fs'; import express from 'express'; import React from 'react'; import { renderToString } from 'react-dom/server'; import { match, RoutingContext } from 'react-router'; import ContactsApp from './app/component/contact-app.jsx'; const app = express(); app.set('views', './'); app.set('view engine', 'ejs'...
site/src/components/Chat.js
livesmoking/livesmoking
import React from 'react' class Chat extends React.Component { constructor(props) { super(props) this.state = { text: '', } this.setText = this.setText.bind(this) this.sendMessage = this.sendMessage.bind(this) } componentDidUpdate() { this.refs.messages.scrollTop = this.refs.messag...
packages/react/src/components/RadioButton/RadioButton.Skeleton.js
carbon-design-system/carbon-components
/** * 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 PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import { settings } from 'carbon-components'; co...
packages/idyll-cli/test/multiple-component-dirs/src/components-2/functional-component.js
idyll-lang/idyll
import React from 'react'; export default () => { return <div>Let's put the fun back in functional!</div>; };
src/svg-icons/editor/format-bold.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatBold = (props) => ( <SvgIcon {...props}> <path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1...
docs/app/Examples/collections/Form/Shorthand/FormExampleFieldLabelObject.js
clemensw/stardust
import React from 'react' import { Checkbox, Form } from 'semantic-ui-react' const FormExampleFieldLabelElement = () => ( <Form> <Form.Field control={Checkbox} label={<label>I agree to the Terms and Conditions</label>} /> </Form> ) export default FormExampleFieldLabelElement
src/browser/components/focus.js
redcom/doctori-romani-in-berlin
// @flow weak // Higher order component for focusing elements by ValidationError. import React from 'react'; import { ValidationError } from '../../common/lib/validation'; import { findDOMNode } from 'react-dom'; const focus = (errorProp) => (WrappedComponent) => class Wrapper extends React.Component { component...
test/test_helper.js
davidsanchez96/pruebaTecnica
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
test/js/release_test/ViroParticleTest.js
viromedia/viro
/** * Sample React Native App * https://github.com/facebook/react-native */ 'use strict'; import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, } from 'react-native'; import { ViroSceneNavigator, ViroScene, ViroARScene, ViroBox, ViroMaterials, ViroNode,...
src/renderer/components/Shared/TracksHeaderCell.react.js
MrBlenny/museeks
import React, { Component } from 'react'; import classnames from 'classnames'; import Dragger from '../DragResize/Dragger'; class TracksHeaderCell extends Component { static propTypes = { children: React.PropTypes.node, id: React.PropTypes.string, width: React.PropTypes.number, c...
src/scenes/home/codeSchools/codeSchools.js
miaket/operationcode_frontend
import React, { Component } from 'react'; import LinkButton from 'shared/components/linkButton/linkButton'; import Section from 'shared/components/section/section'; import ApprovedSchools from './approvedSchools/approvedSchools'; import PartnerSchools from './partnerSchools/partnerSchools'; import OnlineSchools from '....
components/DashboardPlayer.js
turntwogg/final-round
import React from 'react'; import { useTheme } from '@turntwo/react-ui'; import Link from './Link'; import Typography from './Typography'; import Ratio from './Ratio'; import Image from './Image'; import FollowButton from './FollowButton'; const DashboardPlayer = ({ player }) => { const { title, fieldPlayerImage, f...
src/layouts/PageLayout/PageLayout.js
adogpt/adogpt
import React from 'react' import { IndexLink, Link } from 'react-router' import PropTypes from 'prop-types' import './PageLayout.scss' import AppBar from 'material-ui/AppBar' import Toolbar from 'material-ui/Toolbar' import Button from 'material-ui/Button' import IconButton from 'material-ui/IconButton' import { withS...
docs/app/Examples/views/Statistic/Types/StatisticExampleTopLabel.js
mohammed88/Semantic-UI-React
import React from 'react' import { Statistic } from 'semantic-ui-react' const StatisticExampleTopLabel = () => ( <div> <Statistic> <Statistic.Label>Views</Statistic.Label> <Statistic.Value>40,509</Statistic.Value> </Statistic> </div> ) export default StatisticExampleTopLabel
src/scripts/components/main.js
gabrielseco/IdiomaticReact
'use strict'; import React from 'react'; import Router from 'react-router'; import Immutable from 'immutable'; import { AppFlux } from '../flux/AppFlux'; import App from './App'; import InterfaceHome from './Interfaces/Home'; import InterfaceRest from './Interfaces/Rest'; try { require('../../styles/main.scss'...
blueocean-material-icons/src/js/components/svg-icons/image/flash-off.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ImageFlashOff = (props) => ( <SvgIcon {...props}> <path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"/> </SvgIcon> ); ImageFlashOff.displayName = 'ImageFlashOff'; ImageFlashOff.muiName...
src/App.js
ijones16/react-hot-boilerplate
import React, { Component } from 'react'; export default class App extends Component { render() { return ( <h1>Hello, world.</h1> ); } }
src/containers/context.react-test.js
dchanko/js-starter
import React, { Component } from 'react'; import Rx from 'rxjs'; import { mount } from 'enzyme'; import { RxContextProvider, connect } from './context'; import renderer from 'react-test-renderer'; describe("RxContextProvider Container", () => { test('Sets context', () => { const provider = new RxContextProvider(...
pkg/interface/link/src/js/components/lib/pagination.js
ngzax/urbit
import React, { Component } from 'react'; import { Route, Link } from 'react-router-dom'; import { makeRoutePath } from '../../lib/util'; export class Pagination extends Component { render() { let props = this.props; let prevPage = (Number(props.page) - 1); let nextPage = (Number(props.page) + 1); ...
src/components/Feedback/Feedback.js
utkdigitalinitiatives/ibu
/** * 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, { Component } from 'react'; import withStyle...
src/svg-icons/image/wb-incandescent.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageWbIncandescent = (props) => ( <SvgIcon {...props}> <path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2....
src/components/GoogleMapDiv.js
agualbbus/fibmaps
import React, { Component } from 'react'; const style = { width: '100%', height: '100%', left: 0, top: 0, margin: 0, padding: 0, position: 'absolute', }; export default class GoogleMapDiv extends Component { shouldComponentUpdate() { return false; // disable react on this div } render() { ...
client/src/containers/dev-tools.js
triforkse/mesos-ui
import React from 'react'; // https://github.com/gaearon/redux-devtools#use-devtoolsinstrument-store-enhancer import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; const DevTools = createDevTools( <DockMonitor t...
src/TodoApp.js
Todolab/frontend
import React from 'react'; import {view as Todos} from './todos/'; import {view as Filter} from './filter/'; function TodoApp() { return( <div> <Todos/> <Filter/> </div> ) } export default TodoApp
app/utils/injectSaga.js
balintsoos/app.rezsi.io
import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; import getInjectors from './sagaInjectors'; /** * Dynamically injects a saga, passes component's props as saga arguments * * @param {string} key A key of the saga * @param {function} saga A r...
src/svg-icons/image/center-focus-strong.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCenterFocusStrong = (props) => ( <SvgIcon {...props}> <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V...
src/components/Footer.js
sparkdesignsystem/spark-design-system
/* eslint-disable react/jsx-one-expression-per-line */ import React from 'react'; import { SprkFooter } from '@sparkdesignsystem/spark-react'; const linkColumns = [ { heading: 'Support', links: [ { href: 'https://github.com/sparkdesignsystem/spark-design-system/blob/staging/CONTRIBUTI...
src/profile/genres.js
manu-garcia/react-pwa-from-scratch
import React, { Component } from 'react'; import { connect } from 'react-redux'; import TagsCloud from '../components/tags-cloud/tags-cloud'; import { setGenres } from '../actions/profile.actions' class MyGenres extends Component { onTagClick (tag) { // tag.selected = !tag.selected; // this.props...
docs/app/Examples/modules/Modal/Variations/index.js
aabustamante/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const ModalExamples = () => ( <ExampleSection title='Variations'> <ComponentExample title='Size' description='A modal...
packages/ringcentral-widgets-docs/src/app/pages/Components/CallAvatar/Demo.js
ringcentral/ringcentral-js-widget
import React from 'react'; // eslint-disable-next-line import CallAvatar from 'ringcentral-widgets/components/CallAvatar'; import styles from './styles.scss'; const props = {}; // props.isOnConferenceCall = true; // props.extraNum = 2; props.avatarUrl = null; // 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9Gc...
packages/mineral-ui-icons/src/IconSignalCellularConnectedNoInternet2Bar.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconSignalCellularConnectedNoInternet2Bar(props: IconProps) { const iconProps = { rtl: false, ...props }; ret...
boilerplate/app/modules/entities/entities-screen.js
ruddell/ignite-jhipster
import React from 'react' import { ScrollView, Text } from 'react-native' import { connect } from 'react-redux' // Styles /* eslint-disable no-unused-vars */ import RoundedButton from '../../shared/components/rounded-button/rounded-button' import { loginScreen, // ignite-jhipster-entity-screen-import-needle } from ...
src/modules/texts/containers/ReadingEnvironmentContainer/ReadingEnvironmentContainer.js
cltk/cltk_frontend
import React from 'react'; import { compose } from 'react-apollo'; import ReadingEnvironment from '../../components/ReadingEnvironment'; import readingEnvironmentQuery from '../../graphql/queries/readingEnvironment'; class ReadingEnvironmentContainer extends React.Component { render() { let work = null; if ( ...
src/organisms/cards/SimplePolicyCard/PolicyActions.js
policygenius/athenaeum
import React from 'react'; import PropTypes from 'prop-types'; import Layout from 'atoms/Layout'; import Button from 'atoms/Button'; import styles from './policy_card.module.scss'; export const PolicyActions = (props) => { const { onContinue, continueCTAText, selected } = props; return ( <div className={style...
packages/cf-component-heading/test/Heading.js
mdno/mdno.github.io
import React from 'react'; import { Heading } from '../../cf-component-heading/src/index'; import { felaSnapshot } from 'cf-style-provider'; test('should render size', () => { const snapshot = felaSnapshot(<Heading size={2}>Heading</Heading>); expect(snapshot.component).toMatchSnapshot(); expect(snapshot.styles)...
app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js
musashino205/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import AsyncSelect from 'react-select/async'; import { NonceProvider } from 'react-sele...
src/index.js
thomasmarkiewicz/assetitemizer.com
import React from 'react' import ReactDOM from 'react-dom' import App from './App' import registerServiceWorker from './registerServiceWorker' import { BrowserRouter as Router } from 'react-router-dom' import './index.css' ReactDOM.render(<Router><App /></Router>, document.getElementById('root')) registerServiceWorke...
test/specs/views/Feed/FeedEvent-test.js
Rohanhacker/Semantic-UI-React
import _ from 'lodash' import faker from 'faker' import React from 'react' import * as common from 'test/specs/commonTests' import FeedEvent from 'src/views/Feed/FeedEvent' import FeedLabel from 'src/views/Feed/FeedLabel' describe('FeedEvent', () => { common.isConformant(FeedEvent) common.rendersChildren(FeedEven...
source/index.js
andresgallego/filmsupply-clips
import React from 'react'; import { render } from 'react-dom'; import { Provider, connect } from 'react-redux'; import createApp, { store } from './App'; const App = createApp(React); const mapStateToProps = state => { return { clips: state.allClips.clips, filters: state.allFilters.filters, selectedFilt...
MobileApp/MessageHub/components/Search.js
FresnoState/mobilestudentintranet
import React, { Component } from 'react'; import { Text, Dimensions, View, ScrollView } from 'react-native'; import {Icon, Input} from 'native-base'; import SearchPanel from './searchViews/SearchPanel'; import SearchItem from './searchViews/SearchItem'; const { width, height } = Dimensions.get('window')...
src/HomeOld.js
ivmarcos/react-hot-boilerplate
import React, { Component } from 'react'; import AppBar from 'material-ui/AppBar'; import VideoSlider from './VideoSlider'; import { Card, CardText } from 'material-ui/Card'; import Text from 'material-ui/TextField'; import NavBar from './NavBar'; import Slide from './Slide'; class App extends Component { render() ...
client/src/app/components/App.js
rajington/heartseekers
import React from 'react'; import { Link } from 'react-router'; import { PromiseState } from 'react-refetch'; import connect from '../api-connector'; import PromiseStateContainer from './PromiseStateContainer'; const SUMMONERS = { na: [ 'tubstep', 'jbunnies', 'SURPRISE PARTY', ], }; class App extends ...
app/javascript/mastodon/features/compose/components/autosuggest_account.js
haleyashleypraesent/ProjectPrionosuchus
import React from 'react'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; class AutosuggestAccount extends ImmutablePureComponen...
src/table/index.js
twilson63/t63
import React from 'react' import R from 'ramda' import combine from '../lib/combine-string-lists' const { propOr } = R const Table = props => { return ( <div aria-role={props['aria-role'] || 'table'} className={combine('flex flex-column', props.className)} style={props.style} > {prop...
client/src/components/AppContainer.js
yegor-sytnyk/contoso-express
// This component handles the App template used on every page. import React from 'react'; import {connect} from 'react-redux'; import Navigation from './Navigation'; import dateFormatter from '../formatters/dateFormatter'; class App extends React.Component { render() { let date = dateFormatter.currentYear(...
app/config/routes.js
natac13/vegan-recipe-app-redux
import React from 'react'; import { Router, Route, IndexRoute } from 'react-router'; import Main from '../containers/Main'; import Home from '../components/home/'; import RecipeList from '../components/recipeList/'; import AddRecipe from '../components/addRecipe/'; import RecipeDetails from '....
tests/lib/rules/vars-on-top.js
ljharb/eslint
/** * @fileoverview Tests for vars-on-top rule. * @author Danny Fritz * @author Gyandeep Singh */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ const rule = require(".....
admin/client/App/screens/List/components/ItemsTable/ItemsTableDragDropZoneTarget.js
alobodig/keystone
/** * THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT * THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON * - @mxstbr */ import React from 'react'; import { DropTarget } from 'react-dnd'; import { setCurrentPage } from '../../actions'; let timeoutID = false; // drop target var ItemsTableDragDro...
packages/core/src/icons/components/OrderSheet.js
iCHEF/gypcrete
import React from 'react'; export default function SvgOrderSheet(props) { return ( <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <path d="M18.25 4c-.347 0-.856.462-1.063.662l-.5.49a.457.457 0 01-.32.127....
js/components/sidebar/index.js
tausifmuzaffar/bisApp
import React, { Component } from 'react'; import { Image, Platform } from 'react-native'; import { connect } from 'react-redux'; import { Content, Title, Text, List, ListItem, Icon, Container, Left, Right, Badge, Button, View, StyleProvider, getTheme, variables } from 'native-base'; import { Actions } from 'react-nati...
src/components/Field/InputNumber/InputNumber.js
thomasthiebaud/lundalogik
import React from 'react' import PropTypes from 'prop-types' import { InputNumber, Form } from 'antd' import { formLayout } from 'components/Field/layout' class InputNumberInput extends React.Component { handleChange(values) { this.props.input.onChange(values) } render() { return ( <Form.Item ...
components/textfield/__tests__/Textfield.spec.js
react-material-design/react-material-design
import React from 'react'; import { mount } from 'enzyme'; import Textfield from '../index'; jest.mock('uuid', () => ({ v4: jest.fn(() => '2e732f05-f466-4fba-acb5-2f3be58daf75'), })); describe('<Textfield />', () => { it('should render', () => { const textfield = mount(<Textfield />); expect(te...
client/tests/components/groups/SignupModal.spec.js
johadi10/PostIt
import 'babel-polyfill'; import React from 'react'; import expect from 'expect'; import { mount } from 'enzyme'; import SignupModal from '../../../src/components/groups/SignupModal'; const wrapper = mount(<SignupModal/>); describe('<SignupModal/>', () => { it('should check that the div with modal class exist', () =>...
dashboard/app/components/ConfirmationBox/ConfirmationBox.js
tlisonbee/cerberus-management-service
import React from 'react' import { Component } from 'react' import PropTypes from 'prop-types' import './ConfirmationBox.scss' export default class ConfirmationBox extends Component { static propTypes = { message: PropTypes.string.isRequired, handleYes: PropTypes.func.isRequired, handleNo:...
app/containers/RepoListItem/index.js
romanvieito/ball-simpler
/** * RepoListItem * * Lists the name and the issue count of a repository */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { FormattedNumber } from 'react-intl'; import { makeSelectCurrentUser } fro...
app/react-icons/fa/shopping-basket.js
scampersand/sonos-front
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaShoppingBasket extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m37.3 17.5q1 0 1.7 0.7t0.8 1.8-0.8 1.8-1.7 0.7h-0.3l-2.3 12.8q-0.1 0....
test/Tab.js
GetAmbassador/react-ions
import React from 'react' import Tab from '../src/components/TabWrapper/Tab' import Badge from '../src/components/Badge' describe('Tab', () => { let wrapper it('should shallow render itself', () => { wrapper = shallow(<Tab title="Test Tab" />) expect(wrapper.hasClass('tab')).to.equal(true) expect(wra...
app/react/src/demo/Welcome.js
rhalff/storybook
import React from 'react'; import PropTypes from 'prop-types'; import glamorous from 'glamorous'; const Main = glamorous.article({ margin: 15, maxWidth: 600, lineHeight: 1.4, fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', }); const Title = glamorous.h1({}); const Note = g...
website/irulez/src/components/admin_menu/fields/MultipleSelectionField.js
deklungel/iRulez
import React, { Component } from 'react'; import classNames from 'classnames'; import { withStyles } from '@material-ui/core/styles'; import Input from '@material-ui/core/Input'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@materia...
frontend/src/components/eois/cells/eoiSectorCell.js
unicef/un-partner-portal
import React from 'react'; import R from 'ramda'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withStyles } from 'material-ui/styles'; import Typography from 'material-ui/Typography'; import Divider from 'material-ui/Divider'; import Tooltip from '../../common/portalTooltip'; impo...
nailgun/static/views/clusters_page.js
huntxu/fuel-web
/* * Copyright 2013 Mirantis, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
docs/src/pages/demos/tabs/IconTabs.js
AndriusBil/material-ui
/* eslint-disable flowtype/require-valid-file-annotation */ import React from 'react'; import Paper from 'material-ui/Paper'; import Tabs, { Tab } from 'material-ui/Tabs'; import PhoneIcon from 'material-ui-icons/Phone'; import FavoriteIcon from 'material-ui-icons/Favorite'; import PersonPinIcon from 'material-ui-icon...
test/components/Counter.spec.js
arkadyuti/electron-react-nedb
import { spy } from 'sinon'; import React from 'react'; import { shallow } from 'enzyme'; import { BrowserRouter as Router } from 'react-router-dom'; import renderer from 'react-test-renderer'; import Counter from '../../app/components/Counter'; function setup() { const actions = { increment: spy(), incremen...
clients/react-js/src/index.js
UNOPS/UiMetadataFramework
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();