path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
client/extensions/woocommerce/woocommerce-services/components/settings-group-card/index.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
/**
* Internal dependencies
*/
import CompactCard from 'components/card/compact';
import FormSectionHeading from 'components/forms/form-section-heading';
const Setting... |
examples/counter/index.js | witer5/redux | import React from 'react';
import App from './containers/App';
React.render(
<App />,
document.getElementById('root')
);
|
src/components/views/board-market-brokerage-table.js | HuangXingBin/goldenEast | import React from 'react';
import { Table,Button } from 'antd';
import { Link } from 'react-router';
import weiGuDong from '../../appConstants/assets/images/微股东.png';
import normalCard from '../../appConstants/assets/images/普卡.png';
import silverCard from '../../appConstants/assets/images/银卡.png';
import goldenCard fro... |
client/src/components/NotFound.js | bwuphan/raptor-ads | import React from 'react';
import { Link } from 'react-router';
import { Item, Statistic, Container, Grid } from 'semantic-ui-react';
const NotFound = () =>
<Container textAlign="center" className="notFound">
<Grid width={16}>
<Grid.Column width={4} />
<Grid.Column width={8}>
<Item.Image
... |
scripts/components/pages/doc/docBase.js | evilfaust/lyceum9sass | import React from 'react';
import Docs from '../../ui/docs';
class DocsBase extends React.Component {
constructor(props) {
super(props);
this.displayName = 'DocsBase';
}
render() {
return (
<div>
<div className="info-doc-primary"><h4>Основные документы</h4></div>
... |
internals/templates/containers/HomePage/index.js | Third9/mark-one | /*
* 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... |
app/javascript/mastodon/features/compose/components/upload_button.js | summoners-riftodon/mastodon | import React from 'react';
import IconButton from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 're... |
scripts/apps/search/directives/ItemList.js | gbbr/superdesk-client-core | /* eslint-disable react/no-render-return-value */
// TODO(*): Fix above?
import React from 'react';
import ReactDOM from 'react-dom';
import {ItemList as ItemListComponent} from 'apps/search/components';
ItemList.$inject = [
'$location',
'$timeout',
'$injector',
'$filter',
'search',
'datetime... |
example/examples/LiteMapView.js | parkling/react-native-maps | import React from 'react';
import {
StyleSheet,
Dimensions,
ScrollView,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LATITUDE_DELTA = 0.0922;... |
src/js/date/components/controls.js | ocamler/expense-www | import $ from 'jquery';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../actions';
@connect(
null,
actions
)
export default class extends Component {
onSubmit(e) {
$(this).prop("disabled", true);
this.props.submit_form();
}
render() {
... |
app/containers/LanguageProvider/index.js | mrprim/mindfog | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
src/frontend/components/Loading/index.js | jsonnull/aleamancer | // @flow
import React from 'react'
import styled, { keyframes } from 'styled-components'
import spinner from './spinner.svg'
import { colors } from 'frontend/styles/common'
const Container = styled.div`
display: flex;
flex-direction: column;
align-items: stretch;
position: absolute;
background: ${colors.blue... |
src/routes/Home/components/HomeView.js | wilwong89/didactic-web-game | import React from 'react'
import MemeImage from '../assets/meme.jpg'
import './HomeView.scss'
export const HomeView = () => (
<div>
<h4>Welcome!</h4>
<img alt='This is a meme, because Bryan demanded it!' className='meme' src={MemeImage} />
</div>
)
export default HomeView
|
src/features/tab-view/settings/index.js | rldona/react-native-tab-view-seed | import React, { Component } from 'react';
import {
TouchableOpacity,
Text,
View,
Alert,
ToastAndroid,
ScrollView,
StyleSheet,
Dimensions
} from 'react-native';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as historialActions from '../../../redux/actions/histo... |
admin/client/Signin/Signin.js | danielmahon/keystone | /**
* The actual Sign In view, with the login form
*/
import assign from 'object-assign';
import classnames from 'classnames';
import React from 'react';
import xhr from 'xhr';
import Alert from './components/Alert';
import Brand from './components/Brand';
import UserInfo from './components/UserInfo';
import LoginF... |
client/utils/router.js | quarterto/almanac | import * as reactiveHistory from 'meteor/quarterto:reactive-history'
import { withTracker } from 'meteor/react-meteor-data'
import React from 'react'
import { route_ } from 'boulevard'
import { compose, lifecycle, withProps } from 'recompact'
export const { link, setUrl, navigate: go, state, history } = reactiveHistor... |
pootle/static/js/editor/index.js | claudep/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import assign from 'object-assign';
import React from 'rea... |
src/svg-icons/action/cached.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCached = (props) => (
<SvgIcon {...props}>
<path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.... |
src/native/components/Auth/SignupForm.js | asha-nepal/AshaFusionCross | /**
* Copyright 2017 Yuichiro Tsuchiya
*
* Licensed 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
examples/tree-view/index.js | edge/redux | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import Node from './containers/Node'
import configureStore from './store/configureStore'
import generateTree from './generateTree'
const tree = generateTree()
const store = configureStore(tree)
... |
src/svg-icons/social/plus-one.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPlusOne = (props) => (
<SvgIcon {...props}>
<path d="M10 8H8v4H4v2h4v4h2v-4h4v-2h-4zm4.5-1.92V7.9l2.5-.5V18h2V5z"/>
</SvgIcon>
);
SocialPlusOne = pure(SocialPlusOne);
SocialPlusOne.displayName = 'Social... |
fields/types/text/TextFilter.js | andrewlinfoot/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
FormField,
FormInput,
FormSelect,
SegmentedControl,
} from '../../../admin/client/App/elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
const MODE_OPTIONS = [
{ la... |
frontend/component/Header.js | sijia-c/practice-node-project | import React from 'react';
import {Link} from 'react-router';
import {loginUser, logout, notificationCount} from '../lib/client';
export default class Header extends React.Component{
constructor(props){
super(props);
this.state={};
}
componentDidMount(){
loginUser()
.then(user => this.setState... |
src/components/Footer/Footer.js | ResistanceCalendar/resistance-calendar-frontend | import React from 'react';
import { Link } from 'react-router-dom';
import { Copyright } from '../';
import styles from './Footer.sass';
function footerLinks() {
/* eslint-disable jsx-a11y/href-no-hash */
return (
<div className={styles.linksWrapper}>
<Link to="/">Home</Link>
<a
href="htt... |
examples/todos/src/components/Todo.js | pavelivanov/redaction | import React from 'react'
import PropTypes from 'prop-types'
import actions from '../actions'
const Todo = ({ todo }) => (
<li
onClick={() => actions.todos.toggleItem(todo.id)}
style={{
textDecoration: todo.completed ? 'line-through' : 'none'
}}
>
{todo.text}
</li>
)
Todo.propTypes = {
... |
example/src/screens/types/DummyScreen.js | yusufyildirim/react-native-navigation | import _ from 'lodash';
import React, { Component } from 'react';
import {
View,
ScrollView,
Dimensions,
Text,
StyleSheet,
Button,
PixelRatio
} from 'react-native';
import {NavigationToolBarIOS} from 'react-native-navigation';
const {width} = Dimensions.get('window');
class DummyScreen extends Componen... |
widgets/src/callout/callout.js | joshferrell/hapi-maily | import React from 'react';
import PropTypes from 'prop-types';
const Callout = ({ title, text }) => (
<mj-section full-width="full-width" padding-top="0" padding-bottom="0">
<mj-column>
<mj-text font-size="15" padding-bottom="0">
<h2 style={{ fontWeight: 'normal' }}>{title}</h2>... |
fields/types/number/NumberColumn.js | Yaska/keystone | import React from 'react';
import numeral from 'numeral';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var NumberColumn = React.createClass({
displayName: 'NumberColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTyp... |
client/reactComponents/Barrel.js | ourvrisrealerthanyours/tanks | import React from 'react';
const Barrel = (props) => {
const position = props.position || '0 0 0';
const rotation = props.rotation || '0 0 0';
const barrelLength = props.barrelLength || 6;
// TODO: Make better turret angle interpolator
if(props.fireEvent) {
return (
<a-entity class='barrel'
p... |
spec/sections/LinkSection.js | react-fabric/react-fabric | import React from 'react'
import Link from '../../src/Link'
const LinkSection = () => (
<section>
<h2>Link</h2>
<Link href="http://react-fabric.github.io" title="docs">Docs</Link>
</section>
)
export default LinkSection
|
src/components/Spinner.js | blaqbern/report-generator | import React from 'react'
import styles from './css/Spinner.css'
export default function Spinner({
fetching,
putting,
item,
}) {
return (
<div>
<span className={styles.spinner}></span>
{fetching ? <span>{`Fetching ${item}`}</span> : null}
{putting ? <span>{`Creating ${item}`}</span> : nul... |
client/index.js | kasonjim/interviewer.dc | //import PropTypes from 'prop-types';
import React from 'react'
import ReactDOM from 'react-dom'
import App from './Components/App.jsx'
// import {browserHistory} from 'react-router'
// import makeRoutes from './routes'
// const routes = makeRoutes()
ReactDOM.render(
<App />, document.getElementById('app')
)... |
frontend/src/components/PublicFooter.js | carlosascari/opencollective-website | import React from 'react';
export default () => {
return (
<div className='PublicFooter px2'>
<div className='container clearfix'>
<div className='left pt3'>
<svg width='14' height='14' className='inline-block align-middle mr1'>
<use xlinkHref='#svg-isotype' fill='#7FADF2'/>
... |
src/svg-icons/content/unarchive.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentUnarchive = (props) => (
<SvgIcon {...props}>
<path d="M20.55 5.22l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.4... |
frontend/components/SecurityTrendsList.js | zhangmingkai4315/SecurityTrend | // import _ from 'lodash';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { ListView, View, ActivityIndicator, RefreshControl } from 'react-native';
import { securityTrendsFetch } from '../actions';
import SecurityTrendItem from './SecurityTre... |
src/components/atoms/Card/index.js | ygoto3/artwork-manager | // @flow
import React from 'react';
import styles from './styles.css';
export type CardProps = {
children: React$Element<any>;
};
export const Card = ({ children, ...otherProps }: CardProps) => (
<section className={styles.container} {...otherProps}>{children}</section>
);
Object.assign(Card, {
displayName: ... |
modules/Redirect.js | malte-wessel/react-router | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL path a client should
... |
src/svg-icons/notification/vibration.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationVibration = (props) => (
<SvgIcon {...props}>
<path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0... |
test/helpers/shallowRenderHelper.js | pzli/galleryByReact | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/svg-icons/action/https.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-... |
app/addons/setup/components/MultipleNodeController.js | apache/couchdb-fauxton | // Licensed 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed un... |
src/routes/contact/index.js | langpavel/react-starter-kit | /**
* 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 Layout from '../../co... |
src/components/pages/QueryingTheAPI.js | gorgias/gorgias-docs | import React from 'react'
import {JSONTree} from './../JsonTree'
import {Code} from './../../utils'
export const QueryingTheAPI = () => (
<div id="querying-the-api" className="section">
<div className="wrap">
{/* Left Column */}
<div className="column left">
{/* D... |
src/components/Player.js | hedgepigdaniel/gnomocracy | import React from 'react'
import { connect } from 'react-redux'
import Link from 'redux-first-router-link'
import styles from '../css/Video'
const Player = ({ playing, youtubeId, slug, color }) =>
!playing
? <div
className={styles.heroContainer}
style={{ backgroundImage: youtubeBackground(youtubeId)... |
wwwroot/app/src/components/base/modal/AlertModal.js | AlinCiocan/FoodPlanApp | import React from 'react';
import Modal from './Modal';
import Button from '../buttons/Button';
const AlertModal = (props) => {
return (
<Modal
isOpen={props.isOpen}
contentLabel={props.title}
>
<div className="pes-alert-modal">
<h2 className="pes... |
src/webapp/components/sliders/StatisticsSlider.js | nus-mtp/cubist | import React from 'react';
import classnames from 'classnames';
import Slider from 'react-slick';
import Immutable from 'immutable';
class StatisticsSlider extends React.Component {
static propTypes = {
snapshots: React.PropTypes.instanceOf(Immutable.Map),
statistics: React.PropTypes.instanceOf(Immutable.Lis... |
react/features/app/components/AbstractApp.js | bickelj/jitsi-meet | import React, { Component } from 'react';
import {
localParticipantJoined,
localParticipantLeft
} from '../../base/participants';
import {
appNavigate,
appWillMount,
appWillUnmount
} from '../actions';
/**
* Default config.
*
* @type {Object}
*/
const DEFAULT_CONFIG = {
configLocation: '.... |
js/components/CSIconCell.js | kilimondjaro/react-native-couchsurfing-app | // @flow
import React from 'react';
import {
TouchableOpacity,
Text,
Image,
StyleSheet
} from 'react-native';
type Props = {
icon: any;
title: string;
onPress?: () => void;
};
export default function CSIconCell(props: Props) {
return (
<TouchableOpacity
onPress={props.onPress}
style={s... |
src/svg-icons/av/fiber-new.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFiberNew = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM8.5 15H7.3l-2.55-3.5V15H3.5V9h1.25l2.5 3.5V9H8.5v6zm5-4.74H11v... |
scripts/index.js | jiangli373/react-proto | 'use strict';
import '../css/style.css';
import React from 'react';
import Router from 'react-router';
import { DefaultRoute, Redirect, Link, Route, RouteHandler } from 'react-router';
import App from './App';
import PagePannel from './PagePannel';
import CanvasPannel from './CanvasPannel';
let routes=(
<Route name=... |
components/format_panel.js | volodalexey/spachat | import React from 'react'
import Location_Wrapper from './location_wrapper'
const FormatPanel = React.createClass({
getDefaultProps() {
return {
mainContainer: {
"element": "div",
"config":{
"class": "btnEditPanel flex-align-c ",
"data": {
"role": 'btnEdi... |
client/components/Comments.js | fleemaja/polls-app-v2 | import React from 'react';
import Paper from 'material-ui/Paper';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
import { blue500 } from 'material-ui/styles/colors';
const Comments = React.createClass({
getInitialState() {
return ({ author: "", comment: "", aE... |
app/components/team/Pipelines/chooser.js | buildkite/frontend | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import shallowCompare from 'react-addons-shallow-compare';
import AutocompleteDialog from 'app/components/shared/Autocomplete/Dialog';
import Button from 'app/components/shared/Button';
import Emojify from 'app/comp... |
src/svg-icons/navigation/close.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationClose = (props) => (
<SvgIcon {...props}>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</SvgIcon>
);
NavigationClose = pure(Navig... |
simpleFetch/src/Home.js | fengnovo/webpack-react | import React from 'react'
import ReactDOM from 'react-dom'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { fetchHomeData, fetchNextData, fetchingNextData,fetchDetailData, markScrollY } from './actions'
let date = 20170530
class Home extends React.Component {
constructor (props)... |
src/components/offlineWrapper/index.js | LiskHQ/lisk-nano | import React from 'react';
import { connect } from 'react-redux';
import styles from './offlineWrapper.css';
export const OfflineWrapperComponent = props => (
<span className={!props.offline ? '' : styles.isOffline}>
{ props.children }
</span>
);
const mapStateToProps = state => ({
offline: state.loading &... |
src/svg-icons/editor/border-outer.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderOuter = (props) => (
<SvgIcon {...props}>
<path d="M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z"/>
</SvgIcon>
);
EditorBorderOuter =... |
node_modules/babel-plugin-react-transform/test/fixtures/code-class-extends-component-with-render-method/actual.js | jasonlarue/react-native-flashcards | import React, { Component } from 'react';
class Foo extends Component {
render() {}
}
|
src/index.js | bcbcarl/react-c3js | import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
let c3;
class C3Chart extends React.Component {
static get displayName() {
return 'C3Chart';
}
static get propTypes() {
return {
data: PropTypes.object.isRequired,
title: PropTypes.object,... |
step7-unittest/node_modules/react-router/modules/RoutingContext.js | jintoppy/react-training | import React from 'react'
import RouterContext from './RouterContext'
import warning from './routerWarning'
const RoutingContext = React.createClass({
componentWillMount() {
warning(false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://t... |
example/components/PageMenu.react.js | Neophy7e/react-bootstrap-typeahead | import React from 'react';
import {AutoAffix} from 'react-overlays';
import {Nav} from 'react-bootstrap';
const PageMenu = props => (
<AutoAffix>
<div
className="bs-docs-sidebar hidden-print hidden-xs hidden-sm"
role="complementary">
<Nav className="bs-docs-sidenav">
{props.children}
... |
packages/react/src/components/atoms/links/DecorativeLink/DecorativeLink.stories.js | massgov/mayflower | import React from 'react';
import { StoryPage } from 'StorybookConfig/preview';
import IconDownload from 'MayflowerReactBase/Icon/IconDownload';
import DecorativeLink from './index';
import DecorativeLinkDocs from './DecorativeLink.md';
const Template = (args) => <DecorativeLink {...args} />;
export const DecorativeL... |
src/routes/Users.js | caijinchun/hsweb-antd | import React from 'react';
import { connect } from 'dva';
import styles from './Users.css';
import UsersComponent from '../components/Users/Users';
import MainLayout from '../components/MainLayout/MainLayout';
function Users({ location }) {
return (
<MainLayout location={location}>
<div className={styles.n... |
src/AboutMe.js | ZacharyCalvert/ZachCalvert | import React, { Component } from 'react';
import './style/about.css';
class AboutMe extends Component {
render() {
return (
<div className="col-sm-3 col-sm-offset-1 hidden-xs sidebar">
<div id="about" className="sidebar-module sidebar-module-inset">
<h4>About Me</h4>
<... |
example/js/components/DDPTestComponent.js | c58/marsdb-sync-client | import React from 'react';
import TodoModel from '../models/Todo.model';
import * as MarsClient from 'marsdb-sync-client';
export default class DDPTestComponent extends React.Component {
state = {
messages: ['Started'],
};
componentDidMount() {
TodoModel.find({}, {sub: ['allTodos']}).observe((todos) =>... |
internals/templates/app.js | jdm85kor/sentbe | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
/* eslint-disable import/no-unresolved, import/extensions */
// Load the manifest.json file and the .htaccess file
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].... |
app/stories/button.js | manavsehgal/reactspeedcoding | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
storiesOf('Button', module)
.add('with text, default color', () => (
<button className="button default" onClick={action('clicked')}>My First Button</button>
))
.add('with icon, primary color', () => (
<button className="but... |
src/svg-icons/hardware/laptop.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptop = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/>
</SvgIcon>
);
HardwareLaptop = pure(Hardwa... |
app/js/components/Header.js | azazdeaz/react-gsap-enhancer-react-router-example | 'use strict';
import React from 'react';
class Header extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<header>
Header
</header>
);
}
}
export default Header; |
src/components/LoginForm/LoginForm.js | Rosita13/react-redux | import React, { Component } from 'react';
import { reduxForm, Field, propTypes } from 'redux-form';
import loginValidation from './loginValidation';
@reduxForm({
form: 'login',
validate: loginValidation
})
export default class LoginForm extends Component {
static propTypes = {
...propTypes
}
renderInput... |
schema/graphQLSchema.js | ramsaylanier/ApolloPress | import React from 'react';
import {
GraphQL,
GraphQLSchema,
GraphQLEnumType,
GraphQLBoolean,
GraphQLObjectType,
GraphQLID,
GraphQLString,
GraphQLInt,
GraphQLNonNull,
GraphQLList
} from 'graphql';
import {
connectionArgs,
connectionDefinitions,
connectionFromPromisedArray,
globalIdField
} f... |
src/svg-icons/device/nfc.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceNfc = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2... |
app/javascript/mastodon/features/lists/components/new_list_form.js | Kirishima21/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from '../../../actions/lists';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
const messages = def... |
docs/pages/customization/theming.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'customization/theming';
const requireDemo = require.context('docs/src/pages/customization/theming', false, /\.(js|tsx)$/);
const ... |
src/components/EditPost.js | jackiejohnston/redux-readable | import React from 'react'
import PropTypes from 'prop-types'
import { withRouter, Link, Redirect } from 'react-router-dom'
import { connect } from 'react-redux'
import { updatePost } from '../actions'
class EditPost extends React.Component {
state = {
id: this.props.location.state.id,
title: this.props.loc... |
docs/app/Examples/elements/Button/Groups/ButtonExampleGroupIcon.js | ben174/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupIcon = () => (
<div>
<Button.Group>
<Button icon='align left' />
<Button icon='align center' />
<Button icon='align right' />
<Button icon='align justify' />
</Button.Group>
{' '}
<But... |
examples/react-es6/CheckboxWithLabel.js | aduyng/jest | import React from 'react';
class CheckboxWithLabel extends React.Component {
constructor(props) {
super(props);
this.state = {isChecked: false};
// since auto-binding is disabled for React's class model
// we can prebind methods here
// http://facebook.github.io/react/blog/2015/01/27/react-v0.1... |
index.js | artemkaint/react-chartist | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
class ChartistGraph extends React.Component {
displayName = 'ChartistGraph';
componentWillReceiveProps(newProps) {
this.updateChart(newProps);
}
componentWillUnmount() {
if (this.chartist) {
try {
this.chartist... |
src/components/Header/Header.js | DaveyEdwards/myiworlds | /**
* 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/Event/components/formSteps/AddEventStep2.js | jirkae/hobby_hub | /* global google */
import React, { Component } from 'react';
import { Button, FormGroup, ControlLabel, FormControl, Col } from "react-bootstrap";
import TagsSuggestInput from "./../../../Base/components/TagsSuggestInput";
import { fetchCities } from './../../../Base/services/restApi';
class AddEventStep2 extends Co... |
packages/core/src/icons/components/Mapping.js | iCHEF/gypcrete | import React from 'react';
export default function SvgMapping(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 32 32"
{...props}
>
<path
data-name="\u30D1\u30B9 981"
d="M22.501 15h-13a1 1 0 010-2h13a1 1 0 010 2... |
app/components/map/info-banner/index.js | Vizzuality/forest-watcher | // @flow
import type { Alert } from 'types/alerts.types';
import type { MapItemFeatureProperties } from 'types/common.types';
import type { ViewStyle } from 'types/reactElementStyles.types';
import React, { Component } from 'react';
import { Image, Platform, Text, TouchableHighlight, TouchableNativeFeedback, View } fr... |
src/modules/widget/ButtonGroup.js | lenxeon/react | "use strict"
import React from 'react'
import classnames from 'classnames'
import getGrid from './higherorder/grid'
import { requireCss } from './themes'
requireCss('buttons')
requireCss('button-groups')
@getGrid
class Button extends React.Component {
static displayName = 'Button'
static cls = 'button-group';
... |
src/containers/toputilizers/components/TopUtilizersHistogram.js | kryptnostic/gallery | import React from 'react';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import moment from 'moment';
import { Button, DropdownButton, MenuItem } from 'react-bootstrap';
import { Constants } from 'lattice';
import EdmConsts from '../../../utils/Consts/EdmConsts';
import styles from '../styles.... |
docs/src/app/components/pages/components/TimePicker/ExampleInternational.js | verdan/material-ui | import React from 'react';
import TimePicker from 'material-ui/TimePicker';
const TimePickerInternational = () => (
<div>
<TimePicker
hintText="Custom Labels"
okLabel="确定"
cancelLabel="取消"
/>
</div>
);
export default TimePickerInternational;
|
app/src/components/Folder/FolderFeeds.js | GetStream/Winds | import PropTypes from 'prop-types';
import React from 'react';
import { Waypoint } from 'react-waypoint';
import { connect } from 'react-redux';
import ArticleListItem from '../ArticleListItem';
import EpisodeListItem from '../EpisodeListItem';
import Loader from '../Loader';
import { getFolderFeeds } from '../../api/... |
app/javascript/mastodon/features/list_timeline/index.js | ashfurrow/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnBackButton from '../../co... |
src/parser/priest/holy/modules/core/EchoOfLightMastery.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import SpellIcon from 'common/SpellIcon';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import HealingDone from... |
src/Parser/BalanceDruid/Modules/Features/SolarEmpowerment.js | mwwscott0/WoWAnalyzer | import React from 'react';
import Icon from 'common/Icon';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Module from 'Parser/Core/Module';
import SPELLS from 'common/SPELLS';
import ResourceTypes from 'common/RESOURCE_TYPES';
class SEmpowerment extends Module {
isSolarWrath(event) {
c... |
app/javascript/mastodon/features/picture_in_picture/index.js | koba-lab/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Video from 'mastodon/features/video';
import Audio from 'mastodon/features/audio';
import { removePictureInPicture } from 'mastodon/actions/picture_in_picture';
import Header from './components/header';
import F... |
src/routes/index.js | 879479119/Github-Mobile | import React from 'react'
import { Route, Switch, Redirect } from 'react-router'
import { HashRouter } from 'react-router-dom'
import Internationalization from '../i18n/Internationalization'
import Home from '../layouts/Home'
import User from '../views/User'
import SearchResult from '../views/SearchResult'
import Tren... |
Front-End/components/solutionexplorer.component.js | brandonrninefive/prIDE | import React from 'react';
import ReactDOM from 'react-dom';
import {Grid, Row, Col, Button, FormGroup, FormControl} from 'react-bootstrap';
import ResponsiveFixedDataTable from 'responsive-fixed-data-table';
import {Column, Cell} from 'fixed-data-table';
import ExplorerCell from './explorercell.component';
class Solut... |
stories/common/index.js | BitLooter/Stuffr-frontend | import React from 'react'
import { Provider } from 'react-redux'
import i18next from 'i18next'
import { storiesOf } from '@storybook/react'
import { action as storybookAction } from '@storybook/addon-actions'
import locale from '../../app/locales/main/en.json'
import * as apiActions from '../../app/main/actions/api'
i... |
Root.js | CostSheetApp/CostSheetsApp | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import routes from '../routes';
import { Router } from 'react-router';
export default class Root extends Component {
render() {
const { store, history } = this.props;
return (
<Provider... |
src/routes.js | bharney/YogaMarieMills | import React from 'react';
import { Route, IndexRoute, browserHistory } from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import CoursesPage from './components/course/CoursesPage';
import ManageCoursePage from './components/course/ManageCoursePage';
import BlogP... |
packages/wix-style-react-test-runtime/src/puppeteer-testkit/App.js | wix/wix-style-react | import React from 'react';
import Button from 'wix-style-react/dist/src/Button';
import Heading from 'wix-style-react/dist/src/Heading';
class App extends React.Component {
state = {
clicked: false,
};
render() {
return (
<div>
<Button
dataHook="action-button"
onClick={(... |
src/svg-icons/action/translate.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTranslate = (props) => (
<SvgIcon {...props}>
<path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.7... |
lib/cli/generators/METEOR/template/.stories/index.js | jribeiro/storybook | /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import { Button, Welcome } from '@storybook/reac... |
src/examples/pages/Textfields.js | iporaitech/react-to-mdl | import React from 'react';
import Grid, { Cell } from 'react-to-mdl/lib/grid';
import Textfield from 'react-to-mdl/lib/textfield';
const Page = (props) => {
return (
<Grid>
<Cell desktop={12} className="example-block">
<h6>
Textfield
</h6>
<Textfield id="email"
l... |
packages/reactor-conference-app/src/event/Event.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { Panel, TabBar } from '@extjs/ext-react';
import { connect } from 'react-redux';
import { setTitle } from '../actions';
import { loadEvent } from './actions';
import days from '../util/days';
class Event extends Component {
render() {
const { record, heade... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.