path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
docs/src/pages/customization/BusinessVariables.js | AndriusBil/material-ui | // @flow weak
import React from 'react';
import PropTypes from 'prop-types';
import Checkbox from 'material-ui/Checkbox';
import { createMuiTheme, MuiThemeProvider, withStyles } from 'material-ui/styles';
import orange from 'material-ui/colors/orange';
const styles = theme => ({
danger: {
color: theme.status.da... |
site/src/constants/config/learn/vue.js | appbaseio/reactivesearch | import React from 'react';
import theme from './../../theme/vue';
import baseConfig from './../base/vue';
const { primary, primaryDark } = theme;
export default {
...baseConfig,
title: 'Get Started with Reactive Search Vue',
description: (
<React.Fragment>
Use our step-by-step guide to learn all about Reactiv... |
src/molecules/formfields/FieldGroup/__tests__/field_group.spec.js | policygenius/athenaeum | /* eslint-disable no-extra-parens */
import React from 'react';
import renderer from 'react-test-renderer';
import FieldGroup from 'molecules/formfields/FieldGroup';
import TextField from 'molecules/formfields/TextField';
describe('<FieldGroup />', () => {
let component;
beforeEach(() => {
component = (
... |
index.android.js | ColdForge/icebox | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class iceboxiOS extends Component {
render() {
return (
<View style={styles.container}>
<Tex... |
spec/coffeescripts/react_files/components/ZipFileOptionsFormSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2015 - 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... |
packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js | TheBlasfem/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import styles from './NoInteractions.css';
export default function NoInteractions({
hei... |
src/reactImpl/Component.js | pengzhanlee/xeact | import React from 'react';
import {addIdToInstanceRelation} from "../methods";
/**
* 方法暴露
* 将 instanceId (xeactId) 与 internal instance 关联
*/
function methodExpose() {
// const exposedId = this[EXPOSED_METHODS_ID_KEY];
//
// const exposedInstance = getExposedInstance(exposedId);
//
// if(exposedI... |
front-end/app/containers/incidents/incident_update_container.js | akumbhani66/cantaloupe | import { connect } from 'react-redux';
import IncidentUpdate from '../../components/incidents/Incident_update_component';
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import * as Actions from '../../actions/actions';
const mapStateToProps = (state) => {
return {
state: state... |
src/components/home.js | universo-mw8/smart-sale-pwa | import React from 'react'
export default React.createClass({
render () {
return <div>Home</div>
}
})
|
docs/src/examples/modules/Dropdown/Variations/DropdownExampleMenuDirectionLeft.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Dropdown, Icon } from 'semantic-ui-react'
const DropdownExampleMenuDirectionLeft = () => (
<Dropdown text='Menu' floating labeled button className='icon'>
<Dropdown.Menu className='left'>
<Dropdown.Item>
<Icon name='dropdown' />
<span className='text'>Left... |
19-移动端/01-react-native/04-图标组件/04-图标组件.js | csxiaoyaojianxian/JavaScriptStudy | import React, { Component } from 'react';
import {
TabBarIOS,
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import Icon from 'react-native-vector-icons/Ionicons';
class List extends Component {
render(){
return (
<Vi... |
src/views/presentation-view/svg/symbols/point.js | vynogradskyi/resume | import React from 'react';
export default function () {
return (
<symbol id="point" data-name="point" viewBox="0 0 174 174">
<circle cx="87" cy="87" r="87"/>
<circle fill="#fff" cx="86.5" cy="86.5" r="70.5"/>
<circle cx="86" cy="86" r="56"/>
</symbol>
);
} |
extension/src/actions.js | webextensions/live-css-editor | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { CommandPalette } from './command-palette/command-palette.js';
import {
APP_$_CLOSE_COMMAND_PALETTE
} from 'reducers/actionTypes.js';
function mapStateToProps(state) {
return {
open: state.ap... |
src/routes/Counter/components/Counter.js | aburd/issues-tracker | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
src/screens/Counter/Clicker.js | prashaantt/hapi-react-transform-boilerplate | import React from 'react';
export default class Clicker extends React.Component {
handleClick() {
if (this.props.type === 'increment') {
this.props.incrementCounter(this.props.amount);
}
else {
this.props.decrementCounter(this.props.amount);
}
}
re... |
src/svg-icons/maps/local-hotel.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalHotel = (props) => (
<SvgIcon {...props}>
<path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/>
</SvgIcon>
);
MapsLocalHotel = pu... |
app/about/components.js | alyzhao/my-blog | import React from 'react';
class AboutComponent extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="about">
</div>
);
}
}
export { AboutComponent }; |
test/JumbotronSpec.js | modulexcite/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Jumbotron from '../src/Jumbotron';
describe('Jumbotron', function () {
it('Should output a div with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Jumbotron>
<strong>Content</strong>... |
src/__tests__/switch.js | pqx/react-input-switch | import React, { Component } from 'react';
import { mount } from 'enzyme';
import renderer from 'react-test-renderer';
import Switch from '../switch';
test('render', () => {
expect(renderer.create(<Switch />).toJSON()).toMatchInlineSnapshot(`
<label
className="css-1m7f95s-Switch"
onClick={... |
modules/dreamview/frontend/src/components/Header/Selector.js | xiaoxq/apollo | import React from 'react';
export default class Selector extends React.Component {
constructor(props) {
super(props);
this.state = {
name: props.name,
value: props.currentOption,
};
this.onChangeHandler = this.onChangeHandler.bind(this);
}
onChangeHandler(event) {
this.setState... |
.storybook/stories/infinite-scroll.js | eberhara/react-bidirectional-infinite-scroll | import React from 'react'
import { storiesOf } from '@storybook/react'
import Vertical from '../../demo/src/examples/vertical'
import Horizontal from '../../demo/src/examples/horizontal'
storiesOf(' > InfiniteScroll', module)
.add('Vertical', () => <Vertical />)
.add('Horizontal', () => <Horizontal />)
|
docs/app/Examples/modules/Dimmer/Variations/index.js | clemensw/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const DimmerVariationsExamples = () => (
<ExampleSection title='Variations'>
<ComponentExample
title='Blurring'
desc... |
investninja-web-ui-app/src/frontend/index.js | InvestNinja/InvestNinja-web-ui | import React from 'react';
import ReactDOM from 'react-dom';
import App from './component/App';
import CarteiraBox from './component/Carteira/CarteiraBox';
import { AppContainer } from 'react-hot-loader';
import { overrideComponentTypeChecker } from 'react-toolbox';
import { Route, BrowserRouter } from 'react-router-do... |
src/svg-icons/file/cloud-upload.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloudUpload = (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.... |
components/card/card-content.js | Centroida/CentroUI | import React from 'react';
import {
asset,
Pano,
Text,
View,
Plane,
} from 'react-vr';
export default class CnCardContent extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
//Think about resizing images
<View st... |
src/js/components/Object.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import CSSClassnames from '../utils/CSSClassnames';
const CLASS_ROOT = CSSClassnames.OBJECT;
const LIST_ITEM = CSSClassnames.LIST_ITEM;
export default class GrommetObject... |
src/pages/About/About.js | moje-skoly/app-reloaded | import React from 'react';
import { Container, Row, Col } from 'reactstrap';
import './About.less';
const About = () => {
return (
<Container>
<Row>
<Col md={{ size: 6, offset: 3 }} sm={{ size: 8, offset: 2 }} xs={12}>
<div className="about">
<h1>O projektu <strong>Moje školy... |
spec/coffeescripts/react_files/components/NoResultsSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2015 - 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... |
src/svg-icons/image/panorama-horizontal.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaHorizontal = (props) => (
<SvgIcon {...props}>
<path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C... |
examples/pinterest/app.js | taion/rrtr | import React from 'react'
import { render } from 'react-dom'
import { browserHistory, Router, Route, IndexRoute, Link } from 'rrtr'
const PICTURES = [
{ id: 0, src: 'http://placekitten.com/601/601' },
{ id: 1, src: 'http://placekitten.com/610/610' },
{ id: 2, src: 'http://placekitten.com/620/620' }
]
const Moda... |
test/DropdownButtonSpec.js | pandoraui/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import DropdownButton from '../src/DropdownButton';
import DropdownMenu from '../src/DropdownMenu';
import MenuItem from '../src/MenuItem';
import { shouldWarn } from './helpers';
describe('DropdownButton', function() {
const simpleD... |
node_modules/antd/es/radio/radio.js | yhx0634/foodshopfront | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
examples/simple/index.js | bmcmahen/react-simple-menu | import React from 'react';
import ReactDOM from 'react-dom'
import App from './components/App';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
app/javascript/mastodon/features/ui/components/column_subheading.js | clworld/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
|
components/TopLink.js | isogon/styled-mdl-website | import React from 'react'
import { withRouter } from 'next/router'
import Link from 'next/link'
import styled, { css, keyframes } from 'styled-components'
import { Ripple } from 'styled-mdl'
const grow = keyframes`
from {
opacity: 0;
transform: scale3d(0, 1, 1);
}
to {
opacity: 1;
transform: scal... |
system/src/routes/Setting/containers/SettingViewContainer/index.js | axmatthew/react | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Map } from 'immutable';
import { fetch, update } from '../../../../modules/settings';
import SettingView from '../../components/SettingView';
class SettingViewContainer extends Component {
static propTypes = {
ui: React.Pr... |
frontend/app_v2/src/common/icons/Instagram.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
/**
* @summary Instagram Icon
* @component
*
* @param {object} props
*
* @returns {node} jsx markup
*/
function Instagram({ styling }) {
return (
<svg
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
fillRule="evenodd"
... |
shared/components/Story.js | AndrewGibson27/react-fetch-boilerplate | import React, { Component } from 'react';
import { connect, PromiseState } from 'react-refetch';
import Comments from './comments';
import { ColumnNine } from '../styles/grid';
const Story = ({
storyFetch,
match: { params: { id } }
}) => {
if (storyFetch.fulfilled) {
const { value: { headline, body } } = st... |
src/svg-icons/image/center-focus-weak.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCenterFocusWeak = (props) => (
<SvgIcon {...props}>
<path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-... |
src/svg-icons/hardware/laptop-chromebook.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopChromebook = (props) => (
<SvgIcon {...props}>
<path d="M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z"/>
</SvgIcon>
);
HardwareLaptopChromebook = pure(HardwareLaptopChromebook);
Har... |
src/components/GroupedCombobox/GroupedComboboxContainer.js | propertybase/react-lds | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { itemType } from '../Combobox/utils/constants';
import { BaseCombobox } from '../Combobox';
class GroupedComboboxContainer extends Component {
static propTypes = {
children: PropTypes.func.isRequired,
id: PropTypes.string.i... |
bemuse/src/flux/index.js | bemusic/bemuse | import Bacon from 'baconjs'
import React from 'react'
export { Bacon }
let lock = false
export function Action(transform = (x) => x) {
var bus = new Bacon.Bus()
var action = function () {
if (lock) {
throw new Error(
'An action should not fire another action! (' + lock.stack + ')'
)
}... |
src/main.js | bigtable2006/practice-04 | import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './store/createStore';
import AppContainer from './containers/AppContainer';
// ========================================================
// Store Instantiation
// ========================================================
const initialS... |
lib/js/shared/components/ExampleControls/index.js | jneander/learning | import React from 'react';
import IconPauseSolid from 'instructure-icons/lib/Solid/IconPauseSolid';
import IconPlaySolid from 'instructure-icons/lib/Solid/IconPlaySolid';
import IconRefreshSolid from 'instructure-icons/lib/Solid/IconRefreshSolid';
import Button from 'instructure-ui/lib/components/Button';
import Checkb... |
src/components/navigation/NavigationMenu.js | erkgmz/kailey-lp | import React from 'react';
import { Link, IndexLink } from 'react-router';
import { slide as Menu } from 'react-burger-menu';
import Radium from 'radium';
import styles from '../../styles/_NavigationMenu.scss';
import navItems from './navigationItemsData';
import hamburgerStyles from './hamburgerStyles';
class Navig... |
client/components/VolunteerGroupSelect.js | cadus/crewing | import React from 'react';
import _ from 'lodash';
import { Button, Pill } from 'elemental';
import Select from 'react-select';
import groupsJSON from '../../shared/groups.json';
const groups = groupsJSON.map(name => ({ value: name, label: _.startCase(name) }));
const statusMap = {
none: 'default',
pending: 'inf... |
blueocean-material-icons/src/js/components/svg-icons/communication/dialpad.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationDialpad = (props) => (
<SvgIcon {...props}>
<path d="M12 19c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2... |
tools/template/index/root/Root.dev.js | SteamerTeam/steamer-react | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from '../stores/configureStore';
import IndexWrapper from '../container/index';
import DevTools from '../../common/devtools/DevTools';
import { DEBUG } from '../constants/constants';
let store = configureStore();
... |
src/components/loader/index.js | thinktopography/reframe | import React from 'react'
import PropTypes from 'prop-types'
class Loader extends React.Component {
static propTypes = {
label: PropTypes.string
}
static defaultProps = {
label: 'Loading'
}
render() {
const { label } = this.props
return (
<div className="reframe-loader">
<div... |
app/javascript/mastodon/components/status_list.js | danhunsaker/mastodon | import { debounce } from 'lodash';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import StatusContainer from '../containers/status_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
import LoadGap from './load_gap... |
src/client/react/components/presentational/ScheduleErrorDisplay.js | nloomans/rooster.hetmml.nl | /**
* Copyright (C) 2018 Noah Loomans
*
* This file is part of rooster.hetmml.nl.
*
* rooster.hetmml.nl 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 op... |
jenkins-design-language/src/js/components/material-ui/svg-icons/device/network-wifi.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const DeviceNetworkWifi = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.01.01-.01 8.46-10.54C20.04 10.62 1... |
src/user-accounts/UserAccountsPage.js | binary-com/binary-next-gen | import React from 'react';
import WebPage from '../containers/WebPage';
import UserAccountsContainer from './UserAccountsContainer';
export default (props) => (
<WebPage>
<UserAccountsContainer {...props} />
</WebPage>
);
|
app/jsx/shared/ExternalToolModalLauncher.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - 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... |
test/Utils-spec.js | CurtisHumphrey/enzyme | import { describeWithDOM } from './_helpers.js';
import React from 'react';
import { expect } from 'chai';
import { mount } from '../src/';
import {
coercePropValue,
onPrototype,
getNode,
nodeEqual,
isSimpleSelector,
propFromEvent,
SELECTOR,
selectorType,
mapNativeEventNames,
} from '../src/Utils';
d... |
test/components/Label.spec.js | vpodolyan/documenter | import expect from 'expect'
import React from 'react'
import { shallow } from 'enzyme'
import Label from '../../src/components/Label'
function setup(fields, fieldName) {
const component = shallow(
<Label fields={fields} name={fieldName} />
)
return { component }
}
describe('Label component', () =... |
client/authentication/components/pages/restorePassword/RestorePassword.js | Haaarp/geo | import React from 'react';
import { connect } from 'react-redux';
import PreloaderButton from 'konux/common/components/PreloaderButton';
import FormWrap from 'konux/common/components/FormWrap';
import { StatusType } from './../../../constants';
import { checkValid } from 'konux/common/utils';
import { bindActionCreator... |
pkg/interface/link/src/js/components/lib/sidebar-invite.js | ngzax/urbit | import React, { Component } from 'react';
import classnames from 'classnames';
import _ from 'lodash';
export class SidebarInvite extends Component {
onAccept() {
api.invite.accept(this.props.uid);
}
onDecline() {
api.invite.decline(this.props.uid);
}
render() {
const { props } = this;
re... |
src/js/SecondPage_REMOTE_11688.js | merlox/dapp-transactions | import React from 'react'
import Header from './Header'
import { Link } from 'react-router-dom'
import './../stylus/index.styl'
import './../stylus/secondpage.styl'
import LINKS from './utils.js'
class SecondPage extends React.Component {
constructor(props){
super(props)
this.state = {
dialog1... |
test/menuFactory.spec.js | negomi/react-burger-menu | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-dom/test-utils';
import { assert, expect } from 'chai';
import sinon from 'sinon';
import createShallowComponent from './utils/createShallowComponent';
import createMountedComponent from './utils/createMountedCompon... |
demos/demo/src/components/Client/Input.js | bdjnk/cerebral | import React from 'react'
import {connect} from 'cerebral/react'
import {props, signal, state} from 'cerebral/tags'
import translations from '../../common/compute/translations'
export default connect(
{
enterPressed: signal`clients.enterPressed`,
escPressed: signal`clients.escPressed`,
value: state`clien... |
js/components/form/textArea.js | bengaara/simbapp |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Textarea, Body, Left, Right, IconNB } from 'native-base';
import { Actions } from 'react-native-router-flux';
import sty... |
client/src/util/react-mousetrap.js | irskep/summertunes | import React from 'react';
export function mouseTrap(Base){
return class extends React.Component {
constructor(props){
super(props);
this.__mousetrapBindings = [];
this.Mousetrap = require('mousetrap');
}
bindShortcut (key, callback) {
this.... |
src/components/__tests__/ui/button-test.js | npdat/Demo_React_Native | /**
* Test to check if the component renders correctly
*/
/* global it expect */
import { Alert } from 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Button from '@ui/Button';
// Default Button Press function
const onPress = () => Alert.alert('Hey Tester');
it('Button... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | lfontana/BrewsBrothersChillerFrontEnd | 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'));
|
src/TemplateContainer/Header.js | nienkebos/ExhibitionPlanner | import React from 'react';
import { Link } from 'react-router';
//STYLES//
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import {green200} from '../styles/colors';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton... |
rx-sandbox/creating-apps-with-observables/App.js | claycarpenter/node-sandbox | import React from 'react';
import {Counter} from './Counter';
import {Counter2} from './Counter2';
import {DelayCounter} from './DelayCounter';
export class App extends React.Component {
render() {
return (
<div>
<DelayCounter/>
</div>
);
}
}
|
sticky-notes/__tests__/No-tests.js | Zyst/learning-react | jest.autoMockOff();
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
describe('Application', () => {
it('is our starting point', () => {
expect(1).toEqual(1);
});
});
|
app/javascript/mastodon/components/__tests__/display_name-test.js | NS-Kazuki/mastodon | import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import DisplayName from '../display_name';
describe('<DisplayName />', () => {
it('renders display name + account name', () => {
const account = fromJS({
username: 'bar',
acct: 'bar@baz',
... |
src/react/JSONTree/JSONNullNode.js | threepointone/redux-devtools | import React from 'react';
import reactMixin from 'react-mixin';
import { SquashClickEventMixin } from './mixins';
import hexToRgb from '../../utils/hexToRgb';
const styles = {
base: {
paddingTop: 3,
paddingBottom: 3,
paddingRight: 0,
marginLeft: 14
},
label: {
display: 'inline-block',
ma... |
app/containers/HomePage/index.js | mamaracas/MEventsRegistration | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*/
import React from 'react';
import Helmet from 'react-helmet';
import {FormattedMessage} from 'react-intl';
import {connect} from 'react-redux';
import {createStructuredSelector} from 'reselect';
import {makeSelectRepos, makeSelect... |
src/js/components/Chart/stories/Point.js | grommet/grommet | import React from 'react';
import { Box, Chart, Heading } from 'grommet';
const values = [{ value: [10, 20] }, { value: [20, 30] }, { value: [30, 15] }];
export const Point = () => (
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={grommet}>
<Box direction="row-responsive" wrap p... |
src/components/NewsUpdates/NewsUpdates.js | Aquellex/aquellexws | import React from 'react';
import PropTypes from 'prop-types';
import styles from './NewsUpdates.module.css';
const NewsUpdates = ({ children }) => <div className={styles.newsUpdates}>{children}</div>;
NewsUpdates.propTypes = {
children: PropTypes.node.isRequired,
};
export default NewsUpdates;
|
docs/client/components/pages/Linkify/CustomComponentLinkifyEditor/index.js | dagopert/draft-js-plugins | import React, { Component } from 'react';
import { EditorState } from 'draft-js';
import Editor from 'draft-js-plugins-editor';
import createLinkifyPlugin from 'draft-js-linkify-plugin';
import editorStyles from './editorStyles.css';
const linkifyPlugin = createLinkifyPlugin({
component: (props) => (
// eslint-d... |
vendor/htmlburger/carbon-fields/assets/js/fields/components/oembed/index.js | FolsomCreative/storynav | /**
* The external dependencies.
*/
import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import { isEmpty, debounce } from 'lodash';
import { compose, withHandlers, setStatic, withState } from 'recompose';
/**
* The internal dependencies.
*/
impor... |
sandbox/src/components/Scanner.js | coreaps/public | import React from 'react';
import Quagga from '../../../../dist/quagga';
export default class Scanner extends React.Component {
static propTypes = {
onDetected: React.PropTypes.func,
onCancel: React.PropTypes.func,
config: React.PropTypes.object.isRequired,
};
constructor(props) {
... |
test/TableSpec.js | erictherobot/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Table from '../src/Table';
describe('Table', function () {
it('Should be a table', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Table />
);
assert.equal(React.findDOMNode(instance).nodeName,... |
dva/dva-quickstart/src/routes/IndexPage.js | imuntil/React | import React from 'react';
import { connect } from 'dva';
import styles from './IndexPage.css';
function IndexPage() {
return (
<div className={styles.normal}>
<h1 className={styles.title}>Yay! Welcome to dva!</h1>
<div className={styles.welcome} />
<ul className={styles.list}>
<li>To g... |
src/index.js | zzy348429898/gallery-by-react | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
docs/src/app/components/pages/components/GridList/ExampleComplex.js | rscnt/material-ui | import React from 'react';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
const styles = {
root: {
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'space-around',
},
gridLi... |
app/components/admin/step3/view.js | 7hci/surfboard | import React from 'react';
import { Page } from '../../shared/index';
const Step3 = (props) => {
const { handleClickSkip } = props;
return (
<Page
content={
<div className="card-block">
<p>
An e-mail has been sent to the new hire with instructions on how to complete the
... |
src/docs/examples/TextInput/ExampleError.js | thomashoggard/ps-react-tom | import React from 'react';
import TextInput from 'ps-react-tom/lib/TextInput';
/** Optional TextBox */
export default class ExampleOptional extends React.Component {
render() {
return (
<TextInput
htmlId="example-optional"
label="First Name"
name="firstname"
required
... |
src/version.js | CurtisHumphrey/enzyme | import React from 'react';
export const VERSION = React.version;
export const REACT013 = VERSION.slice(0, 4) === '0.13';
export const REACT014 = VERSION.slice(0, 4) === '0.14';
|
src/components/Toolbar/Toolbar.js | MinisterioPublicoRJ/inLoco-2.0 | import React from 'react'
import ToolbarMenu from '../ToolbarMenu/ToolbarMenu'
const Toolbar = ({
baseMaps,
globalFilterType,
layers,
loginStatus,
mapProperties,
places,
showSidebarRight,
toolbarActive,
tutela,
onChangeActiveBaseMap,
onClearPlaceTutelaLayer,
onContourCha... |
frontend/src/Movie/Index/Table/MovieIndexRow.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import HeartRating from 'Components/HeartRating';
import Icon from 'Components/Icon';
import IconButton from 'Components/Link/IconButton';
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
import RelativeDateCellConnector fro... |
geonode/contrib/monitoring/frontend/src/components/cels/response-time/index.js | simod/geonode | import React from 'react';
import PropTypes from 'prop-types';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
import styles from './styles';
class ResponseTime extends React.Component {
static propTypes = {
average: PropTypes.number.isRequired,
data: PropTypes.arra... |
blueprints/smart/files/__root__/containers/__name__.js | harijoe/redux-shooting-stars | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
type Props = {
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render() {
return (
<div></div>
)
}
}
const mapStateToProps = (state) => {
return {}
}
const ... |
sundin/source/constants/scenes.js | tkfeng/mppCalc | /**
* All screens and scenes in the app.
* Using React-Native-Router-Flux.
*
* Created by tkfeng on 4/8/17.
*/
import React from 'react';
import {
Actions,
Scene
} from 'react-native-router-flux';
import PreLoading from '../containers/preLoading'
import Menu from '../containers/menu';
import ShoutemExample fr... |
Client/__tests__/index.android.js | oaml/RApp | import 'react-native';
import React from 'react';
import Index from '../index.android.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/modules/article/index.js | fanfanlala/ZUO-React | import React from 'react'
import ReactDom from 'react-dom'
import App from './App'
ReactDom.render(
<App />,
document.getElementById('app')
)
|
yycomponent/pagination-table/Table.js | 77ircloud/yycomponent | import React from 'react';
import { Component, PropTypes } from 'react';
// import Child from './Child';
// import Request from 'common/Request';
import { Request } from 'yycomponent';
import actions from './actions';
import './reducer';
function enhancedPaginationTable(AntdTable) {
return class PaginationTable exte... |
src/components/common/TextWithIcon.js | jinqiupeter/mtsr | import React from 'react';
import {StyleSheet, Platform, View, Text, TouchableOpacity} from 'react-native';
import {Actions} from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/FontAwesome';
import {COLOR, SCREEN_WIDTH, SCREEN_HEIGHT} from '../../config';
export default ({
iconName, text,... |
docs/app/Examples/collections/Message/index.js | koenvg/Semantic-UI-React | import React from 'react'
import Types from './Types'
import States from './States'
import Variations from './Variations'
const MessageExamples = () => (
<div>
<Types />
<States />
<Variations />
</div>
)
export default MessageExamples
|
src/svg-icons/editor/border-right.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderRight = (props) => (
<SvgIcon {...props}>
<path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h... |
src/lib/RowIndent.js | maheshsenni/react-treelist | import React from 'react';
import PropTypes from 'prop-types';
import '../css/row-indent.css';
class RowIndent extends React.Component {
constructor(props) {
super(props);
this.displayName = 'RowIndent';
}
render() {
const { indent, reactKey } = this.props;
let indentDummies = null;
if (ind... |
src/components/RepoNote/RepoNote.js | Jac21/reponotesreact | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { css } from 'glamor';
import Message from '../Common/Message/Message';
const repoNoteLabel = css({
fontSize: `${1.175}rem`,
cursor: 'pointer'
});
const sectionDivider = css({
height: `${1}px`,
maxWidth: `${100}vw`,
margi... |
src/svg-icons/action/pregnant-woman.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPregnantWoman = (props) => (
<SvgIcon {...props}>
<path d="M9 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm7 9c-.01-1.34-.83-2.51-2-3 0-1.66-1.34-3-3-3s-3 1.34-3 3v7h2v5h3v-5h3v-4z"/>
</SvgIcon>
);
... |
docs/app/Examples/elements/Image/Groups/index.js | jcarbo/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ImageTypesExamples = () => (
<ExampleSection title='Groups'>
<ComponentExample
title='Size'
description='A grou... |
config/flow/definitions/react.js | richbai90/CS2810 | /* @flow */
// Note: we already have the definitions from
// https://github.com/facebook/flow/blob/master/lib/react.js
// so the below are merely helpful extensions
import React from 'react';
declare type $React$Element = React.Element<*>;
declare type $React$Node = string | number | $React$Element | Array<$React$E... |
packages/react-vis/src/legends/discrete-color-legend.js | uber-common/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.