path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
Libraries/Text/Text.js
happypancake/react-native
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
actor-apps/app-web/src/app/components/sidebar/RecentSectionItem.react.js
Jaeandroid/actor-platform
import React from 'react'; import classNames from 'classnames'; import DialogActionCreators from 'actions/DialogActionCreators'; import DialogStore from 'stores/DialogStore'; import AvatarItem from 'components/common/AvatarItem.react'; class RecentSectionItem extends React.Component { static propTypes = { di...
App/Footer.js
johnwalley/hacker-news
import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View, } from 'react-native'; const styles = StyleSheet.create({ container: { flex: 1, padding: 8, alignItems: 'center', justifyContent: 'center', }, button: { borderColor: '#8E8E8E', borderWid...
src/media/js/addon/components/reviewLog.js
mozilla/marketplace-content-tools
import React from 'react'; import {Note} from '../components/comm' import {Page, PageSection} from '../../site/components/page'; export default class AddonReviewLog extends React.Component { static propTypes = { notes: React.PropTypes.array }; render() { return ( <ul> {this.props.notes &...
app/scripts/pages/objects.js
transmute-industries/monarch-portal
import React from 'react' import ObjectView from '../views/object' import {parse} from '../utils/path.js' import i18n from '../utils/i18n.js' import {Row, Col, Button} from 'react-bootstrap' export default class Objects extends React.Component { static displayName = 'Objects'; static contextTypes = { router: R...
caseStudy/ui/src/index.js
tadas412/EngineeringEssentials
/** * Copyright 2017 Goldman Sachs. * 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 to...
src/modules/textNodes/components/TranslationNodeInput/TranslationNodeInput.js
CtrHellenicStudies/Commentary
import React from 'react'; import PropTypes from 'prop-types'; import { FormGroup, } from 'react-bootstrap'; import TextField from 'material-ui/TextField'; import _ from 'lodash'; import { debounce } from 'throttle-debounce'; import { compose } from 'react-apollo'; import { connect } from 'react-redux'; // components...
packages/icons/src/md/device/BrightnessAuto.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdBrightnessAuto(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M21.33 24.93h4.6l-2.3-7.3-2.3 7.3zM39.63 17l6.63 6.63-6.63 6.63v9.37h-9.37l-6.63 6.63L17 39.63H7.63v-9.37L1 23.63 7.63 17V7.63H17L23.63 1l6.63...
static/views/components/list-item-block.js
kRITZCREEK/FROST-Mobile
'use strict'; import React from 'react'; import moment from 'moment'; export function formatBlock( { startHours: startH, startMinutes: startM, endHours: endH, endMinutes: endM }) { let start = moment( startH + ':' + startM, 'HH:mm').format('LT'); let end = moment( endH + ':' + endM, 'HH:mm').format('LT'); ...
examples/expo/components/StyledText.js
aksonov/react-native-router-flux
import React from 'react'; import { Text } from 'react-native'; export class MonoText extends React.Component { render() { return <Text {...this.props} style={[this.props.style, { fontFamily: 'space-mono' }]} />; } }
src/index.js
adam-hanna/react-responsive-tables
import React from 'react' import ReactDOM from 'react-dom' import App from './App.js' ReactDOM.render(<App />, document.getElementById('root'))
example/src/steps/SelectGalleryStep.js
rsamec/photo-gallery
import React from 'react'; import BindToMixin from 'react-binding'; import InputRange from 'react-input-range'; import PageSizes from '../utils/pageSizes'; import flux from 'fluxify'; const SelectImageGalleryStep = React.createClass({ mixins: [BindToMixin], changeProp(propName, propValue){ this.bindTo(...
src/icons/DevicesIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class DevicesIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M8 12h36V8H8c-2.21 0-4 1.79-4 4v22H0v6h28v-6H8V12zm38 4H34c-1.1 0-2 .9-2 2v20c0 1.1.9 2 2 2h12c1.1 0 2-.9 ...
app/views/app.js
whitebird08/sprintly-kanban
import React from 'react'; import { RouteHandler } from 'react-router'; import Sidebars from './components/sidebars'; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd/modules/backends/HTML5'; import helpers from './pages/helpers.js'; let Kanban = React.createClass({ getInitialState()...
webapp/containers/NotFound/NotFound.js
raksuns/universal-iraks
import React from 'react'; export default function NotFound() { return ( <div className="container"> <h1>Doh! 404!</h1> <p>These are <em>not</em> the droids you are looking for!</p> </div> ); }
mod14/src/Page1.js
mauricedb/mwd-2017-02-20
import React, { Component } from 'react'; class Page1 extends Component { render() { return ( <div> This is page one. </div> ); } } export default Page1;
test/acceptance_test_utils.js
mike-casas/lock
import Immutable, { Map, Set } from 'immutable'; import React from 'react'; import CSSCore from 'fbjs/lib/CSSCore'; import { Simulate } from 'react-addons-test-utils'; import Auth0LockPasswordless from '../src/index'; import { spy, stub } from 'sinon'; import webApi from '../src/core/web_api'; import * as gravatarActio...
src/index.js
toannhu/React-Pokedex
import React from 'react'; import ReactDOM from 'react-dom'; import { ItemList, Footer, NotFound } from './components'; import registerServiceWorker from './registerServiceWorker'; import { Provider } from 'react-redux'; import { Route, Switch } from 'react-router'; import createHistory from 'history/createBrowserHisto...
stories/selecty/index.js
QuietOmen/ui-elements
import { storiesOf } from '@storybook/react'; import React from 'react'
src/ModalFooter.js
collinwu/react-bootstrap
import React from 'react'; import classnames from 'classnames'; class ModalFooter extends React.Component { render() { return ( <div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}> {this.props.children} </div> ); } } ModalFooter.propTypes = { ...
docs/src/examples/modules/Dropdown/Usage/DropdownExampleUncontrolled.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Dropdown } from 'semantic-ui-react' const options = [ { key: 1, text: 'One', value: 1 }, { key: 2, text: 'Two', value: 2 }, { key: 3, text: 'Three', value: 3 }, ] const DropdownExampleUncontrolled = () => ( <Dropdown selection options={options} placeholder='Choose an option'...
src/apps/Sockets/SocketsDialogSidebar.js
Syncano/syncano-dashboard
import React from 'react'; import { Dialog } from '../../common/'; const CustomSocketsRegistryDialogSidebar = () => ( <Dialog.SidebarBox> <Dialog.SidebarSection title="Instance name"> An Instance where your Socket will be installed. You can choose New Instance option to create a new one during instal...
app/client/components/smart-components/BuilderSC.js
jbermudezlobo/lolstats-builder
import React from 'react'; import Builder from './../dumb-components/Builder'; class BuilderSC extends React.Component { static propTypes = { } constructor(props) { super(props); } render() { return ( <Builder /> ); } } export default BuilderSC;
fannie/batches/EndCapper/src/Shelf.js
CORE-POS/IS4C
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { DropTarget } from 'react-dnd'; import Item from './Item.js'; var moveItem = function(id, pos) { }; const shelfTarget = { canDrop(props) { return true; }, drop(props, monitor) { // move the item ...
packages/ringcentral-widgets-docs/src/app/pages/Components/AudioSettingsPanel/Demo.js
u9520107/ringcentral-js-widget
import React from 'react'; // eslint-disable-next-line import AudioSettingsPanel from 'ringcentral-widgets/components/AudioSettingsPanel'; const props = {}; props.currentLocale = 'en-US'; props.dialButtonVolume = 0.5; props.ringtoneVolume = 0.5; props.ringtoneMuted = false; props.callVolume = 0.5; props.dialButtonMute...
examples/Sliders.js
15lyfromsaturn/react-materialize
import React from 'react'; import Slide from '../src/Slide'; import Slider from '../src/Slider'; export default <Slider> <Slide src="http://lorempixel.com/580/250/nature/1" title="This is our big Tagline!"> Here's our small slogan. </Slide> <Slide src="http://lorempixel.com/580/250/nature/2" ...
client/tests/components/groups/Page.spec.js
johadi10/PostIt
import 'babel-polyfill'; import React from 'react'; import expect from 'expect'; import sinon from 'sinon'; import thunk from 'redux-thunk'; import configureStore from 'redux-mock-store'; import { shallow } from 'enzyme'; import Page from '../../../src/components/groups/Page'; const middleware = [thunk]; const mockSto...
src/svg-icons/image/center-focus-weak.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCenterFocusWeak = (props) => ( <SvgIcon {...props}> <path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-...
public/assets/scripts/components/dashboard/resources/common/list.js
luisfbmelo/reda
import React from 'react'; import { Component, PropTypes } from 'react'; import Link from 'react-router/lib/Link' // Utils import { getAvg } from '@/utils'; // Boostrap import { Tooltip, OverlayTrigger } from 'react-bootstrap'; // Components import Rating from '@/components/common/rating'; import SvgComponent from '...
docs/app/Examples/elements/Rail/Variations/RailAttachedInternalExample.js
jamiehill/stardust
import React from 'react' import { Image, Rail, Segment } from 'stardust' const RailAttachedInternalExample = () => ( <Segment> <Image src='http://semantic-ui.com/images/wireframe/paragraph.png' /> <Rail attached internal position='left'> <Segment>Left Rail Content</Segment> </Rail> <Rail att...
src/aside.react.js
matthias-reis/react-xi
import React from 'react'; export default class Xi extends React.Component { constructor() { super(); this.state = { modules: [ {id: 'core', name: 'Xi', actions: 14, background: true}, {id: 'home', name: 'Home', actions: 12, current: true}, {id: 'music', name: 'Music', actions: ...
stories/SideMenu/ExampleSideMenuDrill.js
skyiea/wix-style-react
import React from 'react'; import { SideMenuDrill, SideMenu, Button, Tooltip } from 'wix-style-react'; import { Help as HelpIcon, Chat as ChatIcon, Trash3 as TrashIcon } from 'wix-style-react/Icons'; let counter = 3; const items = [ {type: 'link', to: '//wix.com', title: 'link #0_1', disabled: true}, ...
app/javascript/mastodon/features/picture_in_picture/index.js
musashino205/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Video from 'mastodon/features/video'; import Audio from 'mastodon/features/audio'; import { removePictureInPicture } from 'mastodon/actions/picture_in_picture'; import Header from './components/header'; import F...
src/svg-icons/hardware/computer.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareComputer = (props) => ( <SvgIcon {...props}> <path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/> </SvgIcon> ); HardwareComputer ...
actor-apps/app-web/src/app/components/common/State.react.js
luoxiaoshenghustedu/actor-platform
import React from 'react'; import { MessageContentTypes } from 'constants/ActorAppConstants'; class State extends React.Component { static propTypes = { message: React.PropTypes.object.isRequired }; render() { const { message } = this.props; if (message.content.content === MessageContentTypes.SERVI...
src-client/scripts/display-cargo-details.js
VeryBarry/iLuggit
import Backbone from 'backbone' import React from 'react' import ACTIONS from './ACTIONS.js' import LuggAuthView from './lugg-auth-view.js' import $ from 'jquery' const CargoDisplay = React.createClass({ _acceptLugg: function(){ let userid = this.refs.id.dataset.id // console.log('id', userid); ...
test/helpers/shallowRenderHelper.js
xunxunyao/gallery-by-react
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
src/js/views/transitions-target-over.js
unidevel/touchstonejs-starter
import Container from 'react-container'; import React from 'react'; import Timers from 'react-timers'; import { Mixins, UI } from 'touchstonejs'; module.exports = React.createClass({ mixins: [Mixins.Transitions, Timers()], componentDidMount () { var self = this; this.setTimeout(function () { self.transitionTo...
src/docs/examples/ProgressBar/Example70Percent.js
ebirito/ps-react-ebirito
import React from 'react' import ProgressBar from 'ps-react-ebirito/ProgressBar' /** 70% progress */ export default function Example70Percent() { return <ProgressBar percent={70} width={150} /> }
.storybook/preview.js
pubpub/pubpub
import React from 'react'; import { FocusStyleManager } from '@blueprintjs/core'; import { addDecorator, addParameters } from '@storybook/react'; import { PageContext } from 'utils/hooks'; import { communityData, locationData, loginData, scopeData } from 'utils/storybook/data'; import { AccentStyle } from 'components'...
app/javascript/mastodon/features/ui/components/media_modal.js
Nyoho/mastodon
import React from 'react'; import ReactSwipeableViews from 'react-swipeable-views'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Video from 'mastodon/features/video'; import classNames from 'classnames'; import { defineMessages, injectIntl } from 'react-intl'; i...
packages/react-server-examples/bike-share/components/station-list.js
davidalber/react-server
import React from 'react'; import {logging} from 'react-server'; import StationCard from './station-card'; const logger = logging.getLogger(__LOGGER__); const StationList = ({stations}) => { logger.info(`rendering list of ${stations.length} stations`); const stationCards = stations.map(station => <StationCard stati...
src/svg-icons/image/filter-center-focus.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterCenterFocus = (props) => ( <SvgIcon {...props}> <path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9...
src/svg-icons/action/perm-phone-msg.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPermPhoneMsg = (props) => ( <SvgIcon {...props}> <path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2...
docs/src/sections/WellSection.js
SSLcom/Bootsharp
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function WellSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <Anch...
src/components/Buttons/RoundButtonWithImage.js
alexeiaccio/moscowriver
import React from 'react' import styled from 'styled-components' import { RoundButton, ButtonBack, RoundButtonMiddle, RoundButtonMiddleBack, ButtonShade, ButtonText } from 'Styled' export const RoundButtonWithImage = ({to, url, text}) => <RoundButton to={to}> <ButtonBack style={{backgroundImage: `url...
front/src/components/Temp/TempContainer.js
MichaelKostin/mars-rover
import React from 'react'; import { connect } from 'react-redux'; import Temp from './Temp'; import { setProcessorTemp } from '../../actions'; const mapStateToProps = (state) => ({ CPTemp: state.fromRover.CPTemp }); const mapDispatchToProps = (dispatch) => ({ setProcessorTemp: (temp) => { dispatch(setProces...
src/icons/IosReload.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class IosReload extends React.Component { render() { if(this.props.bare) { return <g> <g id="PL_x5F_Reset_1_"> <path d="M256,64c105.9,0,191.7,85.7,191.9,191.5l55-52.5l9,9.1L441.6,280L375,212.1l9-9.1l51.1,52.4 C4...
client/components/basic/userStatus/UserStatus.js
Sing-Li/Rocket.Chat
import React from 'react'; import { Box } from '@rocket.chat/fuselage'; import statusColors from '../../../helpers/statusColors'; const UserStatus = React.memo(({ status, ...props }) => <Box size='x12' borderRadius='full' backgroundColor={statusColors[status]} {...props}/>); export default UserStatus;
analytics-ui/dev/js/components/header/feedback/feedback.js
CloudBoost/cloudboost
import React from 'react'; import Popover from 'material-ui/Popover'; import {ToolbarTitle} from 'material-ui/Toolbar'; import Badge from 'material-ui/Badge'; import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import TextField ...
src/svg-icons/image/hdr-strong.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageHdrStrong = (props) => ( <SvgIcon {...props}> <path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 ...
client/src/components/auth/register.js
WebTalentTop/newsfere-mern
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Field, reduxForm } from 'redux-form'; import { registerUser } from '../../actions/auth'; const form = reduxForm({ form: 'register', validate, }); const renderField = field => ( <div> <input className="form-control" {.....
src/routes.js
zhongzhi107/marine
import React from 'react'; import {IndexRoute, Route} from 'react-router'; import { App, Home, NotFound, } from 'containers'; export default (store) => { console.log(store); return ( <Route path="/" component={App}> <IndexRoute component={Home}/> <Route path="*" component={NotFound} s...
source-frontend/src/account/Sign.js
Everstar/MusicRadio
/** * Created by tsengkasing on 12/3/2016. */ import React from 'react'; import { hashHistory } from 'react-router' import {Tabs, Tab} from 'material-ui/Tabs' import SwipeableViews from 'react-swipeable-views'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; import ...
js/components/fab/index.js
mrcflorian/classbook
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { actions } from 'react-native-navigation-redux-helpers'; import { Container, Header, Title, Button, Left, Right, Body, Icon, List, ListItem, Content, Text } from 'native-base'; import { Actions } from 'react-native-router-flux'; ...
example/client/index.js
modosc/react-responsive-redux
import '@babel/polyfill' import React from 'react' import { hydrate } from 'react-dom' import { Provider } from 'react-redux' import configureStore from '../common/store/configureStore' import App from '../common/containers/App' const { __PRELOADED_STATE__: preloadedState } = window const store = configureStore(preloa...
server/middlewares/clientRoute.js
chikara-chan/react-isomorphic-boilerplate
import React from 'react' import {renderToString} from 'react-dom/server' import {match, RouterContext} from 'react-router' import {Provider} from 'react-redux' import routes from '../../client/routes' import configureStore from '../../client/common/store/configureStore' const store = configureStore() async function ...
docs/src/app/components/pages/components/Stepper/GranularControlStepper.js
ngbrown/material-ui
import React from 'react'; import { Step, Stepper, StepButton, } from 'material-ui/Stepper'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButton from 'material-ui/FlatButton'; const getStyles = () => { return { root: { width: '100%', maxWidth: 700, margin: 'auto', }...
src/Interpolate.js
tannewt/react-bootstrap
// https://www.npmjs.org/package/react-interpolate-component // TODO: Drop this in favor of es6 string interpolation import React from 'react'; import ValidComponentChildren from './utils/ValidComponentChildren'; const REGEXP = /\%\((.+?)\)s/; const Interpolate = React.createClass({ displayName: 'Interpolate', ...
ide/static/js/paneElement.js
Cloud-CV/IDE
import React from 'react'; class PaneElement extends React.Component { constructor(props) { super(props); this.drag = this.drag.bind(this); } drag(e) { this.props.setDraggingLayer(e.target.id); } render() { return ( <div className="btn btn-block drowpdown-button " dragga...
src/client/containers/Home.js
gearz-lab/gearz
import React from 'react'; var Home = React.createClass({ render: function() { return ( <div> Home page </div> ); } }); export default Home;
client/components/panel.js
nearform/vidi-dashboard
'use strict' import React from 'react' export default React.createClass({ render () { const {title, children} = this.props let heading = null if (title) { heading = <h3 className="panel-heading m0">{title}</h3> } return ( <div className="panel"> {heading} <div class...
src/index.js
tomasz-szymanek/yet-another-boilerplate
import ReactDOM from 'react-dom'; import React from 'react'; import { Router, browserHistory } from 'react-router'; import NoMatch from './components/NoMatch'; import About from './components/About'; import App from './components/App'; import PostContainer from './containers/PostContainer'; import PostsContainer from '...
examples/huge-apps/routes/Grades/components/Grades.js
darul75/react-router
import React from 'react'; class Grades extends React.Component { render () { return ( <div> <h2>Grades</h2> </div> ); } } export default Grades;
app/components/Signup.js
mkamranhamid/react-Firebase-Playlist
import React, { Component } from 'react'; import { Router, Route, Link, browserHistory } from 'react-router' import Firebase from 'firebase'; import Radium from 'radium'; import color from 'color'; import { fbDatabase, fbAuth, fbStorage} from '../util/fbService.js'; export class Signup extends Component { constru...
Console/app/node_modules/rc-calendar/es/year/YearPanel.js
RisenEsports/RisenEsports.github.io
import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-run...
src/svg-icons/device/add-alarm.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAddAlarm = (props) => ( <SvgIcon {...props}> <path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4....
__tests__/components/icons/Status-test.js
linde12/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React from 'react'; import renderer from 'react-test-renderer'; import Status from '../../../src/js/components/icons/Status'; describe('Status', () => { it('has correct default options', () => { const component = renderer.create( ...
src/components/SideBar/SideBar.js
johnnycx127/react-demo
/** * Created by peach on 16-3-16. */ import React, { Component } from 'react'; import { Menu, Icon } from 'antd'; import { Link } from 'react-router'; const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; export default class SideBar extends Component { render() { const styles = require('./Sid...
FrontEnd/atst-user/src/RouteWhenAuthorised.js
codelaborators-network/AllTheSmallThings
import React from 'react'; import { isAuthenticated } from './App'; import { Redirect, Route } from 'react-router-dom'; const RouteWhenAuthorized = ({component: Component, ...rest}) => ( <Route {...rest} render={renderProps => ( isAuthenticated() ? ( <Component {...renderProps} /> ) : ( <Re...
app/javascript/src/components/Table/userFormat.js
michelson/chaskiq
import React from 'react' import Moment from 'react-moment' import Badge from '../Badge' import Avatar from '../Avatar' const userFormat = function (showUserDrawer, app) { let opts = [ // {field: 'id', title: 'id' }, { field: 'name', title: I18n.t('data_tables.users.name'), render: (row) =>...
blueocean-material-icons/src/js/components/svg-icons/content/filter-list.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ContentFilterList = (props) => ( <SvgIcon {...props}> <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/> </SvgIcon> ); ContentFilterList.displayName = 'ContentFilterList'; ContentFilterList.muiName = 'SvgIcon'; export default Conten...
app/components/calendar/Day.js
adrilo/headek
import React, { Component } from 'react'; import CalendarActions from '../../actions/CalendarActions'; import ViewHeadaches from './popover/ViewHeadaches'; import AddHeadache from './popover/AddHeadache'; export default class Day extends Component { constructor() { super(); this.state = { ...
frontend/src/components/posting/utils/container.js
1905410/Misago
// jshint ignore:start import React from 'react'; export default function(props) { return ( <div className={props.className}> <div className="container"> {props.children} </div> </div> ); }
definitions/npm/react-select_v1.x.x/test_react-select_v1.x.x.js
mkscrg/flow-typed
import React from 'react'; import { default as SelectComponent } from 'react-select'; import type Select from 'react-select'; const ArrowRenderer = (props: { onMouseDown: Event }): React$Element<*> => <span>Arrow</span>; const ClearRenderer = (): React$Element<*> => <span />; const filterOption = (option: Object, filt...
src/components/DataTable/__tests__/TableBatchActions-test.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 { mount } from 'enzyme'; import { TableBatchActions } from '../'; describe('DataTable.TableBatchActions', ...
client/components/Tab.js
FlammableHairnet/HireOrbit
import React, { Component } from 'react'; class Tabs extends Component { constructor(props) { super(props); } render() { return( <div className="radio-box job"> {props.types.map((item, i) => <div key={i} className={ (item.value === this.state[props.name]) ? 'active' : '' }> ...
src/components/GameQuery.js
Julzso23/player.me-one-click-share
import React from 'react'; import Spinner from './Spinner'; import GameList from './GameList'; import request from 'superagent'; import {debounce} from 'throttle-debounce'; import '../styles/form.css'; export default class GameQuery extends React.Component { constructor(props) { super(props); this...
docs/src/app/components/pages/components/Toolbar/ExampleSimple.js
verdan/material-ui
import React from 'react'; import IconMenu from 'material-ui/IconMenu'; import IconButton from 'material-ui/IconButton'; import FontIcon from 'material-ui/FontIcon'; import NavigationExpandMoreIcon from 'material-ui/svg-icons/navigation/expand-more'; import MenuItem from 'material-ui/MenuItem'; import DropDownMenu from...
src/routes/notFound/NotFound.js
oct16/Blog-FE
import React from 'react'; import PropTypes from 'prop-types'; import s from './NotFound.css'; class NotFound extends React.Component { static propTypes = { title: PropTypes.string.isRequired, }; render() { return ( <div className={s.root}> <div className={s.container}> <h1>{this...
src/common/BashSnippet/BashSnippet.js
Syncano/syncano-dashboard
import React from 'react'; const styles = { wrapper: { paddingTop: 20, width: '100%' }, description: { fontSize: 16, textAlign: 'left' }, snippet: { color: '#fff', whiteSpace: 'pre-wrap', font: '14px/normal \'Monaco\', monospace', textAlign: 'left', borderRadius: 5, ba...
components/Accordion/__tests__/test.js
xgfe/react-native-ui-xg
/** * Created by lulutia on 2017-04-13. */ /* eslint-disable */ import {jsdom} from 'jsdom'; global.document = jsdom(''); global.window = document.defaultView; import { View, ScrollView, Text } from 'react-native'; import React from 'react'; import {shallow, mount} from 'enzyme'; import renderer from 'react-...
extension/src/js/content/injectApp.js
radek-novak/json-commander
import React from 'react' import {render} from 'react-dom' import App from './components/App' function injectApp( port, jsonString, changeFormatted, insertHtml) { const appElement = document.createElement('div') const formatted = document.createElement('div') appElement.id = 'The_Application' formatted.id = 'f...
client/src/components/settings/SolutionViewer.js
BhaveshSGupta/FreeCodeCamp
import React from 'react'; import PropTypes from 'prop-types'; import { Panel } from '@freecodecamp/react-bootstrap'; import Prism from 'prismjs'; import Helmet from 'react-helmet'; import './solution-viewer.css'; const prismLang = { css: 'css', js: 'javascript', jsx: 'javascript', html: 'markup' }; function...
src/routes/error/index.js
hmeinertrita/MyPlanetGirlGuides
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import ErrorPage from './Err...
src/common-ui/components/MigrationNotice.js
WorldBrain/WebMemex
import React from 'react' import PropTypes from 'prop-types' import styles from './MigrationNotice.css' const MigrationNotice = ({ banner, btnText, subText, onBtnClick, isBtnDisabled, }) => ( <div className={styles.container}> {banner && <img className={styles.banner} src={banner} />} ...
src/components/link.js
getinsomnia/website
import React from 'react'; import GLink from 'gatsby-link'; const Link = ({ children, to, ...props }) => { let addedProps = {}; if ( !props.onClick && props.event && props.event.event && props.event.properties ) { addedProps.onClick = () => { window.analytics && window.analytics.track(...
app/scripts/Widget/plugins/Match/__tests__/reducer.spec.js
igr-santos/hub-client
import React from 'react' import sinon from 'sinon' import { shallow } from 'enzyme' import { expect } from 'chai' import reducer, { handleError, showMatch, initialState, initialAction } from '../reducer' describe('Matches Reducer', () => { let wrapper let sandbox let spy = {} before(() => { sandbox = si...
src/router.js
shihaoran/PaperDataBase
import React from 'react' import {Router} from 'dva/router' import App from './routes/app' export default function ({history, app}) { const routes = [ { path: '/', component: App, getIndexRoute(nextState, cb) { require.ensure([], require => { cb(null, {component: require('./r...
examples/Overlay.js
AlexKVal/react-overlays
import React from 'react'; import Overlay from 'react-overlays/Overlay'; import Button from 'react-bootstrap/lib/Button'; // Styles Mostly from Bootstrap const TooltipStyle = { position: 'absolute', padding: '0 5px' }; const TooltipInnerStyle = { padding: '3px 8px', color: '#fff', textAlign: 'center', bor...
client/extensions/woocommerce/app/promotions/fields/promotion-applies-to-field/applies-to-filtered-list.js
Automattic/woocommerce-connect-client
/** @format */ /** * External dependencies */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import classNames from 'classnames'; import { sortBy } from 'lodash'; import warn from 'lib/warn'; import formatCurrency from '@automattic/format-currency'; /** * Inter...
front/js/containers/Main/Nav.js
henrypoon/stockoverflow
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Sidebar, Segment, Button, Menu, Image, Icon, Header } from 'semantic-ui-react'; @connect((store) => { return { balance: store.user.balance }; })...
src/helpers/makeInjectable.js
pshrmn/rrc
import React from 'react' import warning from 'warning' export default (route) => { if (!route.inject) { return route } else if (!route.component) { warning( false, 'The inject property can only be used with the component property of a route' ) return route } const routeCopy = O...
src/tinymce/utils.js
JerryBerton/dh-component
import { AtomicBlockUtils, EditorState } from 'draft-js'; import { MediaBlock } from './component.js' import React from 'react' export const insertImages = (editorState, data) => { const contentState = editorState.getCurrentContent(); const contentStateWithEntity = contentState.createEntity('image', 'IMMUTABLE', da...
spec/javascripts/jsx/speed_grader/AssessmentAuditTray/components/AssessmentAuditButtonSpec.js
djbender/canvas-lms
/* * Copyright (C) 2018 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
src/components/RevealAuction/TimeDuration.js
ens-bid/ens-bid-dapp
import React from 'react'; import {momentFromNow} from '../../lib/util'; import './TimeDuration.css'; export const TimeDuration = (props) => ( <div className='RevealAuctionTimeDuration'> <div className='RevealAuctionTimeDuration-Reveal'> <div>Reveal Auction On</div> <h3>{props.unsealStartsAt.toString...
packages/stockflux-components/src/components/buttons/borderless-buttons/app-shortcuts/News.js
owennw/OpenFinD3FC
import React from 'react'; import { Launchers } from 'stockflux-core'; import NewsIconSmall from '../../../glyphs/small/news.svg'; import NewsIcon from '../../../glyphs/launcher/news.svg'; import RoundButton from '../../round-button/RoundButton'; export default ({ symbol, name, small, disabled, intentsEnabled }) => { ...
packages/react-error-overlay/src/components/Collapsible.js
timlogemann/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React, { Component } from 'react'; import { black } from '../styles'; import type { Element as ReactElement } from '...
tests/layouts/CoreLayout.spec.js
chasm/tic-tac-routes
import React from 'react' import TestUtils from 'react-addons-test-utils' import CoreLayout from 'layouts/CoreLayout' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) return renderer.getRenderOutput() } function shallowRenderWithProps (props = {}) { ...
src/main.js
bhuvanmalik007/mission-admission
import React from 'react' import ReactDOM from 'react-dom' import createStore from './store/createStore' import CoreProvider from './core/coreprovider' import '../node_modules/grommet/grommet.min.css' import './main.css' import '../node_modules/animate.css/animate.min.css' // ==========================================...