path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
App.android.js | atesoriero2000/scout-project | /**
* Chatham Township Historical Society's Driving Tour App
* Created by: Anthony Tesoriero
* https://github.com/atesoriero2000
*
* Powered by React Native
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
View,
Text
} from 'react-nativ... |
node_modules/_antd@2.13.4@antd/es/card/Grid.js | ligangwolai/blog | import _extends from 'babel-runtime/helpers/extends';
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i... |
app/client.js | lolicoin/wallet | import React from 'react'
import { render } from 'react-dom'
class App extends React.Component {
render() {
return (
<div>
<nav className='navbar navbar-expand-lg navbar-dark bg-dark'>
<span className='navbar-brand'>LoliCoin wallet =^_^=</span>
</nav>
</div>
)
}
}
ren... |
generators/mobile-app/templates/Component.js | HsuTing/generator-cat | 'use strict';
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<Text>Changes you make will automat... |
src/svg-icons/maps/directions-walk.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsWalk = (props) => (
<SvgIcon {...props}>
<path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-... |
client/modules/Post/__tests__/components/PostList.spec.js | Muisti/muisti | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper';
const posts = [
{ name: 'Prashant', cuid: 'f34gb2bh24b24b2', impo... |
packages/ringcentral-widgets-docs/src/app/pages/Components/LogIcon/Demo.js | ringcentral/ringcentral-js-widget | import React from 'react';
// eslint-disable-next-line
import LogIcon from 'ringcentral-widgets/components/LogIcon';
const props = {};
props.currentLocale = 'en-US';
/**
* A example of `LogIcon`
*/
const LogIconDemo = () => <LogIcon {...props} />;
export default LogIconDemo;
|
src/index.js | kelsonic/Kelsonic | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
client/src/index.js | marcboeren/millionf1 | import React from 'react';
import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker';
import { ApolloProvider } from 'react-apollo';
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
impo... |
Example/components/TabView.js | gectorat/react-native-router-flux | import React from 'react';
import {PropTypes} from "react";
import {StyleSheet, Text, View} from "react-native";
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
const contextTypes = {
drawer: React.PropTypes.object,
};
const propTypes = {
name: PropTypes.string,
sce... |
src/internal/ClearFix.js | skarnecki/material-ui | import React from 'react';
import BeforeAfterWrapper from './BeforeAfterWrapper';
const styles = {
before: {
content: "' '",
display: 'table',
},
after: {
content: "' '",
clear: 'both',
display: 'table',
},
};
const ClearFix = ({style, children, ...other}) => (
<BeforeAfterWrapper
{.... |
_course_exercises/rfe/_bck/src/ReposList.js | David-Castelli/react-testing | import React from 'react';
import {render} from 'react-dom';
import Repo from './Repo';
class ReposList extends React.Component {
constructor(props) {
super(props);
this.state = {
search: '',
repos: props.repos
};
}
updateSearch(event) {
this.setState({search: event.target.value.substr(0, 20)})
}
add... |
src/components/app.js | vanfvl/JabbaTracker | import React from 'react';
import {Route, Match, Redirect} from 'react-router-dom';
import Header from './header';
import Login from '../containers/login';
import TimeSheet from '../containers/timesheet';
import ThemisSheet from '../containers/themissheet';
import Input from '../containers/input';
import AccountsTab fr... |
packages/mineral-ui-icons/src/IconFolder.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconFolder(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps}>... |
app/javascript/mastodon/containers/card_container.js | PlantsNetwork/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Card from '../features/status/components/card';
import { fromJS } from 'immutable';
export default class CardContainer extends React.PureComponent {
static propTypes = {
locale: PropTypes.string,
card: PropTypes.array.isRequired,
};
... |
src/index.js | setage/react-kinetic-scrolling | import React from 'react'
const TIME_CONSTANT = 325
const WHEEL_SPEED = 50
const BASE_STYLE = {
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
overflow: 'hidden',
}
const VIEW_STYLE = {
position: 'absolute',
top: 0,
left: 0,
}
class Scrolling extends React.... |
src/media/js/addon/containers/reviewDetail.js | diox/marketplace-content-tools | /*
Single review page for an add-on.
Lists the add-on's versions, each with their own approve and reject buttons.
*/
import React from 'react';
import {connect} from 'react-redux';
import {reverse, ReverseLink} from 'react-router-reverse';
import {bindActionCreators} from 'redux';
import AddonVersionListingContai... |
app/components/agents/randomAgents.js | nypl-registry/browse | import React from 'react'
import RandomRecords from '../shared/randomRecords.js'
const RandomAgents = React.createClass({
render () {
return <RandomRecords recordType='agent' records={this.props.agents} onFetch={this.props.onFetch} />
}
})
export default RandomAgents
|
src/components/common/sticky/Sticky.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import ReactDOM from 'react-dom';
export default class Sticky extends React.Component {
static propTypes = {
isActive: React.PropTypes.bool,
className: React.PropTypes.string,
style: React.PropTypes.object,
stickyClassName: React.PropTypes.string,
stickyStyle: React.Pr... |
test/helpers/shallowRenderHelper.js | sumoli/gallery-by-react | /**
* 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'... |
website-prototyping-tools/RelayPlayground.js | Shopify/relay | /**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/* eslint-disable... |
counter-redux/client/js/index.js | synasius/playground-react | import React from 'react';
import ReactDOM from 'react-dom';
import actions from './components/actions.js';
import manager from './components/store.js';
import Counter from './components/counter.js';
import '../sass/main.scss';
const root = document.querySelector('.container');
manager.initStore();
const store = m... |
src/svg-icons/editor/format-align-right.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatAlignRight = (props) => (
<SvgIcon {...props}>
<path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"/>
</SvgIcon>
);
EditorFormatAlignRight = pure(EditorFormatAlign... |
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js | mklinga/potatoro | 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 = ... |
packages/@vega/feature-checklist/src/ChecklistFullView.js | VegaPublish/vega-studio | // @flow
import React from 'react'
import {distanceInWordsToNow} from 'date-fns'
import {get} from 'lodash'
import Checkbox from 'part:@lyra/components/toggles/checkbox'
import lyraClient from 'part:@lyra/base/client'
import {of as observableOf, combineLatest} from 'rxjs'
import {switchMap, map} from 'rxjs/operators'
i... |
packages/base-shell/src/providers/Online/Context.js | TarikHuber/react-most-wanted | import React from 'react'
export const Context = React.createContext(null)
export default Context
|
src/sheetElems/comment/api.js | lukaszmakuch/quiz | import React from 'react';
import hash from 'hash.js';
const makePreview = comment => (
<div
key={comment.value + comment.index}
style={{
color: '#ddd',
margin: '20px'
}}
className="comment-preview"
>
{comment.value}
</div>
);
export default {
id: comment => ({
...commen... |
src/components/Footer/SetButton/index.js | nobus/weaver | import React, { Component } from 'react';
import { Modal, Grid, Row, Col, Button, FormControl, Glyphicon } from 'react-bootstrap';
class SetButton extends Component {
constructor() {
super();
this.state = {showModal: false};
this.handleClick = this.handleClick.bind(this);
this.saveChanges = this.sav... |
src/stories/index.js | zillding/react-console | import React from 'react'
import { storiesOf, action } from '@kadira/storybook'
import Console from '../index'
storiesOf('React Console', module)
.add('default view', () => (
<Console/>
))
.add('not load fontawesome', () => (
<Console noFontawesome={true} />
))
.add('custom styles', () => {
cons... |
src/components/header/index.js | neekey/daigou | import React from 'react';
import { Link } from 'react-router';
import style from './header.scss';
import pagesLink from './header.json';
import classnames from 'classnames';
export default class Header extends React.Component {
constructor(props) {
super(props);
this.state = {
open: false,
};
... |
src/routes/UIElement/dataTable/index.js | IssaTan1990/antd-admin | import React from 'react'
import { DataTable } from '../../../components'
import { Table, Row, Col, Card, Select } from 'antd'
class DataTablePage extends React.Component {
constructor (props) {
super(props)
this.state = { filterCase: {
gender: '',
} }
}
handleSelectChange = (gender) => {
... |
node_modules/react-router/es6/withRouter.js | lauracurley/2016-08-ps-react | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import React from 'react';
import hoistStatics from 'hoist-no... |
components/tabs/index.js | react-material-design/react-material-design | import '@material/tabs/dist/mdc.tabs.css';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import { MDCTabBar } from '@material/tabs';
/** Tab Bar */
class TabBar extends Component {
static propTypes= {
darkTheme: PropTypes.bool,
ch... |
redux-form/example-fieldArrays/jsx/index.js | Muzietto/react-playground | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {createStore, combineReducers} from 'redux';
import {reducer as reduxFormReducer} from 'redux-form';
import FieldArraysForm from './FieldArraysForm';
const dest = document.getElementById('container'... |
app/index.js | Nurasael/WeWatch | // @flow
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { Router, hashHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import routes from './routes'
import configureStore from './store/configureStore'
import './app.global... |
src/index.js | bibleexchange/be-front-new | // core setup
import React from 'react';
import ReactDOM from 'react-dom';
import Relay from 'react-relay';
import MyNetworkLayer from './MyNetworkLayer';
// routing
import Route from './Route';
import { browserHistory, applyRouterMiddleware, Router } from 'react-router';
import useRelay from 'react-router-relay';
//... |
src/svg-icons/notification/folder-special.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationFolderSpecial = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29... |
src/svg-icons/av/subtitles.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSubtitles = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/>
</SvgIcon... |
app/components/ListItem/index.js | zuban/zuban-boilerplate | import React from 'react';
import Item from './Item';
import Wrapper from './Wrapper';
function ListItem(props) {
return (
<Wrapper>
<Item>
{props.item}
</Item>
</Wrapper>
);
}
ListItem.propTypes = {
item: React.PropTypes.any,
};
export default ListItem;
|
src/app/index.js | MrJonas/bike-routes | import React from 'react';
import {render} from 'react-dom';
import {Route, HashRouter, withRouter} from 'react-router-dom';
require("./../assets/style.css");
require('es6-object-assign').polyfill();
import 'bootstrap/dist/css/bootstrap.css';
import AboutPage from './pages/about.page';
import MainPage from './pages/m... |
src/svg-icons/device/graphic-eq.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGraphicEq = (props) => (
<SvgIcon {...props}>
<path d="M7 18h2V6H7v12zm4 4h2V2h-2v20zm-8-8h2v-4H3v4zm12 4h2V6h-2v12zm4-8v4h2v-4h-2z"/>
</SvgIcon>
);
DeviceGraphicEq = pure(DeviceGraphicEq);
DeviceGraphi... |
src/svg-icons/image/brightness-5.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness5 = (props) => (
<SvgIcon {...props}>
<path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.6... |
plugins/Files/js/components/deletedialog.js | NebulousLabs/Sia-UI | import PropTypes from 'prop-types'
import React from 'react'
import { List } from 'immutable'
const DeleteDialog = ({ files, actions }) => {
const onYesClick = () => {
files.map(actions.deleteFile)
actions.hideDeleteDialog()
}
const onNoClick = () => actions.hideDeleteDialog()
return (
<div classNa... |
src/tests/components/SelectOption.js | bruderstein/unexpected-react |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class SelectOption extends Component {
render() {
return (
<li id={'unique_' + Math.floor(Math.random()*10000)} className="Select__item--unselected Select__item ">
{this.props.label}
</li... |
examples/03 Nesting/Drop Targets/index.js | wagonhq/react-dnd | import React from 'react';
import Container from './Container';
export default class NestingDropTargets {
render() {
return (
<div>
<p>
<b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/03%20Nesting/Drop%20Targets'>Browse the Source</a></b>
</p>
<p>
... |
docs/src/app/components/pages/components/SvgIcon/ExampleSimple.js | verdan/material-ui | import React from 'react';
import {blue500, red500, greenA200} from 'material-ui/styles/colors';
import SvgIcon from 'material-ui/SvgIcon';
const iconStyles = {
marginRight: 24,
};
const HomeIcon = (props) => (
<SvgIcon {...props}>
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</SvgIcon>
);
const SvgIco... |
src/pages/index.js | jcmnunes/josenunesxyz | import React from 'react';
import { Link } from 'gatsby';
import styled from 'styled-components';
import Manifest from '../components/Manifest';
import List from '../components/List';
import Contact from '../components/Contact';
import H1 from '../styles/H1';
import Heading from '../styles/Heading';
import TwoColumnG... |
client/src/containers/PatientDetail.js | wilimitis/DoctorIQ | import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
BrowserRouter as Router,
Route,
Link,
Redirect,
withRouter,
Switch
} from 'react-router-dom';
import { Card } from 'material-ui/Card';
import download from 'downloadjs';
import { patientDetailSubmit } from '../actions/... |
example/examples/AnimatedViews.js | zigbang/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Dimensions,
Animated,
} from 'react-native';
import {
ProviderPropType,
Animated as AnimatedMap,
AnimatedRegion,
Marker,
} from 'react-native-maps';
import PanController from './PanController';
import PriceMarker from './AnimatedPriceMarker';
const... |
src/parser/hunter/survival/modules/talents/FlankingStrike.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
/**
* You and your pet leap to the target and strike it as one, dealing a tot... |
src/svg-icons/hardware/gamepad.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareGamepad = (props) => (
<SvgIcon {...props}>
<path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/>
</SvgIcon>
);
HardwareGamepad = pure(Hardw... |
src/svg-icons/notification/vibration.js | andrejunges/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... |
src/routes.js | pppp22591558/ChinaPromotion | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... |
app/components/LandingPage.js | SynapseNetwork/Synapse-Desktop | /* **************************************************************
* Synapse - Desktop Client
* @author Marco Fernandez Pranno <mfernandezpranno@gmail.com>
* @licence MIT
* @link https://github.com/SynapseNetwork/Synapse-Desktop
* @version 1.0
* ****************************************************... |
packages/material-ui-icons/src/LockOpen.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V1... |
src/payout-picker/PayoutPickerMobile.js | nuruddeensalihu/binary-next-gen | import React from 'react';
import MobilePage from '../containers/MobilePage';
import PayoutPickerContainer from './PayoutPickerContainer';
export default (props) => (
<MobilePage toolbarShown={false} backBtnBarTitle="Payout">
<PayoutPickerContainer {...props} />
</MobilePage>
);
|
src/index.js | ericyd/surfplot-ui | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.scss';
if (typeof window !== undefined) {
ReactDOM.render(
<App />,
document.getElementById('root')
);
}
|
src/routes.js | aragonwa/kc-restaurant-reviews | import React from 'react';
// Index route is used to set the Root Route
import {Route, IndexRoute, Redirect} from 'react-router';
import App from './components/App';
import RestaurantReviewsPage from './containers/RestaurantReviewsPage'; // eslint-disable-line import/no-named-as-default
import Details from './component... |
src/svg-icons/av/fiber-pin.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFiberPin = (props) => (
<SvgIcon {...props}>
<path d="M5.5 10.5h2v1h-2zM20 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-2zM9 11.5c0 .85-.65 1.5-1.5 1.5h-2v2H4V9h3.5c.85... |
src/svg-icons/social/group-add.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroupAdd = (props) => (
<SvgIcon {...props}>
<path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.... |
src/frontend/components/Menu.js | ErdMutter92/Project-Atlantis | import React from 'react';
import Bootstrap from 'react-bootstrap';
import axios from 'axios';
import io from 'socket.io-client';
import ServerDataService from '../services/server';
import Online from './status/Online';
import Motd from './status/Motd';
import Weather from './status/Weather';
import Mojang from './stat... |
ui/src/pages/PeopleManagePage/AttributesEditor/index.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
import { Map } from 'immutable';
import { compose, withProps, setPropTypes, withState } from 'recompose';
import { withModels } from 'ui/utils/hocs';
import AddTextIconButton from 'ui/components/TextIconButton/AddTextIconButton';
import NewRow from './NewRo... |
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/actual.js | rafser01/installer_electron | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
src/views/icons/ShieldCrossedIcon.js | physiii/home-gateway | import React from 'react';
import IconBase from './IconBase.js';
export const ShieldCrossedIcon = (props) => (
<IconBase {...props} viewBox="0 0 20 20">
<path d="M1.9 1.3c.2-.2.5-.2.7 0l15.5 15.5c.2.2.2.5 0 .7-.2.2-.5.2-.7 0L1.8 1.9c-.3-.2.1-.6.1-.6zM14.7 17.3c-1.1 1-2.6 1.8-4.5 2.7h-.4c-8.3-3.5-8.1-8.2-7.7-15.2v-.... |
Other/styleguide/src/components/Section.js | barretthafner/learning | /* @flow */
import React from 'react';
import { View } from 'react-sketchapp';
import Label from './Label';
type P = {
title: string,
children?: any,
};
const Section = ({ title, children }: P) => (
<View style={{ marginBottom: 96, flexDirection: 'row' }}>
<View style={{ width: 200 }}>
<Label bold>{tit... |
src/components/Link/Link.js | utage2002/mm | /**
* 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/utils/reactUtils.js | webroo/react-redux-template | import React from 'react';
/**
* Basic version of react-hyperscript. Acts like an overloaded version of React.createElement()
* Allows you to optionally omit the second `props` argument and put children there instead.
* @example
* h('div') // HTML element
* h(MyElement) // Custom element
* h('div', {classN... |
src/app.js | gthomas-appfolio/appfolio-react-template | import React, { Component } from 'react';
import Message from './components/message.js';
export default class App extends Component {
render() {
return (
<div>
<Message />
</div>
);
}
}
|
storybook/stories/character_counter.story.js | imomix/mastodon | import React from 'react';
import { storiesOf } from '@storybook/react';
import CharacterCounter from 'mastodon/features/compose/components/character_counter';
storiesOf('CharacterCounter', module)
.add('no text', () => {
const text = '';
return <CharacterCounter text={text} max={500} />;
})
.add('a few ... |
src/components/common/products/ProductList.js | ESTEBANMURUZABAL/my-ecommerce-template | /**
* Imports
*/
import React from 'react';
import {FormattedMessage} from 'react-intl';
import {slugify} from '../../../utils/strings';
// Flux
import IntlStore from '../../../stores/Application/IntlStore';
// Required components
import Heading from '../typography/Heading';
import Pagination from '../navigation/P... |
fields/types/embedly/EmbedlyField.js | wustxing/keystone | import React from 'react';
import Field from '../Field';
import { FormField, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'EmbedlyField',
// always defers to renderValue; there is no form UI for this field
renderField () {
return this.renderValue();
},
renderValue (path, label, ... |
app/javascript/mastodon/features/compose/components/compose_form.js | KnzkDev/mastodon | import React from 'react';
import CharacterCounter from './character_counter';
import Button from '../../../components/button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import ReplyIndicatorContainer from '../containers/reply_indicator_container';
import Autosugges... |
src/svg-icons/editor/insert-invitation.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertInvitation = (props) => (
<SvgIcon {...props}>
<path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/>
... |
src/svg-icons/image/movie-creation.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageMovieCreation = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
</SvgIcon>
);
ImageMovieCreati... |
src/svg-icons/maps/local-grocery-store.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalGroceryStore = (props) => (
<SvgIcon {...props}>
<path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-... |
src/App.js | theCoolKidsJavaScriptMeetup/cuddlyGuacamole | import React, { Component } from 'react';
import { BrowserRouter as Router } from 'react-router-dom'
import Firebase from 'firebase'
import Navigation from './components/Navigation';
import Footer from './components/Footer';
import Main from './components/Main';
import Sponsors from './components/Sponsors';
import Reg... |
mobile/js/features/home/nav.js | lovelypig5/mock-server | import React from 'react';
import {
Navigator,
Text,
TouchableOpacity
} from 'react-native';
import styles from '../../styles';
import Home from './index';
import LoginButton from '../login/loginButton';
class HomeNav extends React.Component {
render() {
return (<Navigator initialRoute={ this.... |
js/Details.js | olegk101/test | import React from 'react'
import { connect } from 'react-redux'
import { getOMDBDetails } from './actionCreators'
import Header from './Header'
const { shape, string, func } = React.PropTypes
const Details = React.createClass({
propTypes: {
show: shape({
title: string,
year: string,
poster: str... |
src/components/Item.js | namelos/react-demo | import React, { Component } from 'react';
import { ListItem } from 'material-ui';
export default class Item extends Component {
render = () =>
<ListItem primaryText={ this.props.children } />
} |
src/svg-icons/hardware/smartphone.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareSmartphone = (props) => (
<SvgIcon {...props}>
<path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/>
</SvgIcon>
);
HardwareSmartphone = p... |
src/routes/NotAuthenticatedRoute.js | Clemson-University-Energizer/energizer-app |
import React from 'react';
import { Route, Redirect } from 'react-router-dom';
const NotAuthenticatedRoute = ({ component, ...rest }) => (
<Route {...rest} render={props => (
sessionStorage.JWT_TOKEN ? (
<Redirect to={{ pathname: '/', state: { from: props.location } }}/>
) : (
(React.createE... |
src-example/components/pages/GenericPage/index.stories.js | SIB-Colombia/biodiversity_catalogue_v2_frontend | import React from 'react'
import { storiesOf } from '@kadira/storybook'
import { GenericPage } from 'components'
storiesOf('GenericPage', module)
.add('default', () => (
<GenericPage />
))
|
public/js/components/Help.js | hkdnet/GitRec | 'use strict'
import React from 'react';
import { Button, Grid, Row, Col, Label } from 'react-bootstrap';
export default class Help extends React.Component {
render() {
return (
<div>
<h2>How to Use</h2>
<section>
<ul>
<li>GitHubレポジトリを指定します。 例: hkdnet/GitRec</li>
... |
src/svg-icons/image/filter-tilt-shift.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterTiltShift = (props) => (
<SvgIcon {...props}>
<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62... |
src/components/user/menu-item.js | OpenChemistry/mongochemclient | import React, { Component } from 'react';
import { MenuItem } from '@material-ui/core';
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
class UserMenuComponent extends Component {
render() {
const { onClick } = this.props;
return (
<MenuItem onClick={onClick}>
<AccountCircleIc... |
docs/app/Examples/elements/Reveal/index.js | vageeshb/Semantic-UI-React | import React from 'react'
import Types from './Types'
import Content from './Content'
import States from './States'
import Variations from './Variations'
const RevealExamples = () => (
<div>
<Types />
<Content />
<States />
<Variations />
</div>
)
export default RevealExamples
|
src/admin/ControlSidebar.js | rendact/rendact | import React from 'react';
import $ from 'jquery';
import Query from './query';
import _ from 'lodash';
import {disableForm, errorCallback} from '../utils';
import Notification from 'react-notification-system';
import {connect} from 'react-redux';
import {withApollo} from 'react-apollo';
import gql from 'graphql-tag';
... |
app/containers/App/index.js | kenaku/react-boilerplate | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*/
import React from 'react'
import Helmet from 'react-helmet'
// Import the CSS reset, which HtmlWebpackPlugin transfers to the build folder
imp... |
examples/huge-apps/routes/Course/routes/Announcements/components/Announcements.js | MattSPalmer/react-router | import React from 'react';
class Announcements extends React.Component {
render () {
return (
<div>
<h3>Announcements</h3>
{this.props.children || <p>Choose an announcement from the sidebar.</p>}
</div>
);
}
}
export default Announcements;
|
pootle/static/js/auth/components/SignInForm.js | unho/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/ButtonLayout/ButtonLayout.js | nirhart/wix-style-react | import React from 'react';
import styles from './ButtonLayout.scss';
import classNames from 'classnames';
const ButtonLayout = props => {
const {theme, hover, active, disabled, height, children} = props;
const className = classNames({
[styles.button]: true,
[styles[theme]]: true,
[styles.hover]: hover... |
src/svg-icons/device/signal-cellular-2-bar.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellular2Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M2 22h20V2z"/><path d="M14 10L2 22h12z"/>
</SvgIcon>
);
DeviceSignalCellular2Bar = pure(DeviceSignalCellular2Bar);
Device... |
src/public/components/toolbox/item/file/copy.js | Harrns/segta | import React from 'react'
import copy from 'copy-to-clipboard'
import ListItem from '../default'
import { CopyIcon } from '../../../image/svg'
export default class CopyToolboxItem extends React.Component {
constructor (props) {
super(props)
this.state = {}
this.initState(props)
}
initState (props)... |
src/components/ShareExperience/common/CompanyQuery.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import AutoCompleteTextInput from 'common/form/AutoCompleteTextInput';
import { debounce } from 'utils/streamUtils';
import InputTitle from './InputTitle';
import { getCompaniesSearch } from '../../../apis/companySearchApi';
const getItemValue = item =>... |
src/Well.js | Lucifier129/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import bootstrapUtils, { bsSizes, bsClass } from './utils/bootstrapUtils';
import { Sizes } from './styleMaps';
@bsClass('well')
@bsSizes([Sizes.LARGE, Sizes.SMALL])
class Well extends React.Component {
render() {
let classes = bootstrapUtils.getCla... |
App/Containers/APITestingScreen.js | HyphenateInc/hyphenate-react-native | // @flow
// An All Components Screen is a great way to dev and quick-test components
import React from 'react'
import { ScrollView, View, Text, TouchableOpacity, Image } from 'react-native'
import { Metrics, Images } from '../Themes'
import FullButton from '../Components/FullButton'
// For API
import API from '../Ser... |
src/utils/ValidComponentChildren.js | cgvarela/react-bootstrap | import React from 'react';
/**
* Maps children that are typically specified as `props.children`,
* but only iterates over children that are "valid components".
*
* The mapFunction provided index will be normalised to the components mapped,
* so an invalid component would not increase the index.
*
* @param {?*} ... |
src/pages/Charts/UserBehavior.js | chaitanya1375/Myprojects | import React from 'react';
import Chart from 'react-chartist';
let data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
series: [
[542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895],
[412, 243, 280, 580, 453, 353, 300, 364, 368, 410, 636, 695]
]
... |
examples/todos/index.js | mikekidder/redux | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import todoApp from './reducers'
import App from './components/App'
let store = createStore(todoApp)
render(
<Provider store={store}>
<App />
</Provid... |
demo/sections/BasicSection.js | affinipay/react-bootstrap-autosuggest | import React from 'react'
import { Alert } from 'react-bootstrap'
import Autosuggest from 'react-bootstrap-autosuggest'
import Anchor from './Anchor'
import Playground from './Playground'
const NamePrefix = require('raw-loader!../examples/NamePrefix').trim()
const scope = { Autosuggest }
export default function Basic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.