path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/src/javascript/components/modals/confirm-modal/ConfirmModal.js | stephdewit/flood | import React from 'react';
import Modal from '../Modal';
export default class ConfirmModal extends React.Component {
getContent() {
return <div className="modal__content">{this.props.options.content}</div>;
}
render() {
return (
<Modal
actions={this.props.options.actions}
alignmen... |
Dockerfiles/node/nodeapp/src/Modules/TestModule.js | 4lexBaum/projekt-5s-dhbw | import React from 'react';
import { Header } from '../Components/Header.js';
import { QualityData } from '../Components/CustomerQuality.js';
import { ChartContainer } from '../Components/ChartContainer.js';
export class TestModule extends React.Component {
constructor(props) {
super(props);
... |
app/scripts/GenomePositionSearchBox.js | hms-dbmi/4DN_matrix-viewer | import { select, event } from 'd3-selection';
import React from 'react';
import slugid from 'slugid';
import {
FormGroup,
Glyphicon,
DropdownButton,
MenuItem,
} from 'react-bootstrap';
import PropTypes from 'prop-types';
import Autocomplete from './Autocomplete';
import ChromosomeInfo from './ChromosomeInfo';
... |
app/js/seed/views/_success.js | blockstack/blockstack-portal | import React from 'react'
import PropTypes from 'prop-types'
import { ShellScreen, Type } from '@blockstack/ui'
import {Box} from '@components/ui/components/primitives'
const SuccessScreen = ({ finish, buttonLabel, ...rest }) => {
const props = {
title: {
children: <>Save your Secret Recovery Key</>
... |
tests/routes/Home/components/HomeView.spec.js | ComplimentaryCalendar/calendar | import React from 'react'
import { HomeView } from 'routes/Home/components/HomeView'
import { render } from 'enzyme'
describe('(View) Home', () => {
let _component
beforeEach(() => {
_component = render(<HomeView />)
})
it('Renders a welcome message', () => {
const welcome = _component.find('h4')
... |
generators/app/templates/app/router.js | KyperTech/generator-kyper-react | import React from 'react' // eslint-disable-line
import { Route, IndexRoute, Router } from 'react-router'
import {
App,
Home,
About,
Account,
Login,
Signup,
NotFound,
Cars
} from './containers'
export default (history) => (
<Router history={ history }>
<Route path='/' component={... |
docs/src/examples/elements/Input/Variations/InputExampleAction.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Input } from 'semantic-ui-react'
const InputExampleAction = () => (
<Input action='Search' placeholder='Search...' />
)
export default InputExampleAction
|
src/components/UsersRoute.js | lukin-deema/FileSystem | import React from 'react';
import UsersListConnect from '../containers/UsersList';
import UsersAddConnect from '../containers/UsersAdd';
import UsersFilter from './UsersFilter';
const UsersRoute = () => (
<div>
<div>UsersRoute</div>
<UsersAddConnect/>
<UsersFilter/>
<UsersListConnec... |
src/router.js | albperezbermejo/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/http';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactPage';
... |
packages/ringcentral-widgets-docs/src/app/pages/Components/ConferencePanel/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... |
src/containers/toputilizers/components/TopUtilizersPage.js | kryptnostic/gallery | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import Immutable from 'immutable';
import Page from '../../../components/page/Page';
// import { entitySetDetailRequest } from '../../entitysetdetail/EntitySetDetailActionFactory'... |
src/svg-icons/communication/invert-colors-off.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationInvertColorsOff = (props) => (
<SvgIcon {...props}>
<path d="M20.65 20.87l-2.35-2.35-6.3-6.29-3.56-3.57-1.42-1.41L4.27 4.5 3 5.77l2.78 2.78c-2.55 3.14-2.36 7.76.56 10.69C7.9 20.8 9.95 21.58 12 21.5... |
gatsby-browser.js | startop-education/startop-gatsby | // import React from 'react'
// import {Provider} from 'react-redux'
// import createStore from './src/createStore'
//
// const store = createStore()
//
// exports.wrapRootComponent = function wrapRootComponent({Root}) {
// return function wrapRootComponentComponent(props) {
// return (
// <Provider store={... |
src/components/Spinner.js | lxgreen/flickr-viewr | import React from 'react';
import './Spinner.css';
// html + css source: https://codepen.io/magnus16/pen/BKoRNw
const Spinner = () => {
return (
<div className="cs-loader">
<div className="cs-loader-inner">
<label> ●</label>
<label> ●</label>
<lab... |
packages/bonde-admin/src/mobrender/widgets/draft/components/draft-button.js | ourcities/rebu-client | import PropTypes from 'prop-types'
import React from 'react'
if (require('exenv').canUseDOM) require('./draft-button.scss')
const DraftButton = ({ icon, svgIcon: SVGIcon, label, updateKind, widget, ...props }) => {
return (
<div className='draft-widget-button col col-4 p1'>
<button title={label} className... |
src/Parser/Warlock/Demonology/Modules/Items/T20_2set.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
const CALL_DREADSTALKERS_COOLDOWN = 15000;
class T20_2set extends A... |
contrib/webui/src/home/components/filters/index.js | roscopecoltran/papernet | import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { List, Map } from 'immutable';
import classNames from 'classnames';
import './filters.scss';
const f = (tag, filters, onFilterChange) => () => {
const tags = filters.get('tags') || Lis... |
src/components/Leaderboard.js | mineralmink/poke |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class Leaderboard extends Component {
//
// handleAvatar = (avatar) =>{
// return (
// <div key={avatar.name}
// className="panel panel-default"
// styl... |
src/components/common/forms/InlineItems.js | ESTEBANMURUZABAL/bananaStore | /**
* Imports
*/
import React from 'react';
// Required components
import FormLabel from './FormLabel';
/**
* Component
*/
class InlineItems extends React.Component {
//*** Component Lifecycle ***//
componentDidMount() {
// Component styles
require('./InlineItems.scss');
}
//**... |
js/views/CohortSuggest.js | acthp/ucsc-xena-client | import React from 'react';
import PureComponent from '../PureComponent';
import Input from 'react-toolbox/lib/input';
var _ = require('../underscore_ext').default;
import './GeneSuggest.css'; // XXX rename file
import XAutosuggest from './XAutosuggest';
var renderInputComponent = ({ref, onChange, ...props}) => (
<Inp... |
test/ModalSpec.js | adamschroder/react-overlays | import jQuery from 'jquery';
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ReactDOM from 'react-dom';
import simulant from 'simulant';
import Modal from '../src/Modal';
import Transition from '../src/Transition';
import { render, shouldWarn } from './helpers';
const $ = com... |
src/App.js | ethjar/wallet | import React, { Component } from 'react';
import logo from './ETHEREUM-ICON_Black.png';
import './App.css';
import Wallet from './Wallet.js';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="log... |
src/components/AddCountButton.js | codaco/Network-Canvas | import React from 'react';
import PropTypes from 'prop-types';
const baseClass = 'add-count-button';
/**
* @class AddCountButton
*
* @description
* Renders an "Add" button with a count [of the number of items to be added].
*
* Example use: selecting multiple search results from autocomplete interface.
*
* @p... |
src/components/App.js | zooniverse/zoo-react-starterify | import React from 'react';
import { Link } from 'react-router';
import packageJSON from '../../package.json';
export default class App extends React.Component {
returnSomething(something) {
// this is only for testing purposes. Check /test/components/App-test.js
return something;
}
render() {
const ... |
actor-apps/app-web/src/app/components/sidebar/RecentSectionItem.react.js | VikingDen/actor-platform | import React from 'react';
import classNames from 'classnames';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import AvatarItem from 'components/common/AvatarItem.react';
class RecentSectionItem extends React.Component {
static propTypes = {
di... |
client/src/components/Draftail/index.js | zerolab/wagtail | import React from 'react';
import ReactDOM from 'react-dom';
import { DraftailEditor } from 'draftail';
import { Provider } from 'react-redux';
import { gettext } from '../../utils/gettext';
import Icon from '../Icon/Icon';
export { default as Link } from './decorators/Link';
export { default as Document } from './de... |
examples/components/MultiCheckboxSet.js | meraki/mki-formsy-react | import React from 'react';
import Formsy from 'formsy-react';
import createReactClass from 'create-react-class';
function contains(container, item, cmp) {
for (const it of container) {
if (cmp(it, item)) {
return true;
}
}
return false;
}
const MyRadioGroup = createReactClass({
mixins: [Formsy.M... |
src/App.js | AndGreen/gadsby-test | import React, { Component } from 'react';
import DatetimePicker from './components/DatetimePicker';
class App extends Component {
render() {
return (
<DatetimePicker />
);
}
}
export default App;
|
src/svg-icons/image/rotate-90-degrees-ccw.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageRotate90DegreesCcw = (props) => (
<SvgIcon {...props}>
<path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.7... |
docs/src/index.js | Cadasta/django-skivvy | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app';
import remark from 'remark';
import slug from 'remark-slug';
import content from './custom/content';
var ast = remark()
.use(slug)
.run(remark().parse(content));
ReactDOM.render(
<App ast={a... |
src/app/budget/SummaryDepartments.js | cityofasheville/simplicity2 | import React from 'react';
import PropTypes from 'prop-types';
import { graphql, compose } from 'react-apollo';
import gql from 'graphql-tag';
// import { connect } from 'react-redux';
import BudgetSummaryBarChart from './BudgetSummaryBarChart';
import LoadingAnimation from '../../shared/LoadingAnimation';
import Error... |
react-flux-mui/js/material-ui/src/svg-icons/hardware/keyboard-tab.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardTab = (props) => (
<SvgIcon {...props}>
<path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/>
</SvgIcon>
);
HardwareKeyboardTab = pure(HardwareKeyboard... |
Ethereum-based-Roll4Win/node_modules/react-bootstrap/es/NavItem.js | brett-harvey/Smart-Contracts | import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import classNames from 'classnames';
import React from 'react';
import { createBootstrapC... |
app/components/IssueIcon/index.js | ninjaref/ninjaref | import React from 'react';
import PropTypes from 'prop-types';
function IssueIcon(props) {
return (
<svg
height="1em"
width="0.875em"
className={props.className}
>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7... |
client/src/containers/SignUp.js | MattMcFarland/reactathon | import React from 'react';
import { SignupForm } from '../components';
export const SignUp = () => (
<section>
<div
style={{
maxWidth: '440px',
padding: '8px',
background: 'white',
margin: '1em auto 2em auto',
borderRadius: '2px',
boxShadow: '0 3px 10px rgba(0... |
src/components/jogos/JogoItem.js | sysbet/sysbet-mobile | import {
List
} from 'immutable';
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
ToastAndroid,
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import Button from 'react-native-button';
class Palpite extends Component {
render() {
let { palpite ... |
src/svg-icons/maps/person-pin-circle.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPinCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 2c1.1 0 2 .9 2 2 0 1.11-.9 2-2 2s-2-.89-2-2c0-1.1.9-2 2-2zm0 10c-1.67 0... |
js/src/ui/CurrencySymbol/currencySymbol.example.js | nipunn1313/parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
protocol-designer/src/index.js | OpenTrons/opentrons-api | import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { AppContainer } from 'react-hot-loader'
import { configureStore } from './configureStore'
import { App } from './components/App'
import { initialize } from './initialize'
import { initializeMixpanel } from './anal... |
samples/react/app/components/Toggle/index.js | IntelliSearch/search-client | /**
*
* LocaleToggle
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = <option>--</option>;
// If we have items, render them
if (props.values) {
content = props.values.ma... |
web/components/shared/GamePreview/Well/index.js | skidding/flatris | // @flow
import React, { Component } from 'react';
import { COLORS } from 'shared/constants/tetromino';
import { getExactPosition } from 'shared/utils/grid';
import TetrominoComponent from '../../Tetromino';
import WellGridComponent from './WellGrid';
import type {
Position2d,
Tetromino,
TetrominoGrid,
WellGr... |
fields/types/azurefile/AzureFileColumn.js | efernandesng/keystone | import React from 'react';
var AzureFileColumn = React.createClass({
renderValue () {
var value = this.props.data.fields[this.props.col.path];
if (!value) return;
return <a href={value.url} target="_blank">{value.url}</a>;
},
render () {
return (
<td className="ItemList__col">
<div className="ItemLis... |
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js | hzy87email/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ActivityHeader extends React.Component {
static propTypes = {
close: React.PropTypes.func,
title: React.PropTypes.stri... |
docs/app/Examples/elements/Button/Content/ButtonMultipleConditionalsExample.js | jcarbo/stardust | import React from 'react'
import { Button } from 'stardust'
const ButtonMultipleConditionalsExample = () => (
<Button.Group>
<Button>One</Button>
<Button.Or />
<Button>Two</Button>
<Button.Or />
<Button>Three</Button>
</Button.Group>
)
export default ButtonMultipleConditionalsExample
|
src/components/Footer/Footer.js | giux78/daf-dataportal | import React, { Component } from 'react';
class Footer extends Component {
render() {
return (
<footer className="app-footer">
<a href="https://teamdigitale.governo.it">Team Digitale</a> © 2017-2018 Team Digitale.
<span className="float-right">Powered by <a href="https://teamdigitale.g... |
components/AreaUnits/AreaUnits.story.js | rdjpalmer/bloom | import React from 'react';
import { storiesOf } from '@storybook/react';
import AreaUnits from './AreaUnits';
import { AREA_UNITS } from '../../constants/units';
storiesOf('AreaUnits', module)
.add('Square foot', () => (
<AreaUnits
value="300"
unit={ AREA_UNITS.SQUARE_FOOT }
/>
))
.add('Mete... |
src/lib/components/C3/ScatterPlotUI.js | as-me/Adapter | import c3 from 'c3';
import React from 'react';
class C3ScatterPlot extends React.Component {
constructor(props) {
super(props);
this.sessionData = props.sessionData;
this.hook = props.hook;
this.state = this.sessionData.getSessionStateValue();
this.initialize = this.initi... |
docs/src/examples/collections/Message/Variations/MessageExampleInfo.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleInfo = () => (
<Message info>
<Message.Header>Was this what you wanted?</Message.Header>
<p>Did you know it's been a while?</p>
</Message>
)
export default MessageExampleInfo
|
src/scenes/influences/followers/index.js | PowerlineApp/powerline-rn | import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
View,
RefreshControl,
TouchableOpacity,
Alert,
Platform
} from 'react-native';
import {
List,
ListItem,
Text,
Content,
Left,
Body,
Thumbnail,
Right,
Icon
} from 'native-base';
import { Actions } from '... |
react-native solution/__tests__/index.android.js | renolmachado/React-native-upload-image-to-nodejs | 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 />
);
});
|
client/src/javascript/components/sidebar/SpeedLimitDropdown.js | stephdewit/flood | import _ from 'lodash';
import {defineMessages, FormattedMessage, injectIntl} from 'react-intl';
import React from 'react';
import ClientActions from '../../actions/ClientActions';
import connectStores from '../../util/connectStores';
import Dropdown from '../general/form-elements/Dropdown';
import EventTypes from '..... |
src/svg-icons/av/movie.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvMovie = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
</SvgIcon>
);
AvMovie = pure(AvMovie);
Av... |
assets/jqwidgets/demos/react/app/grid/aggregates/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
class App extends React.Component {
render() {
let source =
{
localdata: generatedata(200),
datatype: 'array',
datafield... |
src/components/Layout/Layout.js | vlt5/react-starter-kit | import React from 'react';
require('./Layout.less');
export default class Layout extends React.Component {
render() {
return (
<div className='layout'>
<h1>Hey there!</h1>
<p>Below is a simple image demo:</p>
<div className='img-test'></div>
... |
src/js/components/SocialShare.js | linde12/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Anchor from './Anchor';
import SocialTwitterIcon from './icons/base/SocialTwitter';
import SocialFacebookIcon from './icons/base/SocialFacebook';
import SocialGoogle... |
src/containers/Asians/Published/Dashboard/PreliminaryRounds/index.js | westoncolemanl/tabbr-web | import React from 'react'
import ListSubheader from 'material-ui/List/ListSubheader'
import Responsive from 'react-responsive'
import LargePreliminaryRounds from './LargePreliminaryRounds'
import SmallPreliminaryRounds from './SmallPreliminaryRounds'
export default () => <div>
<ListSubheader
disableSticky
>
... |
daily-frontend/src/components/Sidebar/Sidebar.js | zooyalove/dailynote | import React from 'react';
const Sidebar = ({
active,
children
}) => {
return (
<nav className={`${active ? 'active' : ''}`}>
{children}
</nav>
);
}
export default Sidebar; |
src/svg-icons/image/flash-on.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFlashOn = (props) => (
<SvgIcon {...props}>
<path d="M7 2v11h3v9l7-12h-4l4-8z"/>
</SvgIcon>
);
ImageFlashOn = pure(ImageFlashOn);
ImageFlashOn.displayName = 'ImageFlashOn';
ImageFlashOn.muiName = 'SvgIco... |
app/imports/ui/client/components/TasksManagement/AddTaskForm.js | valcol/ScrumNinja | import React, { Component } from 'react';
import { Meteor } from 'meteor/meteor';
import { Session } from 'meteor/session';
import FeedbackMessage from '../misc/FeedbackMessage';
class addTaskForm extends Component {
constructor(props) {
super(props);
this.state = {
id: 0,
description: '',
... |
src/parser/warrior/fury/modules/spells/RampageCancelled.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
const RAMPAGE_HITS_PER_CAST = 4;
class RampageCancelled extends Analyzer {
// Rampage is in fact 5 separate spells... |
chrome/extension/todoapp.js | jhen0409/react-chrome-extension-boilerplate | import React from 'react';
import ReactDOM from 'react-dom';
import Root from '../../app/containers/Root';
import './todoapp.css';
chrome.storage.local.get('state', (obj) => {
const { state } = obj;
const initialState = JSON.parse(state || '{}');
const createStore = require('../../app/store/configureStore');
... |
app/javascript/mastodon/components/column_header.js | hugogameiro/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
const messages = defineMessages({
show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' },
hide: { id: 'column_header.h... |
node_modules/enzyme/src/ShallowWrapper.js | vallihe/wizarddemo | import React from 'react';
import flatten from 'lodash/flatten';
import unique from 'lodash/uniq';
import compact from 'lodash/compact';
import cheerio from 'cheerio';
import ComplexSelector from './ComplexSelector';
import {
nodeEqual,
containsChildrenSubArray,
propFromEvent,
withSetStateAllowed,
propsOfNod... |
src/components/App.js | jsize8/learn-fullstack-javascript | import React from 'react';
import Header from './Header';
import ContestList from './ContestList';
import Contest from './Contest';
import * as api from '../api';
const pushState = (obj, url) =>
window.history.pushState(obj, '', url);
const onPopState = handler => {
window.onpopstate = handler;
};
class App exte... |
app/javascript/mastodon/components/display_name.js | glitch-soc/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { autoPlayGif } from 'mastodon/initial_state';
export default class DisplayName extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
oth... |
src/containers/notebook.js | OpenChemistry/mongochemclient | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux'
import Notebook from '../components/notebook'
class NotebookContainer extends Component {
render() {
return <Notebook fileId={this.props.fileId} />
}
}
NotebookContainer.propTypes = {
fileId... |
tests/baselines/reference/jsDeclarationsReactComponents.js | RyanCavanaugh/TypeScript | //// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsReactComponents.ts] ////
//// [jsDeclarationsReactComponents1.jsx]
/// <reference path="/.lib/react16.d.ts" />
import React from "react";
import PropTypes from "prop-types"
const TabbedShowLayout = ({
}) => {
return (
<div />
);
};
Tab... |
entry_types/scrolled/package/src/frontend/foregroundBoxes/InvisibleBoxWrapper.js | tf/pageflow | import React from 'react';
import classNames from 'classnames';
import styles from './InvisibleBoxWrapper.module.css';
export function InvisibleBoxWrapper({position, openStart, openEnd, children}) {
return(
<div className={classNames({
[styles.start]: !openStart && position !== 'full',
[styles.e... |
index.js | supnate/react-flux-comment-list | import 'babel-core/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(<App />, document.getElementById('react-root-node'));
|
client/index.js | ArthurFree/learn-ssr | // // import React from 'react';
// // import ReactDOM from 'react-dom';
// // class Root extends React.Component {
// // render() {
// // return (
// // <div>
// // hello,world!!!
// // </div>
// // )
// // }
// // }
// // ReactDOM.render(<Root />, document.querySelector(".content"));
// import { c... |
src/client.js | karlbright/hotplate | import React from 'react'
import { render } from 'react-dom'
import { browserHistory, Router } from 'react-router'
import routes from './routes'
const root = document.getElementById('root')
render(<Router history={browserHistory}>{routes}</Router>, root)
|
src/svg-icons/action/shop-two.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionShopTwo = (props) => (
<SvgIcon {...props}>
<path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4... |
test/RowSpec.js | westonplatter/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Row from '../src/Row';
describe('Row', () => {
it('uses "div" by default', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Row />
);
assert.equal(React.findDOMNode(instance).nodeName, 'DIV');
});
... |
src/contexts/UserSettingsContext.js | mifi/lossless-cut | import React from 'react';
export default React.createContext();
|
src/components/carousel.js | liuyuanquan/kankan | import React from 'react';
import { carousellist as list } from '../constant';
class Carousel extends React.Component {
constructor(props) {
super();
this.props = props;
this.state = {
activeIndex: -1,
timeId: null,
length: this.props.list.length
}
}
handleOver(e) {
clearTimeout(this.state.timeId... |
packages/arwes/src/Loading/Loading.js | romelperez/ui | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import AnimationComponent from '../Animation';
export default function Loading(props) {
const {
theme,
classes,
animation,
Animation,
animate,
show,
layer,
small,
full,
className,
... |
client/redux/DevTools.js | kshowalter/PacketNotes | 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 an... |
frontend/src/Calendar/Options/CalendarOptionsModalContent.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FieldSet from 'Components/FieldSet';
import Form from 'Components/Form/Form';
import FormGroup from 'Components/Form/FormGroup';
import FormInputGroup from 'Components/Form/FormInputGroup';
import FormLabel from 'Components/Form/FormLa... |
index/components/DataBasicView.js | JDRomano2/VenomKB | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Col } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import SequenceBox from '../components/SequenceBox';
import OutLinks from '../components/OutLinks';
import { connect } from 'react-redux';
import { selectData, fe... |
src/content/services/assets/digital/index.js | jmikrut/keen-2017 | import React, { Component } from 'react';
import Work from '../../../../components/Work';
import WorkHeader from '../../../../components/Work/Header';
import workContent from '../../../work';
import randomArray from '../../../../utilities/randomNumberArray.js';
import code from './digital-node.jpg';
import './Digita... |
src/presenters/MessageBubble.js | vulong23/xlbox | import React from 'react'
import styles from './MessageBubble.css'
export default ({ children, color, backgroundColor }) => {
color = color || 'black'
backgroundColor = backgroundColor || '#EEE'
return (
<div className={styles.bubble} style={{ color, backgroundColor }}>
<p className={st... |
docs/src/app/components/pages/components/TextField/ExampleSimple.js | kasra-co/material-ui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleSimple = () => (
<div>
<TextField
hintText="Hint Text"
/><br />
<br />
<TextField
hintText="The hint text can be as long as you want, it will wrap."
/><br />
<TextField
id="text-f... |
client/control/image-select.js | quarterto/almanac | import qs from 'querystring'
import { withTracker } from 'meteor/react-meteor-data'
import styled, { css } from 'styled-components'
import { compose, getContext, withHandlers, withState } from 'recompact'
import React from 'react'
import subscribe from '../utils/subscribe'
import { UnsplashPhotos } from '../../shared/... |
app/containers/EditContainer.js | mcmunder/eaternity-react | /* @flow */
import React from 'react'
import * as dataActions from '../store/data/actions'
import * as viewActions from '../store/view/actions'
import { bindActionCreators } from 'redux'
import { push } from 'react-router-redux'
import { connect } from 'react-redux'
import Edit from '../components/Edit/Edit'
const Edi... |
src/components/video_list.js | yongliu2001/ReduxExample | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const VideoItems = props.videos.map((video) => {
return (
<VideoListItem key={video.etag} video={video}
onVideoSelect={props.onVideoSelect}/>
);
});
return (
<ul className="co... |
src/svg-icons/action/backup.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBackup = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z... |
src/client/components/LoginModal.js | dgrcode/FCC-Voting-App | 'use strict';
import React from 'react';
import LoginButton from './LoginButton';
export default class LoginModal extends React.Component {
render () {
return (
<div className="modal fade" id="modal-login" role="dialog">
<div className="modal-dialog" role="document">
<div className="moda... |
app/components/CommentList/index.js | mclxly/react-study | /**
*
* CommentList
*
*/
import React from 'react';
import Comment from 'components/Comment';
class CommentList extends React.Component {
render() {
let commentNodes = (
'没有评论。'
);
if (this.props.data.length > 0) {
commentNodes = this.props.data.map(function(comment) {
return (
... |
web/test/portal/components/L10nControlBtn.js | trendmicro/serverless-survey-forms | import '../../helpers/env';
import DomMock from '../../helpers/dom-mock';
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-dom/test-utils';
import ControlBtn from '../../../portal/src/components/L10n/ControlBtn';
import IconButton from '../../../portal/src/components/IconButton';
Do... |
src/svg-icons/action/highlight-off.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHighlightOff = (props) => (
<SvgIcon {...props}>
<path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 1... |
admin/client/App/shared/Popout/PopoutListHeading.js | Yaska/keystone | /**
* Render a popout list heading
*/
import React from 'react';
import blacklist from 'blacklist';
import classnames from 'classnames';
var PopoutListHeading = React.createClass({
displayName: 'PopoutListHeading',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
},
... |
source/components/Subjects/index.js | mikey1384/twin-kle | import React from 'react';
import PropTypes from 'prop-types';
import SubjectPanel from './SubjectPanel';
import SubjectInputArea from './SubjectInputArea';
import Button from 'components/Button';
import Context from './Context';
import { loadSubjects } from 'helpers/requestHelpers';
Subjects.propTypes = {
className... |
docs/src/ComponentsPage.js | apkiernan/react-bootstrap | import React from 'react';
import AutoAffix from 'react-overlays/lib/AutoAffix';
import Waypoint from 'react-waypoint';
import Nav from '../../src/Nav';
import NavItem from '../../src/NavItem';
import Anchor from './Anchor';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter fro... |
packages/theme-patternfly-org/components/link/link.js | patternfly/patternfly-org | import React from 'react';
import { Link as ReachLink, navigate } from '@reach/router';
import { getAsyncComponent } from '../../routes';
const Promiseany = (Promise.any || function ($) {
return new Promise(function (D, E, A, L) {
A = [];
L = $.map(function ($, i) {
return Promise.resolve($).then(D, fu... |
js/fgoIndex/navigationOptions.js | JenningsWu/Chaldea-archives | import React from 'react'
import PropTypes from 'prop-types'
import Icon from 'react-native-vector-icons/FontAwesome'
const TabBarIcon = ({ tintColor }) => (
<Icon
name="book"
size={20}
style={{ color: tintColor }}
/>
)
TabBarIcon.propTypes = {
tintColor: PropTypes.string.isRequired,
}
const indexN... |
src/svg-icons/device/location-searching.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceLocationSearching = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-... |
app/routes.js | tikinatop/lucoa | /* eslint flowtype-errors/show-errors: 0 */
import React from 'react';
import { Switch, Route } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
export default () => (
<App>
<Switch>
<Route path="/coun... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-11/Exercise.js | Brandon-J-Campbell/codemash | import React from 'react';
import Friends from './Friends';
export default function Exercise() {
return <Friends friends={myFriends} />
}
const myFriends = [
{
id: 1,
name: 'Potatoes',
image: 'http://placekitten.com/150/150?image=1',
},
{
id: 2,
name: 'Flower',
image: 'http://placekit... |
index.ios.js | rissch/Smart-Recipes-Mobile-App | // @flow
// Vendor.
import React, { Component } from 'react';
import { AppRegistry, View } from 'react-native';
// App.
import App from './src/app';
export default function SmartRecipes(){
return (
<View>
<App />
</View>
)
}
AppRegistry.registerComponent('SmartRecipes', () => SmartRecipes);
|
client/js/containers/AppContainer.js | flammenmensch/proverbs-and-sayings | import React from 'react';
import App from '../components/App';
const loadData = () => fetch('/api/data').then(response => response.json());
export default class AppContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
proverb: '',
loading: false
}
}
compo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.