path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/containers/Root.js | stefanwille/react-todo | import React from 'react'
import HomeView from 'views/HomeView/HomeView'
export default class Root extends React.Component {
static propTypes = {
};
render () {
return (
<div className='container'>
<HomeView/>
</div>
)
}
}
|
src/Select.js | geowarin/react-easy-form | import React from 'react';
import getNextId from './getNextId';
const isEmpty = (obj) => {
return Object.keys(obj).length === 0;
};
class Select extends React.Component {
constructor(...args) {
super(...args);
this.state = {
id: this.context.labelId || this.props.id || getNextId('select_')
};
... |
src/app.js | sentenza/react-iperblog | import ChartMonitor from 'redux-devtools-chart-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import Immutable from 'immutable';
import LogMonitor from 'redux-devtools-log-monitor';
import React from 'react';
import ReactDOM from 'react-dom';
import SliderMonitor from 'redux-slider-monitor';
import cr... |
src/browser/app/Root.js | TheoMer/Gyms-Of-The-World | // @flow
import BaseRoot from './BaseRoot';
import ElementsRenderer from 'found/lib/ElementsRenderer';
import LoadingBar from './LoadingBar';
import React from 'react';
import renderError from './renderError';
import routeConfig from './routeConfig';
import { ScrollManager } from 'found-scroll';
import { createConnecte... |
src/components/app.js | utkarshkpal/weather-app | import React, { Component } from 'react';
import SearchBar from '../containers/search_bar.js';
import WeatherList from '../containers/weather_list'
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
|
src/components/StickyBar/StickyBar.js | hologram-io/docs | import _ from 'lodash'
import React from 'react'
const HIDDEN_AT = 400;
const THROTTLE_SCROLL_MS = 150;
const SHOW_AT_SCROLLUP_SPEED = 135;
class StickyBar extends React.Component {
constructor(props) {
super(props);
this.lastPosition = 0;
}
componentDidMount() {
this.onScroll = _.throttle(this.o... |
app/javascript/mastodon/components/hashtag.js | clworld/mastodon | import React from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Permalink from './permalink';
import { shortNumberFormat } from '../utils/numbers';
const Hashtag = ({ hashtag }) ... |
spa/components/map-view.js | chadwilcomb/routemap2 | import app from 'ampersand-app'
import React from 'react'
import L from 'mapbox.js'
export default React.createClass({
displayName: 'MapView',
componentDidMount: function() {
const {features} = this.props;
if (features.features.length > 1000) {
features.features = features.features.slice(... |
src/components/Fixture/Fixture.js | footballhackday/hackday-example | 'use strict';
import React, { Component } from 'react';
import Button from 'react-bootstrap/lib/Button';
import Team from './Team';
import moment from 'moment';
export default class Fixture extends Component {
render() {
let fixture = this.props.fixture,
date = moment(fixture.scheduled_at),
... |
blueprints/component/files/src/components/__name__/__name__.js | hack-duke/hackduke-code-for-good-website | import React from 'react'
import classes from './<%= pascalEntityName %>.scss'
export const <%= pascalEntityName %> = () => (
<div className={classes['<%= pascalEntityName %>']}>
<h1><%= pascalEntityName %></h1>
</div>
)
export default <%= pascalEntityName %>
|
client/src/components/roles/rolePage.js | natalie-elizabeth/doczy | import React, { Component } from 'react';
import Roles from './createRole';
class RolePage extends Component {
render() {
return (
<div>
<Roles />
</div>
);
}
}
export default RolePage;
|
src/svg-icons/notification/personal-video.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPersonalVideo = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/>
</SvgIcon>
);
Notifi... |
src/components/Header/Header.js | MichalObi/redux-to-do-app | import React from 'react'
import { IndexLink, Link } from 'react-router'
import './Header.scss'
export const Header = () => (
<div>
<h1>React / Redux playground</h1>
<IndexLink to='/' activeClassName='route--active'>
Home
</IndexLink>
{' · '}
<Link to='/counter' activeClassName='route--acti... |
2-tools/2-redux/src/components/GridControls.js | taylor1791/cobble-react | import React, { Component } from 'react';
import Perf from 'react/lib/ReactDefaultPerf';
import ToggleButton from './ToggleButton';
export default class GridControls extends Component {
constructor(props) {
super(props);
this.state = {
frameId: null,
startedAt: null,
ticks: 0
};
}
... |
client/__tests__/index.android.js | damienomurchu/snapscreen | 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 />
);
});
|
server/sonar-web/src/main/js/apps/permission-templates/app.js | joansmith/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
jekyll-strapi-tutorial/api/admin/admin/src/utils/injectReducer.js | strapi/strapi-examples | import React from 'react';
import PropTypes from 'prop-types';
import hoistNonReactStatics from 'hoist-non-react-statics';
import getInjectors from './reducerInjectors';
/**
* Dynamically injects a reducer
*
* @param {string} key A key of the reducer
* @param {function} reducer A reducer that will be injected
*
... |
code/web/node_modules/react-router/es6/Link.js | zyxcambridge/RecordExistence | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
src-admin/src/Components/CustomCheckbox.js | ioBroker/ioBroker.admin | import { Checkbox, FormControlLabel, withStyles } from '@material-ui/core';
import React from 'react';
import clsx from 'clsx';
import I18n from '@iobroker/adapter-react/i18n';
import PropTypes from 'prop-types';
const styles = theme => ({
input: {
minWidth: 300
}
});
const CustomCheckbox = ({ title, ... |
packages/demo/stories/zoomable.js | zzarcon/skatepark.js | import React from 'react';
import {
storiesOf
} from '@kadira/storybook';
import 'skateparkjs-zoomable';
import options from './defaultStoryOptions';
storiesOf('Zoomable', module)
.addWithInfo('Default options', () => (
<sk-zoomable src="https://raw.githubusercontent.com/zzarcon/skatepark.js/master/art/logo.pn... |
internals/templates/containers/HomePage/index.js | Princess310/react-chat-exp | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... |
src/containers/FrontPageContainer.js | brookslyrette/reactit | import React, { Component } from 'react';
import { connect } from 'react-redux'
import { loadReddit, loadMoreItems, changeType, expandItem } from '../actions/redditActionCreators.js';
import Listing from '../components/Listing.js';
export class FrontPageContainer extends Component {
constructor(props) {
super... |
config/componentData.js | kenfly51/ps-react | module.exports = [{"name":"EyeIcon","description":"Eye Icon","code":"import React from 'react';\n\n/** Eye Icon */\nconst EyeIcon = () => {\n return (\n <div>\n +\n </div>\n );\n};\n\nexport default EyeIcon;","examples":[{"name":"ExampleSimpleIcon","description":"Simple Icon","code":"import React from 'rea... |
docs/app/Examples/collections/Grid/Variations/GridExampleEqualWidthColumn.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Grid, Segment } from 'semantic-ui-react'
const GridExampleEqualWidthColumn = () => (
<Grid columns='equal'>
<Grid.Column>
<Segment>1</Segment>
</Grid.Column>
<Grid.Column width={8}>
<Segment>2</Segment>
</Grid.Column>
<Grid.Column>
<Segment>3</... |
imports/ui/components/InputHint/InputHint.js | haraneesh/mydev | import React from 'react';
import PropTypes from 'prop-types';
import './InputHint.scss';
const InputHint = ({ children }) => (
<div className="InputHint">
{children}
</div>
);
InputHint.propTypes = {
children: PropTypes.node.isRequired,
};
export default InputHint;
|
app/pages/project/home/home-workflow-buttons.spec.js | zooniverse/Panoptes-Front-End | import React from 'react';
import assert from 'assert';
import { shallow } from 'enzyme';
import ProjectHomeWorkflowButtons from './home-workflow-buttons';
import ProjectHomeWorkflowButton from './home-workflow-button';
const testWorkflows = [
{ id: '2342',
configuration: { level: '1' },
display_name: 'Begi... |
src/svg-icons/image/camera.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCamera = (props) => (
<SvgIcon {...props}>
<path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4... |
node_modules/card-filters/src/server.js | nickolusroy/monster-book | import path from 'path';
import http from 'http';
import express from 'express';
import React from 'react';
export default function(config) {
const app = express();
const server = http.createServer(app);
app.use('/libs', express.static(path.join(__dirname, '../node_modules')));
app.use(express.static(config.webS... |
app/containers/RepoListItem/index.js | abasalilov/react-boilerplate | /**
* RepoListItem
*
* Lists the name and the issue count of a repository
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { FormattedNumber } from 'react-intl';
import { makeSelectCurrentUser } fro... |
index/components/AboutApi.js | JDRomano2/VenomKB | import React from 'react';
const AboutApi = () =>
<div>
<div className="jumbotron">
<div className="container">
<h2>REST API Documentation</h2>
<p>
VenomKB comes with a public web API for programmatic access to VenomKB data. The API is simple in comparison to that of most popular ... |
examples/huge-apps/routes/Messages/components/Messages.js | aastey/react-router | import React from 'react'
class Messages extends React.Component {
render() {
return (
<div>
<h2>Messages</h2>
</div>
)
}
}
export default Messages
|
src/icons/AssignmentReturnedIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class AssignmentReturnedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M38 6h-8.37c-.82-2.32-3.02-4-5.63-4s-4.81 1.68-5.63 4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 ... |
Skins/VetoccitanT3/ReactSrc/node_modules/react-awesome-slider/src/hoc/captioned-images/hoc.js | ENG-SYSTEMS/Kob-Eye | import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default function CaptionedHoc(WrappedComponent) {
return class extends Component {
static propTypes = {
screens: PropTypes.array.isRequired,
};
renderScreens() {
return this.props.screens.map((screen, index)... |
8.0.4/examples/asyncChangeValidation/dist/bundle.js | erikras/redux-form-docs | !function(t){function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var r={};n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__e... |
src/__tests__/App.js | rueian/ToDo | import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import Parse from 'parse';
describe('App', () => {
describe('_getFB', () => {
it('call FB sdk in to get profile with correct fields', () => {
let FB = {
api: jest.genMockFunction()
};... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | daretana90/angular | import React from 'react';
import { render } from 'react-dom';
// 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';
render(<HelloWorld />, document.getElementById('react-root'));
|
addons/actions/src/manager.js | nfl/react-storybook | import React from 'react';
import addons from '@storybook/addons';
import ActionLogger from './containers/ActionLogger';
import { ADDON_ID, PANEL_ID } from './';
export function register() {
addons.register(ADDON_ID, () => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Actio... |
Realization/frontend/czechidm-example/src/content/example-product/ExampleProductDetail.js | bcvsolutions/CzechIdMng | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import Joi from 'joi';
//
import { Basic, Utils } from 'czechidm-core';
import { ExampleProductManager } from '../../redux';
const manager = new ExampleProductManager();
/**
* Exam... |
site/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | shardulgo/shardulgo.github.io | 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'));
|
template/react/components/Hello.js | wanglei8381/wag-cli | import React from 'react'
export default ({name}) => {
return <h1>Hello {name}</h1>
}
|
node_modules/semantic-ui-react/dist/es/elements/Image/Image.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import _isNil from 'lodash/isNil';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { childrenUtils, createShorthandFactory, customPropTypes, getElementType, getUnhandledProps, META, SUI, useKeyOnly, useKeyOrValueA... |
actor-apps/app-web/src/app/components/modals/MyProfile.react.js | jamesbond12/actor-platform | /*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import React, { Component } from 'react';
import { Container } from 'flux/utils';
import Modal from 'react-modal';
import ActorClient from 'utils/ActorClient';
import { KeyCodes } from 'constants/ActorAppConstants';
import MyProfileActions from 'actions/MyPro... |
examples/js/manipulation/search-clear-table.js | echaouchna/react-bootstrap-tab | /* eslint max-len: 0 */
/* eslint no-console: 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;
prod... |
src/utils/childrenValueInputValidation.js | mengmenglv/react-bootstrap | import React from 'react';
import { singlePropFrom } from './CustomPropTypes';
const propList = ['children', 'value'];
export default function valueValidation(props, propName, componentName) {
let error = singlePropFrom(propList)(props, propName, componentName);
if (!error) {
error = React.PropTypes.node(pro... |
src/svg-icons/notification/phone-bluetooth-speaker.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneBluetoothSpeaker = (props) => (
<SvgIcon {...props}>
<path d="M14.71 9.5L17 7.21V11h.5l2.85-2.85L18.21 6l2.15-2.15L17.5 1H17v3.79L14.71 2.5l-.71.71L16.79 6 14 8.79l.71.71zM18 2.91l.94.94-.94.94... |
docs/app/Examples/elements/Button/Types/ButtonExampleLabeled.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleLabeled = () => (
<div>
<Button
content='Like'
icon='heart'
label={{ as: 'a', basic: true, content: '2,048' }}
labelPosition='right'
/>
<Button
content='Like'
icon='heart'
la... |
app/components/clock/clock.js | newtext/timer | import React from 'react';
export default class Clock extends React.Component {
static defaultProps = {
totalSeconds: 0,
}
static propTypes = {
totalSeconds: React.PropTypes.number.isRequired,
}
formatSeconds(totalSeconds) {
let seconds = totalSeconds % 60;
let minutes = Math.floor(totalSecon... |
src/index.spec.js | kovndr/braintree-dropin-react | /* eslint-disable */
import 'babel-polyfill'
import React from 'react'
import Enzyme, { shallow, mount } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16';
import { shallowToJson } from 'enzyme-to-json'
import braintree from 'braintree-web-drop-in'
import BraintreeDropin from '../dist'
Enzyme.configure({ ada... |
src/views/AboutView.js | todvora/extrade | import React from 'react'
import { Link } from 'react-router'
export class AboutView extends React.Component {
render () {
return (
<div className='container text-center'>
<h1>O aplikaci</h1>
<p>Aplikace Statistiky zahraničního obchodu funguje jako alternativní rozhraní k oficiálním statist... |
docs/client.js | Azerothian/react-bootstrap | import 'bootstrap/less/bootstrap.less';
import './assets/docs.css';
import './assets/style.css';
import './assets/carousel.png';
import './assets/logo.png';
import './assets/favicon.ico';
import './assets/thumbnail.png';
import './assets/thumbnaildiv.png';
import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemir... |
src/routes/TaxCalc.js | joshhunt/money | import React, { Component } from 'react';
import {Currency, Percent} from './../common';
import LightTheme from 'material-ui/lib/styles/raw-themes/light-raw-theme';
import TextField from 'material-ui/lib/text-field'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './../sty... |
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js | kritikasoni/smsss-react | import React from 'react'
import { reduxForm } from 'redux-form'
export const fields = []
const validate = (values) => {
const errors = {}
return errors
}
type Props = {
handleSubmit: Function,
fields: Object,
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
defaultProps = ... |
src/components/articles/wysiwyg/WYSIWYGbuttons.js | ghartong/react_falcor | import React from 'react'
class StyleButton extends React.Component {
constructor() {
super()
this.onToggle = (e) => {
e.preventDefault()
this.props.onToggle(this.props.style)
}
}
render() {
let className = 'RichEditor-styleButton'
if (this.p... |
frontend/src/containers/catalog_search_form/catalog_search_form.js | reabreu/discount-ascii-warehouse | import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../../actions';
import { heading2 } from '../../../styles/headings';
import RadioGroupStyle from '../../../styles/radio_group';
import RadioOptionStyle from '../../../styles/radio_option';
const Heading2 = headin... |
src/index.js | beni55/react-imageloader | import React from 'react';
const {PropTypes} = React;
const {span} = React.DOM;
const Status = {
PENDING: 'pending',
LOADING: 'loading',
LOADED: 'loaded',
FAILED: 'failed',
};
export default class ImageLoader extends React.Component {
static propTypes = {
wrapper: PropTypes.func,
className: PropTy... |
js/components/Header/3.js | LetsBuildSomething/vmag_mobile |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text } from 'native-base';
import { Actions } from 'react-native-router-flux';
import { actions } from 'react-native-navigation-redux-helpers';
import { openDra... |
src/views/toast/AppRegistryInjection.js | tielan/react-native-go | import { StyleSheet, View, AppRegistry } from 'react-native';
import React, { Component } from 'react';
import StaticContainer from 'static-container';
import EventEmitter from 'react-native/Libraries/vendor/emitter/EventEmitter';
const styles = StyleSheet.create({
container: {
flex: 1,
position: '... |
src/modules/auth/components/Login/Login.js | cltk/cltk_frontend | import React from 'react';
import PropTypes from 'prop-types';
import hello from 'hellojs';
import OAuthButtons from '../OAuthButtons';
import PWDLoginForm from '../PWDLoginForm';
import './Login.css';
hello.init({
facebook: process.env.REACT_APP_FACBOOK_CLIENT_ID,
twitter: process.env.REACT_APP_TWITTER_CLIENT_ID,
... |
examples/with-redux/src/client/index.js | jaredpalmer/react-production-starter | import React from 'react';
import { hydrate } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import App from '../common/containers/App';
const store = configureStore(window.__PRELOADED_STATE__);
hydrate(
<Provider store={store}>
<App />
<... |
app/components/search-layout.js | svtizg/svtizg.github.io | import React from 'react';
const SearchLayout = React.createClass({
render: function() {
return (
<div className="search">
<header className="search-header">
</header>
<div className="search-results">
{this.props.children}
</div>
<footer classNam... |
src/shared/components/form/formZipCode/formZipCode.js | alexspence/operationcode_frontend | import React, { Component } from 'react';
import FormInput from '../formInput/formInput';
class FormZipCode extends Component {
render() {
return (
<FormInput
{...this.props}
validationRegex={/(^\d{5}$)|(^\d{5}-\d{4}$)/}
validationErrorMessage="Must be a valid US zip code"
/>... |
src/app/ui/Page/Page.native.js | arikanmstf/mylibrary | /**
* Native Component Template By => create-module script
* @version 1.0.0
*
*/
// @flow
import React from 'react';
import type { Node } from 'react';
import { Container } from 'native-base';
import type { PageProps } from './types';
import defaultStyle from './style.json';
const Page = (props: PageProps): ?Nod... |
blueocean-material-icons/src/js/components/svg-icons/hardware/tablet-android.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const HardwareTabletAndroid = (props) => (
<SvgIcon {...props}>
<path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"/>
</SvgIcon>
);
HardwareTabletAndroid.displa... |
modules/users/client/components/ProfileEditLanguages.component.js | Trustroots/trustroots | // External dependencies
import { useTranslation } from 'react-i18next';
import { QueryClient, QueryClientProvider } from 'react-query';
import PropTypes from 'prop-types';
import React from 'react';
import { $broadcast } from '@/modules/core/client/services/angular-compat';
import LanguageSelect from '@/modules/core/... |
my-app/src/components/pages/projectpages/state/fearanger.js | sThig/jabbascrypt | import React from 'react';
import styled from 'styled-components';
import faceanni from '../../../../static/faceanni2.png';
import facedarth from '../../../../static/facedarth2.png';
import { Row, Col } from 'react-flexbox-grid';
import HitPoints from './hitpoints';
import Stats from './stats';
const SpecialAbilities ... |
test/DropdownMenuSpec.js | mcraiganthony/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import DropdownMenu from '../src/DropdownMenu';
import MenuItem from '../src/MenuItem';
describe('DropdownMenu', function () {
it('Should render menu correctly', function () {
let Parent = React.createClass({
render(){
... |
public/app/components/properties/properties-editor.js | vincent-tr/mylife-home-studio | 'use strict';
import React from 'react';
import * as mui from 'material-ui';
const PropertiesEditor = ({ id, value, type, useRealType, onChange }) => {
const onStringChange = (event) => {
event.stopPropagation();
onChange(event.target.value);
};
const onIntegerChange = (event) => {
event.stopPropa... |
web/src/js/__tests__/components/common/ToggleButtonSpec.js | StevenVanAcker/mitmproxy | import React from 'react'
import renderer from 'react-test-renderer'
import ToggleButton from '../../../components/common/ToggleButton'
describe('ToggleButton Component', () => {
let mockFunc = jest.fn()
it('should render correctly', () => {
let checkedButton = renderer.create(
<Toggle... |
app/components/Navbar.js | xdrt81y/newedenfaces-react | import React from 'react';
import {Link} from 'react-router';
import NavbarStore from '../stores/NavbarStore';
import NavbarActions from '../actions/NavbarActions';
class Navbar extends React.Component {
constructor(props) {
super(props);
this.state = NavbarStore.getState();
this.onChange = this.onChange... |
app/javascript/mastodon/features/account/components/header.js | lindwurm/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
import ImmutablePureComponent from 'react-immutable-pure-component';
impo... |
node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js | ddigioia/react_router_practice_1 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
packages/wix-style-react/src/ComposerSidebar/docs/examples.js | wix/wix-style-react | import React from 'react';
import {
Rename,
CropRotate,
MagicWand,
Adjust,
CutOut,
} from 'wix-ui-icons-common';
export const items = [
{
id: 0,
label: 'Crop & Rotate',
icon: <CropRotate />,
},
{
id: 1,
label: 'Enhance',
icon: <MagicWand />,
},
{
id: 2,
label: 'Adjus... |
src/svg-icons/communication/no-sim.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationNoSim = (props) => (
<SvgIcon {...props}>
<path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.... |
src/svg-icons/action/camera-enhance.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCameraEnhance = (props) => (
<SvgIcon {...props}>
<path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.2... |
lib/dashboard/components/errors/Category.js | gmrutilus/rutilus-analytics-node-js | /**
* Rutilus
*
* @homepage https://gmrutilus.github.io
* @license Apache-2.0
*/
import React from 'react';
import { connect } from 'react-redux';
import { Panel } from 'react-bootstrap';
import Group from './Group';
import { errorActions } from '../../actions/actions';
// How many errors to load every time?
c... |
src/navigators/TabNavigator.js | half-shell/react-navigation | /* @flow */
import React from 'react';
import { Platform } from 'react-native';
import createNavigator from './createNavigator';
import createNavigationContainer from '../createNavigationContainer';
import TabRouter from '../routers/TabRouter';
import TabView from '../views/TabView/TabView';
import type { TabViewCon... |
examples/todomvc/containers/App.js | bkniffler/redux-devtools | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import { Provider } from 'react-redux';
import *... |
app/components/CampaignProgress/index.js | ivanaairenee/donasee-fe | /**
*
* CampaignProgress
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { CampaignProgressElement } from './style';
import { Line } from 'rc-progress';
class CampaignProgress extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
return (
... |
components/InteriorLeftNav.js | hellobrian/carbon-components-react | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classnames from 'classnames';
import window from 'window-or-global';
import InteriorLeftNavList from './InteriorLeftNavList';
import InteriorLeftNavItem from './InteriorLeftNavItem';
import Icon from './Icon';
class InteriorLeftNav e... |
src/svg-icons/action/change-history.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionChangeHistory = (props) => (
<SvgIcon {...props}>
<path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"/>
</SvgIcon>
);
ActionChangeHistory = pure(ActionChangeHistory);
ActionChangeHistory.display... |
demo/components/StyleGuide.js | Adphorus/react-date-range | import React from 'react';
import PropTypes from 'prop-types';
import Logo from 'rsg-components/Logo';
import Markdown from 'rsg-components/Markdown';
import Styled from 'rsg-components/Styled';
const xsmall = '@media (max-width: 600px)';
const styles = ({ font, base, light, link, baseBackground, mq }) => ({
root: ... |
src/index.js | codyloyd/teamup | import React from 'react'
import ReactDOM from 'react-dom'
import Root from './components/root'
import './index.css'
import configureFirebase from './configureFirebase'
import configureStore from './configureStore'
import appReducer from './reducer'
// these imports are useful for testing.. but I keep them commented
... |
frontend/component/Signup.js | honggzb/practise_node | import React from 'react';
import jQuery from 'jquery';
import {signup} from '../lib/client';
import {redirectURL} from '../lib/utils';
export default class Signup extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleChange(name, e) {
this.state[name] = e.target.val... |
src/app/components/ViewC.js | flexpert/react-es6-fsm | /* eslint-disable */
import React from 'react';
import View from '../rfsm/View';
export default class ViewA extends View {
static TransitionTypes = {
GOTO_D: 'gotoD'
};
constructor(props) {
super(props);
this.goto = this.goto.bind(this);
this.state = {};
}
goto(state) {
this.next(thi... |
inc-decnum/src/App.js | Nodewarrior/react-examples | import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props)
this.state = {
click : 0,
show : true
}
}
incItem = () => {
this.setState({
click : this.state.click + 1
})
}
decItem = () => {
this.setState({
click : ... |
packages/material-ui-icons/src/BatteryChargingFull.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let BatteryChargingFull = props =>
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13... |
src/components/Checkbox.js | webcerebrium/ec-react15-lib | import React from 'react';
const Checkbox = (props) => {
const isChecked = String(props.value) === 'true';
const onChange = () => {
props.onChange(!isChecked);
};
const chkAtLeft = (!props.side || props.side === 'left');
const styles = {
forTop: { display: 'flex', alignItems: 'flex-start', cursor: 'p... |
app/javascript/mastodon/features/notifications/components/notifications_permission_banner.js | tootcafe/mastodon | import React from 'react';
import Icon from 'mastodon/components/icon';
import Button from 'mastodon/components/button';
import IconButton from 'mastodon/components/icon_button';
import { requestBrowserPermission } from 'mastodon/actions/notifications';
import { changeSetting } from 'mastodon/actions/settings';
import ... |
src/svg-icons/image/rotate-90-degrees-ccw.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageRotate90DegreesCcw = (props) => (
<SvgIcon {...props}>
<path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.7... |
frontend/Story/Container.js | fdemian/Morpheus | import React from 'react';
import { connect } from 'react-redux';
import Story from './Story';
import loadStory from './Actions';
const mapStateToProps = (state) => {
return {
story: state.story,
isLoggedIn: state.session.loggedIn,
oauthProviders: state.app.oauth
}
}
const mapDispatchToProps = (dispa... |
app/containers/NotFoundPage/index.js | rebeccavl/Rebecca-van-Loenen | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
*/
import React from 'react';
export default class NotFound extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
render() {
return (
<h1>
404: Not Found
... |
actor-apps/app-web/src/app/components/Login.react.js | x303597316/actor-platform | import _ from 'lodash';
import React from 'react';
import classNames from 'classnames';
import { Styles, RaisedButton, TextField } from 'material-ui';
import { AuthSteps } from 'constants/ActorAppConstants';
import Banner from 'components/common/Banner.react';
import LoginActionCreators from 'actions/LoginActionCre... |
resources/react/components/parts/Schedule.js | fetus-hina/stat.ink | import Impl from './schedule/Schedule';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchSchedule, scheduleTickTime } from '../../actions/schedule';
class Schedule extends Component {
constructor (...args) {
super(...args);
thi... |
src/components/LoginForm/LoginForm.js | shawnrmoss/react-material-ui-starter |
import React, { Component } from 'react';
import s from './LoginForm.scss';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import Paper from 'material-ui/lib/paper';
import TextField from 'material-ui/lib/text-field';
import Email from 'material-ui/lib/text-field';
import RaisedBut... |
src/svg-icons/editor/title.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorTitle = (props) => (
<SvgIcon {...props}>
<path d="M5 4v3h5.5v12h3V7H19V4z"/>
</SvgIcon>
);
EditorTitle = pure(EditorTitle);
EditorTitle.displayName = 'EditorTitle';
export default EditorTitle;
|
modules/Route.js | levjj/react-router | import React from 'react'
import warning from 'warning'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components } from './PropTypes'
const { string, bool, func } = React.PropTypes
/**
* A <Route> is used to declare which components are rendered to t... |
test/unit/components/UI/Card.spec.js | LN-Zap/zap-desktop | import React from 'react'
import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
import { Card } from 'components/UI'
describe('component.UI.Card', () => {
it('should render correctly', () => {
const tree = renderWithTheme(<Card>content</Card>).toJSON()
expect(tree).toMatchSnapshot()
... |
example/examples/LoadingMap.js | palexs/react-native-maps | import React from 'react';
import {
Text,
View,
Dimensions,
StyleSheet,
} from 'react-native';
import MapView from 'react-native-maps';
import flagImg from './assets/flag-blue.png';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGI... |
src/asLayout/layout.spec.js | obartra/reflex | import React from 'react'
import { render } from 'react-testing-library'
import asLayout from './index'
import Layout from '../layout'
describe('asLayout', () => {
it('should allow wrapping any element into a Layout', () => {
const Span = asLayout('span')
const { container } = render(<Span />)
expect(co... |
src/lib/plot/grid-lines.js | jameskraus/react-vis | // Copyright (c) 2016 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, merge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.