path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
node_modules/redux-form/es/__tests__/values.spec.js
saltypaul/SnipTodo
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* eslint react/no-multi-comp:0 */ import React from 'react';...
src/Board.js
Codility/swarm
import React from 'react'; import Tile from './Tile'; import EmptyTile from './EmptyTile'; import HexLayout from './HexLayout'; export default class Board extends HexLayout { getRows(tiles) { let table = []; tiles.forEach((tile) => { if (!table[tile.x]) { table[tile.x] = []; } table...
src/index.js
Deadhood/tepa-complete
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'mobx-react' import { AppContainer } from 'react-hot-loader' import { BrowserRouter as Router } from 'react-router-dom' import App from './App' import DataStore from './DataStore' import 'bootswatch/cosmo/bootstrap.min.css' import './...
client/src/components/city.js
BrunoSalerno/citylines
import React from 'react'; import CityBase from './city-base'; import {Switch, Redirect, Route} from 'react-router-dom'; import PropTypes from 'prop-types'; import {PanelHeader, PanelBody} from './panel'; import {Map, Source, Popup} from './map'; import Translate from 'react-translate-component'; import FeaturePopup...
src/dumb/App.js
jeckhummer/ebidding-commercial
import React from 'react'; import {NotRemovedItemsTable} from '../smart/tables/NotRemovedItemsTable'; import {RemovedItemsTable} from '../smart/tables/RemovedItemsTable'; import DuplicatesNotification from "../smart/common/DuplicatesNotification"; import {ItemsCurrencySelect} from "../smart/common/ItemsCurrencySelect";...
client/src/components/Admin/Issue/index.js
dotkom/super-duper-fiesta
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Redirect } from 'react-router-dom'; import { VOTING_NOT_STARTED, VOTING_IN_PROGRESS, VOTING_FINISHED } from 'common/actionTypes/issues'; import { adminCloseIssue, adminDeleteIssue, enableVoting, disabl...
modules/gui/src/widget/shape.js
openforis/sepal
import {compose} from 'compose' import Icon from 'widget/icon' import PropTypes from 'prop-types' import React from 'react' import Tooltip from 'widget/tooltip' import lookStyles from 'style/look.module.css' import styles from './shape.module.css' import withForwardedRef from 'ref' class _Shape extends React.Component...
app/components/areas/area-detail/index.js
Vizzuality/forest-watcher
// @flow import type { Area } from 'types/areas.types'; import type { Route } from 'types/routes.types'; import React, { Component } from 'react'; import { Alert, View, Image, ScrollView, Text, TextInput, TouchableHighlight } from 'react-native'; import debounceUI from 'helpers/debounceUI'; import { trackScreenView } ...
src/ReactTouchHandler-test.js
KamranAsif/fixed-data-table-2
/** * Copyright Schrodinger, LLC */ import React from 'react'; import ReactTouchHandler from './ReactTouchHandler'; import sinon from 'sinon'; import { assert } from 'chai'; import { createRenderer, isElement } from 'react-addons-test-utils'; describe('ReactTouchHandler', function() { var clock, sandbox, requestA...
app/component/quiz/Domicilio.js
vagnerpraia/ipeasurvey
import React, { Component } from 'react'; import { PanResponder, StyleSheet, TextInput, ToastAndroid, View } from 'react-native'; import { Body, Button, Card, CardItem, Container, Content, Footer, FooterTab, Header, Icon, Left, Right, Text, Title } from 'native-base'; import SideMenu from 'react-native-side-menu'; imp...
research/reactNative/index.ios.js
huxinmin/PracticeMakesPerfect
/** * 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 reactNative extends Component { render() { return ( <View style={styles.contain...
src/index.js
webberdoo/react-redux-starter
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = applyMiddleware()(createStore); ReactDOM.render( <Provi...
src/icons/SocialJavascript.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class SocialJavascript extends React.Component { render() { if(this.props.bare) { return <g> <g transform="translate(384 48)"> <g id="icon-javascript_1_1_"> <path d="M-176,40.001h-80v212.498c0,52.58-18.032,67.26...
app/views/Proposals/Proposal/Budgeting/Partial/Partial.js
RcKeller/STF-Refresh
import React from 'react' import PropTypes from 'prop-types' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import api from '../../../../../services' import _ from 'lodash' import { Select, Alert, message } from 'antd' const Option = Select.Option import { Boundary, Spr...
node_modules/react-native/Libraries/Components/Keyboard/Keyboard.js
kssujithcj/TestMobileCenter
/** * 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...
modules/__tests__/transitionHooks-test.js
ryardley/react-router
/*eslint-env mocha */ /*eslint react/prop-types: 0*/ import expect, { spyOn } from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import execSteps from './execSteps' import Router from '../Router' describe('When a router enters a branch', function () { var node, Dashbo...
src/svg-icons/editor/format-underlined.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatUnderlined = (props) => ( <SvgIcon {...props}> <path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/> </SvgIcon> ); EditorF...
src/components/Common/Alert/Alert.js
Jac21/reponotesreact
import React from 'react'; import PropTypes from 'prop-types'; import { css } from 'glamor'; const swatch = css({ display: 'block', padding: `${1}em`, fontSize: `${1}rem`, color: '#fff' }); const error = css({ backgroundColor: '#d91e18' }); const Alert = ({ message }) => { return ( <React.Fragment> ...
packages/docs/components/Examples/static-toolbar/SimpleToolbarEditor/index.js
nikgraf/draft-js-plugin-editor
import React, { Component } from 'react'; import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor'; import createToolbarPlugin from '@draft-js-plugins/static-toolbar'; import editorStyles from './editorStyles.module.css'; const staticToolbarPlugin = createToolbarPlugin(); const { Toolbar } = static...
src/components/FormMarcaAuto.js
aurigadl/EnvReactAsk
import React from 'react' import SelectInput from './SelectInput.js' import {remoteData} from '../utils/mrequest'; import {Tooltip, Card , Form , Input , message, Col, Row, Button, Icon} from 'antd'; const FormItem = Form.Item; const InputGroup = Input.Group; var FormMarcaAuto = Form.create()(React.createClass({ ...
techCurriculum/ui/solutions/4.2/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...
packages/react-instantsearch-dom/src/components/__tests__/RefinementList.js
algolia/react-instantsearch
import React from 'react'; import renderer from 'react-test-renderer'; import Enzyme, { mount } from 'enzyme'; import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; import RefinementList from '../RefinementList'; Enzyme.configure({ adapter: new Adapter() }); jest.mock('../../widgets/Highlight', () => () => null);...
assets/jqwidgets/demos/react/app/dropdownlist/righttoleftlayout/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxDropDownList from '../../../jqwidgets-react/react_jqxdropdownlist.js'; class App extends React.Component { componentDidMount() { let item = this.refs.myDropDownList.getItemByValue('US'); this.refs.myDropDownList.selectItem(item...
src/svg-icons/image/add-to-photos.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageAddToPhotos = (props) => ( <SvgIcon {...props}> <path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/> ...
examples/markdown.js
dundalek/react-blessed-contrib
// Adapted from https://github.com/yaronn/blessed-contrib/blob/master/examples/markdown.js import React, { Component } from 'react'; import blessed from 'blessed'; import { render } from 'react-blessed'; import { Markdown } from '../src/index'; import chalk from 'chalk'; class App extends Component { componentDidMo...
__tests__/components/Table-test.js
linde12/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React from 'react'; import renderer from 'react-test-renderer'; import Table from '../../src/js/components/Table'; import TableHeader from '../../src/js/components/Table'; import TableRow from '../../src/js/components/Table'; // needed becau...
app/javascript/mastodon/features/keyboard_shortcuts/index.js
lindwurm/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...
src/helpers/universalRouter.js
joelburget/pigment
import qs from 'query-string'; import React from 'react'; import {match, RoutingContext} from 'react-router'; import createRoutes from '../routes'; import { Provider } from 'react-redux'; const getFetchData = (component = {}) => { return component.WrappedComponent ? getFetchData(component.WrappedComponent) : ...
src/components/Footer.js
laurentzziu/color-gems-react
import React from 'react'; const Footer = (props) => { return ( <footer id="app-footer" className="text-center mb-3"> <small>Made with (love) by &nbsp; <a href="https://floringorgan.com/">Florinel Gorgan</a>. </small> </footer> ) } export default Footer;
src/modules/widget/Table.js
lenxeon/react
'use strict' import React from 'react' import classnames from 'classnames' import { substitute } from './utils/strings' import TableHeader from './TableHeader' import { requireCss } from './themes' requireCss('tables') class Table extends React.Component { static displayName = 'Table' static propTypes = { b...
__tests__/components/Carousel-test.js
linde12/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React from 'react'; import renderer from 'react-test-renderer'; import Carousel from '../../src/js/components/Carousel'; // needed because this: // https://github.com/facebook/jest/issues/1353 jest.mock('react-dom'); describe('Carousel', ()...
src/docs/components/quote/QuoteExamplesDoc.js
grommet/grommet-docs
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import Quote from 'grommet/components/Quote'; import Paragraph from 'grommet/components/Paragraph'; import InteractiveExample from '../../../components/InteractiveExample'; Quote.displayName = 'Quote'; Parag...
lib/App.js
chelletuerk/react_number_guesser
import React from 'react' import Controls from './Controls' import UserRangeInputs from './UserRangeInputs' require('./styles.scss') class App extends React.Component { constructor() { super() this.state = { guess: '', showGuess: null, hint: null, min: 1, max: 100, genera...
examples/05 Customize/Drop Effects/index.js
jowcy/react-dnd
import React from 'react'; import Container from './Container'; export default class CustomizeDropEffects { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/05%20Customize/Drop%20Effects'>Browse the Source</a></b> </p> <p>...
src/index.js
wwayne/react-tooltip
/* eslint-disable no-unused-vars, dot-notation */ import React from 'react'; import PropTypes from 'prop-types'; /* Decorators */ import staticMethods from './decorators/staticMethods'; import windowListener from './decorators/windowListener'; import customEvent from './decorators/customEvent'; import isCapture from '...
scripts/components/UserList.react.js
ViniciusAtaide/chatflux
import React from 'react'; import ChatActions from '../Actions/UserActions'; export default class UserList extends React.Component { _login() { let login = this.refs.login.getDOMNode(); ChatActions.loginAction(login.value); login.value = ""; } _subscribe() { let login = this.refs.login.getDOMN...
src/App.js
aerobatic/kexp-spotify-player
import React, { Component } from 'react'; import Player from './components/Player'; import WelcomeSplash from './components/WelcomeSplash'; import * as spotifyAuth from './lib/spotifyAuth'; import glamorous from 'glamorous' import './App.css'; const AppShell = glamorous.section({ width: 700, maxWidth: '100%', m...
src/docs/apiExamples/SankeyChart.js
recharts/recharts.org
import React from 'react'; import { Sankey, Tooltip, Layer, Rectangle } from 'recharts'; const data0 = { nodes: [ { name: 'Visit' }, { name: 'Direct-Favourite' }, { name: 'Page-Click' }, { name: 'Detail-Favourite' }, { name: 'Lost' }, ], links: [ { source: 0, target: 1, value: 3728.3 }, ...
node_modules/react-bootstrap/es/Tab.js
WatkinsSoftwareDevelopment/HowardsBarberShop
import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import _extends from 'babel-runtime/helpers/extends'; import React from 'react'; import TabContainer from...
src/svg-icons/image/exposure-plus-2.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageExposurePlus2 = (props) => ( <SvgIcon {...props}> <path d="M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-...
src/Tooltip/Tooltip.js
yurizhang/ishow
import React from 'react'; import PropTypes from 'prop-types'; import {default as Component,View} from '../Common/plugs/index.js'; //提供style, classname方法 import Transition from '../Message/transition'; import Popper from '../Common/utils/popper'; import '../Common/css/Tooltip.css'; import '../Common/css/Popover.css'; ...
src/components/Blog/Blog.react.js
DeveloperAlfa/chat.susi.ai
import './Blog.css'; import 'font-awesome/css/font-awesome.min.css'; import PropTypes from 'prop-types'; import htmlToText from 'html-to-text'; import $ from 'jquery'; import { Card, CardMedia, CardTitle, CardText, CardActions } from 'material-ui/Card'; import susi from '../../images/susi-logo.svg'; import dateFormat f...
docs/app/Examples/elements/Input/Variations/InputExampleActionIconButton.js
aabustamante/Semantic-UI-React
import React from 'react' import { Input } from 'semantic-ui-react' const InputExampleActionIconButton = () => ( <Input action={{ icon: 'search' }} placeholder='Search...' /> ) export default InputExampleActionIconButton
src/svg-icons/device/signal-cellular-connected-no-internet-1-bar.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellularConnectedNoInternet1Bar = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M20 10v8h2v-8h-2zm-8 12V12L2 22h10zm8 0h2v-2h-2v2z"/> </SvgIcon> ); Devi...
src/components/Square.js
marcjohnstonuw/bingo-gen
import React, { Component } from 'react'; class GameType extends Component { constructor (props) { super(props); this.state = { isEditing: props.data.text ? false : true, newText: props.data.text }; } onSave () { this.setState({ isEditing...
webpack/scenes/ModuleStreams/ModuleStreamsPage.js
cfouant/katello
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Grid, Row, Col, Form, FormGroup } from 'react-bootstrap'; import qs from 'query-string'; import Search from '../../components/Search/index'; import ModuleStreamsTable from './ModuleStreamsTable'; import { orgId } from '../../services...
src/components/Sidebar.js
maloun96/react-admin
import React from 'react'; import {render} from 'react-dom'; import {Link} from 'react-router-dom'; class Sidebar extends React.Component { render(){ return ( <div> <aside className="main-sidebar"> <section className="sidebar"> <div className="user-panel"> <div className="pull-left ...
docs/src/app/components/pages/components/AutoComplete/ExampleSimple.js
ruifortes/material-ui
import React from 'react'; import AutoComplete from 'material-ui/AutoComplete'; export default class AutoCompleteExampleSimple extends React.Component { constructor(props) { super(props); this.state = { dataSource: [], }; } handleUpdateInput = (value) => { this.setState({ dataSourc...
src/website/app/demos/Grid/common/DemoLayout.js
mineral-ui/mineral-ui
/* @flow */ import styled from '@emotion/styled'; import { clearFix } from 'polished'; import React from 'react'; import { ignoreSsrWarning } from '../../../../../library/utils/emotion'; import type { StyledComponent } from '@emotion/styled-base/src/utils'; const Root: StyledComponent<{ [key: string]: any }> = styled(...
src/Stepper/StepContent.spec.js
ruifortes/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import StepContent from './StepContent'; import getMuiTheme from '../styles/getMuiTheme'; describe('<StepContent />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (node, context = {}...
src/pages/index.js
daudahmad/daudahmad.github.io
import React from 'react' import { Link, graphql } from 'gatsby' import Bio from '../components/Bio' import Layout from '../components/Layout' import SEO from '../components/seo' import { rhythm } from '../utils/typography' class BlogIndex extends React.Component { render() { const { data } = this.props con...
app/javascript/mastodon/features/compose/components/reply_indicator.js
lynlynlynx/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Avatar from '../../../components/avatar'; import IconButton from '../../../components/icon_button'; import DisplayName from '../../../components/display_name'; import { defineMessages, injec...
app/javascript/flavours/glitch/components/media_gallery.js
Kirishima21/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { is } from 'immutable'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { isIOS } from 'flavours/glitch/util/is_mob...
examples/with-redux-reselect-recompose/components/clock.js
callumlocke/next.js
import React from 'react' import PropTypes from 'prop-types' import { compose, pure, setDisplayName, setPropTypes } from 'recompose' const format = t => `${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}` const pad = n => n < 10 ? `0${n}` : n const Clock = ({ lastUpdate, light }) => <div ...
src/views/IconView.js
nitrog7/nl-fluid
import React from 'react'; import * as components from 'components'; const { Box, Code, Component, Container } = components; export default class IconView extends Component { constructor(props) { super(props); this.state = { }; } render() { return ( <Container direction="colu...
src/components/footer.js
paulckennedy/KennedyChemistryRocks
import React from 'react'; export default (props) => { return ( <div> <footer className="hg_footer"> <div className="contactus"> <h3>Tracy Kennedy MS.</h3> <div clasclassNames="address"> <h1 className="bigOne"><...
app/javascript/mastodon/features/getting_started/index.js
pixiv/mastodon
import React from 'react'; import Column from '../ui/components/column'; import ColumnLink from '../ui/components/column_link'; import ColumnSubheading from '../ui/components/column_subheading'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import Prop...
src/shared/components/socialMedia/socialMediaItem/socialMediaItem.js
OperationCode/operationcode_frontend
import React from 'react'; import PropTypes from 'prop-types'; import styles from './socialMediaItem.css'; const SocialMediaItem = (props) => { const { smImage, smText, link, } = props; return ( <div className={styles.socialMediaItem}> <a href={link} target="_blank" rel="noopener noreferre...
frontend/src/components/ChatMeta.js
nepeat/chatforesnics
import React from 'react'; import ReactHighstock from 'react-highcharts/ReactHighstock.src'; import HighchartsMore from 'highcharts-more'; import HighchatsExporting from 'highcharts-exporting'; // Modules HighchartsMore(ReactHighstock.Highcharts); HighchatsExporting(ReactHighstock.Highcharts); const ChatMeta = ({ cha...
src/parser/rogue/subtlety/modules/features/SymbolsOfDeathUptime.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage } from 'common/format'; import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modu...
src/components/BoggleCube.js
jlfwong/boggle
import React, { Component } from 'react'; import { StyleSheet, css } from 'aphrodite'; import PureComponent from 'react-pure-render/component'; const RP = React.PropTypes; const BoggleCube = (name, CUBE_WIDTH, CUBE_SPACING) => { /** * Render a single boggle cube. */ class _Cube extends PureComponent { s...
node/client/src/views/Page/Page.js
joseph-bakke/hack4cause
import React from 'react'; import axios from 'axios'; import _ from 'lodash'; import Layout from '../Shared/Layout'; import Graph from '../Shared/Graph'; import ButtonSelectorMenu from '../Shared/ButtonSelectorMenu'; const eugeneOverviewEndpoint = 'http://localhost:3001/eugeneData'; const ignoreFields = ['index', 'ren...
src/containers/DevTools.js
robertcasanova/personal-website
import React from 'react' // Exported from redux-devtools import { createDevTools } from 'redux-devtools' // Monitors are separate packages, and you can make a custom one import LogMonitor from 'redux-devtools-log-monitor' import DockMonitor from 'redux-devtools-dock-monitor' // createDevTools takes a monitor and pr...
index.android.js
sercaninaler/chatbot
/** * 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 chatbot extends Component { render() { return ( <View style={styles.container}>...
test/containers/index.spec.js
sgillespie/beer-recipe-adapter
import { ADD_GRAIN, DELETE_GRAIN, UPDATE_EFFICIENCY, UPDATE_GRAVITY, UPDATE_VOLUME, } from '../../actions'; import AdjustableRecipe from '../../components/AdjustableRecipe'; import chai from 'chai'; import { findRenderedComponentWithType, renderIntoDocument, } from 'react-addons-test-utils'; import jsdom ...
src/components/FileUpload.js
iGameLab/teleport-client
import React from 'react' import PropTypes from 'prop-types' import Dropzone from 'react-dropzone' export default class FileUpload extends React.Component{ static propTypes = { apiUrl: PropTypes.string.isRequired, multiple: PropTypes.bool.isRequired, extraData: PropTypes.object } ...
public/js/cat_source/es6/components/modals/ForgotPasswordModal.js
matecat/MateCat
import update from 'immutability-helper' import React from 'react' import TextField from '../common/TextField' import * as RuleRunner from '../common/ruleRunner' import * as FormRules from '../common/formRules' import {forgotPassword} from '../../api/forgotPassword' import {checkRedeemProject as checkRedeemProjectApi}...
client/components/ui/multi-state-modal.js
jankeromnes/kresus
import React from 'react'; import PropTypes from 'prop-types'; import { assertHas } from '../../helpers'; import Modal from './modal'; class MultiStateModal extends React.Component { constructor(props) { super(props); this.state = { view: props.initialView }; this.swi...
src/components/prototype/Record.js
arayi/SLions
/** * Practice Scene */ import React from 'react'; import PropTypes from 'prop-types'; import { View, Button, Alert } from 'react-native'; import { Actions } from 'react-native-router-flux'; // Consts and Libs import { AppStyles } from '@theme/'; import { DefaultSongs } from '@constants/'; import Sound from 'react-n...
src/spares/paragraph/Paragraph.js
korchemkin/spares-uikit
/** * * Spares-uikit * * @author Dmitri Korchemkin * @source https://github.com/korchemkin/spares-uikit */ import React, { Component } from 'react'; import './Paragraph.css'; class Paragraph extends Component { render() { return ( <p className="spares-paragraph">{this.props.children}</p> ); } } e...
web/src/js/utils.js
StevenVanAcker/mitmproxy
import _ from 'lodash' import React from 'react' window._ = _; window.React = React; export var Key = { UP: 38, DOWN: 40, PAGE_UP: 33, PAGE_DOWN: 34, HOME: 36, END: 35, LEFT: 37, RIGHT: 39, ENTER: 13, ESC: 27, TAB: 9, SPACE: 32, BACKSPACE: 8, SHIFT: 16 }; // Add...
app/containers/NotFoundPage/index.js
xavierouicar/react-boilerplate
/** * 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...
frontend/component/Footer.js
laayoune/whoquan
import React from 'react'; const footerStyle ={ marginTop:50, padding:20 }; export default class Footer extends React.Component { render(){ return( <div className="text-center" style={footerStyle}> &copy; CopyRight Node.js实战 </div> ) } }
src/components/App.js
Montana-Code-School/LifeCoach
import React from 'react'; import Navigation from './Navigation'; class App extends React.Component{ constructor() { super(); } render() { return( <div> <Navigation/> {this.props.children} </div> ); } } export default App;
app/Meneame.js
alvaromb/mnm
import React from 'react' import { StyleSheet, Image, Text, Dimensions } from 'react-native' import MaterialIcons from 'react-native-vector-icons/MaterialIcons' import Ionicon from 'react-native-vector-icons/Ionicons' import { Menu } from 'react-native-section-menu' import { MnmSectionPortada, MnmSectionNuevas, ...
src/components/Counter/Counter.js
cargo-transport/web-frontend
import React from 'react'; import classes from './Counter.scss'; export const Counter = (props) => ( <div> <h2 className={classes.counterContainer}> Counter: {' '} <span className={classes['counter--green']}> {props.counter} </span> </h2> <button className="btn btn-default...
modules/Router.js
mjw56/react-router
import React from 'react' import warning from 'warning' import createHashHistory from 'history/lib/createHashHistory' import { createRoutes } from './RouteUtils' import RoutingContext from './RoutingContext' import useRoutes from './useRoutes' import { routes } from './PropTypes' const { func, object } = React.PropTyp...
test/OverlayDeprecationSpec.js
mxc/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Position from '../src/Position'; import Transition from '../src/Transition'; import Portal from '../src/Portal'; import { shouldWarn } from './helpers'; describe('Components moved to react-overlays', () => { it('should warn ab...
src/components/GroupList.js
wookiecookie87/lunch_group_creator_with_reactjs
import React from 'react' class GroupList extends React.Component{ constructor(props, context) { super(props, context); } render () { let groupList = this.props.groupMembers.map((member) => ( <li key={member.name} className="list-group-item">{member.name}</li> )); return ( <ul className="list-group ...
definitions/npm/react-onclickoutside_v6.x.x/flow_v0.104.x-/test_react-onclickoutside_v6.x.x.js
flowtype/flow-typed
import React from 'react'; import onClickOutside, { IGNORE_CLASS_NAME } from 'react-onclickoutside'; import { describe, it } from 'flow-typed-test'; describe('react-onclickoutside', () => { it('IGNORE_CLASS_NAME', () => { IGNORE_CLASS_NAME.slice(); // $FlowExpectedError Cannot perform arithmetic operation b...
src/svg-icons/device/battery-alert.js
mit-cml/iot-website-source
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryAlert = (props) => ( <SvgIcon {...props}> <path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0...
src/components/portfolio-contact.js
relwiwa/fcc-portfolio-page
import React from 'react'; import '../styles/portfolio-contact.scss'; const PortfolioContact = (props) => { const { contactData } = props; const renderContactItem = (item) => { const { description, image, title, url } = item; return( <div className="column column-block text-center" ...
lib/components/App.js
dpkshrma/beaver
'use babel'; import React from 'react'; import { Collapse } from 'react-collapse'; import TodoFormContainer from './TodoForm'; import TodoListContainer from './TodoList'; import { TodoService } from '../services'; const TODO_FORM = 'todoForm'; const TODO_LIST = 'todoList'; const TopBar = ({ children, toggleTopMenu, ...
src/components/counter.js
pingf/BSIDK
import React from 'react'; import ReactDOM from 'react-dom'; import { createStore } from 'redux'; import { Provider, connect } from 'react-redux'; import Button from './button' // React component class Counter extends React.Component { render(){ const { value, onIncreaseClick, click } = this.props; return ( <d...
client/components/dashboard/SurveyTemplates.js
AnatolyBelobrovik/itechartlabs
import React from 'react'; import { connect } from 'react-redux'; import MenuPage from '../shared/MenuPage'; import TemplatesGrid from '../shared/templates/TemplatesGrid'; import SearchBar from '../shared/SearchBar'; import NoData from '../shared/NoData'; import Loader from 'react-loader'; import { getTemplatesRequest,...
pyxis/components/Grid/index.js
gtkatakura/furb-desenvolvimento-plataformas-moveis
import React from 'react'; import { View, Text, Button, StyleSheet } from 'react-native'; import Components from './../../components'; const styles = new StyleSheet.create({ grid: { margin: 20 }, header: { }, header_text: { fontSize: 32 }, header_actions: { // flexWrap: 'wrap', flexDirec...
src/components/exercises/build-sentence-video.component.js
serlo-org/serlo-abc
import React from 'react'; import { View, Dimensions } from 'react-native'; import { PRIMARY } from '../../styles/colors'; import Video from '../common/Video'; import { PortraitScreenOrientation } from '../helpers/screen-orientation'; import { BuildSentence } from './build-sentence.component'; export const BuildSente...
src/Popover/Popover.spec.js
mit-cml/iot-website-source
/* eslint-env mocha */ import React from 'react'; import {assert} from 'chai'; import {shallow, mount} from 'enzyme'; import Popover from './Popover'; import PopoverAnimationDefault from './PopoverAnimationDefault'; import Paper from '../Paper'; import getMuiTheme from '../styles/getMuiTheme'; describe('<Popover />',...
packages/mineral-ui-icons/src/IconEventSeat.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconEventSeat(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProp...
ui/src/components/role-policy/AddAssertionForRole.js
yahoo/athenz
/* * Copyright 2020 Verizon Media * * 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 t...
components/AppBar.js
nodegin/react-native-redux-routing
import React from 'react' import { StyleSheet, Text, View, Dimensions, TouchableHighlight, Platform, WebView, } from 'react-native' import { types } from '../actions' const windowSize = Dimensions.get('window') const appBarIconSize = 24 export default class extends React.Component { _class() { r...
app/jsx/shared/SVGWrapper.js
venturehive/canvas-lms
/* * Copyright (C) 2015 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
pages/work/index.js
gregcorby/gregcorby.com
import React from 'react' import { Link } from 'react-router' import { prefixLink } from 'gatsby-helpers' export default class Sass extends React.Component { render () { return ( <div className="page-container" id="content-container"> <div className="work-container"> <h2 className="work-heade...
src/universal/components/About.js
jcoreio/crater
// @flow import React from 'react' import {Link} from 'react-router' const About = (): React.Element<any> => ( <div> <h1>About</h1> <p> This is an app skeleton that uses Meteor, Webpack, and React. </p> <p> Unlike a traditional Meteor app, it allows you to avoid building any of your app ...
src/components/UpdateItemTray/index.js
instructure/canvas-planner
/* * Copyright (C) 2017 - 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/containers/book_list.js
gui-santos/exp-redux
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { selectBook } from '../actions/index'; import { bindActionCreators } from 'redux'; class BookList extends Component { renderList() { return this.props.books.map((book) => { return ( <li key={book.titl...
docs/app/Examples/views/Comment/Content/CommentExampleReplyForm.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Button, Comment, Form } from 'semantic-ui-react' const CommentExampleReplyForm = () => ( <Comment.Group> <Comment> <Comment.Avatar as='a' src='http://semantic-ui.com/images/avatar/small/steve.jpg' /> <Comment.Content> <Comment.Author as='a'>Steve Jobes</Comm...
app/pages/about/faq.spec.js
zooniverse/Panoptes-Front-End
/* eslint prefer-arrow-callback: 0, func-names: 0, 'react/jsx-filename-extension': [1, { "extensions": [".js", ".jsx"] }] */ import React from 'react'; import assert from 'assert'; import { shallow } from 'enzyme'; import Faq from './faq'; describe('Faq', function () { it('renders without crashing', function () { ...
styleguide/screens/Patterns/Patterns.js
NGMarmaduke/bloom
import React from 'react'; import { Switch, Route } from 'react-router-dom'; import Accessibility from './Accessibility/Accessibility'; import Animation from './Animation/Animation'; import Badge from './Badge/Badge'; import Buttons from './Buttons/Buttons'; import Cards from './Cards/Cards'; import Carousel from './C...
test/ResponsiveEmbedSpec.js
HPate-Riptide/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import ReactDOM from 'react-dom'; import ResponsiveEmbed from '../src/ResponsiveEmbed'; import { shouldWarn } from './helpers'; describe('ResponsiveEmbed', () => { it('should contain `embed-responsive` class', () => { let instance...