path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
client/components/App.js | andrewh0/boilerplate-react | import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
greeting: 'Hello world',
};
}
render() {
return (
<div>
<p>{this.state.greeting}</p>
</div>
);
}
};
ReactDOM.render(... |
server/server.js | d-adamkiewicz/QEditorRViewer | import path from 'path'
var webpack = require('webpack')
var webpackDevMiddleware = require('webpack-dev-middleware')
var webpackHotMiddleware = require('webpack-hot-middleware')
var config = require('../webpack.config')
import React from 'react'
import { renderToString } from 'react-dom/server'
import { Provider } fr... |
demo/src/App.js | bem-sdk-archive/bemjson-to-jsx | import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor';
import BemjsonToJSX from '../..';
import './App.css';
const defaultCode =
`({
block: 'button',
text: 'Hello world'
})`;
const defaultJSX = `<button text='Hello world' />`;
class App extends Component {
constructor(pr... |
cerberus-dashboard/src/components/SDBMetadataList/SDBMetadataList.js | Nike-Inc/cerberus | /*
* Copyright (c) 2020 Nike, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
src/components/concent/Onboarding.js | golemfactory/golem-electron | import React from 'react';
import { Transition, animated } from 'react-spring/renderprops.cjs';
import Welcome from './steps/Welcome';
import Step1 from './steps/Step1';
import Step2 from './steps/Step2';
import Step3 from './steps/Step3';
import Step4 from './steps/Step4';
import Step5 from './steps/Step5';
export d... |
client/analytics/components/partials/assetSelector/AssetSelectorContainer.js | Haaarp/geo | import React from 'react';
import {connect} from 'react-redux';
import AssetSelector from './AssetSelector';
class AssetSelectorContainer extends React.Component {
render() {
return (
<AssetSelector
assets={this.props.assets}
assetStats={this.props.assetStats}
... |
src/parser/druid/restoration/modules/features/Innervate.js | FaideWW/WoWAnalyzer | import React from 'react';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import { formatNumber } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
c... |
example/src/screens/transitions/CollapsingHeader.js | MattDavies/react-native-navigation | import React from 'react';
import { StyleSheet, View, Text, ScrollView } from 'react-native';
class CollapsingHeader extends React.Component {
static navigatorStyle = {
drawUnderTabBar: true,
navBarButtonColor: '#ffffff',
navBarTextColor: '#ffffff',
collapsingToolBarImage: require(... |
src/components/footer/FooterToolbar.js | crp2002/ID3-React | import React from 'react';
export default (props) => {
return(
<div className="footer-status toolbar-actions">
<div className="status-bar-left">
<div className="error-helper-status">
<span className="error-helper icon icon-info-circled"></span>
<span className="error-helper info... |
react/features/always-on-top/index.js | bgrozev/jitsi-meet | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import AlwaysOnTop from './AlwaysOnTop';
// Render the main/root Component.
// $FlowExpectedError
ReactDOM.render(<AlwaysOnTop />, document.getElementById('react'));
window.addEventListener(
'beforeunload',
() => ReactDOM.unmountComponent... |
src/index.js | jiv-e/preact-widget-boilerplate | import React from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import reducers from './reducers'
import App from './app'
import './index.css'
const store = createStore(
reducers,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EX... |
lib/CountrySelection/CountrySelection.js | folio-org/stripes-components | import React from 'react';
import { useIntl } from 'react-intl';
import countries from '../../util/countries';
import Selection from '../Selection';
const CountrySelection = props => {
const intl = useIntl();
const sortedCountries = countries
.map(c => ({
label: intl.formatDisplayName(c.alpha2, { type:... |
src/libraries/extendComponentProps.js | blueberryapps/react-bluekit | import React from 'react';
import {fromJS} from 'immutable';
export default function extendComponentProps(builtProps, propsDefinition) {
const immutableBuiltProps = fromJS(builtProps)
const componentProps = {}
if (propsDefinition.get('children'))
componentProps.children = <span dangerouslySetInnerHTML={{__h... |
src/teams-list-item.js | dajk/csgo-everything | import React from 'react';
export default class TeamsListItem extends React.Component {
renderPlayers() {
const players = this.props.players.map((player, index) =>
<li key={index} style={{ display: 'inline' }} className='players-list'
{...player}>
<a style={{ display: 'inline' }} target="_bla... |
android_container/index.ios.js | guoxiaoxing/awesome-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 android_container extends Component {
render() {
return (
<View style={styles.c... |
docs/src/app/components/pages/components/Tabs/ExampleSimple.js | matthewoates/material-ui | import React from 'react';
import {Tabs, Tab} from 'material-ui/Tabs';
import Slider from 'material-ui/Slider';
const styles = {
headline: {
fontSize: 24,
paddingTop: 16,
marginBottom: 12,
fontWeight: 400,
},
};
function handleActive(tab) {
alert(`A tab with this route property ${tab.props['data... |
src/components/Svg/G.js | weaintplastic/react-sketchapp | import React from 'react';
import { pathProps, fontProps } from './props';
module.exports = class G extends React.Component {
static propTypes = {
...pathProps,
...fontProps,
};
render() {
const { children, ...rest } = this.props;
return <svg_g {...rest}>{children}</svg_g>;
}
};
|
docs/app/Examples/modules/Dropdown/Types/DropdownExamplePointing.js | clemensw/stardust | import React from 'react'
import { Dropdown, Menu } from 'semantic-ui-react'
const DropdownExamplePointing = () => (
<Menu>
<Menu.Item>
Home
</Menu.Item>
<Dropdown text='Shopping' pointing className='link item'>
<Dropdown.Menu>
<Dropdown.Header>Categories</Dropdown.Header>
<Dr... |
examples/basic-setup/src/my-command.js | weaintplastic/react-sketchapp | import React from 'react';
import PropTypes from 'prop-types';
import { render, Artboard, Text, View } from 'react-sketchapp';
import chroma from 'chroma-js';
// take a hex and give us a nice text color to put over it
const textColor = (hex) => {
const vsWhite = chroma.contrast(hex, 'white');
if (vsWhite > 4) {
... |
src/scenes/MainScene.js | fkoester/tachograph-app | import React from 'react';
import { Navigator } from 'react-native';
import { Scene } from 'react-native-router-flux';
import TripRecordingView from '../components/TripRecordingView';
import TripBoundsView from '../components/TripBoundsView';
import TripRouteView from '../components/TripRouteView';
import TripPurposeVi... |
src/pages/uncategorized/Createmaze/Createmaze.js | hyy1115/react-redux-webpack3 | import React from 'react'
class Createmaze extends React.Component {
render() {
return (
<div>Createmaze</div>
)
}
}
export default Createmaze |
src/index.js | Phani17/WeatherReport | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise'
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware(Re... |
app/jsx/assignments/GradeSummary/components/GradersTable/index.js | djbender/canvas-lms | /*
* Copyright (C) 2018 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
app/javascript/mastodon/features/list_editor/components/account.js | PlantsNetwork/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../compone... |
frontend/src/components/file-chooser/searched-list-item.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { Utils } from '../../utils/utils';
const propTypes = {
currentItem: PropTypes.object,
onItemClick: PropTypes.func.isRequired,
onSearchedItemDoubleClick: PropTypes.func.isRequired,
};
class SearchedListItem extends React.Component {
constr... |
src/Button.js | tannewt/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
import ButtonInput from './ButtonInput';
const Button = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
active: React.PropTypes.bool,... |
docs/app/Examples/elements/List/Variations/ListExampleCelledOrdered.js | koenvg/Semantic-UI-React | import React from 'react'
import { List } from 'semantic-ui-react'
const ListExampleCelledOrdered = () => (
<List celled ordered>
<List.Item>Cats</List.Item>
<List.Item>Horses</List.Item>
<List.Item>Dogs
<List.List>
<List.Item>Labradoodles</List.Item>
<List.Item>Shiba Inu</List.Item... |
docs/src/pages/components/progress/LinearDeterminate.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import LinearProgress from '@material-ui/core/LinearProgress';
const useStyles = makeStyles({
root: {
width: '100%',
},
});
export default function LinearDeterminate() {
const classes = useStyles();
const [progress, setProgr... |
src/scenes/Dashboard/TasksInfoBar/TasksInfoBar.js | jmlweb/paskman | import React from 'react';
import PT from 'prop-types';
import styled from 'styled-components';
import TaskInfoBarContainer from './TaskInfoBarContainer';
import AddIconSVG from './AddIconSVG';
import colors from '../../../styles/colors';
import sizes from '../../../styles/sizes';
import spacing from '../../../styles/s... |
packages/flow-runtime-docs/src/components/docs/ValidationPage.js | codemix/flow-runtime | /* @flow */
import React, { Component } from 'react';
import {observer} from 'mobx-react';
import {Link} from 'react-router';
import Example from '../Example';
const validationCode = `
import t from 'flow-runtime';
const string = t.string();
const validation = t.validate(string, false);
validation.hasErrors(); // ... |
src/FormGroup.js | westonplatter/react-bootstrap | import React from 'react';
import classNames from 'classnames';
class FormGroup extends React.Component {
render() {
let classes = {
'form-group': !this.props.standalone,
'form-group-lg': !this.props.standalone && this.props.bsSize === 'large',
'form-group-sm': !this.props.standalone && this.pr... |
docs/src/app/components/pages/components/CircularProgress/ExampleDeterminate.js | skarnecki/material-ui | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
export default class CircularProgressExampleDeterminate extends React.Component {
constructor(props) {
super(props);
this.state = {
completed: 0,
};
}
componentDidMount() {
this.timer = setTimeout(() ... |
mlflow/server/js/src/common/components/SimplePagination.js | mlflow/mlflow | import React from 'react';
import PropTypes from 'prop-types';
import { Menu, Pagination } from 'antd';
import { css } from 'emotion';
export class SimplePagination extends React.Component {
static propTypes = {
currentPage: PropTypes.number.isRequired,
isLastPage: PropTypes.bool.isRequired,
onClickNext:... |
src/components/concent/steps/Welcome.js | golemfactory/golem-electron | import React from 'react';
export default class Welcome extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="concent-onboarding__step">
<div className="concent-onboarding__desc">
<div>
... |
src/scenes/home/about/financialStatements/financialReport.js | tskuse/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
const FinancialReport = ({ url, name }) => <p><a href={url}>{name}</a></p>;
FinancialReport.propTypes = {
name: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
};
export default FinancialReport;
|
app/javascript/mastodon/components/loading_indicator.js | Arukas/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const LoadingIndicator = () => (
<div className='loading-indicator'>
<div className='loading-indicator__figure' />
<FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' />
</div>
);
export default LoadingIndicat... |
src/svg-icons/image/panorama-wide-angle.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaWideAngle = (props) => (
<SvgIcon {...props}>
<path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12... |
view/src/components/ExtraTable.js | reliablejs/reliable-master | 'use strict';
import React from 'react';
import { Table } from 'antd';
import { FormattedMessage } from 'react-intl';
import { getUuid } from '../util/index';
const columns = [{
title: <FormattedMessage id='buildinfo.extra.extraName' />,
dataIndex: 'extraName',
width: 200,
render: value => <span className="i... |
src/parser/paladin/retribution/modules/core/azeritetraits/IndomitableJustice.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import AzeritePowerStatistic from 'interface/statistics/AzeritePowerStatistic';
import BoringSpell... |
src/svg-icons/action/payment.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPayment = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/>
</SvgIcon>
);
ActionPay... |
packages/react-interactions/events/src/dom/Focus.js | jzmq/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
ReactDOMResponderEvent,
ReactDOMResponderContext,
PointerType,
} from 'shared/ReactDOMTypes';
impo... |
packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.js | svrcekmichal/react-scripts | import React from 'react'
export default () => (
<span id="feature-public-url">{process.env.PUBLIC_URL}.</span>
)
|
Paths/React/05.Building Scalable React Apps/3-react-boilerplate-building-scalable-apps-m3-exercise-files/After/app/containers/App/index.js | phiratio/Pluralsight-materials | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
app/javascript/mastodon/features/status/components/detailed_status.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from... |
src/CounterInputGeneral/index.js | christianalfoni/ducky-components | import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.css';
import ButtonPlusMinus from '../ButtonPlusMinus';
import Typography from '../Typography';
function CounterInputGeneral(props) {
return (
<div className={styles.wrapper
} >
<Typography
className={s... |
src/contacts/toolbar/ContactsToolbar.js | easyCZ/enlighten | import React, { Component } from 'react';
import { Col, Row } from 'react-flexbox-grid';
import IconButton from 'react-toolbox/lib/button';
import FontIcon from 'react-toolbox/lib/font_icon';
import { ToolbarStyle } from '../../Styles';
import * as Colors from '../../Colors';
const styles = {
container: {
heigh... |
code/schritte/4-test/src/main.js | st-he/react-workshop | // polyfill for IE
require('es6-promise').polyfill();
require('whatwg-fetch');
import React from 'react';
import ReactDOM from 'react-dom';
import GreetingController from './GreetingController';
const mountNode = document.getElementById('mount');
ReactDOM.render(<GreetingController />, mountNode);
|
src/components/menu/header-icon.js | aautem/aa | import React from 'react';
import PropTypes from 'prop-types';
import { Icon } from 'react-native-elements';
export default class HeaderIcon extends React.Component {
render() {
return (
<Icon
name={this.props.name}
type={this.props.type}
color={this.props.color}
onPress={th... |
src/svg-icons/content/remove-circle-outline.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRemoveCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8... |
src/js/containers/MapBox/index.js | nathanuphoff/datahub.client | import React from 'react'
import mapboxgl from 'mapbox-gl'
import * as mapActions from './actions'
export default class MapBox extends React.Component {
componentDidMount() {
mapboxgl.accessToken = 'pk.eyJ1IjoibWFydGlud2FhZyIsImEiOiJjaWo0NWt6ZWYwMDE0dXlrcm0yenVkNDR5In0.0I9xJzLubP9g3V_NTt1PhA';
const... |
app/static/js/components/Modal.js | isaaguilar/sandbox | import React from 'react'
import { Modal, Popover, Tooltip, OverlayTrigger, Button } from 'react-bootstrap'
export default class MyModal extends React.Component {
constructor() {
super();
this.state = {
showModal: false,
};
}
//const Example = React.createClass({
close() {
this.setState(... |
src/components/Company/Add.js | hovmand/test-company-client | import React from 'react'
import Form from '../../containers/Company/Form'
const Add = () => (
<div>
<h1>Add new company</h1>
<Form />
</div>
)
export default Add
|
src/svg-icons/navigation/unfold-more.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationUnfoldMore = (props) => (
<SvgIcon {...props}>
<path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"/>
</SvgIcon>
);
Navig... |
examples/js/column-format/extra-data-column-format-table.js | pvoznyuk/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
const qualityType = {
0: 'good',
1: 'bad',
2: 'unknown'
};
const inStockStatus = {
1: 'yes',
2: 'no'
};
function addProducts(quantity) {
const startId = prod... |
react-components/src/library/components/signup/privacy_policy.js | concord-consortium/rigse | import React from 'react'
export default class PrivacyPolicy extends React.Component {
render () {
return (
<div className='privacy-policy'>
By clicking Register!, you agree to our <a href='https://concord.org/privacy-policy' target='_blank'>privacy policy.</a>
</div>
)
}
}
|
js/jqwidgets/demos/react/app/panel/fluidsize/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';
class App extends React.Component {
render () {
let innerHtml =
'<div style=\'margin: 10px;\'>' +
'<h3>Early History of the Internet</h3></div>' +
'<!--Content--... |
example/index.js | Charmatzis/react-leaflet-bing | import React from 'react';
import { render } from 'react-dom';
import BingExample from "./bing";
const example = (
<div>
<h1>React-Leaflet-Bing example</h1>
<BingExample />
</div>
)
render(example, document.getElementById('app')); |
simple-filer/src/renderer/components/react-split-pane/SplitPane.js | akabekobeko/examples-electron | import React from 'react';
import PropTypes from 'prop-types';
import stylePropType from 'react-style-proptype';
import { polyfill } from 'react-lifecycles-compat';
import Pane from './Pane';
import Resizer, { RESIZER_DEFAULT_CLASSNAME } from './Resizer';
function unFocus(document, window) {
if (document.selection)... |
app/components/ProgressBar/index.js | VeloCloud/website-ui | import React from 'react';
import ProgressBar from './ProgressBar';
function withProgressBar(WrappedComponent) {
class AppWithProgressBar extends React.Component {
constructor(props) {
super(props);
this.state = {
progress: -1,
loadedRoutes: props.location && [props.location.pathname]... |
src/interface/report/FightSelection.js | FaideWW/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import ReactTooltip from 'react-tooltip';
import { t } from '@lingui/macro';
import getFightName from 'common/getFightName';
import { i18n } from 'interface/RootLocalizationPro... |
packages/reactor-kitchensink/src/examples/PivotGrid/TabularLayout/TabularLayout.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { Container, PivotGrid, Toolbar, Button } from '@extjs/reactor/modern';
import SaleModel from '../SaleModel';
import { generateData } from '../generateSaleData';
export default class TabularLayout extends Component {
store = Ext.create('Ext.data.Store', {
... |
app/javascript/mastodon/features/getting_started/index.js | TheInventrix/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... |
examples/todo/js/components/TodoList.js | Aweary/relay | /**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... |
app/javascript/mastodon/components/status_content.js | glitch-soc/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Permalink from './permalink';
import classnames from 'classnames';
import PollContainer from 'mastodon/containers/poll_container';
import Icon ... |
src/ButtonInput.js | yuche/react-bootstrap | import React from 'react';
import Button from './Button';
import FormGroup from './FormGroup';
import InputBase from './InputBase';
import childrenValueValidation from './utils/childrenValueInputValidation';
class ButtonInput extends InputBase {
renderFormGroup(children) {
let {bsStyle, value, ...other} = this.p... |
client/src/components/Informational/ManagerResources.js | codefordenver/Circular | import React from 'react';
import { Row, Col, Grid, PageHeader } from 'react-bootstrap';
import CollapsePanel from '../UtilComponents/CollapsePanel';
const ManagerResources = () => (
<div>
<Grid fluid>
<Row>
<Col xs={12} md={10} mdOffset={1}>
<PageHeader className="info-page-header-overri... |
app/containers/entrypoints/soundhax/setup/index.js | SomeoneWeird/aergia | import path from 'path'
import fs from 'fs'
import { ipcRenderer } from 'electron'
import React from 'react'
import { browserHistory } from 'react-router'
import RaisedButton from 'material-ui/RaisedButton'
import CircularProgress from 'material-ui/CircularProgress'
import request from 'request'
import requestProgres... |
src/svg-icons/hardware/headset.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareHeadset = (props) => (
<SvgIcon {...props}>
<path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z"/>
</SvgIcon>
... |
modules/ScrollManagementMixin.js | kevinsimper/react-router | import React from 'react';
import { canUseDOM, setWindowScrollPosition } from './DOMUtils';
import NavigationTypes from './NavigationTypes';
var { func } = React.PropTypes;
function getCommonAncestors(branch, otherBranch) {
return branch.filter(route => otherBranch.indexOf(route) !== -1);
}
function shouldUpdateSc... |
app/components/Trailer.js | Mikkael3/tiea207projekti2015 | /*
* Joonas Vilppunen, Markus Muranen, Niko Heikkinen
* MIT Licence
* 2015
*/
import React from 'react';
import {Link} from 'react-router';
import TrailerStore from '../stores/TrailerStore';
import TrailerActions from '../actions/TrailerActions';
class Trailer extends React.Component {
constructor(props) {
super(... |
src/routes/Publications/Publications.js | arvigeus/studentlife | // @flow
import React, { Component } from 'react';
import Relay from 'react-relay';
import PublicationExcerpt from './PublicationExcerpt';
import Button from '../../components/Input/Button';
import s from '../../styles/Article.css';
type PropsType = {
view: any,
relay: any
}
class Publications extends Component... |
examples/ControlledExample.js | instea/react-native-popup-menu | import React, { Component } from 'react';
import { Text } from 'react-native';
import Menu, {
MenuProvider,
MenuOptions,
MenuOption,
MenuTrigger,
} from 'react-native-popup-menu';
export default class ControlledExample extends Component {
constructor(props, ctx) {
super(props, ctx);
this.state = { o... |
app/app.js | crp2002/e-commerce-site | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
impor... |
app/containers/Root.js | lksilva/elecash-flow | // @flow
import React from 'react';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import Routes from '../routes';
type RootType = {
store: {},
history: {}
};
export default function Root({ store, history }: RootType) {
return (
<Provider store={store}>
<... |
src/index.js | vitaliykrushinsky/react-redux-demo | /*eslint-disable import/default */
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import configureStore from './store/configureStore.dev';
import {Provider} from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import {loadCour... |
app/javascript/mastodon/components/column_header.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { createPortal } from 'react-dom';
import classNames from 'classnames';
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
import Icon from 'mastodon/components/icon';
const messages = defineMessages({
show: { id: 'column_h... |
packages/material-ui-icons/src/CallMerge.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z" /></g>
, 'CallMerge');
|
stories/components/boardCard/index.js | tal87/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import BoardCard from 'shared/components/boardCard/boardCard';
import jamesBondJpg from '../../asset/james-bond.jpg';
storiesOf('shared/components/boardCard', module).add('Default', () => (
<BoardCard
name="James Bond"
src={jamesBondJ... |
components/animals/rosomakSibirsky.child.js | marxsk/zobro | import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../images/animals/rosomakSibirsky/01... |
src/components/CourseEditor/NoteEditor/Forms/CourseForm.js | bibleexchange/be-front-new | import React from 'react';
import TextInput from '../TextInput';
export default class CourseForm extends React.Component {
render() {
return (
<div>
<TextInput label='course id' name='course_id' value={this.props.inputs.course_id} handleEdit={this.props.handleInputChanges} />
<TextInp... |
packages/expo-dev-menu/vendored/react-native-gesture-handler/src/GestureHandlerRootView.js | exponentjs/exponent | import React from 'react';
import { View } from 'react-native';
export default View;
|
src/components/App.js | cristianvnica/learning-mern-stack | 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/components/Teachers/TeacherList.js | klpdotorg/tada-frontend | import React from 'react';
import PropTypes from 'prop-types';
import { Loading, Message } from '../common';
import { Teacher } from '../../containers/Teachers';
const TeacherList = ({ teacherIds, showAddTeacherPopup, loading, hasPermissions }) => {
if (loading) {
return <Loading />;
}
return (
<div cl... |
src/Popup.react.js | minutemailer/react-popup | import React from 'react';
import PropTypes from 'prop-types';
import key from 'keymaster';
import PopupStore from './Store';
import Header from './Header.react';
import Footer from './Footer.react';
import Constants from './Constants';
import { element, modifier } from './Bem';
const defaultKeyFilter = key.filter;
co... |
js/app.js | wuyuanyi135/react-template | /**
*
* app.js
*
* This is the entry file for the application, mostly just setup and boilerplate
* code. Routes are configured at the end of this file!
*
*/
// Load the ServiceWorker, the Cache polyfill, the manifest.json file and the .htaccess file
import 'file?name=[name].[ext]!../serviceworker.js';
import '... |
0011-proptypes/app/src/App.js | davidwparker/programmingtil-react | import React, { Component } from 'react';
import SomeComponent, { Thing } from './SomeComponent';
import './App.css';
function func() {
return true;
}
const thing = new Thing();
class App extends Component {
render() {
const array = [1,2,3];
const obj = {};
const sym = Symbol("hi");
return (
... |
src/button/lightButton.js | Seeingu/borrow-book | import React, { Component } from 'react';
import {
View,
Text,
TouchableHighlight,
} from 'react-native';
import { CommonStyles } from '../assets/styles';
const LightButton = ({ text, onPress }) => (
<TouchableHighlight onPress={this.onPress}>
<View style={[CommonStyles.flexItemsCenter, { backgroundColor:... |
docs/src/app/components/pages/components/RefreshIndicator/ExampleReady.js | hwo411/material-ui | import React from 'react';
import RefreshIndicator from 'material-ui/RefreshIndicator';
const style = {
container: {
position: 'relative',
},
refresh: {
display: 'inline-block',
position: 'relative',
},
};
const RefreshIndicatorExampleSimple = () => (
<div style={style.container}>
<RefreshIn... |
examples/huge-apps/routes/Profile/components/Profile.js | maksad/react-router | import React from 'react';
class Profile extends React.Component {
render () {
return (
<div>
<h2>Profile</h2>
</div>
);
}
}
export default Profile;
|
stories/InputNumber.stories.js | maputnik/editor | import React from 'react';
import {useActionState} from './helper';
import InputNumber from '../src/components/InputNumber';
import {InputContainer} from './ui';
import {withA11y} from '@storybook/addon-a11y';
export default {
title: 'InputNumber',
component: InputNumber,
decorators: [withA11y],
};
export const... |
Paths/React/05.Building Scalable React Apps/7-react-boilerplate-building-scalable-apps-m7-exercise-files/After/app/containers/LinkListContainer/index.js | phiratio/Pluralsight-materials | /*
*
* LinkListContainer
*
*/
import React from 'react';
import { connect } from 'react-redux';
import selectLinkListContainer from './selectors';
import LinkList from '../../components/LinkList';
import { requestLinks } from './actions';
export class LinkListContainer extends React.Component { // eslint-disable-... |
src/components/sparklineWidget/sparklineWidget.js | govau/datavizkit |
import React from 'react';
import PropTypes from 'prop-types';
import SparklineChart from './sparklineChart';
import Tooltip from './../tooltip/tooltip';
import {dateFormats} from './../../utils/displayFormats';
import './sparklineWidget.css';
const SparklineWidget = ({
chartTitle,
chartDescription,
chartUp... |
src/utilities/storybook.js | helpscout/blue | /* istanbul ignore file */
import React from 'react'
import styled from 'styled-components'
export class WithAktiv extends React.Component {
componentDidMount() {
document.body.classList.add('with-aktiv')
}
componentWillUnmount() {
document.body.classList.remove('with-aktiv')
}
render() {
retur... |
src/client/index.js | r3dDoX/geekplanet | /* eslint-disable import/first */
import './errorHandler';
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { addLocaleData } from 'react-intl';
import de from 'react-intl/locale-data/de';
import authService from './auth/authService';
import './exten... |
client/src/CodeInput.js | ASU-CodeDevils/DemonHacks2017 | import React from 'react'
import './CodeInput.css'
class CodeInput extends React.Component {
componentWillReceiveProps ({shouldLineReset}) {
if (shouldLineReset) {
this.el.value = ''
this.props.resetCallback()
}
}
handleChange (e) {
if (e.key === 'Tab') {
e.preventDefault()
e.... |
js/components/layout/customRow.js | bengaara/simbapp |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Button, Icon, Left, Right, Body } from 'native-base';
import { Grid, Row } from 'react-native-easy-grid';
import { Actions } from 'react-n... |
components/menu/MenuItem.js | showings/react-toolbox | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { MENU } from '../identifiers';
import { FontIcon } from '../font_icon/FontIcon';
import rippleFactory from '../ripple/Ripple';
const factory = (ripple) => ... |
src/components/Post/Post.js | Ryann10/hci_term | import React from 'react'
import './Post.scss'
import { Link } from 'react-router'
import { Card, CardActions, CardHeader, CardMedia, CardTitle, CardText } from 'material-ui/Card'
import {GridList, GridTile} from 'material-ui/GridList'
import {List, ListItem} from 'material-ui/List'
import Avatar from 'material-ui/Avat... |
blueocean-material-icons/src/js/components/svg-icons/navigation/arrow-drop-down-circle.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const NavigationArrowDropDownCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/>
</SvgIcon>
);
NavigationArrowDropDownCircle.displayName = 'NavigationArrowDrop... |
app/javascript/mastodon/features/ui/components/bundle_column_error.js | vahnj/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import Column from './column';
import ColumnHeader from './column_header';
import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
import IconButton from '../../../components/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.