path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
js/app.js | brainly/datacontest | import React from 'react';
import ReactDOM from 'react-dom';
import SlideList from './components/slideList.js';
function start() {
ReactDOM.render(
<SlideList/>,
document.getElementById('app')
);
}
start();
|
test/PropertyCardContainer.spec.js | maiastone/real-estate-investment-management | import React from 'react';
import { shallow, mount, render } from 'enzyme';
import { assert, expect } from 'chai';
let sinon = require('sinon');
import PropertyCardContainer from '../lib/components/PropertyCardContainer.jsx';
import ToggleSwitch from '../lib/components/ToggleSwitch.jsx';
describe('PropertyCardContai... |
docs/app/Examples/elements/Segment/Groups/SegmentExamplePiledSegments.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Segment } from 'semantic-ui-react'
const SegmentExamplePiledSegments = () => (
<Segment.Group piled>
<Segment>Top</Segment>
<Segment>Middle</Segment>
<Segment>Bottom</Segment>
</Segment.Group>
)
export default SegmentExamplePiledSegments
|
src/index.js | Peterrkang/Locals | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import reduxThunk from 'redux-thunk';
import... |
src/svg-icons/editor/show-chart.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorShowChart = (props) => (
<SvgIcon {...props}>
<path d="M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"/>
</SvgIcon>
);
EditorShowChart = pure(EditorShowChart);
EditorShowChart.displayNa... |
app/javascript/mastodon/components/dropdown_menu.js | ambition-vietnam/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import IconButton from './icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
imp... |
src/svg-icons/maps/local-printshop.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
app/javascript/flavours/glitch/components/media_attachments.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { MediaGallery, Video, Audio } from 'flavours/glitch/util/async-components';
import Bundle from 'flavours/glitch/features... |
client/modules/core/routes.js | bompi88/grand-view | // //////////////////////////////////////////////////////////////////////////////
// Client Routes
// //////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Concept
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in c... |
.storybook/config.js | joshblack/carbon-components-react | import React from 'react';
import { configure, addDecorator } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withOptions } from '@storybook/addon-options';
import { configureActions } from '@storybook/addon-actions';
// import { checkA11y } from 'storybook-addon-a11y';
import Contai... |
src/svg-icons/device/storage.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceStorage = (props) => (
<SvgIcon {...props}>
<path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/>
</SvgIcon>
);
DeviceStorage = pure(DeviceStorage);
DeviceS... |
docs/src/pages/demos/progress/LinearQuery.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import { LinearProgress } from 'material-ui/Progress';
const styles = {
root: {
flexGrow: 1,
},
};
function LinearQuery(props) {
const { classes } = props;
return (
<div className={classes.r... |
src/pages/home/page.js | mhgbrown/typography-karaoke | import React from 'react';
import ReactDom from 'react-dom';
import { Link } from 'react-router';
import _ from 'lodash';
import client from '../../common/store/Contentful';
import marked from 'marked';
import styles from "./style.css";
export default class HomePage extends React.Component {
constructor(props) {
... |
src/icons/Calculator.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Calculator extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M400,32H112c-8.8,0-16,7.2-16,16v416c0,8.8,7.2,16,16,16h288c8.8,0,16-7.2,16-16V48C416,39.2,408.8,32,400,32z M144,208h32... |
docs/app/Examples/elements/List/Content/ListExampleIcon.js | ben174/Semantic-UI-React | import React from 'react'
import { Icon, List } from 'semantic-ui-react'
const ListExampleIcon = () => (
<List>
<List.Item as='a'>
<Icon name='help' />
<List.Content>
<List.Header>Floated Icon</List.Header>
<List.Description>
This text will always have a left margin to make ... |
2.Practice/app.js | hiren2728/ReactDemo | import React from 'react';
import ReactDom from 'react-dom';
import Welcome from './src/Welcome'
class App extends React.Component{
render(){
return <Welcome message = "Hello World"/>
}
}
ReactDom.render(
<App/>,
document.getElementById("app")
); |
app/components/PublicRoute/PublicRoute.js | sunnymis/Swoleciety | import React from 'react';
import { Route, Redirect } from 'react-router-dom';
require('./PublicRoute.scss');
const PublicRoute = ({ component: Component, user, ...rest }) => {
return (
<Route
{...rest}
render={props => user ? <Redirect to="/" /> : <Component user={user} {...props} />}
/>
);
}... |
src/components/SvgIcon/SvgIcon.js | sk-iv/iva-app | import React from 'react';
import type { Node } from 'react';
import classNames from 'classnames';
if(process.env.WEBPACK) require('./SvgIcon.css');
export type Props = {
/**
* Elements passed into the SVG Icon.
*/
children: Node,
/**
* @ignore
*/
className?: string,
/**
* Provides a human-re... |
app/components/ListTitle/index.js | Thinkmill/react-conf-app | // @flow
import React from 'react';
import { PixelRatio, Text, View } from 'react-native';
import theme from '../../theme';
type Props = {
bordered?: boolean,
text: string,
};
export default function ListTitle({ bordered, text }: Props) {
const styles = {
text: {
color: theme.color.text,
fontSi... |
tests/Rules-isAlphanumeric-spec.js | bitgaming/formsy-react | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Formsy from './..';
import { InputFactory } from './utils/TestInput';
const TestInput = InputFactory({
render() {
return <input value={this.getValue()} readOnly/>;
}
});
const TestForm = React.createClass({
render() {
re... |
js-old/src/views/Home/Accounts/accounts.spec.js | destenson/ethcore--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... |
src/containers/search_bar.js | LianaBuss/react-weather | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: ''};
this.onInputChange = this.onInputC... |
src/static/app.js | AdrienAgnel/testDjangoApp | import React from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import * as _ from 'lodash';
import { authLogoutAndRedirect } from './actions/auth';
import './styles/main.scss';
class App extends Reac... |
src/components/post-listing/item-post-card.js | Clip-sub/CSClient-RN | /**
* @flow
*/
'use strict';
import React from 'react';
import { Image, TouchableOpacity, Platform, Share, Text } from 'react-native';
import { Body, Button, Card, CardItem, Icon, Left, View } from 'native-base';
import HTMLView from 'react-native-htmlview';
import HTMLParser from 'fast-html-parser';
import he from '... |
tests/routes/Home/components/HomeView.spec.js | arleighdickerson/react-redux-express | 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')
... |
src/front-end/js/containers/RouterContainer.js | aleksey-gonchar/challenge-zenbrook | /* global __CLIENT__, RESPONSE */
import React from 'react'
import { Router } from 'react-router'
import * as AppActions from '../actions/AppActions.js'
export default class RouterContainer extends React.Component {
static requireAuth (store) {
var appStore = store
return (nextState, transition) => {
... |
f2e/src/js/compoents/app/mock.js | NyaaFinder/nyaacat | // 一个组件是一个模块,自己带有自己的样式
import React from 'react';
import AppActions from'../../actions/AppActions';
import AppStore from'../../stores/AppStore';
import Socket from 'socket.io-client';
import Dialog from '../dialog/dialog.jsx';
import Login from '../dialog/login.jsx';
import Foot from '../foot/foot.jsx';
import Head fro... |
src/index.js | sashasushko/moira-front | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { BrowserRouter } from 'react-router-dom';
import Api from './Api/MoiraAPI';
import App from './App';
import { ApiProvider } from './Api/MoiraApiInjection';
import config from './config';
imp... |
modules/IndexLink.js | calebmichaelsanchez/react-router | import React from 'react'
import Link from './Link'
const IndexLink = React.createClass({
render() {
return <Link {...this.props} onlyActiveOnIndex={true} />
}
})
export default IndexLink
|
chapter-12/express_server/src/pages/CounterPage.js | mocheng/react-and-redux | import React from 'react';
import {view as Counter, stateKey, reducer} from '../components/Counter';
const page = () => {
return (
<div>
<div>Counter</div>
<Counter value={0} />
</div>
);
};
const initState = () => Promise.resolve(100);
export {page, reducer, initState, stateKey};
|
ui/src/containers/Visualisations/TemplateStreamUserEngagementLeaderboard/Viewer.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
import SourceResults from 'ui/containers/VisualiseResults/SourceResults';
import BarChartResults from 'ui/containers/VisualiseResults/BarChartResults';
/**
* @param {string} props.visualisationId
* @param {boolean} props.showSourceView
*/
const Viewer =... |
examples/src/tag-props.js | madox2/react-tagcloud | import React from 'react'
import { TagCloud } from 'react-tagcloud'
const data = [
{ value: 'jQuery', count: 25 },
{ value: 'MongoDB', count: 18 },
{ value: 'JavaScript', count: 38 },
{
value: 'React',
count: 30,
// props below will be passed to tag component
props: {
title: 'React is awe... |
client/src/components/Admin/Users/List/index.js | dotkom/super-duper-fiesta | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Fuse from 'fuse.js';
import { CAN_VOTE } from 'common/auth/permissions';
import { adminToggleCanVote } from 'features/user/actionCreators';
import ReactTable from 'react-table';
import 'react-table/react-table.c... |
app/components/HomeSignUpRib/index.js | audoralc/pyxis | /**
*
* HomeSignUpRib
*
*/
import React from 'react';
import ReactPlaceholder from 'react-placeholder';
import glamorous from 'glamorous';
const SubButton = glamorous.button ( {
background: '#017B63',
color: '#f6edeb',
border: '2px solid #f6edeb',
textDecoration: 'none',
padding: '.25em .5em',
fontS... |
client/views/admin/integrations/edit/HistoryItem.js | VoiSmart/Rocket.Chat | import { Button, Icon, Box, Accordion, Field, FieldGroup } from '@rocket.chat/fuselage';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import React from 'react';
import { integrations as eventList } from '../../../../../app/integrations/lib/rocketchat';
import { useMethod } from '../../../../contex... |
App/Containers/TalkDetailScreen.js | infinitered/ChainReactApp | import React from 'react'
import { BackHandler, ScrollView, Text, View, Image, TouchableOpacity } from 'react-native'
import PurpleGradient from '../Components/PurpleGradient'
import TalkInfo from '../Components/TalkInfo'
import SocialMediaButton from '../Components/SocialMediaButton'
import { NavigationActions } from ... |
components/Label/stories.js | insane-ux/rebulma | // @flow
import React from 'react'
import { storiesOf } from '@kadira/storybook'
import Label from './'
storiesOf('Label', module)
.add('default', () => (
<Label>Default Label</Label>
))
.add('small', () => (
<Label className="is-small">Small Label</Label>
))
.add('large', () => (
<Label classNa... |
src/svg-icons/av/library-books.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryBooks = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h1... |
src/app/common/UserInterface/components/Icon.js | toxzilla/app | import React from 'react';
import shallowCompare from 'react-addons-shallow-compare';
import {classNames} from 'react-dom-stylesheet';
export default class Icon extends React.Component {
static displayName = 'Icon'
static propTypes = {
iconName: React.PropTypes.string.isRequired,
className: React.PropTyp... |
src/components/WorkHistory/index.js | nzchicken/cv | import React from 'react'
import styled from 'styled-components'
import { format } from 'date-fns'
const Container = styled.div`
position: relative;
padding-left: 0.5em;
`
const Bar = styled.div`
position: absolute;
left: -48px;
top: 0;
width: 12px;
height: 100%;
background-color: #9eb5ff;
border-ra... |
test/development/basic-basepath/next-dynamic/components/hello-context.js | JeromeFitz/next.js | import React from 'react'
import PropTypes from 'prop-types'
export default class extends React.Component {
static contextTypes = {
data: PropTypes.object,
}
render() {
const { data } = this.context
return <div>{data.title}</div>
}
}
|
examples/gatsby/src/pages/about.js | lgollut/material-ui | import React from 'react';
import Container from '@material-ui/core/Container';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
import ProTip from '../components/ProTip';
import Link from '../components/Link';
import Copyright from '../components/Copyright';
export defau... |
app/common/components/OverlayPortal/index.js | Kaniwani/KW-Frontend | import React from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { white } from 'common/styles/colors';
import IconButton from 'common/components/IconButton';
// NOTE: this is more of a reference as to how ReactDOM.createPortal() ... |
src/js/Scroller/Scroll.js | AlejandroHerr/fotoxjs | /* global SyntheticMouseEvent */
// @flow
import React from 'react';
type ScrollProps = {
position: number,
styles: { [key: string]: string },
width: number,
onMouseDown: (e: SyntheticMouseEvent) => void,
};
const Scroll = ({ position, styles, width, onMouseDown }: ScrollProps) => (
<div className={styles.s... |
src/parser/shared/modules/spells/bfa/azeritetraits/UnstableCatalyst.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { calculateAzeriteEffects } from 'common/stats';
import AzeritePowerStatistic from 'interface/statistics/AzeritePowerStatistic';
import BoringSpellValueText from 'interface/statistics/components/Bori... |
client/src/core-components/table.js | opensupports/opensupports | import React from 'react';
import _ from 'lodash';
import classNames from 'classnames';
import Pagination from 'core-components/pagination';
import Icon from 'core-components/icon';
import Loading from 'core-components/loading';
class Table extends React.Component {
static propTypes = {
headers: React.Pro... |
src/components/common/svg-icons/image/hdr-weak.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageHdrWeak = (props) => (
<SvgIcon {...props}>
<path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4... |
examples/counter/containers/App.js | xgrommx/redux-act | import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import thunk from 'redux-... |
django/webcode/webcode/frontend/node_modules/react-bootstrap/es/ToggleButton.js | OpenKGB/webcode | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
client/node_modules/react-router/es/Router.js | bourdakos1/Visual-Recognition-Tool | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _classCallCheck(instance, Constructor) { if (!(insta... |
src/js/components/App.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { getCurrentLocale } from '../utils/Locale';
import SkipLinks from './SkipLinks';
import CSSClassnames from '../utils/CSSClassn... |
src/presentation/Post.js | shek8034/react-webpack-setup | import React from 'react';
export default function Post(props) {
return (
<div>{props.post.data.title} :- asked by {props.post.data.author}</div>
)
} |
docs/src/app/components/pages/components/Stepper/VerticalNonLinearStepper.js | ngbrown/material-ui | import React from 'react';
import {
Step,
Stepper,
StepButton,
StepContent,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* A basic vertical non-linear implementation
*/
class VerticalNonLinear extends React.Component {... |
assets/jqwidgets/demos/react/app/layout/righttoleftlayout/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxLayout from '../../../jqwidgets-react/react_jqxlayout.js';
import JqxTree from '../../../jqwidgets-react/react_jqxtree.js';
class App extends React.Component {
render() {
let layout = [{
type: 'layoutGroup',
ori... |
examples/real-world/src/root/Root.prod.js | ioof-holdings/redux-dynamic-reducer | import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
import routes from './routes'
const Root = ({ store, history }) => (
<Provider store={store}>
<Router history={history} routes={routes} />
</Provider>
)
Root.propTypes = {
... |
modules/IndexRoute.js | jdelight/react-router | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { component, components, falsy } from './PropTypes';
var { bool, func } = React.PropTypes;
/**
* An <IndexRoute> is used to specify its parent's <Route indexRoute> in
* a JSX route config... |
components/src/Section/Section.story.js | svef/www | import React from 'react'
import { storiesOf } from '@storybook/react'
import Section from '.'
import H1 from '../H1'
storiesOf('Section', module)
.add('default', () => (
<Section>
<H1 color="svef">Some title</H1>
</Section>
))
.add('hero', () => (
<Section hero>
<H1 color="svef">Some t... |
src/components/App.js | jahin07/Course-Description | 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... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | arseneonly/swapi | import React from 'react';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
js/src/ui/Portal/portal.example.js | BSDStudios/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... |
app/containers/Connection.js | josser/pickler | import React, { Component } from 'react';
import { connect } from "react-redux";
import { push } from "react-router-redux";
import { addToFavorites, save, touchFavorites } from "reducers/config";
import autobind from "autobind-decorator";
class Connection extends Component {
state = {
favorite: {
payload:... |
app/containers/AutoComplete/index.js | joeysherman/noodle-time | /*
*
* AutoComplete
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import reducer from './reducer';
import saga from './saga';
// Selectors
import selectAutoComplete, {
selectPredictions,
makeSelectSu... |
node_modules/react-bootstrap/es/Row.js | caughtclean/but-thats-wrong-blog | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
consoles/my-joy-images/src/components/toolbar.js | yldio/joyent-portal | import React from 'react';
import { Field } from 'redux-form';
import Flex from 'styled-flex-component';
import { Margin } from 'styled-components-spacing';
import { Button, FormGroup, Input, FormLabel } from 'joyent-ui-toolkit';
export const Toolbar = ({
searchable = true,
searchLabel = 'Filter',
searchPlaceho... |
app/javascript/mastodon/features/ui/components/boost_modal.js | 3846masa/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import IconButton from '../../../components/icon_button';
import Button from '../../../components/button';
import StatusCo... |
index.js | corbmanj/project-dashboards | import React from 'react'
import { render } from 'react-dom'
import { Router, Route, browserHistory, IndexRoute } from 'react-router'
import App from './modules/App'
render((
<Router history={browserHistory}>
<Route path="/" component={App} />
</Router>
), document.getElementById('app'))
|
docs/app/Examples/elements/List/ContentVariations/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ListContentVariations = () => (
<ExampleSection title='Content Variations'>
<ComponentExample
title='Vertically Alig... |
archimate-frontend/src/main/javascript/components/view/nodes/model_b/businessInteraction.js | zhuj/mentha-web-archimate | import React from 'react'
import _ from 'lodash'
import { ModelNodeWidget } from '../BaseNodeWidget'
export const TYPE='businessInteraction';
export class BusinessInteractionWidget extends ModelNodeWidget {
getClassName(node) { return 'a-node model_b businessInteraction'; }
}
|
assets/javascript/view/operation/request.js | benhu/RestApiTester | 'use strict';
import React from 'react';
import ObjectHelper from '../../helper/object';
import Parameter from './parameter';
export default class Request extends React.Component {
render() {
const paramsWidth = {width: 350};
const objHelper = new ObjectHelper();
let partial = null;
... |
react-ui/src/components/shared/AttributionFooter.js | EdwinJow/truthindata | import React, { Component } from 'react';
import axios from 'axios';
class AttributionFooter extends Component {
constructor(props) {
super(props);
this.state = {
dataSources: []
};
}
render() {
return (
<div style={{width: '100%'}}>
... |
app/javascript/mastodon/components/column.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollTop } from '../scroll';
export default class Column extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
label: PropTypes.string,
bindToDoc... |
src/svg-icons/hardware/keyboard-arrow-right.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>
</SvgIcon>
);
HardwareKeyboardArrowRight = pure(HardwareKeyboardArrowRight);
Hardwar... |
app/javascript/flavours/glitch/components/load_more.js | Kirishima21/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,
disabled: PropTypes.bool,
visible: PropTypes.bool,
}
static defaultProps = {
vi... |
src/pages/news/NBA/NewsNBA.js | HeliumLau/Hoop-react | import React from 'react';
import { Link } from 'react-router';
import './NewsNBA.less';
export default class NewsNBA extends React.Component {
render() {
return (
<div>
<div className="newsNBA-navigation-container">
<ul className="newsNBA-navigation">
... |
frontend/jqwidgets/jqwidgets-react/react_jqxtoolbar.js | liamray/nexl-js | /*
jQWidgets v5.7.2 (2018-Apr)
Copyright (c) 2011-2018 jQWidgets.
License: https://jqwidgets.com/license/
*/
import React from 'react';
const JQXLite = window.JQXLite;
export const jqx = window.jqx;
export default class JqxToolBar extends React.Component {
componentDidMount() {
let options = this.manage... |
src/components/CancelSubscriptionBtn.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import withIntl from '../lib/withIntl';
import { graphql } from 'react-apollo';
import { FormattedMessage } from 'react-intl';
import gql from 'graphql-tag';
import SmallButton from './SmallButton';
class CancelSubscriptionBtn extends React.Component {
s... |
__tests__/App-test.js | concensus/react-native-ios-concensus | import 'react-native';
import React from 'react';
import App from '../App';
import renderer from 'react-test-renderer';
it('renders the loading screen', async () => {
const tree = renderer.create(<App />).toJSON();
expect(tree).toMatchSnapshot();
});
it('renders the root without loading screen', async () => {
c... |
src/components/label-button.component.js | Antoine38660/git-point | import React from 'react';
import { StyleSheet } from 'react-native';
import { Button } from 'react-native-elements';
import { fonts } from 'config';
import { getFontColorByBackground } from 'utils';
type Props = {
label: Object,
largeWithTag: boolean,
};
const styles = StyleSheet.create({
smallLabelButton: {
... |
src/index.js | osxi/react-pouch-redux-starter-kit | 'use strict';
import { Provider } from 'react-redux';
import Router from './components/router';
import React from 'react';
import { render } from 'react-dom';
import store from './redux/store';
render(
<Provider store={store}>
<Router />
</Provider>
, document.getElementById('app')
);
|
src/ContentBlocks/Shared/ImageGalleryComponent.js | grommet/grommet-cms-content-blocks | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Box from 'grommet/components/Box';
import Image from 'grommet/components/Image';
import Tiles from 'grommet/components/Tiles';
import Tile from 'grommet/components/Tile';
import styled from 'styled-components';
const Div = styled.div`... |
demos/demo/src/components/Timer/index.js | FWeinb/cerebral | import React from 'react'
import {connect} from 'cerebral/react'
import {signal} from 'cerebral/tags'
import ProjectSelectorTag from '../ProjectSelectorTag'
import {displayTaskDuration, isRunning} from '../../modules/tasks/helpers'
import runningTask from '../../computed/runningTask'
import translations from '../../com... |
src/List/Toolbar/SelectSortBy/SelectSortBy.component.js | Talend/react-talend-components | import React from 'react';
import { NavItem, Nav, NavDropdown, MenuItem } from 'react-bootstrap';
import uuid from 'uuid';
import theme from './SelectSortBy.scss';
function SelectSortBy({ field, id, isDescending, onChange, options }) {
const order = isDescending || false;
const selected = field && options.find(item... |
examples/src/index.js | LayGit/layui | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory } from 'react-router';
import { routes } from './route'
ReactDOM.render((
<Router history={ hashHistory } routes={routes}></Router>
), document.getElementById('app'))
|
src/components/GroupsSection.js | giladgreen/pokerStats |
import React, { Component } from 'react';
export default class GroupsSection extends Component {
render() {
const {groups,groupsCount,connected,jumpToLoginSection} = this.props;
if (connected || !groups || groups.length == 0){
return <div/>
}
const groupsItems = group... |
src/components/views/Account/SignIn.js | jennywin/donate-for-good | import React, { Component } from 'react';
export default class SignIn extends Component {
render() {
return (
<div>
This is the signin page.
</div>
);
}
}
|
src/root.js | TimurAsayonok/ContentApplication | import React from 'react'
import { Navigation } from 'react-native-navigation'
import { Provider } from 'react-redux'
import { ApolloProvider, ApolloClient, createNetworkInterface } from 'react-apollo'
import configureStore from './store/configureStore'
import client from './client'
import { registerScreens } from './c... |
src/encoded/static/components/gene_search/input.js | ENCODE-DCC/encoded | import React from 'react';
import PropTypes from 'prop-types';
/**
* Controlled input box that accepts user's query
* and triggers onChange callback.
*/
const Input = React.forwardRef((props, ref) => (
<input
id="gene"
autoComplete="off"
aria-label="search for gene name"
placeholde... |
src/icons/PregnantWomanIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class PregnantWomanIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M18 8c0-2.22 1.78-4 4-4s4 1.78 4 4-1.78 4-4 4-4-1.78-4-4zm14 18c-.02-2.69-1.66-5.02-4-6 0-3.31-2.69-... |
react-vr/Island/__tests__/client.js | nikgraf/webvr-experiments | import 'react-native';
import 'react-vr';
import React from 'react';
import Index from '../index.vr.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(<Index />);
});
|
src/components/App/index.js | charleslxh/react-temp | import React from 'react';
import { Route, Link } from 'react-router-dom';
import Header from 'COMPONENTS/Header'
import Home from 'COMPONENTS/Home'
import About from 'COMPONENTS/About'
import Counter from 'COMPONENTS/Counter'
import Counter2 from 'COMPONENTS/Counter2'
import './style.css';
class App extends React.C... |
packages/mineral-ui-icons/src/IconNewReleases.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconNewReleases(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconPr... |
app/components/Home.js | daiyingheng/dayinhen | import React from 'react';
import {Link} from 'react-router';
import HomeActions from '../actions/HomeActions';
import HomeStore from '../stores/HomeStore'
import {first, without, findWhere} from 'underscore';
class Home extends React.Component {
constructor(props) {
super(props);
this.state = HomeStore.get... |
src/components/landing/landing.js | tervay/AutoScout | import React from 'react';
import SearchBar from '@/components/search/search';
import './landing.scss';
export default function Landing() {
return (
<div className={'flexContainer'}>
<SearchBar />
</div>
);
}
|
app/components/Toggle/index.js | coocooooo/webapp | /**
*
* LocaleToggle
*
*/
import React from 'react';
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.map((value) => (
<ToggleOption key... |
src/pages/generic.js | DarylRodrigo/DarylRodrigo.github.io | import React from 'react';
import pic4 from '../images/pic04.jpg';
import Layout from '../components/common/layout';
import Footer from '../components/common/Footer';
import Header from '../components/common/Header';
const SecondPage = () => (
<Layout>
<Header />
<div id="wrapper">
<section id="mai... |
src/components/Toggle.js | nikgraf/belle | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { injectStyles, removeStyle } from '../utils/inject-style';
import { omit, has, last, first, uniqueId } from '../utils/helpers';
import style from '../style/toggle';
import config from '../config/toggl... |
js/src/components/Controls/ColorPicker/index.js | understory-dev/react-draft-wysiwyg | /* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
toggleCustomInlineStyle,
getSelectionCustomInlineStyle,
} from 'draftjs-utils';
import LayoutComponent from './Component';
class ColorPicker extends Component {
static propTypes = {
onChange: PropTypes.func.... |
src/index.js | LightningVII/CSS3-Transform-Effect-Demo | import React from 'react'
import ReactDOM from 'react-dom'
import Main from './components/Main'
import { JackContext } from './Context'
import 'ant-design-pro/dist/ant-design-pro.css'
import 'antd/dist/antd.css'
class Provider extends React.Component {
constructor () {
super()
this.state = {
title: '监控统... |
pootle/static/js/auth/components/RequestPasswordResetProgress.js | iafan/zing | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import { PureRenderMixin } from... |
src/Pagination.js | bbc/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import PaginationButton from './PaginationButton';
import elementType from 'react-prop-types/lib/elementType';
import SafeAnchor from './SafeAnchor';
const Pagination = React.createClass({
mixins: [Bootstra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.