path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
frontend-new/src/js/components/common/sidebar/AdminSideBar.js
leapfrogtechnology/vyaguta-resource
import React from 'react'; import { IndexLink, Link } from 'react-router'; import * as urlConstants from '../../../constants/urlConstants'; const AdminSidebar = () => ( <ul className="nav navbar-nav-custom navbar-right"> <li> <IndexLink to='/' activeClassName="active" title="Dashboard"> {/*<i class...
src/components/topic/snapshots/foci/builder/search/SearchPreview.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import { FormattedMessage, injectIntl } from 'react-intl'; import { Row, Col } from 'react-flexbox-grid/lib'; import SearchStoryCountPreviewContainer from './SearchStoryCountPreviewContainer'; import SearchStoryPreviewContainer from './SearchStoryPreviewCon...
example/v9.x.x/storybook/src/index.js
i18next/react-i18next
import React from 'react'; import ReactDOM from 'react-dom'; import { I18nextProvider } from 'react-i18next'; import './index.css'; import App from './App'; import i18n from './i18n'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render( <I18nextProvider i18n={i18n}> <App /> </I18nextP...
tests/Scroll.spec.js
react-component/table
import React from 'react'; import { mount } from 'enzyme'; import { act } from 'react-dom/test-utils'; import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; import Table from '../src'; describe('Table.Scroll', () => { const data = [{ key: 'key0', name: 'Lucy' }, { key: 'key1', name: 'Jack' }]; const cre...
ReactTest/app/component/Home.js
OlesiaBelmega/GoIT-Studing
import React from 'react'; import {Link} from 'react-router-dom'; class Home extends React.Component { render() { return( <div className="home-container"> <h1> Github Battle: Battle your friends...and stuff. </h1> <Link className='bu...
packages/Tabs/story.js
ancestorcloud/trace-ui
import React from 'react' import { storiesOf } from '@kadira/storybook' import {Tabs, TabList, TabPanels} from './index' storiesOf('Tabs', module) .add('style 1', () => { const Tab = ({ onClick, isDisabled, isActive, children, }) => { const tabStyles = { display: 'inline...
src/redux/modules/Forms/RenderField.js
aplee29/online-notebook-app-client
import React from 'react'; const RenderField = ({ input, placeholder, label, type, meta: { error } }) => ( <div> <label>{label}</label> <p>{error && <span style={{color: 'red'}}>{error}</span>}</p> <input style={{width: '30vw', height: '5vh'}} {...input} placeholder={placeholder} type={type} />...
src/FormControls/Static.js
snadn/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import InputBase from '../InputBase'; import childrenValueValidation from '../utils/childrenValueInputValidation'; class Static extends InputBase { getValue() { const {children, value} = this.props; return children ? children : value; } ren...
assets/javascripts/kitten/components/typography/text/index.js
KissKissBankBank/kitten
import React from 'react' import classNames from 'classnames' import PropTypes from 'prop-types' import { checkDeprecatedSizes } from '../../../helpers/utils/deprecated' export const allowedColorStrings = [ 'font1', 'font2', 'primary1', 'background1', 'error', 'valid', 'grey-000', 'grey-100', 'grey-2...
src/svg-icons/device/signal-cellular-connected-no-internet-4-bar.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellularConnectedNoInternet4Bar = (props) => ( <SvgIcon {...props}> <path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/> </SvgIcon> ); DeviceSignalCellularConnectedNoInternet4Bar = pur...
docs/app/Examples/elements/Reveal/Content/RevealExampleHidden.js
clemensw/stardust
import React from 'react' import { Image, Reveal } from 'semantic-ui-react' const RevealExampleHidden = () => ( <Reveal animated='small fade'> <Reveal.Content visible> <Image src='http://semantic-ui.com/images/wireframe/square-image.png' size='small' /> </Reveal.Content> <Reveal.Content hidden> ...
src/pages/page-2.js
Smona/smona.github.io
import React from 'react' import Link from 'gatsby-link' const SecondPage = () => ( <div> <h1>Hi from the second page</h1> <p>Welcome to page 2</p> <Link to="/">Go back to the homepage</Link> </div> ) export default SecondPage
test/HotKeys/ActivatingHotKeysUsingFocusedProp.spec.js
JohnC-80/react-hotkeys
import React from 'react'; import {mount} from 'enzyme'; import {expect} from 'chai'; import sinon from 'sinon'; import HotKeys from '../../lib/HotKeys'; import KeyCode from '../support/KeyCode'; import FocusableElement from '../support/FocusableElement'; describe('Activating hotkeys using focused prop:', () => { b...
HotelAndroid/splash.js
MJ111/hotel-reverse
import React, { Component } from 'react'; import { View, Image, AsyncStorage, Text, StyleSheet, } from 'react-native'; class SplashPage extends Component { constructor(props) { super(props); } async movePage () { //await AsyncStorage.setItem('tutorial','false'); // --> !!!!!!change to commen...
src/icons/Times.js
ericyd/surfplot-ui
import React from 'react'; import Icon from './Icon'; const Times = props => ( <Icon className={props.className}> <path d='M10 10 L90 90 M90 10 L 10 90' /> </Icon> ); Times.propTypes = { className: React.PropTypes.string }; export default Times;
src/svg-icons/image/remove-red-eye.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageRemoveRedEye = (props) => ( <SvgIcon {...props}> <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5...
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.ios.js
jevakallio/react-native
import React, { Component } from 'react'; import { StyleSheet, Text, View, } from 'react-native'; export default class WelcomeText extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Welcome to React Native! </Text> <...
modules/__tests__/RouteUtils-test.js
9618211/react-router
import expect from 'expect'; import React from 'react'; import Route from '../Route'; import { createRoutesFromReactChildren } from '../RouteUtils'; describe('createRoutesFromReactChildren', function () { var Parent = React.createClass({ render() { return ( <div> <h1>Parent</h1> ...
examples/huge-apps/routes/Course/components/Course.js
CivBase/react-router
import React from 'react'; import Dashboard from './Dashboard'; import Nav from './Nav'; var styles = {}; styles.sidebar = { float: 'left', width: 200, padding: 20, borderRight: '1px solid #aaa', marginRight: 20 }; class Course extends React.Component { render () { let { children, params } = this.pro...
src/components/Content.js
liron-navon/liron-navon.github.io
import React from 'react' import PropTypes from 'prop-types' export const HTMLContent = ({ content, className }) => ( <div className={className} dangerouslySetInnerHTML={{ __html: content }} /> ) const Content = ({ content, className }) => ( <div className={className}>{content}</div> ) Content.propTypes = { co...
src/components/Header/Header.js
Nanjaa/Webcomic
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import withStyles from 'isomorp...
app/components/About.js
brandondoran/react-webpack-starter
import React from 'react'; const About = () => ( <div style={{ padding: 10 }}> <h2>I am About!</h2> </div> ); export default About;
src/components/board_2.js
TheOriginalDollarStoreBaller/react-black-jack
// IMPORT DEPENDENCIES import React, { Component } from 'react'; import _ from 'underscore' // IMPORT COMPONENTS import Hand from './hand'; // CREATE COMPONENTS class Board extends Component { constructor(props) { super(props) this.state = { players: ['player', 'dealer'], ...
src/app/Router.js
hellowin/kanca
// @flow import React from 'react'; import { Router, Route, browserHistory, Redirect, IndexRedirect } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import config from 'config'; import store from 'infra/service/store'; // containers import App from './App'; import Login from 'domain/us...
docs/app/Examples/collections/Grid/Variations/GridExampleRelaxedVery.js
koenvg/Semantic-UI-React
import React from 'react' import { Grid, Image } from 'semantic-ui-react' const GridExampleRelaxedVery = () => ( <Grid relaxed='very' columns={4}> <Grid.Column> <Image src='http://semantic-ui.com/images/wireframe/image.png' /> </Grid.Column> <Grid.Column> <Image src='http://semantic-ui.com/im...
client/src/infrastructure/store-connector.js
euqen/spreadsheet-core
import React from 'react'; export default function bind(store, getState) { return function (DecoratedComponent) { class StoreConnector extends React.Component { constructor(props) { super(props); this.handleStoreChanged = this.handleStoreChanged.bind(this); ...
src/svg-icons/social/mood-bad.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialMoodBad = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c....
resources/js/react/Avatar.js
chekun/spore
import React from 'react'; //<Avatar icon=[] /> class Avatar extends React.Component { constructor(props) { super(props) } render() { var avatarPrefix = 'http://#region.as.baoz.cn/f/#file'; var url = 'http://d.as.baoz.cn/f/default.t30x30.png'; if (this.props.icon) { ...
KDReactNative/KDClass/Mine/KDMine.js
csyibei/KDReactNative
/** * Created by kaidi on 2016/10/17. */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, TouchableOpacity, Navigator, ScrollView } from 'react-native'; var KDPushView = require('../KDPushView'); var KDMineHeader = require('./KDMineHeader'...
pages/error/index.js
lifeiscontent/OpenPoGoUI
import React from 'react'; import history from '../../core/history'; import Link from '../../components/Link'; import s from './styles.css'; class ErrorPage extends React.Component { static propTypes = { error: React.PropTypes.object, }; componentDidMount() { document.title = this.props.error && this.p...
examples/js/column-filter/date-filter-programmatically.js
neelvadgama-hailo/react-bootstrap-table
/* eslint max-len: 0 */ /* eslint no-unused-vars: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; const startDate = new Date(2015, 0, 1); const endDate = new Date(); ...
src/layouts/CoreLayout/CoreLayout.js
sadayuki-matsuno/pdf
import React from 'react' import Header from '../../components/Header' import Footer from '../../components/Footer' import './CoreLayout.scss' import '../../styles/core.scss' export const CoreLayout = ({ children }) => ( <div className='container text-center'> <Header /> <div className='core-layout__viewport...
src/components/Header.js
CharmedSatyr/game_of_life
import React from 'react'; const Header = () => ( <header> <h1>John Conway's Game of Life</h1> <h3>a zero player automaton</h3> </header> ); export default Header;
src/svg-icons/editor/format-align-left.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatAlignLeft = (props) => ( <SvgIcon {...props}> <path d="M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"/> </SvgIcon> ); EditorFormatAlignLeft = pure(EditorFormatAlignL...
examples/huge-apps/routes/Course/components/Nav.js
mjw56/react-router
import React from 'react'; import { Link } from 'react-router'; import AnnouncementsRoute from '../routes/Announcements'; import AssignmentsRoute from '../routes/Assignments'; import GradesRoute from '../routes/Grades'; const styles = {}; styles.nav = { borderBottom: '1px solid #aaa' }; styles.link = { display: ...
src/routes/MyResource/components/ConfigContent/VipConfigContent.js
TheModevShop/craft-app
import React from 'react'; import {browserHistory} from 'react-router'; import _ from 'lodash'; import Select from 'react-select'; import Loader from 'components/Loader/Loader'; import './config-content.less'; class ConfigContent extends React.Component { constructor(...args) { super(...args); this.state = {...
packages/material-ui-icons/src/SignalWifi4Bar.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let SignalWifi4Bar = props => <SvgIcon {...props}> <path d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z" /> </SvgIcon>; SignalWifi4Bar = pure(SignalWifi4Bar)...
03-postcss/lib/layout/index.js
samueleaton/approaches-to-styling
import React from 'react' import styleable from 'react-styleable' import Cover from '../cover' import Avatar from '../avatar' import Bio from '../bio' import Info from '../info' @styleable(require('./index.css')) export default class Layout extends React.Component { render () { return ( <div className={th...
app/components/Tabs/Timeline/index.js
prudhvisays/newsb
import React from 'react'; import moment from 'moment'; import './timeline.css'; export default class Timeline extends React.Component { //eslint-disable-line constructor(props) { super(props); this.formatTime = this.formatTime.bind(this); this.formatDate = this.formatDate.bind(this); } formatTim...
src/scenes/home/informationForm/formComponents/workInfo.js
sethbergman/operationcode_frontend
import React from 'react'; import { Line } from 'rc-progress'; import Form from 'shared/components/form/form'; import PropTypes from 'prop-types'; import FormSelect from 'shared/components/form/formSelect/formSelect'; import { WORKINFO, MENTOR_ANSWERS } from 'shared/constants/status'; import styles from './formComponen...
__tests__/index.android.js
derickwarshaw/react-native-jenkins
import 'react-native'; import React from 'react'; import Index from '../index.android.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/svg-icons/maps/restaurant.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsRestaurant = (props) => ( <SvgIcon {...props}> <path d="M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"/> </SvgIcon> )...
src/svg-icons/communication/call-missed.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationCallMissed = (props) => ( <SvgIcon {...props}> <path d="M19.59 7L12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"/> </SvgIcon> ); CommunicationCallMissed = pure(CommunicationCallMissed); CommunicationC...
src/components/BooksDashboardFilters/BooksDashboardFilters.js
sbalay/reacting
import React, { Component } from 'react'; import DropdownButton from 'react-bootstrap/lib/DropdownButton'; import MenuItem from 'react-bootstrap/lib/MenuItem'; export default class BooksDashboardFilters extends Component { constructor(props) { super(props); this.state = { filterTypes: ['title', 'autho...
Example/src/page/TabBar/Rnx/index.js
dragonwong/rnx-ui
/** * 主页面 rnx 面板 */ import React from 'react'; import { StyleSheet, View, Text, } from 'react-native'; import NavBar from 'rnx-ui/NavBar'; const styles = StyleSheet.create({ all: { flex: 1, }, }); function Rnx() { return ( <View style={styles.all}> <NavBar title="RNX" /> <Text> ...
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/Dialog/Page.js
pbogdan/react-flux-mui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import dialogReadmeText from './README'; import DialogExampleSimple from './Exam...
src/createElement.js
thebritican/react-router-relay
import React from 'react'; import Container from './Container'; export default function createElement(Component, props) { return ( <Container Component={Component} {...props} /> ); }
packages/material-ui-icons/src/ExpandMore.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let ExpandMore = props => <SvgIcon {...props}> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" /> </SvgIcon>; ExpandMore = pure(ExpandMore); ExpandMore.muiName = 'SvgIcon'; export default ExpandMor...
views/prompt.js
cyrixhero/black-screen
import _ from 'lodash'; import React from 'react'; import Autocomplete from './autocomplete'; import DecorationToggle from './decoration_toggle'; // TODO: Make sure we only update the view when the model changes. export default React.createClass({ getInitialState() { return { suggestions: [], ...
app/components/SubNavigation/index.js
seanng/web-server
/** * * SubNavigation * */ import React from 'react'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; import messages from './messages'; import Tab from '../Tab'; const Div = styled.div` background-color: #eeeeee; height: 45px; display: flex; justify-content: center; ...
app/javascript/mastodon/features/keyboard_shortcuts/index.js
amazedkoumei/mastodon
import React from 'react'; import Column from '../ui/components/column'; import ColumnBackButtonSlim from '../../components/column_back_button_slim'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-co...
consoles/my-joy-images/src/components/tags.js
yldio/joyent-portal
import React from 'react'; import { Margin } from 'styled-components-spacing'; import { TagItem } from 'joyent-ui-toolkit'; import { KeyValue } from 'joyent-ui-resource-widgets'; export const AddForm = props => ( <KeyValue {...props} method="add" input="input" type="tag" expanded /> ); export const EditForm = prop...
geonode/monitoring/frontend/src/components/cels/layer-select/index.js
ppasq/geonode
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; import actions from './actions'; import styles from './styles'; const mapStateToProps = (state) => ({ interval: stat...
test/ButtonInputSpec.js
collinwu/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ButtonInput from '../src/ButtonInput'; import {shouldWarn} from './helpers'; describe('ButtonInput', () =>{ it('renders an input button element with type=button', function () { const instance = ReactTestUtils.renderIntoDocum...
resources/js/Admin/components/MainNav/NavLink.js
DoSomething/northstar
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { InertiaLink } from '@inertiajs/inertia-react'; const NavLink = ({ className, href, isActive, routeName, title }) => { const textColor = isActive ? 'text-white' : 'text-gray-500'; return routeName ? ( <...
src/parser/warlock/affliction/modules/soulshards/SoulShardDetails.js
fyruna/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import ResourceBreakdown from 'parser/shared/modules/resourcetracker/ResourceBreakdown'; import SPELLS from 'common/SPELLS'; import Panel from 'interface/others/Panel'; import STATISTIC_ORDER from 'interface/others/STATISTIC_ORDER'; import Stati...
src/docs/apiExamples/ErrorBar.js
recharts/recharts.org
import React from 'react'; import { ScatterChart, XAxis, YAxis, CartesianGrid, Tooltip, Legend, Scatter, ErrorBar } from 'recharts'; const data = [ { x: 45, y: 100, z: 150, errorY: [30, 20], errorX: 5, }, { x: 100, y: 200, z: 200, errorY: [20, 30], errorX: 3, }, { ...
src/index.js
KidLau/react-3d-views
'use strict'; import React from 'react'; import {render} from 'react-dom'; import {Router, Route, browserHistory, IndexRedirect} from 'react-router'; import CoverFlowView from './examples/cover-flow-view'; const routes = [ <Route path="/"> <IndexRedirect to="/cover-flow-view" /> <Route path="/cover-flow-vi...
_experiment/react-fetch-github-repo/v3-stable/src/App.js
David-JC/react-testing
import React from 'react'; import {render} from 'react-dom'; import ReposList from './ReposList'; // init repos Array let repos = [] // Create generic App Component class App extends React.Component { render() { return ( <div> <h1>iGenius repositories</h1> <ReposList repos={this.props.repos}/> </div> ...
src/RichTextAreaComposite/RichTextAreaComposite.spec.js
nirhart/wix-style-react
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import RichTextAreaComposite from './RichTextAreaComposite'; import Label from '../Label'; import RichTextArea from '../RichTextArea'; import {richTextAreaCompositeTestkitFactory} from '../../testkit'; import {richTextAreaCompositeTestkitF...
app/jsx/bundles/account_grading_standards.js
djbender/canvas-lms
/* * Copyright (C) 2016 - 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...
views/decoration_toggle.js
jassyboy/black-screen
import React from 'react'; export default React.createClass({ getInitialState() { return {enabled: this.props.invocation.state.decorate}; }, handleClick(event) { stopBubblingUp(event); var newState = !this.state.enabled; this.setState({enabled: newState}); this.prop...
app/components/FormFields/Loading.js
dmitru/react-redux-router-expense-tracker-example-app
import React from 'react' import classNames from 'classnames' import { Glyphicon } from 'react-bootstrap' import styles from './Loading.css' export default class Loading extends React.Component { static propTypes = { delay: React.PropTypes.oneOfType([ React.PropTypes.bool, React.PropTypes.number, ...
src/components/Layout.js
CoolPodCast/playerDesktop
import React from 'react'; import ReactDOM from 'react-dom'; import Menu from './components/Menu/SideBar'; import Content from './components/Feed/Content'; class Layout extends React.Component { render() { return ( <div> <Menu/> <Content/> </div> ); } } cons...
examples/redux/src/js/components/Comments.js
cpsubrian/hipley
import React from 'react' import Comment from './Comment' class Comments extends React.Component { static propTypes = { comments: React.PropTypes.array, likeComment: React.PropTypes.func } render () { return ( <ul className='comments'> {this.props.comments.map((comment, i) => { ...
index.android.js
shuiszhang/fanfou
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, } from 'react-native'; import Fanfou from './app/app'; AppRegistry.registerComponent('fanfou', () => Fanfou);
force_dir/node_modules/react-bootstrap/es/Pagination.js
wolfiex/VisACC
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
src/svg-icons/editor/strikethrough-s.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorStrikethroughS = (props) => ( <SvgIcon {...props}> <path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 ...
app/containers/NotFoundPage/index.js
andresol/homepage
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
src/components/buttons/Button.js
kryptnostic/gallery
import React from 'react'; import StyledButton from './StyledButton'; export default class Button extends React.Component { static propTypes = { children: React.PropTypes.node.isRequired, disabled: React.PropTypes.bool, onClick: React.PropTypes.func, scStyle: React.PropTypes.string }; render()...
examples/test/advanced.js
busypeoples/reactcards.js
import React from 'react' import { assert } from 'chai' import { shallow } from 'enzyme' import { Foo, Bar } from '../components' export function testBarAdvancedComponent() { describe('Test <Bar />', () => { it('should display a bar. drink up!', () => { const wrapper = shallow(<Bar/>) ...
src/client/components/regions.js
caseywebdev/bruteball
import _ from 'underscore'; import {withPave} from 'pave-react'; import React from 'react'; const renderRegion = ({id, ping}) => <div key={id}> {id} {ping == null ? '...' : Math.floor(ping * 1000)} ping </div>; const render = ({props: {pave: {state: {regions}, error}}}) => <div>{error ? error.toString() : _...
Paths/React/05.Building Scalable React Apps/8-react-boilerplate-building-scalable-apps-m8-exercise-files/After/app/components/LinkList/index.js
phiratio/Pluralsight-materials
/** * * LinkList * */ import React from 'react'; import Link from '../Link'; import styles from './styles.css'; function LinkList({ links, topicName, children }) { const linkNodes = links.map(l => ( <Link key={l.id} link={l} /> )); return ( <div className={styles.linkList}> <h1>{...
pages/error/index.js
GabrielLagos/emotion_analyser
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-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'; ...
app-course-sync/views/WellcomeView.js
globant-ui-rosario/progress-tracker
import React, { Component } from 'react'; class BootcampWellcomeView extends Component { render () { return <div>Wellcome view</div>; } }; export default BootcampWellcomeView;
dist/lib/carbon-fields/assets/js/fields/components/hidden/index.js
ArtFever911/statrer-kit
/** * The external dependencies. */ import React from 'react'; import PropTypes from 'prop-types'; import { setStatic } from 'recompose'; /** * The internal dependencies. */ import Field from 'fields/components/field'; import { enhance } from 'fields/components/text'; import { TYPE_HIDDEN } from 'fields/constants'...
src/hoc/selectable-enhance.js
izziaraffaele/material-ui
import React from 'react'; import getMuiTheme from '../styles/getMuiTheme'; import StylePropable from '../mixins/style-propable'; import ColorManipulator from '../utils/color-manipulator'; export const SelectableContainerEnhance = (Component) => { const composed = React.createClass({ displayName: `Selectable${C...
src/components/UIShell/Link.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 PropTypes from 'prop-types'; import React from 'react'; /** * Link is a custom component that allows us to supporting rendering elem...
app/javascript/mastodon/containers/timeline_container.js
hyuki0000/mastodon
import React from 'react'; import { Provider } from 'react-redux'; import PropTypes from 'prop-types'; import configureStore from '../store/configureStore'; import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; import PublicTim...
app/NavBar.js
vikramcse/react-calculator
import React from 'react'; class NavBar extends React.Component { render() { return ( <nav> <div className="nav-wrapper"> <a href="#" className="brand-logo">Calculator</a> <ul id="nav-mobile" className="right hide-on-med-and-down"> <li><a href="https://github.com/vikram...
monkey/monkey_island/cc/ui/src/components/ui-components/inline-selection/InlineSelection.js
guardicore/monkey
import React from 'react'; import PropTypes from 'prop-types'; import BackButton from './BackButton'; import {Col, Row, Container} from 'react-bootstrap'; import {getColumnSize} from './utils'; export default function InlineSelection(WrappedComponent, props) { return ( <Container className={'inline-selection-co...
client/app/scripts/auth0-lock/support/design/index.js
Zeus-HatersGonaHate/Zeus-HatersGonaHate
import React from 'react'; import ReactDOM from 'react-dom'; import Immutable from 'immutable'; import _ from '../../src/browser'; import Control, { store } from './control'; import * as ClientSettings from '../../src/core/client/settings'; import webAPI from '../../src/core/web_api'; const WebAPI = webAPI.constructor;...
DialogExample/index.ios.js
ahmedlhanafy/react-native-md-dialog
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, TouchableOpacity } from 'react-native'; import App from './App'; class DialogExample extends Component { render() { return ( ...
src/js/components/icons/status/Blank.js
kylebyerly-hp/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; const CLASS_ROOT = CSSClassnames.STATUS_ICON; export default class Blank ex...
src/FormControls/Static.js
yuche/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import InputBase from '../InputBase'; import childrenValueValidation from '../utils/childrenValueInputValidation'; class Static extends InputBase { getValue() { const {children, value} = this.props; return children ? children : value; } ren...
__tests__/index.ios.js
kkerr1/BlindPoll
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
HTML/前端/my-react-app-spring-boot-yao/src/index.js
xiaoxiaoyao/MyApp
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; function Square(props) { return ( <button className="square" onClick={props.onClick}> {props.value} </button> ); } class Board extends React.Component { renderSquare(i) { return ( <Square value={thi...
static/src/containers/AdminHome.js
eltrufas/cosmico
import React from 'react'; import Paper from 'material-ui/Paper'; const AdminHome = () => ( <Paper style={{ maxWidth: '500px', padding: '16px', margin: '20px auto', textAlign: 'center'}}> Aun no hay nada aquí. </Paper> ) export default AdminHome
tests/react_native_tests/test_data/native_code/BorderStyles/storybook/stories/Mobile/index.js
ibhubs/sketch-components
import React from 'react' import { storiesOf } from '@storybook/react-native' import { action } from '@storybook/addon-actions' import { linkTo } from '@storybook/addon-links' import Mobile from 'app/components/Mobile' storiesOf('Mobile', module) .add('default', () => ( <Mobile></Mobile>))
src/components/App.js
andreminz/aim
import React from 'react'; import { BrowserRouter } from 'react-router'; import styles from './App.css'; import Navbar from './Navbar'; import Main from './Main'; import Footer from './Footer'; const App = () => <BrowserRouter> <div className={styles.app}> <Navbar /> <Main /> <Footer /> </d...
step4.0/client/App.js
colmarius/universal-react-workshop-app
import React from 'react' import TalkList from './TalkList' const App = React.createClass({ render: function() { return ( <div className='jumbotron'> <h1 className="text-center"> Conference Talks </h1> <TalkList /> </div> ) }, }) export default App
packages/cp-frontend/test/unit/components/services/empty.js
yldio/copilot
/** * @jest-environment jsdom */ import React from 'react'; import renderer from 'react-test-renderer'; import 'jest-styled-components'; import EmptyServices from '@components/services/empty.js'; import { Router } from '../../mocks'; it('renders <EmptyServices /> without throwing', () => { const tree = renderer ...
docs/src/Root.js
tigerandgirl/ssc-refer
import React from 'react'; const Root = React.createClass({ statics: { /** * Get the list of pages that are renderable * * @returns {Array} */ getPages() { return [ 'index.html', 'introduction.html', 'getting-started.html', 'components.html', ...
src/icons/Pricetags.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class Pricetags extends React.Component { render() { if(this.props.bare) { return <g> <g> <path d="M472,239.2L472,239.2C472,239.2,471.9,239.2,472,239.2L282.1,48.1c0,0,0,0,0,0l-1.4-1.4c0,0-0.5,0-0.5,0 c-7.5-7.2-1...
app/components/home/Stepper.js
OldFresco/web-app-kiwwi
import React from 'react'; import { Step, Stepper, StepButton, } from 'material-ui/Stepper'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButton from 'material-ui/FlatButton'; import Body from 'material-ui/svg-icons/action/accessibility'; import Target from 'material-ui/svg-icons/action/track-c...
src/propTypes/ShadowPropTypesIOS.js
dingbat/react-native-mock
import React from 'react'; import ColorPropType from './ColorPropType'; const { PropTypes } = React; const ShadowPropTypesIOS = { /** * Sets the drop shadow color * @platform ios */ shadowColor: ColorPropType, /** * Sets the drop shadow offset * @platform ios */ shadowOffset: PropTypes.shape...
app/javascript/mastodon/features/ui/components/column_loading.js
mimumemo/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Column from '../../../components/column'; import ColumnHeader from '../../../components/column_header'; import ImmutablePureComponent from 'react-immutable-pure-component'; export default class ColumnLoading extends ImmutablePureComponent { stat...
src/common/components/TimelineNodeOrganizer/SortableTreeMenu/Tree.js
jspsych/jsPsych-Redux-GUI
import React from 'react'; import TreeNode from '../../../containers/TimelineNodeOrganizer/SortableTreeMenu/TreeNodeContainer'; class Tree extends React.Component { render() { const { children, collapsed, } = this.props; return ( <div className="Sortable-Tree" > {(collapsed) ? null: ...
app/javascript/flavours/glitch/features/lists/index.js
glitch-soc/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; import Column from 'flavours/glitch/features/ui/components/column'; import Column...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js
RobzDoom/frame_trap
/** * 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. */ import Rea...