path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/components/HistoriqueCommandesUtilisateur/components/DetailCommandeContainer.js | Proxiweb/react-boilerplate | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import RefreshIndicator from 'material-ui/RefreshIndicator';
import RaisedButton from 'material-ui/Raised... |
src/__tests__/optional-import-test.js | brigand/babel-plugin-flow-react-proptypes | const babel = require('babel-core');
const content = `
/* @flow */
import React from 'react'
import type { Values } from './values';
class MyComp extends React.Component {
props: {
values?: Values
}
render() {
return <div />;
}
}
`;
it('function-types', () => {
const res = babel.transform(content, {... |
src/components/pages/workspaces.js | crmaxx/netscanner-ui | import React from 'react';
// import Router from 'react-router';
import { Mixins, Styles } from 'material-ui';
// import WorkspacesFeature from './components/workspaces-feature';
import WorkspacesTable from './components/workspaces-table';
// import FullWidthSection from '../full-width-section';
const { StylePropable,... |
actor-apps/app-web/src/app/components/activity/GroupProfileMembers.react.js | akingyin1987/actor-platform | import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import DialogActionCreators from 'actions/DialogActionCreators';
import LoginStore from 'stores/LoginStore';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { Pure... |
data/jedi.js | uclaacm/website | import React from 'react';
import ao3 from '../public/images/jedi/allyship/ao3.png';
import cisgenderPrivilege from '../public/images/jedi/allyship/cisgender-privilege.png';
import disabilityAccessibility from '../public/images/jedi/allyship/disability-accessibility.jpg';
import dontGiveThemTheAux from '../public/image... |
client/app/components/Footer/index.js | jjt/ffsssshh | import React from 'react';
import A from 'A';
import styles from './styles.css';
class Footer extends React.Component {
render() {
return (
<footer className={ styles.footer }>
<section>
<p>This project is licensed under the MIT license.</p>
</section>
<section>
... |
app/components/Footer/index.js | andyfrith/weather.goodapplemedia.com | import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from 'components/A';
import Wrapper from './Wrapper';
import messages from './messages';
function Footer() {
return (
<Wrapper>
<div style={{width: '100%', background: '#141d26', height: '100px' }}> </div>
{/*<se... |
src/platform/site-wide/banners/components/MaintenanceBanner/index.unit.spec.js | department-of-veterans-affairs/vets-website | // Dependencies
import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
// Relative
import MaintenanceBanner from './index';
import ReusableMaintenanceBanner from '@department-of-veterans-affairs/component-library/MaintenanceBanner';
describe('<MaintenanceBanner>', () => {
it('sho... |
app/javascript/mastodon/features/account_timeline/components/header.js | rekif/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import InnerHeader from '../../account/components/header';
import ActionBar from '../../account/components/action_bar';
import MissingIndicator from '../../../components/missing_indicator';
import ... |
Sobiens.Web.Components.ReactTutorial/ClientApp/src/components/SobyChart.js | sobiens/webcomponents | import React, { Component } from 'react';
import { config } from '../config';
import { SobyMainLibrary } from './SobyMainLibrary';
let sobyMainLibrary = new SobyMainLibrary();
export class SobyChart extends Component {
constructor(props) {
super(props);
const jsCode = "$(function () { \n " +
... |
sam-front/src/components/ApplicationDeployment.js | atgse/sam | import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import groupBy from 'lodash/groupBy';
import keys from 'lodash/keys';
import capitalize from 'lodash/capitalize';
import { collectionSize } from '../helpers';
import { List, ListItem } from 'material-ui/List';
import ... |
examples/huge-apps/routes/Calendar/components/Calendar.js | darul75/react-router | import React from 'react';
class Calendar extends React.Component {
render () {
return (
<div>
<h2>Calendar</h2>
</div>
);
}
}
export default Calendar;
|
fields/types/location/LocationFilter.js | kumo/keystone | import React from 'react';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
return {
inverted: TOGGLE_OPTIONS[0].value,
street: undefined,
city:... |
components/group-contact-list.js | kalicki/WhatsAppLike | import React from 'react'
import GroupContact from './group-contact'
const ListGroupsContacts = ({ items, active, onClick }) =>
<div>
<ul>
{console.log(items)
/*items.map(item =>
<GroupContact
key={item.id}
onClick={() => onClick(item.id)}
name={item.id}
... |
client/containers/header/Header.js | nextinnovation-corp/gacha | import React from 'react';
import { connect } from 'react-redux'
import { links } from '../../../config';
import pikachu from './pikachu.png';
import squirtle from './squirtle.png';
import chamander from './charmander.png';
import s from './Header.css';
import { search } from '../../actions/header';
import LoginButton ... |
packages/xo-web/src/common/home-tags.js | vatesfr/xo-web | import * as CM from 'complex-matcher'
import PropTypes from 'prop-types'
import React from 'react'
import Component from './base-component'
import Tags from './tags'
export default class HomeTags extends Component {
static propTypes = {
labels: PropTypes.arrayOf(PropTypes.string).isRequired,
onAdd: PropType... |
client/src/components/template/header.js | ronniehedrick/scapeshift | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class HeaderTemplate extends Component {
renderLinks() {
if (this.props.authenticated) {
return [
<li key={`${1}header`}>
<Link to="/">Home</Link>
</li>,
<... |
src/Info.js | lincolnphu/zzdi | import React, { Component } from 'react';
import Img from './Img';
require("./style.scss");
export default class Info extends Component {
render(){
const {tracks} = this.props;
const ht = window.innerHeight + window.scrollY -50
const examples = tracks.map((d,i)=>{
let name = d.artist["#text"],
... |
js/App/Components/Location/AddLocation/LocationActivationManual.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : 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
*... |
node_modules/react-router/es6/RouteUtils.js | orionwei/mygit | 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; };
import React from 'react';
function isValidChild(object) {
... |
packages/react-server-examples/code-splitting/components/Body.js | emecell/react-server | import React, { Component } from 'react';
import {logging} from 'react-server';
const logger = logging.getLogger(__LOGGER__);
export default class Body extends Component {
constructor(props) {
super(props);
this.increment = () => {
this.setState({exclamationCount: this.state.exclamationCount + 1});
}
thi... |
DEPRECATED/node_modules/react-router/es6/Route.js | vanHeemstraDesigns/CreationsEcosystemStatic | 'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must e... |
packages/icons/src/md/av/PlayCircleFilled.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdPlayCircleFilled(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 4c11.05 0 20 8.95 20 20s-8.95 20-20 20S4 35.05 4 24 12.95 4 24 4zm-4 29l12-9-12-9v18z" />
</IconBase>
);
}
export default MdPlayC... |
test/ProgressBarSpec.js | azmenak/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ProgressBar from '../src/ProgressBar';
import {shouldWarn} from './helpers';
const getProgressBarNode = function (wrapper) {
return React.findDOMNode(ReactTestUtils.findRenderedDOMComponentWithClass(wrapper, 'progress-bar'));
};... |
packages/mineral-ui-icons/src/IconKeyboardArrowLeft.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 IconKeyboardArrowLeft(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...... |
docs/app/Components/ComponentDoc/ComponentProp/ComponentPropExtra.js | shengnian/shengnian-ui-react | import PropTypes from 'prop-types'
import React from 'react'
const descriptionStyle = {
color: '#666',
}
const contentStyle = {
marginLeft: '0.5em',
}
const contentBlockStyle = {
...contentStyle,
display: 'block',
}
const contentInlineStyle = {
...contentStyle,
display: 'inline',
}
const ComponentPropExtr... |
src/server.js | licatajustin/preesh | /**
* 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 'babel-polyfill';
import path from 'path';
import e... |
tests/framework.spec.js | ksevezich/Duke-Blueprint-website | import assert from 'assert'
import React from 'react'
import {mount, render, shallow} from 'enzyme'
class Fixture extends React.Component {
render () {
return (
<div>
<input id='checked' defaultChecked />
<input id='not' defaultChecked={false} />
</div>
)
}
}
describe('(Framewo... |
examples/todomvc/routes.js | lore/lore | import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
/**
* Wrapping the Master component with this decorator provides an easy way
* to redirect the user to a login experience if we don't know who they are.
*/
import UserIsAuthenticated from './src/decorators/UserIsAuthenticated';
... |
modules/__tests__/createRoutesFromReactChildren-test.js | Dodelkin/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import { createRoutesFromReactChildren } from '../RouteUtils'
import IndexRoute from '../IndexRoute'
import Route from '../Route'
describe('createRoutesFromReactChildren', function () {
const Parent = React.cr... |
src/__stories__/01-basic-table/05-CustomLabels.stories.js | Imballinst/react-bs-datatable | import React from 'react';
import { storiesOf } from '@storybook/react';
import { categoryName } from './_base';
import moment from 'moment';
// In your setup, replace "../../" with "react-bs-datatable".
import Datatable from '../../';
const header = [
{
title: 'Username (filterable)',
prop: 'username',
... |
index.ios.js | AcademyPgh/Y1S2-ReplayFX-Schedule | import {Provider} from 'react-redux';
import store from './src/redux/store';
import AppViewContainer from './src/modules/AppViewContainer';
import React from 'react';
import {AppRegistry} from 'react-native';
const replayfxschedule = React.createClass({
render() {
return (
<Provider store={store}>
... |
app/javascript/mastodon/features/standalone/compose/index.js | sylph-sin-tyaku/mastodon | import React from 'react';
import ComposeFormContainer from '../../compose/containers/compose_form_container';
import NotificationsContainer from '../../ui/containers/notifications_container';
import LoadingBarContainer from '../../ui/containers/loading_bar_container';
import ModalContainer from '../../ui/containers/mo... |
src/svg-icons/editor/format-quote.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatQuote = (props) => (
<SvgIcon {...props}>
<path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/>
</SvgIcon>
);
EditorFormatQuote = pure(EditorFormatQuote);
EditorFormatQuote.displayName = 'EditorFor... |
tests/components/Counter/Counter.spec.js | aurel-tackoen/spencer.io | import React from 'react'
import { bindActionCreators } from 'redux'
import { Counter } from 'components/Counter/Counter'
import { shallow } from 'enzyme'
describe('(Component) Counter', () => {
let _props, _spies, _wrapper
beforeEach(() => {
_spies = {}
_props = {
counter: 5,
...bindActionCre... |
components/animals/orelBelohlavy.child.js | marxsk/zobro | import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../images/animals/orelBelohlavy/01.j... |
src/containers/lookup.js | everywherebible/app | // @flow
import React from 'react';
import {connect} from 'react-redux';
import type {Match} from 'react-router';
import {Route} from 'react-router-dom';
import {addRecent} from '../actions';
import type {Action} from '../actions';
import type {Reference} from '../data/model';
import {populateStoreWithRecents} from '... |
client/views/setupWizard/StepHeader.stories.js | Sing-Li/Rocket.Chat | import { number, text } from '@storybook/addon-knobs';
import React from 'react';
import { StepHeader } from './StepHeader';
export default {
title: 'views/setupWizard/StepHeader',
component: StepHeader,
};
export const _default = () =>
<StepHeader
number={number('number', 1)}
title={text('title', 'Title')}
... |
frontend/test/app/reducers/newsletter-form-test.js | 6a68/testpilot | import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { newsletterFormSetEmail as setEmail,
newsletterFormSetPrivacy as setPrivacy,
newsletterFormSetSubmitting as setSubmitting,
newsletterFormSetFailed as setFailed,
newsletterFormSetSucceeded as... |
js/src/modals/Shapeshift/OptionsStep/optionsSteps.spec.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... |
static/src/components/DynamicPassword.js | detailyang/cas-server | /**
* @Author: BingWu Yang <detailyang>
* @Date: 2016-03-11T12:16:28+08:00
* @Email: detailyang@gmail.com
* @Last modified by: detailyang
* @Last modified time: 2016-04-21T00:43:04+08:00
* @License: The MIT License (MIT)
*/
import Antd, {
Button,
Form,
Input,
Alert,
Row,
Col,
Modal,
} from 'antd';
... |
examples/03 Nesting/Drop Targets/index.js | srajko/react-dnd | import React from 'react';
import Container from './Container';
export default class NestingDropTargets {
render() {
return (
<div>
<p>
<b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/03%20Nesting/Drop%20Targets'>Browse the Source</a></b>
</p>
<p>
... |
docs/src/app/components/pages/components/DatePicker/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 datePickerReadmeText from './README';
import DatePickerExampleSimple from... |
jenkins-design-language/src/js/components/material-ui/svg-icons/content/forward.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ContentForward = (props) => (
<SvgIcon {...props}>
<path d="M12 8V4l8 8-8 8v-4H4V8z"/>
</SvgIcon>
);
ContentForward.displayName = 'ContentForward';
ContentForward.muiName = 'SvgIcon';
export default ContentForward;
|
src/Col.js | mmarcant/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';
import { DEVICE_SIZES } from './utils/StyleConfig';
const propTypes = {
componentClass: elementType,
/**
* The num... |
blueocean-material-icons/src/js/components/svg-icons/action/reorder.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionReorder = (props) => (
<SvgIcon {...props}>
<path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"/>
</SvgIcon>
);
ActionReorder.displayName = 'ActionReorder';
ActionReorder.muiName = 'SvgIcon';
export default ActionReo... |
examples-react/app/components/dashboard/ButtonGhost.js | zcoding/dashboard | import React from 'react'
import ClassNames from 'classnames'
export default class Button extends React.Component {
constructor(props) {
super(props)
}
render() {
let classnames = ClassNames('btn', `btn-g-${this.props.color}`, {'radius': this.props.radius}, {'round': this.props.round})
return <butt... |
src/components/CommentsForm/CommentsForm/CommentsForm.spec.js | easingthemes/notamagic | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import CommentsForm from 'components/CommentsForm';
function shallowRender (component) {
const renderer = TestUtils.createRenderer();
renderer.render(component);
return renderer.getRenderOutput();
}
function shallowRenderWithProps (props ... |
fields/types/location/LocationFilter.js | wmertens/keystone | import React from 'react';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
return {
inverted: INVERTED_OPTIONS[0].value,
street: undefined,
c... |
examples/inbox.js | marudhupandiyang/react-hold-button | import React from 'react';
import HoldButton from '../main';
require('./inbox.scss');
class Inbox extends React.Component {
constructor(props) {
super(props);
this.state = {
messages: [
{
subject: 'Party at 8 today',
time: '4:00 PM',
id: 1,
},
{
... |
fields/explorer/components/FieldSpec.js | vokal/keystone | import Domify from 'react-domify';
import React from 'react';
import { Form } from '../../../admin/client/App/elemental';
import Col from './Col';
import Row from './Row';
const ExplorerFieldType = React.createClass({
getInitialState () {
return {
filter: this.props.FilterComponent.getDefaultValue(),
value: ... |
src/svg-icons/av/video-library.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvVideoLibrary = (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-8 12.5v-9l6 4.5-6 4.5z"/>
</SvgIcon>... |
test/containers/CounterPage.spec.js | lynks-p2p/lynks-client | import { expect } from 'chai';
import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import CounterPage from '../../app/containers/CounterPage';
import configureStore from '../../app/store/configureStore';
function setup(initialState) {
const store = configureStore(initi... |
ui/src/containers/WaypointForm/index.js | LearningLocker/learninglocker | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Map, List } from 'immutable';
import isEmpty from 'lodash/isEmpty';
import Switch from 'ui/components/Material/Switch';
import QueryBuilder from 'ui/containers/QueryBuilder';
class WaypointForm extends Component {
static propTypes... |
app/assets/scripts/components/join-fold.js | openaq/openaq.github.io | 'use strict';
import React from 'react';
import { Link } from 'react-router';
var JoinFold = React.createClass({
displayName: 'JoinFold',
render: function () {
return (
<section className='join-fold'>
<div className='inner'>
<header className='join-fold__header'>
<h1 classN... |
src/SelectBox/SelectBox.js | abouthiroppy/scuba | // @flow
import type { CommonProps } from '../CommonTypes';
import React from 'react';
import classnames from 'classnames';
import styles from './style';
type SelectBoxProps = {
width?: number | string;
listHeight: number | string;
disabled?: boolean; // 未実装
listPosition?: 'top' | 'bottom';
onChange?: Func... |
pnpm-cached/.pnpm-store/1/registry.npmjs.org/react-bootstrap/0.31.0/es/NavbarBrand.js | Akkuma/npm-cache-benchmark | 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 ... |
app/components/Logo/Nutz.js | VonIobro/ab-web | import React from 'react';
import PropTypes from 'prop-types';
const Nutz = ({ width, height }) => (
<svg
width={`${width}px`}
height={`${height}px`}
viewBox="0 0 228 450"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<title id="nutz-logo">Nutz Logo</title>
<g id="Page-1" stroke="n... |
docs/app/Examples/views/Card/Content/ExtraContent.js | jcarbo/stardust | import React from 'react'
import { Card, Icon } from 'stardust'
const description = [
'Amy is a violinist with 2 years experience in the wedding industry.',
'She enjoys the outdoors and currently resides in upstate New York.',
].join(' ')
const ExtraContent = () => (
<Card>
<Card.Content header='About Amy' ... |
tethys-ui-react/src/main/frontend/components/navigation/Navigation.js | fridayy/tethys | /**
*
* Stateless functional presentation component
*
* Created by bnjm on 12/17/16.
*/
import React from 'react';
import {Link} from 'react-router';
import './navigation.css';
const Navigation = () => {
let icon = <i className="fa fa-angle-double-right" aria-hidden="true"></i>
return (
<div cl... |
src/index.js | jayendra-sharan/json-grid-react | import React from 'react';
import ReactDOM from 'react-dom';
import JSONgrid from './components/JSONgrid';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import * as data from './data.js';
// let data = [
// {
// 'firstname': 'Jennifer',
// 'lastname': 'Lawrence',
// 'email... |
app/src/components/Icon.js | cs-cordero/mtgls | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import cards from '../images/cards.png';
import creature from '../images/symbol_creature.png';
import sorcery from '../images/symbol_sorcery.png';
import instant from '../images/symbol_instant.png';
import enchantment fr... |
blueprints/dumb/files/__root__/components/__name__/__name__.js | mleonard87/merknera-ui | import React from 'react'
type Props = {
};
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
export default <%= pascalEntityName %>
|
examples/history/index.js | ashutoshrishi/slate | import { Value } from 'slate'
import { Editor } from 'slate-react'
import React from 'react'
import initialValue from './value.json'
/**
* Toolbar button component.
*
* @type {Function}
*/
const ToolbarButton = props => (
<span className="button" onMouseDown={props.onMouseDown}>
<span className="material-i... |
src/components/common/forms/QuantitySelector.js | ESTEBANMURUZABAL/bananaStore | /**
* Imports
*/
import React from 'react';
// Instantiate logger
let debug = require('debug')('bananaCat');
/**
* Component
*/
class QuantitySelector extends React.Component {
//*** Initial State ***//
state = {
value: this.props.value || 0
};
//*** Component Lifecycle ***//
compo... |
react-router-demo/lessons/07-more-nesting/modules/Repos.js | zhangjunhd/react-examples | import React from 'react'
import { Link } from 'react-router'
export default React.createClass({
render() {
return (
<div>
<h2>Repos</h2>
<ul>
<li><Link to="/repos/reactjs/react-router">React Router</Link></li>
<li><Link to="/repos/facebook/react">React</Link></li>
... |
src/routes/games/index.js | loganfreeman/react-is-fun | import React from 'react';
import Games from './Games';
export default {
path: '/games',
action() {
let menus = [{
text: 'Sudoku',
key: 'sudoku'
}, {
text: 'Tetris',
key: 'tetris'
}, {
text: 'MineSweeper',
key: 'minesweeper'
}];
return <Games title="Games" m... |
presentation/index.js | iansinnott/react-static-presentation | // Import React
import React from 'react';
import classnames from 'classnames/bind';
import 'react-fa';
import s from './index.styl';
const cx = classnames.bind(s);
// Import Spectacle Core tags
import {
Appear,
BlockQuote,
Cite,
Code,
CodePane,
Deck,
Fill,
Heading,
Image,
Layout,
Link,
ListIt... |
es/components/SidePanels/PanelContainer.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
var PanelContainer = function PanelContainer(_ref) {
var selected = _ref.selected,
children = _ref.children;
return _jsx("div", {
className: cx('SidePanel-pan... |
src/routes/error/ErrorPage.js | kevinchau321/TReactr | /**
* 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 PropTypes from 'prop-... |
src/components/layout/Config.js | PsychoLlama/luminary | import { TouchableOpacity, ScrollView } from 'react-native';
import styled from 'styled-components/native';
import { createSelector } from 'reselect';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import React from 'react';
import R from 'ramda';
import * as colors from '../../constants/co... |
js/routes.js | choosenvictim/soundmobx | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Callback from './components/Callback.js';
import NotFound from './components/NotFound.js';
export default () => {
return (
<Route path="/" comp... |
app/packs/src/components/inbox/DatasetContainer.js | ComPlat/chemotion_ELN | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { DragSource } from 'react-dnd';
import { Button, ButtonGroup, Tooltip } from 'react-bootstrap';
import AttachmentContainer from './AttachmentContainer';
import DragDropItemTypes from '../DragDropItemTypes'... |
admin/client/App/screens/List/components/ListColumnsForm.js | giovanniRodighiero/cms | import React from 'react';
import assign from 'object-assign';
import Popout from '../../../shared/Popout';
import PopoutList from '../../../shared/Popout/PopoutList';
import { FormInput } from '../../../elemental';
import ListHeaderButton from './ListHeaderButton';
import { setActiveColumns } from '../actions';
var... |
src/svg-icons/action/view-stream.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewStream = (props) => (
<SvgIcon {...props}>
<path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/>
</SvgIcon>
);
ActionViewStream = pure(ActionViewStream);
ActionViewStream.displayName = 'ActionViewStream';
Acti... |
test/components/shared/LogoTest.js | germohn/tarkvaraprojekt | import {shallow} from 'enzyme';
import React from 'react';
import Logo from '../../../src/components/shared/Logo';
describe('Logo test', () => {
it('Testing if the right logo is rendered when view it tableView', () => {
const wrapper = shallow(<Logo url={'https://funderbeam-706056.c.cdn77.org/logos/100x100/CO/g... |
client/src/components/common/TextField.js | alexandernanberg/luncha | import React from 'react'
import styled from 'styled-components'
import { rgba } from 'polished'
import { colors } from '../../style'
const Input = styled.input`
display: block;
padding: 8px 12px;
width: 100%;
border: solid 2px ${colors.gray300};
border-radius: 3px;
font-size: 1.6rem;
color: ${colors.gra... |
app/components/IssueIcon/index.js | talal7860/punch-assignment-react | import React from 'react';
function IssueIcon(props) {
return (
<svg
height="1em"
width="0.875em"
className={props.className}
>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v... |
src/TextField/TextFieldUnderline.js | igorbt/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import transitions from '../styles/transitions';
const propTypes = {
/**
* True if the parent `TextField` is disabled.
*/
disabled: PropTypes.bool,
/**
* Override the inline-styles of the underline when parent `TextField` is disabled.
*/
... |
src/MultiMonthView.js | erisnuts/react-date-picker | import React from 'react'
import Component from 'react-class'
import { Flex } from 'react-flex'
import InlineBlock from 'react-inline-block'
import assign from 'object-assign'
import clampRange from './clampRange'
import NavBar from './NavBar'
import toMoment from './toMoment'
import join from './join'
import isInRa... |
src/modules/definitions/components/DefinitionWord/DefinitionWord.js | cltk/cltk_frontend | import React from 'react';
import PropTypes from 'prop-types';
class DefinitionWord extends React.Component {
constructor(props) {
super(props);
this.state = {
showMore: false,
};
}
toggleShowMore() {
this.setState({
showMore: !this.state.showMore,
});
}
render() {
const { showMore } = this.... |
node_modules/react-router/es6/RouterContext.js | tousif101/YouTube-Clone-React | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < argum... |
src/react/Tab.js | onap-sdc/sdc-ui | import React from 'react';
class Tab extends React.Component {
render() {
const {
activeTab,
tabId,
title,
onClick,
disabled,
className = ''
} = this.props;
const dataTestId = this.props['data-test-id'];
return ... |
frontend/node_modules/react-error-overlay/lib/containers/StackTrace.js | rootweiller/morichal | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
source/Interaction.js | halt-hammerzeit/react-responsive-ui | import React from 'react'
import classNames from 'classnames'
/**
* .rrui__interaction--pointer {
* outline: none;
* box-shadow: none;
* }
* <Interaction><input .../></Interaction>
* <Interaction><button .../></Interaction>
*/
export default class Interaction extends React.Component {
state = {}
onFocus =... |
src/svg-icons/maps/pin-drop.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPinDrop = (props) => (
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/>
</SvgIcon>
);
... |
web/components/screens/GetReady/index.fixture.js | skidding/flatris | // @flow
import React from 'react';
import { getSampleUser } from '../../../utils/test-helpers';
import { getBlankPlayer } from 'shared/reducers/game';
import GetReady from '.';
const user = getSampleUser();
const otherPlayer = getBlankPlayer('1337', user);
export default {
default: (
<GetReady
disabled=... |
packages/cf-component-modal/test/ModalFooter.js | mdno/mdno.github.io | import React from 'react';
import renderer from 'react-test-renderer';
import { ModalFooter } from '../../cf-component-modal/src/index';
test('should render', () => {
const component = renderer.create(<ModalFooter>ModalFooter</ModalFooter>);
expect(component.toJSON()).toMatchSnapshot();
});
|
src/svg-icons/hardware/power-input.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePowerInput = (props) => (
<SvgIcon {...props}>
<path d="M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"/>
</SvgIcon>
);
HardwarePowerInput = pure(HardwarePowerInput);
HardwarePowerInput.dis... |
modules/Router.js | chf2/react-router | import React from 'react'
import warning from 'warning'
import createHashHistory from 'history/lib/createHashHistory'
import { createRoutes } from './RouteUtils'
import RoutingContext from './RoutingContext'
import useRoutes from './useRoutes'
import { routes } from './PropTypes'
const { func, object } = React.PropTyp... |
src/components/Post/Author/Author.js | bapti/blog | // @flow strict
import React from 'react';
import { getContactHref } from '../../../utils';
import styles from './Author.module.scss';
import { useSiteMetadata } from '../../../hooks';
const Author = () => {
const { author } = useSiteMetadata();
return (
<div className={styles['author']}>
<p className={... |
src/svg-icons/communication/chat.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationChat = (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-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/>
</SvgIcon>
);
Communicatio... |
app/javascript/mastodon/features/ui/components/modal_loading.js | MitarashiDango/mastodon | import React from 'react';
import LoadingIndicator from '../../../components/loading_indicator';
// Keep the markup in sync with <BundleModalError />
// (make sure they have the same dimensions)
const ModalLoading = () => (
<div className='modal-root__modal error-modal'>
<div className='error-modal__body'>
... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Apis.js | rswijesena/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... |
js/ncoda-init.js | nCoda/julius | // -*- coding: utf-8 -*-
//-------------------------------------------------------------------------------------------------
// Program Name: Julius
// Program Description: User interface for the nCoda music notation editor.
//
// Filename: js/ncoda-init.js
// Purpose: Initiali... |
scripts/app.js | anaptfox/imessage-search | import React from 'react';
import ReactDOM from 'react-dom';
import Main from '../components/main.jsx';
window.onload = function() {
ReactDOM.render( < Main / > , document.getElementById('app'));
}
|
test/CardTitleSpec.js | chris-gooley/react-materialize | /* global describe, it */
import React from 'react';
import { shallow } from 'enzyme';
import { assert } from 'chai';
import CardTitle from '../src/CardTitle';
let wrapper = shallow(
<CardTitle image=''>
I am a very simple card
</CardTitle>
);
describe('<CardTitle />', () => {
it('should render', () => {
... |
test/integration/scss-fixtures/nested-global/pages/_app.js | flybayer/next.js | import React from 'react'
import App from 'next/app'
import '../styles/global1.scss'
import '../styles/global2.scss'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
src/components/Navigation/partials/LanguageSelector.js | elamperti/OpenWebScrobbler | import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { languageList } from 'utils/i18n'; // ToDo: remove i18n and get current language from elsewhere
import ReactGA from 'react-ga';
import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import... |
src/components/phone/group2/Statuses.js | kairatz/resource-frontend-server | import React from 'react'
import { DropdownButton, MenuItem } from 'react-bootstrap'
const Statuses = ({ phone, driver, onStatusSelect }) => (
<div className="well">
<h2 id="client-name"> <i className="glyphicon glyphicon-user"></i> { `${driver[0].first_name} ${driver[0].last_name}` } </h2>
<h2 id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.