path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
modules/dreamview/frontend/src/components/SideBar/Menu.js | xiaoxq/apollo | import React from 'react';
import { observer } from 'mobx-react';
import _ from 'lodash';
import RadioItem from 'components/common/RadioItem';
import menuData from 'store/config/MenuData';
import perceptionIcon from 'assets/images/menu/perception.png';
import predictionIcon from 'assets/images/menu/prediction.png';
i... |
src/table/TableRow.js | wisedu/bh-grid | import React from 'react';
const TableRow = React.createClass({
propTypes: {
onDestroy: React.PropTypes.func,
record: React.PropTypes.object,
prefixCls: React.PropTypes.string,
},
componentWillUnmount() {
this.props.onDestroy(this.props.record);
},
render() {
const props = this.props;
... |
src/svg-icons/action/eject.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionEject = (props) => (
<SvgIcon {...props}>
<path d="M5 17h14v2H5zm7-12L5.33 15h13.34z"/>
</SvgIcon>
);
ActionEject = pure(ActionEject);
ActionEject.displayName = 'ActionEject';
ActionEject.muiName = 'Svg... |
src/component/Button.js | armycreator/mobile-app | import React from 'react';
import styled from 'styled-components/native';
import colors from '../colors';
const BaseButton = styled.TouchableHighlight`
border-width: 1;
background-color: ${({ color }) => colors[color] || colors.softGray};
padding-vertical: 20;
padding-horizontal: 10;
border-radius: 3;
bord... |
src/index.js | peter-mount/departureboards | import React from 'react';
import {render} from 'react-dom';
import PageLoader from "./loaders/PageLoader";
render(
<PageLoader/>,
document.getElementById('root')
);
|
src/components/CommentForm.js | NYCJacob/react2you | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { closeCommentEditForm, sendNewComment, sendEditComment } from "../actions/index"
// redux form import
import { Field, reduxForm } from 'redux-form'
import {renderField, renderFieldcommentBody, renderFieldcommentAuthor, required} fr... |
src/views/Components/Forms/Forms.js | Cruis-R/GestionOutil | import React, { Component } from 'react';
import { Button, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
class Forms extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div className="animated fadeIn">
<div c... |
test/specs/views/Feed/Feed-test.js | ben174/Semantic-UI-React | import _ from 'lodash'
import faker from 'faker'
import React from 'react'
import * as common from 'test/specs/commonTests'
import Feed from 'src/views/Feed/Feed'
describe('Feed', () => {
common.hasUIClassName(Feed)
common.isConformant(Feed)
common.propValueOnlyToClassName(Feed, 'size')
common.rendersChildren... |
src/components/Route/Async/Bundle.js | thomasthiebaud/lundalogik | import React from 'react'
import PropTypes from 'prop-types'
class Bundle extends React.Component {
constructor(props) {
super(props)
this.state = {
component: null,
}
}
componentWillMount() {
this.load(this.props)
}
componentWillReceiveProps(nextProps) {
this.load(nextProps)
}
... |
src/Creatable.js | Khan/react-select | import React from 'react';
import Select from './Select';
import defaultFilterOptions from './utils/defaultFilterOptions';
import defaultMenuRenderer from './utils/defaultMenuRenderer';
const Creatable = React.createClass({
displayName: 'CreatableSelect',
propTypes: {
// Child function responsible for creating th... |
app/javascript/mastodon/components/icon_button.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
import AnimatedNumber from 'mastodon/components/animated_number';
export default class IconButton extends React.PureComponent {
static propTypes = {
className: PropTyp... |
packages/slate-react/test/rendering/fixtures/custom-block.js | ashutoshrishi/slate | /** @jsx h */
import React from 'react'
import h from '../../helpers/h'
function Code(props) {
return React.createElement(
'pre',
props.attributes,
React.createElement('code', {}, props.children)
)
}
export const props = {
renderNode(p) {
switch (p.node.type) {
case 'code':
return... |
components/react-semantify/src/views/item.js | react-douban/douban-book-web | import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import TypeSelector from '../mixins/typeSelector';
import {Unit} from '../commons/unit';
let defaultClassName = 'item';
const Item = React.createClass({
mixins: [ClassGenerator, TypeSelector],
render: function () {
let {class... |
src/MenuItem.js | Firfi/meteor-react-bootstrap | import React from 'react';
import classNames from 'classnames';
const MenuItem = React.createClass({
propTypes: {
header: React.PropTypes.bool,
divider: React.PropTypes.bool,
href: React.PropTypes.string,
title: React.PropTypes.string,
target: React.PropTypes.string,
onSelect... |
src/components/Header/Header.js | ShanzayA/wd-aqua | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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, { Component } from 'react';
import withStyle... |
frontend/src/Settings/MediaManagement/RootFolder/RootFoldersConnector.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { deleteRootFolder, fetchRootFolders } from 'Store/Actions/settingsActions';
import RootFolders from './RootFolders';
function createMapStateToProps() {... |
examples/js/manipulation/export-csv-column-table.js | echaouchna/react-bootstrap-tab | /* eslint max-len: 0 */
/* eslint no-unused-vars: 0*/
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
p... |
app/jsx/external_apps/components/Lti2Edit.js | djbender/canvas-lms | /*
* Copyright (C) 2014 - 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... |
dokomoforms/static/src/survey/js/services/__tests__/location-tests.js | SEL-Columbia/dokomoforms | import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
// jest.autoMockOff();
// a noop function useful for passing into components that require it.
var noop = () => {};
describe('location', () => {
var location;
beforeEach(function() {
jest.don... |
app/routes.js | Fresh-maker/razor-client | // @flow
import React from 'react';
import { Route } from 'react-router';
import HomePage from './containers/HomePage';
import Window2Page from './containers/Window2Page';
export default (
<Route path="/" component={HomePage}>
<Route path="/window2/:id" component={Window2Page} />
</Route>
);
|
src/svg-icons/image/filter-b-and-w.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterBAndW = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/>
</SvgIcon>
);
ImageFilterBAndW = pure(Im... |
frontend/component/Login.js | ivernaloo/practice-node-project | import React from 'react';
import jQuery from 'jquery';
import {login} from '../lib/client';
import {redirectURL} from '../lib/utils';
export default class Login extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleChange(name, e) {
this.state[name] = e.target.value... |
src/components/app.js | philly-d/chirp-for-twitter | import React from 'react'
import NewTweet from './newTweet'
import Banner from './banner'
import CurrentThread from '../containers/Thread'
import Screenshotter from '../containers/Screenshotter'
import Autocomplete from '../containers/Autocomplete'
import {
ACTIVE_VIEW_THREAD, ACTIVE_VIEW_COMPOSER, ACTIVE_VIEW_NONE... |
__tests__/components/Hero-test.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import renderer from 'react-test-renderer';
import Hero from '../../src/js/components/Hero';
// needed because this:
// https://github.com/facebook/jest/issues/1353
jest.mock('react-dom');
describe('Hero', () => {
it('... |
src/Form/FormControl.spec.js | dsslimshaddy/material-ui | // @flow
import React from 'react';
import { spy } from 'sinon';
import { assert } from 'chai';
import { createShallow, getClasses } from '../test-utils';
import Input from '../Input';
import FormControl from './FormControl';
describe('<FormControl />', () => {
let shallow;
let classes;
before(() => {
shal... |
entry.js | tcschiller/rio-starter-kit | // entry.js
// Stylesheets
require('./css-src/normalize.scss');
require('./css-src/resets.scss');
require('./css-src/homepage.scss');
require('./css-src/recipe.scss');
// Libraries
import React from 'react';
// App state
import structure from './js-src/AppState';
// Components
import RioComponentCookbook from './js... |
src/frontend/containers/Sidebar/Content.js | jsonnull/aleamancer | // @flow
import React from 'react'
import type { Tab } from 'common/types'
import Session from './Session'
type Props = {
tab: Tab
}
const Content = (props: Props) => {
const { tab } = props
if (tab === 'Session') {
return <Session />
}
return null
}
export default Content
|
pootle/static/js/auth/components/AuthContent.js | fabada/pootle | /*
* 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.
*/
'use strict';
import React from 'react';
import { PureRen... |
demos/function-tree-demos/src/redux/index.js | FWeinb/cerebral | import React from 'react'
import {render} from 'react-dom'
import App from './components/App'
import {Provider} from 'react-redux'
import store from './store'
export default function () {
render((
<Provider store={store}>
<App />
</Provider>
), document.querySelector('#root'))
}
|
src/svg-icons/image/tonality.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTonality = (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 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.... |
src/svg-icons/social/group.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroup = (props) => (
<SvgIcon {...props}>
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.3... |
wrappers/md.js | xzin/homepage | import React from 'react'
import PropTypes from 'prop-types'
import 'css/markdown-styles.css'
import Helmet from 'react-helmet'
import { config } from 'config'
export default class Markdown extends React.Component {
static propTypes = {
router: PropTypes.object,
}
render() {
const post = this.props.rout... |
src/App.js | WenXuanYuan/qfxw | import React, { Component } from 'react';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import * as reducers from 'reducers';
import thunkMiddleware from 'redux-thunk';
import logger from 'redux-logger';
import { Router, Route } from 'react-router';
imp... |
app/assets/scripts/components/team-list.js | openaq/openaq.org | import React, { Component } from 'react';
import { PropTypes as T } from 'prop-types';
import { environment } from '../config';
class TeamList extends Component {
renderListItem(person) {
const { image, name, role, affiliation, contact } = person;
const details = [role, affiliation].filter(Boolean).join(' ... |
components/hoc/with-session.js | sgmap/inspire | import React from 'react'
import hoist from 'hoist-non-react-statics'
import SessionContext from '../../contexts/session-context'
export default Component => hoist(class extends React.Component {
render() {
return (
<SessionContext.Consumer>
{session => (
<Component session={session} {..... |
app/javascript/mastodon/features/ui/util/reduced_motion.js | rekif/mastodon | // Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
import React from 'react';
import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
const stylesToKeep = ['opacity', 'backgroundOpacity'];
const extractValue = (value) =>... |
test/notificationStack.js | pburtchaell/react-notification | import React from 'react';
import { Notification, NotificationStack } from '../src/index';
import mockNotification from './mockNotification';
describe('<NotificationStack />', () => {
let notifications;
beforeEach(() => {
notifications = [
mockNotification,
Object.assign({}, mockNotification, { ke... |
app/containers/BrowserTabsContainer/BrowserTab.js | medialab/hyphe-browser | // small upper part of tabs (favicon, close button…)
import './BrowserTab.styl'
import React from 'react'
import PropTypes from 'prop-types'
import { findDOMNode } from 'react-dom'
import { injectIntl } from 'react-intl'
import { remote, ipcRenderer as ipc } from 'electron'
import cx from 'classnames'
const { Menu, ... |
app/containers/LanguageProvider/index.js | aoshmyanskaya/tko | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
client/components/FlassCommon/Title/index.js | Nexters/flass | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import './styles.scss';
const { string, element } = PropTypes;
const propTypes = {
title: string.isRequired
};
const defaultProps = {
};
const Header = ({ title }) => (
<div className={ classNames('header') }>
... |
docs/src/examples/elements/Loader/Variations/index.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Message } from 'semantic-ui-react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
const LoaderVariationsExamples = () => (
<ExampleSection title='Variations'>
<Compon... |
react/LinkedInIcon/LinkedInIcon.sketch.js | seek-oss/seek-style-guide | import React from 'react';
import LinkedInIcon from './LinkedInIcon';
import generateSketchIconSizes from '../private/generateSketchIconSizes';
export const symbols = {
...generateSketchIconSizes('LinkedIn/1. Unfilled', <LinkedInIcon />),
...generateSketchIconSizes('LinkedIn/2. Filled', <LinkedInIcon filled />)
};... |
app/components/profile/Profile.js | JoaoCnh/picto-pc | import React, { Component } from 'react';
import { Link } from 'react-router';
import Button from '../common/Button';
import styles from './Profile.css';
import AuthAPI from '../../api/auth';
import imageUtils from '../../utils/images';
export default class Profile extends Component {
constructor(props) {
... |
node_modules/react-router/es6/Route.js | MichaelWiss/React_E | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { component, components } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var func = _React$PropTypes.func;
/**
* A <Route> is use... |
fields/types/location/LocationFilter.js | Pop-Code/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
FormField,
FormInput,
Grid,
SegmentedControl,
} from '../../../admin/client/App/elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
ret... |
examples/custom-routing/src/containers/Home.js | calvinrbnspiess/react-static | import React from 'react'
import { getSiteProps } from 'react-static'
//
import logoImg from '../logo.png'
export default getSiteProps(() => (
<div>
<h1 style={{ textAlign: 'center' }}>Welcome to</h1>
<img src={logoImg} alt="" />
</div>
))
|
src/Question.js | vgrigoriu/learn-to-read | import React from 'react';
import { Button } from 'react-bootstrap';
export default function Question(props) {
const correctAnswer = props.allItems[props.correctAnswerIndex];
const options = props.allItems.map(item => {
const text = item.name.toUpperCase();
const handler = (item === correctAnsw... |
src/components/Navbar/Navbar/index.js | easingthemes/notamagic | /**
*
* Navbar
*
*/
import React from 'react';
import Logo from 'components/Navbar/Logo';
import Navigation from 'components/Navbar/Navigation';
/* eslint-disable no-unused-vars */
import styles from './styles.global.scss';
/* eslint-enable no-unused-vars */
class Navbar extends React.Component {
// ----------------... |
src/pages/index.js | mohebifar/restact | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import Helmet from 'react-helmet'
import moment from 'moment'
import { Container, Flex, Box } from '../components/Layout'
import Testimonial from '../components/Testimonial'
import AboutSection from '../components/About... |
src/containers/Asians/Registration/Institutions/RegistrationObserversView/index.js | westoncolemanl/tabbr-web | import React from 'react'
import { connect } from 'react-redux'
import Instance from './Instance'
export default connect(mapStateToProps)(({
registrationObservers,
registrationInstitution,
onOpenSnackbar
}) => {
if (!registrationInstitution) {
return <div />
}
const filterRegistrationObservers = regi... |
src/layouts/CoreLayout.js | marduke182/twitch-redux | import React from 'react';
import 'styles/core.scss';
import Header from 'components/Header';
import Player from 'components/Player';
import GitHubForkRibbon from 'react-github-fork-ribbon';
export default class CoreLayout extends React.Component {
static propTypes = {
children : React.PropTypes.element
}
... |
AreaPicker/__tests__/index.ios.js | yuanliangYL/ReactNative-Components-Demo | import 'react-native';
import React from 'react';
import Index from '../index.ios.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/routes.js | SurgeClub/surgeclub-fe | import React from 'react';
import {IndexRoute, Route} from 'react-router';
import {
App,
Home,
Login,
NotFound,
History,
} from 'containers';
export default () => {
return (
<Route path="/" component={App}>
{ /* Home (main) route */ }
<IndexRoute component={Home}/>
{ /* R... |
app/containers/Home/index.js | Figedi/denon_menu | // @flow
import React, { Component } from 'react';
import classNames from 'classnames';
import Modal from 'react-modal';
import Slider from 'rc-slider';
import { connect } from 'react-redux';
import Layout from '../Layout';
import * as mapDispatchToProps from '../../actions/denon';
import type { RootState } from '../.... |
packages/icons/src/md/content/Flag.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdFlag(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="27.8 11 27 7 9 7 9 41 13 41 13 27 24.2 27 25 31 39 31 39 11" />
</IconBase>
);
}
export default MdFlag;
|
src/views/buttons/dropdowns/Dropdowns.js | mrholek/CoreUI-React | import React from 'react'
import {
CButton,
CButtonGroup,
CCard,
CCardBody,
CCardHeader,
CCol,
CDropdown,
CDropdownDivider,
CDropdownItem,
CDropdownMenu,
CDropdownToggle,
CRow,
} from '@coreui/react'
import { DocsCallout, DocsExample } from 'src/components'
const Dropdowns = () => {
return (
... |
clients/components/ProSettings/ProWhatIs/ProWhatIs.js | Desertsnowman/Caldera-Forms | import React from 'react';
import propTypes from 'prop-types';
import classNames from 'classnames'
import {Twemoji} from 'react-emoji-render';
/**
* Create the ProWhatIs UI
* @param {Object} props
* @return {*}
* @constructor
*/
export const ProWhatIs = (props) => {
return(
<div
className={classNames(props.... |
demo/src/components/App/components/Link/Link.js | YingyuWu/react-autosuggest-fix-ios-scroll-issue | import styles from './Link.less';
import React from 'react';
import PropTypes from 'prop-types';
const Link = props => {
const { className, href, underline, children } = props;
const klass =
(className === null ? '' : className + ' ') +
(underline ? styles.linkWithUnderline : styles.linkWithoutUnderline);... |
src/routes/RetailersMap/components/LocationList/LocationList.js | TheModevShop/craft-app | import React from 'react';
import {Link} from 'react-router';
import _ from 'lodash';
import {removeUnwantedNameCharacters} from 'utility/TitleActions';
import LocationsFilter from './components/LocationsFilter/LocationsFilter';
import Tappable from 'react-tappable';
import $ from "jquery";
import './location-list.less... |
packages/kalama/src/app.js | corporateanon/kalama | import 'babel-polyfill';
import React, { Component } from 'react';
import blessed from 'blessed';
import { render } from 'react-blessed';
import { Provider } from 'react-redux';
import store from './store';
import Router from './containers/Router';
import { initKeyboard, getGlobalKeys } from './services/keyboard';
impo... |
src/components/StaticVictory.js | gj262/noaa-coops-viewer | // Only update victory chart elements when key attributes change.
import PropTypes from 'prop-types'
import React from 'react'
import { VictoryLine } from 'victory-line'
class StaticVictoryLine extends React.Component {
static propTypes = {
data: PropTypes.array.isRequired,
updateAttrs: PropTypes.string.is... |
node_modules/react-bootstrap/es/SplitButton.js | mohammed52/door-quote-automator | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... |
src/index.js | abhiisheek/ps-react-abhiisheek | import React from 'react';
import ReactDOM from 'react-dom';
import Docs from './docs/Docs';
import registerServiceWorker from './registerServiceWorker';
// import './index.css';
ReactDOM.render(<Docs />, document.getElementById('root'));
registerServiceWorker();
|
src/components/Skills.js | orballo/orballo.github.io | import React from 'react';
import PropTypes from 'prop-types';
const Skills = ({ skills }) => {
const mappedSkills = skills
.sort(function(a, b) {
if (a.level === b.level)
return a.name.charCodeAt(0) - b.name.charCodeAt(0);
else return b.level - a.level;
})
.map(function(item, index) ... |
app/javascript/mastodon/features/status/components/action_bar.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import IconButton from '../../../components/icon_button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMess... |
example/index.js | antonKalinin/react-json-graph | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {createStore} from 'redux';
import {Provider} from 'react-redux';
import reducers from './reducers';
const app = (
<Provider store={createStore(reducers)}>
<App />
</Provider>
);
ReactDOM.render(app, document... |
packages/icons/src/md/content/TextFormat.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdTextFormat(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M10 35v4h28v-4H10zm9-8.4L17.2 31H13l9.5-22h3L35 31h-4.2L29 26.6H19zm5-13.64L20.26 23h7.48L24 12.96z" />
</IconBase>
);
}
export default MdT... |
apps/test-suite/tests/Video.js | exponent/exponent | 'use strict';
import React from 'react';
import { forEach } from 'lodash';
import { Video } from 'expo-av';
import { Asset } from 'expo-asset';
import { Platform } from 'react-native';
import { waitFor, retryForStatus, mountAndWaitFor as originalMountAndWaitFor } from './helpers';
export const name = 'Video';
const ... |
admin/client/App/screens/List/components/ListControl.js | xyzteam2016/keystone | import React from 'react';
import classnames from 'classnames';
var ListControl = React.createClass({
propTypes: {
dragSource: React.PropTypes.func,
onClick: React.PropTypes.func,
type: React.PropTypes.oneOf(['check', 'delete', 'sortable']).isRequired,
},
renderControl () {
var icon = 'octicon octicon-';
... |
test/Card.spec.js | react-materialize/react-materialize | import React from 'react';
import { render } from '@testing-library/react';
import Card from '../src/Card';
describe('<Card />', () => {
test('renders', () => {
const { container } = render(
<Card
title="card title"
className="blue-grey darken-1"
textClassName="white-text"
>
... |
frontend/index.js | koerbaecher/slack-like-prototype | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App.jsx';
ReactDOM.render(
<App />,
document.getElementById('root')
); |
docs/src/examples/views/Comment/index.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import Content from './Content'
import Types from './Types'
import States from './States'
import Variations from './Variations'
const CommentExamples = () => (
<div>
<Types />
<Content />
<States />
<Variations />
</div>
)
export default CommentExamples
|
example9/src/components/ApplicationComponent.js | JoeTheDave/Talk-ReactUpAndRunning |
//ApplicationComponent.js
import React from 'react';
import Profile from './Profile';
import dataService from '../services/dataService';
class ApplicationComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
people: dataService.getPeople()
};
... |
src/svg-icons/av/replay-30.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay30 = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-2.4 8.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.... |
app/js/components/RateChart/RateChart.js | adrianomelo/numus | import 'style!css!./RateChart.css';
import React from 'react';
import { LineChart } from 'react-d3';
export default class RateChart extends React.Component {
constructor() {
super();
this.state = {
values: [{x: 1,y :1}, {x:1, y:1}],
width: 0,
height: 0
}
}
componentWillMount() {
... |
app/component/readingTopViewPager.js | lipeiwei-szu/ReactNativeOne | /**
* Created by lipeiwei on 16/10/5.
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Dimensions,
TouchableOpacity,
Image,
InteractionManager
} from 'react-native';
import ViewPager from 'react-native-viewpager';
import {getReadingImageList} from '../api/reading';
import {... |
src/SparklinesCurve.js | okonet/react-sparklines | import React from 'react';
export default class SparklinesCurve extends React.Component {
static propTypes = {
color: React.PropTypes.string,
style: React.PropTypes.object
};
static defaultProps = {
style: {}
};
render() {
const { points, width, height, margin, co... |
src/svg-icons/file/cloud-queue.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloudQueue = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.9... |
scegratoo/public/scripts/services/treenodeattributelist.js | despairblue/scegratoo3 | import {
__,
map,
filter,
contains,
pipe,
prop,
toLower
} from 'ramda'
import React from 'react'
import TreeNodeAttribute from './treenodeattribute'
export default React.createClass({
propTypes: {
node: React.PropTypes.object.isRequired
},
render: function () {
const node = this.props.node
... |
entry.js | nthitz/t3posts |
import React from 'react'
import Router from 'react-router'
import Routes from './app/Routes.jsx'
if (typeof document !== 'undefined') {
var initialProps = JSON.parse(document.getElementById('initial-props').innerHTML)
Router.run(Routes, Router.HistoryLocation, function (Handler) {
React.render(React.createEl... |
src/main.js | bohdanD/movie-search |
import React from 'react';
import ReactDOM from 'react-dom';
import {Container} from './container';
class MainContainer extends React.Component{
render(){
return <Container />
}
};
ReactDOM.render(<MainContainer />, document.getElementById('root')); |
src/client/react/routes/routes.js | lostpebble/koa-mobx-react-starter | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from '../App';
import UserProfile from '../UserProfile';
import Counter from '../Counter';
export const routes = (
<Route path="/" component={App}>
<IndexRoute component={UserProfile}/>
<Route path="/counter" component={... |
src/svg-icons/av/forward-10.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvForward10 = (props) => (
<SvgIcon {...props}>
<path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0... |
frontend/test/app/components/Footer-test.js | mozilla/testpilot | import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import Footer from '../../../src/app/components/Footer';
describe('app/components/Footer', () => {
let subject, sendToGA;
beforeEach(() => {
sendToGA = sinon.spy();
subject = shallow(<Fo... |
src/components/AuthProtected/index.js | suhodolskiy/bsuir-evt-laba-2017 | import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import { Redirect } from 'react-router-dom';
export default function AuthProtected(Component) {
@inject('auth') @observer
class AuthenticatedComponent extends Component {
constructor(props) {
super(props);
}
... |
src/svg-icons/image/hdr-on.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageHdrOn = (props) => (
<SvgIcon {...props}>
<path d="M21 11.5v-1c0-.8-.7-1.5-1.5-1.5H16v6h1.5v-2h1.1l.9 2H21l-.9-2.1c.5-.3.9-.8.9-1.4zm-1.5 0h-2v-1h2v1zm-13-.5h-2V9H3v6h1.5v-2.5h2V15H8V9H6.5v2zM13 9H9.5v6H13... |
src/TextField/TextFieldLabel.spec.js | lawrence-yu/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {expect} from 'chai';
import TextFieldLabel from './TextFieldLabel';
import getMuiTheme from '../styles/getMuiTheme';
describe('<TextFieldLabel>', () => {
it('uses focus styles', () => {
const wrapper = shallow(
<TextF... |
src/svg-icons/social/whatshot.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialWhatshot = (props) => (
<SvgIcon {...props}>
<path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.... |
04-custom-link/components/App.js | nodeyu/jason-react-router-demos-v4 | import React from 'react';
import { BrowserRouter, Route } from 'react-router-dom';
import Home from './Home';
import About from './About';
import CustomLink from './CustomLink';
class App extends React.Component {
render() {
return (
<BrowserRouter>
<div>
<... |
test/CollapseSpec.js | pombredanne/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import Collapse from '../src/Collapse';
describe('Collapse', () => {
let Component, instance;
beforeEach(() => {
Component = React.createClass({
render() {
let { children, ...pr... |
web/js/components/builds/BuildDetails.js | miquella/mason-ci | import React from 'react'
import BuildStore from '../stores/BuildStore'
export default class Builds extends React.Component {
render() {
return(
<div>
Build Details
</div>
)
}
} |
node_modules/_rc-calendar@9.0.4@rc-calendar/es/year/YearPanel.js | ligangwolai/blog | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-run... |
app/index.js | leofle/electron_manifesto | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.global.c... |
src/pages/SlidePage.js | tmpaul06/gathering-client | import React from 'react';
/**
* A slide page listens to keypress events, and reveals
* section after section. When no more sections are pending
* we simply call the parent callback and move on to next
* page
*/
export default class SlidePage extends React.Component {
constructor(props) {
super(props);
... |
src/parser/paladin/protection/modules/spells/LightOfTheProtector.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import Abilities from 'parser/core/modules/Abilities';
import SpellUsable from 'parser/shared/modules/SpellU... |
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-forms-v3-select.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, ContentMixin, LsiMixin, Tools} from './../common/common.js';
import Backdrop from './../bricks/backdrop.js';
import Span from './../bricks/span.js';
import Link from './../bricks/link.js';
import ItemList from './internal/item-list.js';
import Label from... |
src/components/Translation/Game/__tests__/Game.spec.js | jseminck/jseminck-be-main | import React from 'react';
import renderer from 'react-test-renderer';
import {Game} from './../../Game';
describe('Game', function() {
it('renders correctly without data', () => {
const app = renderer.create(
<Game
translations={[]}
index={0}
actions={{
... |
src/Button.js | billyryanwill/amplify | import React from 'react';
const Button = () => {
return (
<button>
Text
</button>
)
}
export default Button;
|
examples/counter/index.js | grahamlyus/redux | 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')
);
|
web/src/components/shared/forms/SignupForm.js | jonwho/reddit-clone | import React, { Component } from 'react';
class SignupForm extends Component {
constructor(props) {
super(props);
this.state = {
username: '',
password: '',
};
this.onChange = this.onChange.bind(this);
this.onSubmit = this.onSubmit.bind(this);
}
onChange(event) {
this.setSt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.