path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
docs/src/app/app.js | ngbrown/material-ui | import React from 'react';
import ReactDOM from 'react-dom';
import {Router, useRouterHistory} from 'react-router';
import AppRoutes from './AppRoutes';
import injectTapEventPlugin from 'react-tap-event-plugin';
import {createHashHistory} from 'history';
// Helpers for debugging
window.React = React;
window.Perf = req... |
examples/todomvc/containers/App.js | jackielii/redux-devtools | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import { Provider } from 'react-redux';
import *... |
frontend/src/Activity/Queue/TimeleftCell.js | Radarr/Radarr | import PropTypes from 'prop-types';
import React from 'react';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import formatTime from 'Utilities/Date/formatTime';
import formatTimeSpan from 'Utilities/Date/formatTimeSpan';
import getRelativeDate from 'Utilities/Date/getRelativeDate';
import formatBytes ... |
blueocean-material-icons/src/js/components/svg-icons/image/transform.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageTransform = (props) => (
<SvgIcon {...props}>
<path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/>
</SvgIcon>
);
ImageTransform.displayName = 'ImageTransform';
ImageTran... |
packages/makeen-mailer/src/templates/Layout.js | makeen-project/makeen | import React from 'react';
import PropTypes from 'prop-types';
const Layout = ({ children }) =>
(<html lang="en">
<head>
<meta charSet="utf-8" />
</head>
<body>
{children}
</body>
</html>);
Layout.propTypes = {
children: PropTypes.node.isRequired,
};
export default Layout;
|
admin/client/App/screens/List/components/ItemsTable/ItemsTableDragDropZone.js | creynders/keystone | /**
* THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT
* THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON
* - @mxstbr
*/
import React from 'react';
import DropZoneTarget from './ItemsTableDragDropZoneTarget';
import classnames from 'classnames';
var ItemsTableDragDropZone = React.createClass({
d... |
submissions/josepot/src/index.js | sensduo/flux-challenge | import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.getElementById('root')
);
|
stories/dialog.stories.js | isogon/styled-mdl | import React from 'react'
import { storiesOf } from '@storybook/react'
import wrapStory from './decorators/wrapStory'
import Basic from '../src/components/dialog/demos/Basic.js'
import FullWidthActions from '../src/components/dialog/demos/FullWidthActions.js'
storiesOf('Dialog', module)
.addDecorator(wrapStory)
.... |
app/containers/Planning/SectionProjects.js | frascata/vivaifrappi | import React from 'react';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
import Text from '../../components/Text/index';
import DsGallery from './DsGallery';
import CpGallery from './CpGallery';
import Accordion from '../../components/Accordio... |
src/frontend/components/Dropdown/index.js | Koleso/invoicer | import React from 'react';
import cx from 'helpers/classes';
// CSS
import './index.less';
const Dropdown = ({
input,
label,
id,
modifiers,
options,
defaultValue,
required = false,
meta: { touched, error },
}) => {
const bm = 'Dropdown';
let labelElement = '';
if (label) {
labelElement = (<label classNa... |
src/svg-icons/places/golf-course.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesGolfCourse = (props) => (
<SvgIcon {...props}>
<circle cx="19.5" cy="19.5" r="1.5"/><path d="M17 5.92L9 2v18H7v-1.73c-1.79.35-3 .99-3 1.73 0 1.1 2.69 2 6 2s6-.9 6-2c0-.99-2.16-1.81-5-1.97V8.98l6-3.06z"/>
... |
docs/app/Examples/collections/Form/Content/FormExampleField.js | koenvg/Semantic-UI-React | import React from 'react'
import { Form } from 'semantic-ui-react'
const FormExampleField = () => (
<Form>
<Form.Field>
<label>User Input</label>
<input />
</Form.Field>
</Form>
)
export default FormExampleField
|
src/components/posts_show.js | unhommequidort/redux_blog | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { fetchPost, deletePost } from '../actions';
class PostsShow extends Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
onDe... |
app/jsx/components/ICSelect.js | sfu/canvas-spaces | import React from 'react';
import PropTypes from 'prop-types';
const controlClass = 'ic-Form-control';
const labelClass = 'ic-Label';
const inputClass = 'ic-Input';
const ICSelect = props => {
const options = () => {
return props.options.map((o, i) => {
return (
<option key={i} value={o.value}>
... |
packages/wix-style-react/src/CardGalleryItem/test/CardGalleryItem.e2eStory.js | wix/wix-style-react | import React from 'react';
import { storiesOf } from '@storybook/react';
import { getTestStoryKind } from '../../../stories/storiesHierarchy';
import { testStories, storySettings } from '../docs/storySettings';
import exampleProps from '../docs/exampleProps';
import { CardGalleryItem } from 'wix-style-react';
const ... |
frontend/test/helpers/shallowRenderHelper.js | pahomovda/victorious-pirate | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
modules/dreamview/frontend/src/components/Layouts/MonitorPanel.js | ApolloAuto/apollo | import 'styles/monitor.scss';
import React from 'react';
import {
Tabs, TabList, Tab, TabPanel,
} from 'react-tabs';
import { MONITOR_MENU } from 'store/options';
import CameraParam from 'components/CameraParam';
import { CameraVideo } from 'components/Tasks/SensorCamera';
import DataCollectionMonitor from 'compon... |
time-on-task/app/components/Sync.js | ajaymore/time-on-task | import React, { Component } from 'react';
import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
import { connect } from 'react-redux';
import { Button } from 'react-native-elements';
import { NetInfo, View, Text } from 'react-native';
import { observationSynced } from '../actions';
class Sync extends ... |
src/svg-icons/action/settings.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettings = (props) => (
<SvgIcon {...props}>
<path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l... |
src/shared/components/OperationListItem/index.js | rvboris/financebutler | import React from 'react';
import moment from 'moment';
import { noop } from 'lodash';
import classnames from 'classnames';
import { ButtonGroup, Button } from 'reactstrap';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import style from './style.css';
import eventEmitter from '../../utils... |
app/clients/next/components/utils.js | garbin/koapp | import React from 'react'
import { isFunction } from 'lodash'
import { compose, withState, withHandlers, branch } from 'recompose'
import Loadable from 'react-loading-overlay'
import numeral from 'numeral'
export const Formatters = {
Price (props) {
const { className = 'price', children, format = '$0,0.00', ...o... |
templates/react/src/test/components/MobileFullscreenVideo/index.js | Jam3/generator-jam3 | import React from 'react';
import PropTypes from 'prop-types';
import MobileFullscreenVideo from '../../../components/MobileFullscreenVideo{{#if sectionNames}}/MobileFullscreenVideo{{/if}}';
class MobileFullscreenVideoTest extends React.PureComponent {
handleOnClick = () => {
this.video.play();
};
render()... |
index.ios.js | stephencheuk/React-Native-Nav | import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
NavigatorIOS,
TouchableHighlight
} from 'react-native';
class nav02 extends Component {
onRightButtonPress: function() {
this.refs.nav.push({
title: 'From Right',
component: ForRightScene
})
},
... |
examples/counter/containers/CounterApp.js | rwillrich/redux | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'redux/react';
import Counter from '../components/Counter';
import * as CounterActions from '../actions/CounterActions';
@connect(state => ({
counter: state.counter
}))
export default class CounterApp {
render() {
co... |
src/components/Header.js | robabby/robabby | import React from 'react'
import Link from 'gatsby-link'
import get from 'lodash/get'
import Nav from './Nav'
import { rhythm, scale } from '../utils/typography'
import '../assets/scss/components/Header.scss'
class Header extends React.Component {
getHeaderClassNames() {
let classList = ['ra-header']
get(... |
docs/src/app/app.js | mtsandeep/material-ui | import React from 'react';
import {render} from 'react-dom';
import {Router, useRouterHistory} from 'react-router';
import AppRoutes from './AppRoutes';
import injectTapEventPlugin from 'react-tap-event-plugin';
import {createHashHistory} from 'history';
// Helpers for debugging
window.React = React;
window.Perf = req... |
public/src/containers/donut/donutDataSeries.js | white87332/react-redux | import React from 'react';
import * as d3 from 'd3';
import DonutPath from './donutPath';
class DonutDataSeries extends React.Component
{
constructor(props, context)
{
super(props, context);
this.state = {};
}
render()
{
let { data, color, width, height } = this.props;
... |
src/routes.js | Kennyomg/gamersonline-uni | import React from 'react';
import {IndexRoute, Route} from 'react-router';
import { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth';
import {
App,
Chat,
Home,
Widgets,
About,
Login,
LoginSuccess,
Survey,
Cart,
Admin,
NotFound,
} from 'containers';
ex... |
src/website/app/demos/ThemeProvider/ThemeProvider/examples/themeProvider.js | mineral-ui/mineral-ui | /* @flow */
import styled from '@emotion/styled';
import React from 'react';
import { ThemeProvider } from '../../../../../../library/themes';
import Sample from '../../common/Sample';
import type { StyledComponent } from '@emotion/styled-base/src/utils';
const Root: StyledComponent<{ [key: string]: any }> = styled('d... |
admin/src/components/Footer.js | lojack/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
var Footer = React.createClass({
displayName: 'Footer',
propTypes: {
appversion: React.PropTypes.string,
backUrl: React.PropTypes.string,
brand: React.PropTypes.string,
Us... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/node_modules/rc-progress/es/Circle.js | bhathiya/test | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runt... |
src/containers/thread/ReposThread/index.js | mydearxym/mastani | /*
*
* ReposThread
*
*/
import React from 'react'
import { ICON_CMD } from '@/config'
import { THREAD } from '@/constant'
import { buildLog } from '@/utils/logger'
import { pluggedIn } from '@/utils/mobx'
import TagsBar from '@/containers/unit/TagsBar'
import Sticky from '@/widgets/Sticky'
import PublishButton ... |
src/views/icons/ShieldIcon.js | physiii/home-gateway | import React from 'react';
import PropTypes from 'prop-types';
import IconBase from './IconBase.js';
export const ShieldIcon = ({shieldChecked, ...props}) => (
<IconBase {...props} viewBox="0 0 20 20">
{shieldChecked
? <path d="M10.2 20h-.4-.1C.9 16.3 1.8 11 2.2 3.1c0-.3.2-.5.5-.5 2.6-.1 4.9-1 7-2.5.2-.1.4-.1.6 ... |
src/index.js | rameshsyn/react-location-picker | /**
* REACT LOCATION PICKER
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Map from './GoogleMap';
const google = window.google;
/* Default configuration */
const DEFAULT_RADIUS = 1000;
const DEFAULT_ZOOM = 10;
/* Circle options */
// https://developers.google.com/maps/doc... |
js/jqwidgets/demos/react/app/treemap/defaultfunctionality/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTreeMap from '../../../jqwidgets-react/react_jqxtreemap.js';
class App extends React.Component {
render () {
let data = [
{
label: 'Drama',
value: null,
color: '#B3FAFF'
},
... |
examples/redux/src/client.js | NickCis/react-data-ssr | import React from 'react';
import { hydrate } from 'react-dom';
import configureStore from './store';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
import routes from './routes';
const store = configureStore(window.__PRELOA... |
charts/react-chartjs-3/example1/src/components/FlowControl.js | rob-blackbourn/scratch-js | import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import ExpansionPanel from '@material-ui/core/ExpansionPanel'
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanel... |
src/client/spinner.js | 2braincells2go/hacker-menu | import React from 'react'
export default class Spinner extends React.Component {
render () {
return (
<div className='spinner'>
Loading...
</div>
)
}
}
|
docs/src/app/components/pages/components/Subheader/Page.js | ichiohta/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import subheaderReadmeText from './README';
import listExampleChatCode from '!ra... |
containers/App.js | tatarin0/react-voting | import React, { Component } from 'react';
import ProductsContainer from './ProductsContainer';
import CartContainer from './CartContainer';
import NavHeader from './NavHeader';
import '../style/master.css';
export default class App extends Component {
render() {
return (
<div>
<NavHeader />
<div... |
webpack/components/ActionableDetail.js | snagoor/katello | import React from 'react';
import {
TextListItem,
TextListItemVariants,
Tooltip,
TooltipPosition,
Spinner,
} from '@patternfly/react-core';
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
import PropTypes from 'prop-types';
import EditableTextInput from './EditableTextInput';
import Edi... |
site/src/components/DemoBox.js | kof/elemental | import React from 'react';
import classnames from 'classnames';
import E from '../../../src/constants';
const ALIGN_TRANSFORM = {
'center': 'center',
'left': 'flex-start',
'right': 'flex-end',
};
var DemoBox = React.createClass({
propTypes: {
align: React.PropTypes.oneOf(['center', 'left', 'right']),
children... |
src/templates/tags.js | chtefi/golb | import React from 'react'
import PropTypes from 'prop-types'
// Components
import { Link, graphql } from 'gatsby'
import Layout from '../components/Layout'
import Article from '../components/Article'
export default ({ location, pageContext, data }) => {
const { tag } = pageContext
const { edges, totalCount } = da... |
packages/benchmarks/src/implementations/styled-jsx/Dot.js | css-components/styled-components | /* eslint-disable react/prop-types */
import React from 'react';
import { style } from './View';
export default ({ children, color, x, y, size, ...props }) => {
return (
<div {...props} style={{ borderBottomColor: color }}>
{children}
<style jsx>{style}</style>
<style jsx>
{`
... |
packages/demos/demo/src/components/Projects/index.js | garth/cerebral | import React from 'react'
import { connect } from '@cerebral/react'
import listProps from '../../common/Collection/props/list'
import translations from '../../common/compute/translations'
import Project from '../Project'
export default connect(
listProps('projects', { t: translations }),
function Projects({
e... |
src/modules/selects/MultiSelect/MultiSelect.js | hellofresh/janus-dashboard | import React from 'react'
import PropTypes from 'prop-types'
import Select from 'react-select'
const propTypes = {
options: PropTypes.arrayOf(PropTypes.object).isRequired
}
const MultiSelect = ({ input, options, ...props }) => {
const handleChange = value => {
input.onChange(value.split(','))
}
return (
... |
src/components/BibleText/ClauseAtomView.js | jcuenod/react-lafwebpy-client | import React from 'react'
import {render} from 'react-dom'
import WholeWord from './WholeWord'
import { clause_types } from 'data/MorphCodes'
const ClauseAtomView = ({data, active_wid}) =>(
<span className="clause_atom_view">
<span><span className="verse_number">{data.verse}</span></span>
<span className="clause... |
src/parser/druid/restoration/modules/talents/TreeOfLife.js | fyruna/WoWAnalyzer | import React from 'react';
import { formatNumber, formatPercentage } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import HealingDone from 'parser/shared/modules/throughput/Heali... |
examples/todomvc/containers/TodoApp.js | hartzis/redux | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { Connector } from 'redux/react';
import Header from '../components/Header';
import MainSection from '../components/MainSection';
import * as TodoActions from '../actions/TodoActions';
export default class TodoApp extends Comp... |
src/screens/types/Notification.js | nanomish/a9 | import React from 'react';
import {StyleSheet, View, Text, Dimensions, Button} from 'react-native';
class Notification extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>In-App Notification</Text>
<Text style={styles.content}>You have 1... |
src/routes/index.js | kkanzelmeyer/project-dashboard | import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to file... |
src/js/components/Layer/stories/Plain.js | grommet/grommet | import React from 'react';
import { Box, Layer, Text } from 'grommet';
export const PlainLayer = () => (
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={...}>
<Box fill background="dark-3">
<Layer margin="medium" plain>
<Box pad="large" border={{ color: 'accent-1', size... |
client/analytics/components/partials/assetSelector/AssetList.js | Haaarp/geo | import React from 'react';
import { connect } from 'react-redux';
import AssetItemContainer from './AssetItemContainer';
import HealthStatusHelper from './../../../utils/HealthStatusHelper';
class AssetList extends React.Component {
getHealthStatus(assetName) {
//-- check if we have a health status for th... |
examples/react-es6/CheckboxWithLabel.js | drd/jest | import React from 'react';
class CheckboxWithLabel extends React.Component {
constructor(props) {
super(props);
this.state = {isChecked: false};
// since auto-binding is disabled for React's class model
// we can prebind methods here
// http://facebook.github.io/react/blog/2015/01/27/react-v0.1... |
src/svg-icons/action/speaker-notes.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSpeakerNotes = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-... |
docs/src/app/components/pages/components/Popover/Page.js | manchesergit/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import popoverReadmeText from './README';
import PopoverExampleSimple from './Ex... |
src/components/field/textlist/index.js | bobinette/papernet-front | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { List } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Text from 'components/input/text';
import { ValueKeyPropType } from 'components/field/propTypes';
import './textlist.scss';
class TextLis... |
src/views/Statistic/Statistic.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
createShorthandFactory,
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useKeyOnly,
useValueAndKey,
} from '../../lib'
import StatisticGroup from './S... |
src/js/pages/LeisureProfileGamesPage.js | nekuno/client | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import connectToStores from '../utils/connectToStores';
import translate from '../i18n/Translate';
import LoginActionCreators from '../actions/LoginActionCreators';
import * as TagSuggestionsActionCreators from '../actions/TagSuggestionsActio... |
blueprints/dumb/files/__root__/components/__name__/__name__.js | Firfi/derp-stock-exchange-frontend | import React from 'react'
type Props = {
};
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
export default <%= pascalEntityName %>
|
app/components/AlgorithmInner/index.js | omeryagmurlu/algoriv | import React from 'react';
import PropTypes from 'prop-types';
import _mapValues from 'lodash.mapvalues';
import { themedStyle } from 'app/utils';
import SideDrawer from 'app/components/SideDrawer';
import modules from 'app/components/modules';
import style from './style.scss';
const css = themedStyle(style);
const... |
wail-ui/loadingScreens/shared/checkStepLabels/checkStepWarningLabel.js | N0taN3rd/wail | import React from 'react'
import PropTypes from 'prop-types'
import StepLabel from 'material-ui/Stepper/StepLabel'
import WarningIcon from 'material-ui/svg-icons/alert/warning'
import { red500 } from 'material-ui/styles/colors'
const CheckStepWarningLabel = ({ownProps, label}) => (
<StepLabel
icon={<WarningIcon ... |
docs/app/Components/ComponentDoc/ComponentProp/ComponentPropDefaultValue.js | shengnian/shengnian-ui-react | import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import { pure } from 'docs/app/HOC'
const ComponentPropDefaultValue = ({ value }) => (_.isNil(value) ? null : <code>{value}</code>)
ComponentPropDefaultValue.propTypes = {
value: PropTypes.node,
}
export default pure(ComponentProp... |
app/components/Shortcuts.js | sedooe/cevirgec | // @flow
/* Copyright (c) 2015 Kod Gemisi Ltd.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React, { Component } from 'react';
import DocumentTitle fro... |
src/index.js | szhclaye/FriendlistRedux | import React from 'react';
import App from './container/App';
React.render(<App />, document.getElementById('root'));
|
src/components/EnsureLoggedInContainer.js | Montana-Code-School/LifeCoach | import React from 'react';
import { browserHistory } from 'react-router';
import { observer, inject } from 'mobx-react';
class EnsureLoggedInContainer extends React.Component {
componentDidMount() {
if (!this.props.userStore.isLoggedIn) {
browserHistory.replace("/");
}
}
render() {
if (this.p... |
fields/types/select/SelectColumn.js | kumo/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTableValue';
var SelectColumn = React.createClass({
displayName: 'SelectColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTy... |
src/containers/Root.js | seespace/dota2assistant | import React from 'react'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
export default class Root extends React.Component {
static propTypes = {
history: React.PropTypes.object.isRequired,
routes: React.PropTypes.element.isRequired,
store: React.PropTypes.object.isRequired
... |
assets/js/components/Diff/DiffVariableVersions.js | daikiueda/gtm-diff | import React from 'react';
import DiffVersionsCommon from './DiffVersionsCommon.js';
export default class DiffVariableVersions extends DiffVersionsCommon {
constructor() {
super();
this.elementType = 'variable';
}
};
|
src/components/Background/Background.js | Zoomdata/nhtsa-dashboard | import React from 'react';
const Background = ({ data }) => {
return <div className="background">{data}</div>;
};
export default Background;
|
src/components/Header/Header.js | ACPK/react-starter-kit | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isom... |
src/components/OrderPage.js | gcanti/tcomb-spa-example | import React from 'react'
import { t, props } from 'tcomb-react'
import { Order } from '../domain'
@props({
isBusy: t.Boolean,
error: t.maybe(t.Error),
order: t.maybe(Order)
})
export default class OrderPage extends React.Component {
render() {
return (
<div id="Order" className="container">
... |
src/views/NotFoundView.js | tomek-f/tomekf | import React from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import styles from './NotFoundView.module.scss';
const propTypes = {
/** Location from React Router */
location: PropTypes.shape().isRequired,
};
const NotFoundView = ({ location }) => (
<div className... |
src/components/Subroute.js | SpikeO/isomorphic-flux-react-react-router | import React, { Component } from 'react';
class Subroute extends Component {
render() {
return (
<h2>This is the Subroute component.</h2>
);
}
}
export default Subroute;
|
src/components/Weui/button/button.js | ynu/res-track-wxe | /*
eslint-disable
*/
import React from 'react';
import classNames from 'classnames';
export default class Button extends React.Component {
static propTypes = {
disabled: React.PropTypes.bool,
type: React.PropTypes.string,
size: React.PropTypes.string
};
static defaultProps = {
... |
src/shared/components/form/form.js | miaket/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './form.css';
const Form = ({ className, children }) => {
const classes = classNames({
[`${styles.form}`]: true,
[`${className}`]: className
});
return (
<form className={classes}>
... |
app/containers/LocaleToggle/index.js | Cherchercher/Wedding-Llama | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
webpack/containers/Application/Routes.js | jlsherrill/katello | import React from 'react';
import { Route } from 'react-router-dom';
import { links } from './config';
export default () => (
<div>
{links.map(({ path, component }) => (
<Route exact key={path} path={`/${path}`} component={component} />
))}
</div>
);
|
src/containers/NotFound/NotFound.js | MasaoIshikawa/ParkSuiteWeb | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
actor-apps/app-web/src/app/components/SidebarSection.react.js | WangCrystal/actor-platform | import React from 'react';
import HeaderSection from 'components/sidebar/HeaderSection.react';
import RecentSection from 'components/sidebar/RecentSection.react';
class SidebarSection extends React.Component {
static propTypes = {
selectedPeer: React.PropTypes.object
};
constructor(props) {
super(props... |
src/svg-icons/image/brush.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrush = (props) => (
<SvgIcon {...props}>
<path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25... |
internals/templates/app.js | koolkt/react-coloc | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
// TODO constrain eslint import/no-unresolved rule to this block
// Load the manifest.json file and the .htaccess file
import 'file?name=[name].[ext]!./manifest.json'; // eslint-disable-lin... |
app/javascript/mastodon/components/load_more.js | verniy6462/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class LoadMore extends React.PureComponent {
static propTypes = {
onClick: PropTypes.func,
visible: PropTypes.bool,
}
static defaultProps = {
visible: true,
}
render() {... |
src/svg-icons/device/screen-lock-portrait.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceScreenLockPortrait = (props) => (
<SvgIcon {...props}>
<path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.... |
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js | hajiwon1023/react-webpack-redux | import React from 'react'
import { reduxForm } from 'redux-form'
export const fields = []
const validate = (values) => {
const errors = {}
return errors
}
type Props = {
handleSubmit: Function,
fields: Object,
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
defaultProps = ... |
homepage/src/components/BasicLayout.js | dirathea/ytschatbot | import React, { Component } from 'react';
import { AppBar, Toolbar, Typography } from 'material-ui';
const styles = {
main: {
height: '100vh',
},
content: {
background: 'black',
height: '100vh',
},
};
class BasicLayout extends Component {
render() {
return (
<div style={styles.main}>
... |
examples/library/examples/demo_2/index.js | urban/webpack-html-plugin | import React from 'react'
import Dom from 'react-dom'
import HelloWorld from '../../src'
const App = () => (
<div>
<HelloWorld style={{color: 'green'}} />
</div>
)
if (typeof document !== 'undefined') {
Dom.render(
React.createElement(App),
document.getElementById('root')
)
}
|
app/components/Input/index.js | matteoterrinoni/portfolio | /**
*
* Input
*
*/
import React from 'react';
import { baseKey } from 'components/Editing/model';
// import styled from 'styled-components';
class Input extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
static key= `${baseKey}input`;
render() {
const { label, value, onChange }... |
web/static/js/components/Time.js | ryo33/Yayaka19 | import React from 'react'
import moment from 'moment'
import TimeAgo from 'react-timeago'
const Time = ({ time }) => (
<TimeAgo date={moment.utc(time).format()} />
)
Time.propTypes = {
time: React.PropTypes.string.isRequired
}
export default Time
|
src/svg-icons/hardware/dock.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareDock = (props) => (
<SvgIcon {...props}>
<path d="M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z"/>
</SvgIcon>
);
HardwareDock = ... |
blueocean-material-icons/src/js/components/svg-icons/editor/vertical-align-bottom.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const EditorVerticalAlignBottom = (props) => (
<SvgIcon {...props}>
<path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/>
</SvgIcon>
);
EditorVerticalAlignBottom.displayName = 'EditorVerticalAlignBottom';
EditorVerticalAlignBottom.muiName = 'Sv... |
src/parser/druid/guardian/modules/azeritetraits/MasterfulInstincts.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox';
import { calculateAzeriteEffects } from 'common/stats';
import { formatPercentage } from 'common/format';
import StatTrack... |
src/routes/admin/index.js | edgarallanglez/foxacademia_frontend | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
level3/client/containers/Menu.js | vulcan-estudios/react-examples | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class MenuContainer extends Component {
constructor () {
super(...arguments);
}
render () {
return (
<nav className='nav'>
<div className='row column'>
<ul>
... |
src/containers/app/ErrorContainer.js | PocketOfWeird/mjfjobs | import React from 'react'
import { connect } from 'react-redux'
import {red800} from 'material-ui/styles/colors'
import { clearError } from '../../actions'
import Notification from '../../components/Notification'
const ErrorNote = Notification(red800)
const mapStateToProps = (state) => ({
open: state.error.message... |
presentation/slides/util/slidify-code.js | DSchau/webpack-presentation | import React from 'react';
import CodeSlide from 'spectacle-code-slide';
export default function(extendProps, key) {
if ( !extendProps.code ) {
extendProps = {
code: extendProps
};
}
const props = Object.assign({
code: {},
lang: 'js',
ranges: [],
transition: ['slide'],
}, extendP... |
src/pages/contact.js | epeterson320/epeterson320.github.io | import React from 'react';
import Page from '../components/Page';
import { Title } from '../components/titles';
import SEO from '../components/SEO';
const ContactPage = () => (
<Page>
<SEO title="Contact" />
<Title>I'd love to get in touch.</Title>
<NetlifyForm name="contact">
<HiddenInput label="F... |
src/components/projects.js | mazairaj/thejulianmaz | import React, { Component } from 'react';
import SvgIcon from 'react-icons-kit';
import { Modal, Button } from 'react-bootstrap';
import { arrowCircleLeft } from 'react-icons-kit/fa';
import { arrowCircleRight } from 'react-icons-kit/fa';
class Projects extends Component {
constructor(props) {
super(props);
... |
app/javascript/mastodon/features/ui/util/react_router_helpers.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { Switch, Route } from 'react-router-dom';
import ColumnLoading from '../components/column_loading';
import BundleColumnError from '../components/bundle_column_error';
import BundleContainer from '../containers/bundle_container';
// Small wrapper t... |
client/src/components/shared/Info/Notices.js | verejnedigital/verejne.digital | // @flow
import React from 'react'
import {Link} from 'react-router-dom'
import InfoButton from './InfoButton'
import {ShowNumberCurrency} from '../../../services/utilities'
import type {Notices as NoticesType, NoticeNew} from '../../../state'
type NoticesProps = {|
data: NoticesType,
|}
const Notices = ({data}: N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.