path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.android.js
dikaiosune/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> <...
src/components/lessons/Vigenere.js
pshrmn/cryptonite
import React from 'react'; import Lesson from './LessonBase'; import VigenereTable from 'components/tools/VigenereTable'; import { EnglishAlphabet } from 'constants/CharacterSets'; const title = 'The Vigenère Cipher'; export default () => ( <Lesson title={title}> <div> <p> The Vigenère cipher is ...
examples/todomvc/test/components/Footer.spec.js
conorhastings/redux
import expect from 'expect' import React from 'react' import TestUtils from 'react-addons-test-utils' import Footer from '../../components/Footer' import { SHOW_ALL, SHOW_ACTIVE } from '../../constants/TodoFilters' function setup(propOverrides) { const props = Object.assign({ completedCount: 0, activeCount: ...
client/js/components/paginated-car-table.js
pvogel1967/relayClassTeam2_11012017
import React from 'react'; import { createPaginationContainer, graphql } from 'react-relay'; import { CarViewRowContainer } from './car-view-row'; export class CarTable extends React.Component { constructor(props) { super(props); this.state = { currentPage: 0, lastPageLoa...
src/desktop/apps/auction/components/layout/Banner.js
kanaabe/force
import _ClockView from 'desktop/components/clock/react' import PropTypes from 'prop-types' import React from 'react' import block from 'bem-cn-lite' import get from 'lodash.get' import { connect } from 'react-redux' import { data as sd } from 'sharify' // FIXME: Rewire let ClockView = _ClockView function Banner (prop...
node_modules/react-router/es6/RoutingContext.js
ddigioia/react_router_practice_1
import React from 'react'; import RouterContext from './RouterContext'; import warning from './routerWarning'; var RoutingContext = React.createClass({ displayName: 'RoutingContext', componentWillMount: function componentWillMount() { process.env.NODE_ENV !== 'production' ? warning(false, '`RoutingContext` has...
app/javascript/mastodon/features/followers/index.js
riku6460/chikuwagoddon
import React from 'react'; import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading...
tools/render.js
maven-hackathon/TheQueerTour
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import glob from 'glob'; import { join, dirname } from 'path'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Html from '../components/Html'...
client/src/LeftNav/index.react.js
wenhao/fixed-asset
import React from 'react' import { Navigation, State } from 'react-router' import { LeftNav } from 'material-ui' const menuItems = [{ text: 'Home', route: 'home' },{ text: 'User', route: 'user' },{ text: 'User Assets', route: 'asset' },{ text: 'Add Asset', route: 'addAsset' }]; const AppLeftNa...
src/js/components/ItemDataset/index.js
waagsociety/ams.datahub.client
import React from 'react' import Li from '../Li' export default function ItemDataset({ data }) { const { access, sourceType, spatialResolution, temporalResolution, publisher, creator, contributor, author } = data return <section className='ItemDataset content'> <h1>Dataset</h1> <ul> <Li header='Acc...
src/admin/containers/AdminContainer.js
firescribe/firescribe
import React, { Component } from 'react'; import { connect } from 'react-redux'; import AppBar from 'material-ui/AppBar'; import DrawerContainer from './DrawerContainer'; class AdminContainer extends Component { constructor(props) { super(props); this.state = { drawerOpen: props.isDesktop, }; } ...
resources/assets/js/components/responses/WriteResponseComponent.js
jrm2k6/i-heart-reading
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchAssignedBooks, saveResponse } from '../../actions/crudActions'; import { MarkdownEditor } from 'react-markdown-editor'; const mapStateToProps = (state) => { return { assignedBooks: state.bookReducers.assignedBooks ...
dispatch/static/manager/src/js/components/inputs/selects/EventSelectInput.js
ubyssey/dispatch
import React from 'react' import { connect } from 'react-redux' import ItemSelectInput from './ItemSelectInput' import eventsActions from '../../../actions/EventsActions' class EventSelectInputComponent extends React.Component { listEvents(query) { let queryObj = {} if (query) { queryObj['q'] = que...
storybook/config.js
Secullum/secullum-react-ui
import React from 'react'; import { configure, addDecorator } from '@kadira/storybook'; import 'font-awesome/css/font-awesome.css'; import '../src/index.css'; addDecorator(story => ( <div style={{ padding: '10px' }}> {story()} </div> )); const req = require.context('../src/components', true, /stories.js$/); ...
src/DateSelector/DateSelector.spec.js
resmio/mantecao
import React from 'react' import renderer from 'react-test-renderer' import DateSelector from './DateSelector' const ON_CHANGE = jest.fn() const DATE = '1984-03-19' describe('Date Selector', () => { it('renders with no date when no date is passed as a prop', () => { const tree = renderer.create(<DateSelector on...
src/containers/HelloWorld.js
Jon-Biz/simple-static-react
import React from 'react' const HelloWorld = (props) => { return ( <div> <h1>Hello World</h1> <p>Here is some data:</p> <p> { props.helloWorldData } </p> <a href="#hello-again-world"> Go to the other page. </a> <p> <i> ...
clients/packages/admin-client/src/community/components/dns/button-preview/index.js
nossas/bonde-client
import PropTypes from 'prop-types' import React from 'react' if (require('exenv').canUseDOM) require('./styles.scss') const ButtonPreview = ({ text, onClick }) => ( <div className='button-preview flex flex-wrap' onClick={onClick}> <div className='circle bg-pagenta'> <i className='fa fa-plus' /> </div>...
src/TimePicker/TimePickerDialog.spec.js
pancho111203/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {expect} from 'chai'; import {spy, stub} from 'sinon'; import getMuiTheme from '../styles/getMuiTheme'; import TimePickerDialog from './TimePickerDialog'; describe('<TimePickerDialog />', () => { const muiTheme = getMuiTheme(); ...
pages/index.js
hillcitymnag/www.hillcitymnag.church
import css from 'next/css' import Head from 'next/head' import React from 'react' import 'whatwg-fetch' import Contact from '../components/contact' import Footer from '../components/footer' import Header from '../components/header' import LatestSermon from '../components/latest-sermon' import Navigation from '../compo...
techCurriculum/ui/solutions/5.3/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 in writ...
src/svg-icons/notification/sms-failed.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationSmsFailed = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/> </SvgIcon> ); NotificationSmsFail...
src/components/ReCaptcha.js
pixelcanvasio/pixelcanvas
/** * Created by arkeros on 9/6/17. * * @flow */ import React from 'react'; import type { State } from '../reducers'; import store from '../ui/store'; import { requestPlacePixel } from '../actions'; import { RECAPTCHA_SITEKEY } from '../core/constants'; function onCaptcha(token: string) { console.log('token',...
src/routes/Counter/components/Counter.js
shengnian/webpack2-react-redux-starter
import React from 'react' export const Counter = (props) => ( <div style={{ margin: '0 auto' }} > <h2>Counter: {props.counter}</h2> <button className='btn btn-default' onClick={props.increment}> Increment </button> {' '} <button className='btn btn-default' onClick={props.doubleAsync}> ...
stories/InputArea/ExamplePaneltitleStyle.js
nirhart/wix-style-react
import React from 'react'; import InputArea from 'wix-style-react/InputArea'; export default () => <div className="ltr"> <div style={{background: '#3899ec', padding: '20px', width: '400px'}}> <div style={{width: '400px'}} className="ltr"> <InputArea theme="paneltitle"/> </div> </div> </...
information/blendle-frontend-react-source/app/containers/ManifestContainer/ManifestDropdownWrapper/index.js
BramscoChill/BlendleParser
import React from 'react'; import { string, shape } from 'prop-types'; import ManifestDropdownContainer from 'containers/ManifestDropdownContainer'; import CSS from './style.scss'; function ManifestDropdownWrapper({ itemId, analytics }) { return ( <div className={CSS.manifestDropdownWrapper}> <ManifestDrop...
examples/huge-apps/routes/Course/components/Nav.js
pheadra/react-router
import React from 'react' import { Link } from 'react-router' const styles = {} styles.nav = { borderBottom: '1px solid #aaa' } styles.link = { display: 'inline-block', padding: 10, textDecoration: 'none' } styles.activeLink = { ...styles.link, color: 'red' } class Nav extends React.Component { rende...
src/president.js
kylefdoherty/ipsum-generator
import React, { Component } from 'react'; class President extends Component { render() { const {displayName, prez, selected} = this.props; const klass = selected ? 'z-depth-1' : 'z-depth-3' return( <div className="col col s12 m6 l3"> <label> <img className={ klass } src={'http://...
examples/nextjs/pages/index.js
dsslimshaddy/material-ui
// @flow import React, { Component } from 'react'; import Button from 'material-ui/Button'; import Dialog, { DialogTitle, DialogContent, DialogContentText, DialogActions, } from 'material-ui/Dialog'; import Typography from 'material-ui/Typography'; import withRoot from '../components/withRoot'; const styles =...
src/containers/Home/Home.js
Viral-MediaLab/viralSitePubPub
import React, { Component } from 'react'; // import { Link } from 'react-router'; const ImageGallery = require('react-image-gallery'); const images = require('../../../data/images.json'); export default class Home extends Component { handleSlide(index) { // console.log('Slid to ' + index); } render() { ...
src/client/index.js
uschen/react-redux-universal-rendering-starter
localStorage.debug = 'app:*'; import _debug from 'debug'; import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { Router, browserHistory } from 'react-router'; import routes from './../routes'; import configureStore from '../redux/configureStore'; import { createFor...
app/containers/Header/index.js
easingthemes/berlinmap
/* * * Header * */ import React from 'react'; import { connect } from 'react-redux'; import AppBar from 'material-ui/AppBar'; import selectHeader from './selectors'; // import { FormattedMessage } from 'react-intl'; // import messages from './messages'; export class Header extends React.Component { // eslint-disa...
src/js/components/pds.js
VitorHP/TI3
import React from 'react'; export default function Pds(props) { return ( <svg> <g className="pds" {...props}> <g transform="translate(361.46546,-15.287633)"> <path d="m -359.96546,55.788253 4.919,-8.058793 2.72115,-1.988533 3.45377,-24.490358 1.88387,-4.291045 1.67456,-0.10466 1.36057,3.7...
src/svg-icons/editor/mode-comment.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorModeComment = (props) => ( <SvgIcon {...props}> <path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/> </SvgIcon> ); EditorModeComment = pure(EditorModeComment); Edito...
js/jqwidgets/demos/react/app/datatable/validation/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxDataTable from '../../../jqwidgets-react/react_jqxdatatable.js'; class App extends React.Component { render() { let source = { dataFields: [ { name: 'OrderID', type: 'int' }, ...
test/observer.spec.js
ConrabOpto/komx-react
import React from 'react'; import ReactDOM from 'react-dom'; import observer from '../src/observer'; import { observable } from 'komx'; import $ from 'jquery'; import ko from 'knockout'; ko.options.deferUpdates = true; const e = React.createElement; // Store class Todo { @observable completed = false; @obser...
src/containers/book_detail.js
Jesus-Gonzalez/ReactReduxTestNumberTwo
import React from 'react'; import { connect } from 'react-redux'; const BookDetail = ({ books, activeBook }) => { if (!books) return (<div></div>); if (!activeBook) return ( <h4 className="col-xs-7">Choose a book</h4> ); return ( <article className="col-xs-7"> <h1>{ activeBook.title }</h1...
.storybook/config.js
yangshun/react-storybook-addon-chapters
import React from 'react'; import { configure, setAddon, addDecorator } from '@storybook/react'; import chapterAddon from '../src/'; addDecorator((story) => ( <div style={{padding: 20}}> {story()} </div> )); setAddon(chapterAddon); configure(function () { require('../example/story'); }, module);
test/integration/AppBar/AppBar.spec.js
ArcanisCz/material-ui
/* eslint-env mocha */ import React from 'react'; import {mount} from 'enzyme'; import {assert} from 'chai'; import AppBar from 'src/AppBar'; import IconButton from 'src/IconButton'; import FontIcon from 'src/FontIcon'; import getMuiTheme from 'src/styles/getMuiTheme'; describe('<AppBar />', () => { const muiTheme =...
examples/src/components/CustomOption.js
jaakerisalu/react-select
import React from 'react'; import Gravatar from 'react-gravatar'; var Option = React.createClass({ propTypes: { addLabelText: React.PropTypes.string, className: React.PropTypes.string, mouseDown: React.PropTypes.func, mouseEnter: React.PropTypes.func, mouseLeave: React.PropTypes.func, option: React.PropTy...
examples/bookmark/moveButton.js
jjmulenex/sdk
import React from 'react'; import {connect} from 'react-redux'; import * as bookmarkAction from './action'; import * as mapActions from '@boundlessgeo/sdk/actions/map'; // Custom Bookmark Component class MoveButtonComponent extends React.PureComponent { // This is the where action really happens, update state and m...
my-app/src/components/pages/projectpages/arrayexercise/Container.js
sThig/jabbascrypt
import React, { Component } from 'react'; import styled from 'styled-components'; import { ContainLeft } from '../../../helper/comps'; import { Col, Row } from 'react-flexbox-grid'; import SyntaxHighlighter from 'react-syntax-highlighter'; import { agate } from 'react-syntax-highlighter/dist/styles'; import jeditemples...
src/components/Session/context.js
b1oki/b1oki.github.io
import React from 'react'; const AuthUserContext = React.createContext(null); export default AuthUserContext;
1.YouTube-API-Search/src/components/search-bar.js
Branimir123/Learning-React
import React, { Component } from 'react'; class SearchBar extends Component { constructor(props){ super(props); this.state = { term: 'Search here' }; } render() { return ( <div className="search-bar"> <input value={this.state.term} onCh...
react/L3/src/pages/GamesPage.js
luolisave/starters
import React from 'react'; import GamesList from './GamesList' import {bindActionCreators} from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import {initGame, selectGame} from '../actions/games' class GamesPage extends React.Component { constructor(){ super(); console.l...
node_modules/react-select/examples/src/components/GithubUsers.js
ivanhristov92/bookingCalendar
import React from 'react'; import Select from 'react-select'; import fetch from 'isomorphic-fetch'; const GithubUsers = React.createClass({ displayName: 'GithubUsers', propTypes: { label: React.PropTypes.string, }, getInitialState () { return { backspaceRemoves: true, multi: true }; }, onChange (val...
client/routes.js
kenware/more-recipes
import React from 'react'; //import { Route, IndexRoute } from 'react-router'; import Home from './components/home/index'; import Detail from './components/detail/index'; import Login from './components/login/index'; import Register from './components/register/index'; import Dashbord from './components/Dashbor...
js/components/TodoInput.js
clairefritz/todo
import React from 'react'; export default class TodoInput extends React.Component { static propTypes = { submitTodo: React.PropTypes.func.isRequired, onBlur: React.PropTypes.func, content: React.PropTypes.string, layout: React.PropTypes.string }; state = { text: this.props.content || '' };...
src/components/DeviceAddButton.js
Bucko13/kinects-it
import React from 'react'; // import RaisedButton from 'material-ui/RaisedButton'; import { NavLink } from './NavLink'; import FloatingActionButton from 'material-ui/FloatingActionButton'; import ContentAdd from 'material-ui/svg-icons/content/add'; import kinectsitTheme from '../assets/kinectsitTheme'; import Paper fro...
app/javascript/mastodon/features/tutorial/components/tutorial_nav.js
masarakki/mastodon
import React from 'react'; import PropTypes from 'prop-types'; export default class TutorialNav extends React.Component { static propTypes = { tutorialSkip: PropTypes.func.isRequired, tutorialNextPage: PropTypes.func.isRequired, navText: PropTypes.string.isRequired, isLast: PropTypes.bool, }; t...
examples/todos-with-undo/src/containers/UndoRedo.js
heyesther/redux
import React from 'react' import { ActionCreators as UndoActionCreators } from 'redux-undo' import { connect } from 'react-redux' let UndoRedo = ({ canUndo, canRedo, onUndo, onRedo }) => ( <p> <button onClick={onUndo} disabled={!canUndo}> Undo </button> <button onClick={onRedo} disabled={!canRedo}>...
src/svg-icons/social/cake.js
mit-cml/iot-website-source
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialCake = (props) => ( <SvgIcon {...props}> <path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l...
client/util/react-intl-test-helper.js
mraq1234/mod11
/** * Components using the react-intl module require access to the intl context. * This is not available when mounting single components in Enzyme. * These helper functions aim to address that and wrap a valid, * English-locale intl context around them. */ import React from 'react'; import { IntlProvider, intlSha...
src/js/pages/OwnProposalsPage.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import translate from '../i18n/Translate'; import connectToStores from '../utils/connectToStores'; import AuthenticatedComponent from '../components/AuthenticatedComponent'; import BottomNavBar from '../components/BottomNavBar/BottomNavBar.js...
src/components/Digit.js
jeetiss/madskillz
import React from 'react' import styled from 'styled-components' const digitColor = props => props.active ? 'black' : 'transparent' const easing = props => props.active ? 'ease-in' : 'ease-out' const dur = props => props.active ? '.3s' : '.1s' const PalkaCore = styled.div` width: 16px; background-color: ${dig...
src/components/icons/ReminderIcon.js
austinknight/ui-components
import React from 'react'; const ReminderIcon = props => ( <svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24"> {props.title && <title>{props.title}</title>} <path d="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A...
src/components/containers/files/FilesLibraryManager.js
ESTEBANMURUZABAL/my-ecommerce-template
/** * Imports */ import React from 'react'; import connectToStores from 'fluxible-addons-react/connectToStores'; import {FormattedMessage} from 'react-intl'; // Flux import FileUploadStore from '../../../stores/Files/FileUploadStore'; import IntlStore from '../../../stores/Application/IntlStore'; import uploadFile f...
backend/editor/react/src/challenge.js
wadobo/socializa
import React, { Component } from 'react'; import TinyMCE from 'react-tinymce'; import { GameSolModal } from './common'; import { tinyMCEConfig } from './common'; export class GameChallenge extends Component { render() { const { game, challenge, idx, actions } = this.props; var id = 'challenge_' ...
docs/src/examples/elements/Icon/Groups/IconExampleTwitterGroup.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Header, Icon } from 'semantic-ui-react' const IconExampleTwitterGroup = () => ( <Header as='h2'> <Icon.Group size='large'> <Icon name='twitter' /> <Icon corner name='add' /> </Icon.Group> Add on Twitter </Header> ) export default IconExampleTwitterGroup
demo/src/containers/Form.js
ilxanlar/cathode
import React from 'react'; import { Button, Form, Grid } from '../../../src'; const sizes = ['md', 'xxs', 'xs', 'sm', 'lg', 'xl', 'xxl']; const moods = ['primary', 'secondary', 'tertiary', 'info', 'success', 'error', 'warning']; const rockBands = [ { id: 1, name: 'Pink Floyd' }, { id: 2, name: 'Metallica' }, { ...
app/javascript/mastodon/features/hashtag_timeline/index.js
KnzkDev/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import ColumnSettingsContainer from './...
app/components/children/dashboard-children/formNode-children/publishForm-children/BroadcastLink.js
asconwe/formulate
import React from 'react'; const base = 'https://www.formulate.fyi' // 'http://localhost:3000' : 'https://formulate-fyi.herokuapp.com'; class BroadcastLink extends React.Component { constructor() { super(); } handleFocus(event) { event.target.select(); } // testing render...
src/interface/common/ReadableList.js
fyruna/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; /** * I think this is ugly but it works so I am going to concede and use it. Turns React elements into a human readable sentence. * E.g. <Maintainer1><Maintainer2><Maintainer3> becomes <Maintainer1>, <Maintainer2> and <Maintainer3> */ const ReadableList...
local-cli/templates/HelloWorld/index.android.js
disparu86/react-native
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; export default class HelloWorld extends Component { render() { return ( <View style={styles.containe...
examples/analyze-bundles/pages/index.js
BlancheXu/test
import React from 'react' import Link from 'next/link' export default class Index extends React.Component { static getInitialProps ({ req }) { if (req) { // Runs only in the server const faker = require('faker') const name = faker.name.findName() return { name } } // Runs only in...
src/components/nodejs/plain/NodejsPlain.js
fpoumian/react-devicon
import React from 'react' import PropTypes from 'prop-types' import SVGDeviconInline from '../../_base/SVGDeviconInline' import iconSVG from './NodejsPlain.svg' /** NodejsPlain */ function NodejsPlain({ width, height, className }) { return ( <SVGDeviconInline className={'NodejsPlain' + ' ' + className} ...
client/modules/Post/tests/components/PostList.spec.js
caleb272/ProjectAccent
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import PostList from '../../components/PostList'; const posts = [ { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" }, { name: 'Mayank', title: 'Hi Mern', slug: ...
app/components/main/Timer.js
ayqy/ready-to-work
import React, { Component } from 'react'; import { Button, Progress } from 'antd'; import notify, { NOTIFY_TYPES } from '../../utils/notify'; import path from 'path'; const initialState = { percent: 0, countDown: '' }; export default class Timer extends Component { state = {...initialState}; render() { co...
app/javascript/mastodon/components/intersection_observer_article.js
maa123/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import scheduleIdleTask from '../features/ui/util/schedule_idle_task'; import getRectFromEntry from '../features/ui/util/get_rect_from_entry'; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'c...
js/components/loaders/ProgressBar.ios.js
chris50bn/Between
/* @flow */ 'use strict'; import React from 'react'; import { ProgressViewIOS} from 'react-native'; import NativeBaseComponent from 'native-base/Components/Base/NativeBaseComponent'; import computeProps from 'native-base/Utils/computeProps'; export default class ProgressBarNB extends NativeBaseComponent { rend...
components/Input/index.js
insane-ux/rebulma
// @flow import React from 'react' import { themr } from 'react-css-themr' import Icon from 'components/Icon' import cn from 'classnames' export const defaultStyles = { root: '', input: '', leftIcon: '', rightIcon: '', } const Input = ({ theme, className, leftIcon, rightIcon, ...props }: { theme:...
.storybook/components/PaginationStory.js
hellobrian/carbon-components-react
import React from 'react'; import { storiesOf } from '@storybook/react'; import Pagination from '../../components/Pagination'; const props = { onChange: ({ page, pageSize }) => { console.log(`Page: ${page}`, `Page Size: ${pageSize}`); // eslint-disable-line no-console }, pageSizes: [10, 20, 30, 40, 50], }; ...
src/utils/deep-compare-children.js
davidkpiano/redux-simple-form
import React from 'react'; import shallowCompare from 'shallow-compare'; import shallowEqual from './shallow-equal'; export function compareChildren(props, nextProps) { const { children } = props; const { children: nextChildren } = nextProps; // If the number of children changed, then children are different. ...
app/javascript/mastodon/components/loading_indicator.js
mecab/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; const LoadingIndicator = () => ( <div className='loading-indicator'> <FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' /> </div> ); export default LoadingIndicator;
docs/app/Examples/views/Statistic/Variations/Floated.js
jcarbo/stardust
import React from 'react' import { Segment, Statistic } from 'stardust' const Floated = () => ( <Segment> <Statistic floated='right' label='Views' value='2,204' /> <p> Te eum doming eirmod, nominati pertinacia argumentum ad his. Ex eam alia facete scriptorem, est autem aliquip detraxit at. Usu o...
src/svg-icons/device/battery-90.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBattery90 = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1...
ReactNativeExampleApp/node_modules/react-native/Libraries/Components/Navigation/NavigatorIOS.ios.js
weien/Auth0Exercise
/** * 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...
src/website/app/demos/Menu/common/DemoLayout.js
mineral-ui/mineral-ui
/* @flow */ import styled from '@emotion/styled'; import React from 'react'; import { pxToEm } from '../../../../../library/styles'; import type { StyledComponent } from '@emotion/styled-base/src/utils'; const Root: StyledComponent<{ [key: string]: any }> = styled('div')( ({ theme, width }) => ({ overflow: 'hidd...
src/components/App.js
PearlR/excel-v2
import React from 'react' import { connect } from 'react-redux' import ControlBar from './ControlBar' import Spreadsheet from './Spreadsheet' const App = ({ spreadsheet }) => { return ( <div className="App"> <ControlBar /> <Spreadsheet spreadsheet={spreadsheet} /> </div> ) } const mapStateToP...
modules/__tests__/transitionHooks-test.js
jdelight/react-router
import expect, { spyOn } from 'expect'; import React from 'react'; import createHistory from 'history/lib/createMemoryHistory'; import execSteps from './execSteps'; import Router from '../Router'; import Route from '../Route'; describe('When a router enters a branch', function () { var node, Dashboard, NewsFeed, Inb...
app/containers/HomePage/index.js
ipselon/react-boilerplate-clone
/* * HomePage * * This is the first thing users see of our App, at the '/' route */ import React from 'react'; import Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import AtPrefix from './AtPre...
src/scenes/home/resetPassword/resetPassword.js
hollomancer/operationcode_frontend
import React, { Component } from 'react'; import Section from 'shared/components/section/section'; import SignUpLink from 'shared/components/signUpLink/signUpLink'; import RequestToken from './requestToken/requestToken'; import SetPassword from './setPassword/setPassword'; import styles from './resetPassword.css'; con...
packages/components/src/DataViewer/ModelViewer/Leaf/ModelViewerLeaf.component.js
Talend/ui
import classNames from 'classnames'; import noop from 'lodash/noop'; import PropTypes from 'prop-types'; import React from 'react'; import getDefaultT from '../../../translate'; import { SimpleTextKeyValue } from '../../Text'; import theme from '../ModelViewer.scss'; /** * Union with only two type and one null, are r...
src/client/pages/notfound.react.js
terakilobyte/esterethinksocketchat
import Component from '../components/component.react'; import DocumentTitle from 'react-document-title'; import React from 'react'; import {Link} from 'react-router'; import {msg} from '../intl/store'; class NotFound extends Component { render() { return ( <DocumentTitle title={msg('notFound.title')}> ...
examples/universal/client/index.js
iatzmon/redux
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import configureStore from '../common/store/configureStore'; import App from '../common/containers/App'; const initialState = window.__INITIAL_STATE__; const store = configureStore(initialState); const rootElement = do...
src/svg-icons/image/photo.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhoto = (props) => ( <SvgIcon {...props}> <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/> </SvgIcon> ); ImagePhoto = p...
client/modules/core/components/.stories/post.js
MechJosh0/storybook-mdl-error
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import Post from '../post'; storiesOf('core.Post', module) .add('default view', () => { const post = { title: 'React storybook is great', content: ` Lorem ipsum dolor sit amet, consectetur adipisicing elit, ...
client/src/index.js
qasim/what-class-is-this
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './static/index.css'; ReactDOM.render( <App />, document.getElementById('root') );
src/react-compat.js
robinpowered/glamorous-native
import React from 'react' // eslint-disable-next-line import/no-mutable-exports let PropTypes if (parseFloat(React.version.slice(0, 4)) >= 15.5) { try { PropTypes = require('prop-types') } catch (error) { // ignore } } PropTypes = PropTypes || React.PropTypes export default PropTypes
docs/src/sections/DatePicker2YearMonthDropdownSection.js
yyssc/ssc-grid
import React from 'react'; import Anchor from '../Anchor'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function DatePicker2FormatterSection() { return ( <div className="bs-docs-section"> <h3><Anchor id="date-picker2-year-month-dropdown">年份、月份下拉快速选择</A...
node_modules/react-native/RNTester/js/ActivityIndicatorExample.js
RahulDesai92/PHR
/** * 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. * * @flow * ...
docs/src/app/components/pages/components/Dialog/ExampleSimple.js
IsenrichO/mui-with-arrows
import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; /** * Dialog with action buttons. The actions are passed in as an array of React objects, * in this example [FlatButtons](/#/components/flat-button...
src/propTypes/StyleSheetPropType.js
lelandrichardson/react-native-mock
/** * https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/StyleSheetPropType.js */ import React from 'react'; import flattenStyle from './flattenStyle'; const { PropTypes } = React; function StyleSheetPropType(shape) { const shapePropType = PropTypes.shape(shape); return function (props, p...
client/src/app/components/forms/editors/SmartCKEditor.js
zraees/sms-project
import React from 'react' import $script from 'scriptjs' export default class SmartCKEditor extends React.Component { componentDidMount() { $script("https://cdn.ckeditor.com/4.5.11/standard/ckeditor.js", ()=> { const CKEDITOR = window['CKEDITOR']; this._editor = CKEDITOR.replace(this.props.contai...
html.js
adjohnson916/site-gatsby
import React from 'react' import DocumentTitle from 'react-document-title' import { prefixLink } from 'gatsby-helpers' module.exports = React.createClass({ propTypes () { return { title: React.PropTypes.string, } }, render () { const title = DocumentTitle.rewind() let cssLink if (pro...
react/src/Checkbox.js
Chalarangelo/react-mini.css
import React from 'react'; import generateUniqueId from './util/idGenerator'; // Module constants (change according to your flavor file) var inputGroupClassName = 'input-group'; // Checkbox component. export function Checkbox (props){ var outProps = Object.assign({}, props); if (typeof outProps.labelText === 'undef...
scenes/VRSecheltScene.js
zuhairp/LearningSpace
import 'aframe'; import {Entity, Scene} from 'aframe-react'; import React from 'react'; import 'aframe-mountain-component'; import Flashcard from '../components/Flashcard'; import Sky from '../components/primitives/Sky'; /*setting up the entire mountain scene experience*/ class VRSecheltScene extends React.Component...
actor-apps/app-web/src/app/components/modals/MyProfile.react.js
luoxiaoshenghustedu/actor-platform
import React from 'react'; import { KeyCodes } from 'constants/ActorAppConstants'; import MyProfileActions from 'actions/MyProfileActionCreators'; import MyProfileStore from 'stores/MyProfileStore'; import AvatarItem from 'components/common/AvatarItem.react'; import Modal from 'react-modal'; import { Styles, TextFi...
test/helpers/shallowRenderHelper.js
lxjx/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/components/pages/HmqLayout/page.js
humaniq/humaniq-pwa-website
import React, { Component } from 'react'; import * as T from "prop-types"; import './styles.scss'; import {cssClassName} from 'utils'; const cn = cssClassName('SE_HmqLayout'); import O_Fixed from 'O_Fixed' import NavBar from './NavBar' import history from 'history' class SE_HmqLayout extends Component { handleSubmi...
src/components/Login.js
farazcsk/marauders-map
import React from 'react'; import { RaisedButton, TextField } from 'material-ui'; import { browserHistory } from 'react-router'; import { getTextFromMic, checkForCorrectPassword, checkForCorrectGoodbye } from './../utils/speech.js'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; class Login exten...