path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/Hello/Hello.js | kashjs/muszoo-react | import React from 'react';
export class Hello extends React.Component {
render() {
return <h1>Hello React! yey</h1>;
}
} |
app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js | ikuradon/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Toggle from 'react-toggle';
import AsyncSelect from 'react-select/async';
import { NonceProvider } from 'react-sele... |
app/components/elements/TimeAgoWrapper.js | enisey14/platform | /* eslint react/prop-types: 0 */
import React from 'react';
import { FormattedRelative } from 'react-intl';
export default class TimeAgoWrapper extends React.Component {
render() {
let {date} = this.props
if(date && /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d$/.test(date)) {
date = date + 'Z' // F... |
ui/src/components/IssueProviderList/index.js | denniss17/status-dashboard | import React, { Component } from 'react';
import IssueProvider from './IssueProvider';
import PropTypes from 'prop-types';
class IssueProviderList extends Component {
render() {
const { issueProviders, statusesForIssues } = this.props;
return (
<div>
{issueProviders && Object.keys(issueProvider... |
app/config/routes.js | cshutchinson/sk | import React, { Component } from 'react';
import Main from '../components/Main';
import Home from '../components/Home';
import { Router, Route, IndexRoute, Link } from 'react-router'
module.exports = (
<Route path="/" component={Main}>
<IndexRoute component={Home} />
</Route>
);
|
packages/react-static/src/browser/components/SiteData.js | nozzle/react-static | import React from 'react'
import useSiteData from '../hooks/useSiteData'
export function SiteData({ children }) {
return children(useSiteData())
}
export function withSiteData(Comp) {
return function componentWithSiteData(props) {
const routeData = useSiteData()
return <Comp {...props} {...routeData} />
... |
src/components/common/Button.js | amir5000/react-native-manager-app | import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
const Button = ({ onPress, children }) => {
const { buttonStyle, buttonTextStyle } = styles;
return (
<TouchableOpacity onPress={onPress} style={buttonStyle}>
<Text style={buttonTextStyle}>{children}</Text>
</Touchable... |
packages/material-ui-icons/src/ArrowForward.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ArrowForward = props =>
<SvgIcon {...props}>
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" />
</SvgIcon>;
ArrowForward = pure(ArrowForward);
ArrowForward.muiName = 'SvgIcon';
exp... |
src/svg-icons/notification/folder-special.js | frnk94/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... |
client/android/app/src/pages/SignUp.js | blusclips/zonaster | import React, { Component } from 'react';
import {Image, StyleSheet, AsyncStorage} from 'react-native';
import { StackNavigator } from 'react-navigation';
import { Container, Content, Text, H1, H3, Button, Item, Input, Grid, Col} from 'native-base';
import general from '../styles/general';
import Icon from 'react-nativ... |
docs/src/app/components/pages/components/SelectField/ExampleFloatingLabel.js | rhaedes/material-ui | import React from 'react';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
const items = [
<MenuItem key={1} value={1} primaryText="Never" />,
<MenuItem key={2} value={2} primaryText="Every Night" />,
<MenuItem key={3} value={3} primaryText="Weeknights" />,
<Menu... |
src/components/js/Contacts.js | ucev/chatroom | import React, { Component } from 'react';
import UserItem from './UserItem';
import MyAction from '../../state/action';
class Contacts extends Component {
render() {
var state = MyAction.getState();
var userid = state.userid;
var users = state.users.filter((user) => {
return user.id != userid;
... |
source/src/components/App.js | mondalamit/mondalamit.github.io | import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<h2>Welcome to React</h2>
</div>
<p className="App-intro">
To get started, edit <code>src/App.js</co... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js | GreenGremlin/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import tiniestCat from './assets/tiniest-cat.jpg';
export default () => (
<img id="feature-image-inclusion... |
src/hucha.web/test/helpers/shallowRenderHelper.js | jparaya/hucha | /**
* 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'... |
docs/src/PageFooter.js | nickuraltsev/react-bootstrap | import React from 'react';
import packageJSON from '../../package.json';
let version = packageJSON.version;
if (/docs/.test(version)) {
version = version.split('-')[0];
}
const PageHeader = React.createClass({
render() {
return (
<footer className="bs-docs-footer" role="contentinfo">
<div c... |
demo/src/demo-components/indicators.js | Strikersoft/striker-store | import React from 'react';
import { shape, func, string } from 'prop-types';
import { observer } from 'mobx-react';
const IndicatorComponent = observer(({ indicator, type }) => {
if (indicator.get()) {
return <span>({type})</span>;
}
return null;
});
IndicatorComponent.propTypes = {
indicator: shape({ ge... |
node_modules/react-router/es/MemoryRouter.js | AngeliaGong/AngeliaGong.github.io | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
src/icons/ViewModuleIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class ViewModuleIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M8 22h10V10H8v12zm0 14h10V24H8v12zm12 0h10V24H20v12zm12 0h10V24H32v12zM20 22h10V10H20v12zm12-12v12h10V1... |
app/components/Button.js | RogerZZZZZ/widget_electron | import React from 'react'
import { Component } from 'react'
let assetsPrefix = process.env.DEV? '..': '.'
class Button extends Component{
constructor(props){
super(props);
let picName = (this.props.status === false || this.props.status === undefined? this.props.name: this.props.name+"-done");
... |
tilapp/src/containers/Scenes/Capture/Index/index.js | tilap/tilapp | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import merge from 'deep-assign';
import { Container } from 'native-base';
import processBarcode from './services/processBarcode';
import { ReverseCameraIcon, ReverseCameraActiveIcon, FlashCameraIcon, Fla... |
src/modules/settings/components/Feedback.js | CaronaBoard/caronaboard-native | import React from 'react'
import { WebView } from 'react-native'
export const Feedback = () => {
return (
<WebView
source={{uri: 'https://goo.gl/forms/IxVqYmchYVrHkNLq2'}}
style={{flex: 1}}
/>
)
}
|
packages/benchmarks-utils/src/index.js | A-gambit/CSS-IN-JS-Benchmarks | import React from 'react';
function getTable(max = 30) {
let table = [];
for (let i = 0; i < max; i++) {
table[i] = [1];
for (let j = 1; j < max; j++) {
const next = table[i][j - 1] - Math.random() * table[i][j - 1] / 10;
table[i].push(next.toFixed(4));
}
}
return table;
}
function get... |
src/App.js | one19/hourmon | import React, { Component } from 'react';
import { GOLD, BLACK } from './colors';
class Counter extends Component {
constructor(props) {
super(props);
this.state = { counter: 0 };
this.interval = setInterval(() => this.tick(), 2000);
}
tick() {
this.setState({
counter: this.state.counter +... |
pages/nosotros.js | markhker/newCyK |
import React, { Component } from 'react';
import './scss/about.scss';
import Paper from 'material-ui/lib/paper';
import CardTitle from 'material-ui/lib/card/card-title';
import CardText from 'material-ui/lib/card/card-text';
import Link from '../components/Link';
import MyRawTheme from '../components/theme';
import T... |
generators/app/templates/src/components/hello-world.js | trigun539/generator-ep-react-simple | import React, { Component } from 'react';
export default class HelloWorld extends Component {
render () {
return <h1>Hello World</h1>;
}
}
|
src/pages/Bookmarks/index.js | bogas04/SikhJS | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import styled from 'react-emotion';
import { BOOKMARK_TYPES } from '../../constants';
import { clearAllBookmarks, getAllBookmarks, updateBookmarkTitle } from '../../bookmarks';
import { Textfield, Butt... |
src/routes/Dashboard/View.js | cesine/rickshaw-react-sample | import React from 'react';
import PropTypes from 'prop-types';
import ChartByDayOfTheWeek from '../../components/ChartByDayOfTheWeek';
import ChartByHour from '../../components/ChartByHour';
import ChartDaysWithout from '../../components/ChartDaysWithout';
import ChartHistogram from '../../components/ChartHistogram';
i... |
src/front-end/js/pages/Registration.js | aleksey-gonchar/emmofret | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import _ from 'lodash'
import * as AppActions from '../actions/AppActions.js'
import FullNameInput from '../components/inputs/FullNameInput.js'
import EmailInput from '../components/inputs/EmailInput.js'
import ... |
src/assets/js/react/components/FontManager/FontVariantLabel.js | GravityPDF/gravity-forms-pdf-extended | /* Dependencies */
import React from 'react'
import PropTypes from 'prop-types'
import { sprintf } from 'sprintf-js'
/**
* @package Gravity PDF
* @copyright Copyright (c) 2021, Blue Liquid Designs
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 6.0
*/
/**
* Disp... |
src/svg-icons/maps/local-play.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPlay = (props) => (
<SvgIcon {...props}>
<path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.... |
jenkins-design-language/src/js/components/material-ui/svg-icons/maps/directions-bus.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const MapsDirectionsBus = (props) => (
<SvgIcon {...props}>
<path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5... |
kit/entry/browser.js | Mahi22/MedTantra | // Browser entry point, for Webpack. We'll grab the browser-flavoured
// versions of React mounting, routing etc to hook into the DOM
// ----------------------
// IMPORTS
/* NPM */
// Enable async/await and generators, cross-browser
import 'regenerator-runtime/runtime';
// Patch global.`fetch` so that Apollo calls... |
app/src/scripts/widgets/UserProfile/UserProfile.js | vyorkin/assignment | import React from 'react';
export default class UserProfile {
render() {
return (
<dl>
<dt>Фамилия:</dt><dd>{this.props.lastName}</dd>
<dt>Имя:</dt><dd>{this.props.firstName}</dd>
<dt>Отчество:</dt><dd>{this.props.middleName}</dd>
</dl>
);
}
}
|
src/Affix.js | pandoraui/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import AffixMixin from './AffixMixin';
const Affix = React.createClass({
mixins: [AffixMixin],
render() {
let holderStyle = {
top: this.state.affixPositionTop,
// we don't want to expose the `style` property
...this.props.style... |
test/test_helper.js | rickywid/micdb | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
src/svg-icons/av/web.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvWeb = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/>
</SvgIcon>
);
AvWeb = pur... |
React-Youtube/src/components/videoDetail.js | vivekbharatha/ModernReactWithReduxCourseUdemy | import React from 'react';
const VideoDetail = ({ video }) => {
if (!video) {
return <div>Started the Engine, hold you sugar !</div>
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed... |
src/components/gameTimerComponent/gameTimerComponent.js | craigbilner/quizapp | 'use strict';
import React from 'react';
import radium from 'radium';
class GameTimerComponent extends React.Component {
constructor(props) {
super(props);
}
timeFunc() {
this.props.onTimeChange(this.props.gameTime - (this.props.timeInterval / 1000));
if (this.props.gameTime !== 0) {
this.sta... |
examples/dynamic-segments/app.js | upraised/react-router | import React from 'react';
import { Router, Route, Link, Redirect } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<ul>
<li><Link to="/user/123">Bob</Link></li>
<li><Link to="/user/abc">Sally</Link></li>
</ul>
{this.props.children}
... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js | GreenGremlin/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return [
{ id: 1, name: '1' },
... |
src/components/Image/Image.js | dialogs/dialog-web-components | /*
* Copyright 2019 dialog LLC <info@dlg.im>
* @flow
*/
import React from 'react';
import classNames from 'classnames';
import getImageSize from '../../utils/getImageSize';
import ImagePreloader, {
type ImagePreloaderState,
STATE_SUCCESS,
} from '../ImagePreloader/ImagePreloader';
import styles from './Image.c... |
src/svg-icons/device/settings-system-daydream.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSettingsSystemDaydream = (props) => (
<SvgIcon {...props}>
<path d="M9 16h6.5c1.38 0 2.5-1.12 2.5-2.5S16.88 11 15.5 11h-.05c-.24-1.69-1.69-3-3.45-3-1.4 0-2.6.83-3.16 2.02h-.16C7.17 10.18 6 11.45 6 13c0 1.... |
src/containers/Home/Home.js | trueter/react-redux-universal-hot-example | import React, { Component } from 'react';
import { Link } from 'react-router';
import { CounterButton, GithubButton } from 'components';
import config from '../../config';
import Helmet from 'react-helmet';
export default class Home extends Component {
render() {
const styles = require('./Home.scss');
// req... |
app/routes.js | ndnhat/te-starter | 'use strict';
import React from 'react';
import Router from 'react-router';
let { Route, DefaultRoute, NotFoundRoute } = Router;
// -- Import base components
import Layout from './components/layout';
import Login from './components/auth/login';
export default (
<Route handler={Layout} path='/'>
<Route name='login... |
app/javascript/flavours/glitch/features/getting_started_misc/index.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Column from 'flavours/glitch/features/ui/components/column';
import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim';
import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-imm... |
lib/index.js | thatPamIAm/weathrly | import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/App';
import reset from '../css/reset';
import styles from '../css/styles';
ReactDOM.render(<App />, document.getElementById('application'));
|
docs/app/Examples/modules/Progress/Content/ProgressExampleProgress.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Progress } from 'semantic-ui-react'
const ProgressExampleProgress = () => (
<Progress percent={44} progress />
)
export default ProgressExampleProgress
|
examples/real-world/containers/Root.js | Lucifier129/redux | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from '../store/configureStore';
import App from './App';
import UserPage from './UserPage';
import RepoPage from './RepoPage';
const store = configureStore();
export de... |
Realization/frontend/czechidm-acc/src/content/system/SystemRoles.js | bcvsolutions/CzechIdMng | import React from 'react';
import _ from 'lodash';
//
import { Basic, Domain } from 'czechidm-core';
import RoleSystemTableComponent, { RoleSystemTable } from '../role/RoleSystemTable';
const uiKey = 'system-roles-table';
/**
* Table to display roles, assigned to system
*
* @author Petr Hanák
* @author Radek Tomi... |
react-flux-mui/js/material-ui/src/svg-icons/device/battery-90.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBattery90 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1... |
app/javascript/mastodon/features/compose/containers/warning_container.js | kibousoft/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { me } from '../../../initial_state';
const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\S+)/i;
const mapStateToProps = sta... |
app/components/Home.js | rondobley/meal-planner | import React from 'react';
import ReactDOM from 'react-dom';
import HomeStore from '../stores/HomeStore';
import HomeActions from '../actions/HomeActions';
class Home extends React.Component {
constructor(props) {
super(props);
this.state = HomeStore.getState();
this.onChange = this.onChang... |
src/svg-icons/social/people-outline.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPeopleOutline = (props) => (
<SvgIcon {...props}>
<path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.7... |
docs/src/app/components/pages/components/SvgIcon/Page.js | igorbt/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import iconReadmeText from './README';
import IconExampleSimple from './ExampleS... |
src/components/RadioButton/RadioButton-story.js | wfp/ui | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
import RadioButton from '../RadioButton';
import RadioButtonSkeleton from '../RadioButton/RadioButton.Skeleton';
const radioPro... |
packages/wix-style-react/src/ListItemSection/docs/index.story.js | wix/wix-style-react | import React from 'react';
import Star from 'wix-ui-icons-common/Star';
import Download from 'wix-ui-icons-common/Download';
import Hint from 'wix-ui-icons-common/Hint';
import {
header,
tabs,
tab,
description,
importExample,
title,
columns,
divider,
example as baseExample,
playground,
api,
test... |
src/svg-icons/notification/airline-seat-recline-normal.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatReclineNormal = (props) => (
<SvgIcon {...props}>
<path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5... |
src/icons/IosGameControllerB.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosGameControllerB extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M135.123,204.568c-10.688,0-19.343,8.717-19.343,19.441c0,10.727,8.655,19.447,19.343,19.447
c10.641,0,19.... |
src/components/TopBar.js | dkadrios/zendrum-stompblock-client | import React from 'react'
import PropTypes from 'prop-types'
import { withStyles, AppBar, Toolbar, SvgIcon, Typography } from '@material-ui/core'
import UserInfo from './UserInfo'
import ZendrumLogo from '../images/ZendrumLogo.svg.js'
import RestompAd from './RestompAd'
const styles = {
title: {
flex: 1,
fon... |
src/components/custom-drawer-content.js | Doko-Demo-Doa/CSClient-RN | /**
* @flow
*/
'use strict';
import React from 'react';
import { View, Image, Alert } from 'react-native';
import { NavigationActions } from 'react-navigation';
import { Body, Icon, Left, ListItem, Text } from 'native-base';
import { connect } from 'react-redux';
import md5 from 'blueimp-md5';
import { requestLogout ... |
docs/src/components/Typography/Typography.js | seekinternational/seek-asia-style-guide | import React from 'react';
import { Helmet } from 'react-helmet';
import PropTypes from 'prop-types';
import {
PageBlock,
Card,
Section,
Paragraph,
Text,
TextLink,
Strong,
Positive,
Critical,
Secondary
} from 'seek-asia-style-guide/react';
import { ScreenReaderOnly } from 'seek-asia-style-guide/reac... |
src/components/SummaryDetail/SummaryDetail.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { ButtonIcon, IconButton } from '../Button';
const SummaryDetail = ({
children,
containerClassName,
iconButtonClassName,
isOpen,
onOpen,
renderTitle,
title,
}) => (
<div className={cx('slds-summary-detail... |
src/components/texts/subtitle-text.js | tuantle/hypertoxin | /**
* Copyright 2016-present Tuan Le.
*
* Licensed under the MIT License.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://opensource.org/licenses/mit-license.html
*
* Unless required by applicable law or agreed to in writing, software
* d... |
pages/error/index.js | koistya/react-static-boilerplate | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/StateUninitialized.js | facebook/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: Props;
state: State;
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: Props;
state: State;
de... |
jiuzhou/RootScene.js | Cowboy1995/JZWXZ | /**
* Created by Tong on 2017/5/10.
*/
/**
* Copyright (c) 2017-present, Liu Jinyong
* All rights reserved.
*
* https://github.com/huanxsd/MeiTuan
* @flow
*/
//import liraries
import React, { Component } from 'react';
import {
Text,
StyleSheet,
View,
TextInput,
TouchableOpacity,
ToastAn... |
modules/RouteUtils.js | littlefoot32/react-router | import React from 'react'
import warning from 'warning'
function isValidChild(object) {
return object == null || React.isValidElement(object)
}
export function isReactChildren(object) {
return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild))
}
function checkPropTypes(componentName, p... |
react-ui/src/Navbar.js | Swoodend/pollster-heroku | import React, { Component } from 'react';
import NavbarNotLoggedIn from './NavbarNotLoggedIn';
import NavbarLoggedIn from './NavbarLoggedIn';
class Navbar extends Component {
constructor(props){
super(props);
this.state = {
loggedIn : false
}
}
componentWillMount(){
let user = localStorage... |
src/components/common/icons/Open.js | WendellLiu/GoodJobShare | import React from 'react';
/* eslint-disable */
const Open = (props) => (
<svg {...props} width="148" height="148" viewBox="0 0 148 148">
<g transform="translate(41.625 46.25)">
<polygon points="27.75 0 27.75 60.125 37 60.125 37 0"/>
<polygon points="62.438 25.438 2.313 25.438 2.313 34.688 62.438 34.... |
1l_React_ET_Lynda/Ex_Files_React_EssT/Ch02/02_07/start/src/index.js | yevheniyc/C | import React from 'react'
import { render } from 'react-dom'
import { hello, goodbye } from './lib'
render(
<div>
{hello}
{goodbye}
</div>,
document.getElementById('react-container')
) |
pages/nintama.js | ybiquitous/next-todo | import React from 'react'
const QUESTIONS = [
{
image: 'http://www.line-tatsujin.com/stamp/outline/a00227-0.png',
choices: [
'猪名寺乱太郎',
'猪奈寺乱太郎',
'猪名寺乱太朗',
],
correct: 0,
},
{
image: 'http://neoapo.com/images/character/13006/a4de7d3b0dcadf1d1e9a5fd51f8fe9b5.png',
choices:... |
react-flux-mui/js/material-ui/src/svg-icons/editor/format-quote.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatQuote = (props) => (
<SvgIcon {...props}>
<path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/>
</SvgIcon>
);
EditorFormatQuote = pure(EditorFormatQuote);
EditorFormatQuote.displayName = 'EditorFor... |
src/svg-icons/notification/confirmation-number.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationConfirmationNumber = (props) => (
<SvgIcon {...props}>
<path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2... |
main.js | manojadd/bob-demo | import React from 'react';
import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import Bob from './components/Bob.jsx';
import ProjectDetails from './components/ProjectDetails.jsx';
import {Router,Route,IndexRoute,hashHistory} from 'react-router';
import Feedback from '.... |
example/index.android.js | line64/react-native-checkout-mercadopago | import React from 'react';
import { AppRegistry, StyleSheet, Text, View, TouchableHighlight } from 'react-native';
import * as MercadoPago from 'react-native-checkout-mercadopago';
import env from './app.json';
export default class Example extends React.Component {
state = {
status: null
};
handl... |
src/containers/app/AppBase.js | mikebarkmin/react-to-everything | import React from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import injectTapEventPlugin from 'react-tap-event-plugin';
import theme from '../../theme/theme';
import Header from '../../components/header/Header';
import Navigati... |
client/src/containers/LandingPage/index.js | pqmcgill/stamp-wedding-app | import React, { Component } from 'react';
import { connect } from 'react-redux';
import detectWebpSupport from '../../util/detectWebpSupport';
import CompatibleImg from '../../components/CompatibleImg';
import { css } from 'aphrodite';
import { Grid, Row, Col } from 'react-flexbox-grid-aphrodite';
import styles from '.... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js | liamhu/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(users) {
return [
{ id: 1, name: '1' ... |
examples/with-loading/pages/index.js | sedubois/next.js | import React from 'react'
import Header from '../components/Header'
export default () => (
<div>
<Header />
<p>Hello Next!</p>
</div>
)
|
pages/index.js | jubearsun/innovative-design | import anime from 'animejs';
import React from 'react';
import classNames from 'classnames';
import DocumentTitle from 'react-document-title';
import FontAwesome from 'react-fontawesome';
import KeyHandler, { KEYDOWN } from 'react-key-handler';
import { prefixLink } from 'gatsby-helpers';
import _ from 'lodash';
impo... |
webapp/app/components/RestoreHistory/index.js | EIP-SAM/SAM-Solution-Server | //
// Page history save
//
import React from 'react';
import { PageHeader } from 'react-bootstrap';
import RestoreHistoryButtons from 'containers/RestoreHistory/Buttons';
import RestoreHistoryTable from 'containers/RestoreHistory/Table';
import styles from 'components/RestoreHistory/styles.css';
/* eslint-disable rea... |
src/react/JSONTree/JSONArrow.js | josebalius/redux-devtools | import React from 'react';
const styles = {
base: {
display: 'inline-block',
marginLeft: 0,
marginTop: 8,
marginRight: 5,
'float': 'left',
transition: '150ms',
WebkitTransition: '150ms',
MozTransition: '150ms',
borderLeft: '5px solid transparent',
borderRight: '5px solid trans... |
source/containers/App/Header/ChatButton.js | mikey1384/twin-kle | import PropTypes from 'prop-types';
import React from 'react';
import Button from 'components/Button';
import Icon from 'components/Icon';
ChatButton.propTypes = {
chatMode: PropTypes.bool,
loading: PropTypes.bool,
numUnreads: PropTypes.number,
onClick: PropTypes.func.isRequired
};
export default function Cha... |
src/Parser/Hunter/Marksmanship/Modules/Items/MKIIGyroscopicStabilizer.js | enragednuke/WoWAnalyzer | import React from 'react';
import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Wrapper from 'common/Wrapper';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
/**
* Equip: Your Aimed Shot grants yo... |
src/svg-icons/action/assignment-returned.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAssignmentReturned = (props) => (
<SvgIcon {...props}>
<path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .... |
src/parser/rogue/subtlety/modules/core/NightbladeDuringSymbols.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import DamageTracker from 'parser/shared/modules/AbilityTracker';
import SymbolsDamageTracker from './SymbolsDamageTracker';
class NightbladeDuringSymbols extends Ana... |
src/universal/modules/auth/signup/components/Signup/Signup.js | ruffers9/django-react-boilerplate | import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import Paper from 'material-ui/Paper';
import { Link } from 're... |
packages/react-router-website/modules/components/Logo.js | justjavac/react-router-CN | import React from 'react'
import { Block, Row } from 'jsxstyle'
import { DARK_GRAY } from '../Theme'
import LogoImage from '../logo.png'
const Logo = ({ size = 230, shadow = true }) => (
<Row
background={DARK_GRAY}
width={size+'px'}
height={size+'px'}
alignItems="center"
justifyContent="center"
... |
examples/todomvc/config/react.js | lore/lore | /**
* Configuration file for React
*
* This file is where you define overrides for the default mounting behavior.
*/
// import React from 'react';
// import ReactDOM from 'react-dom';
// import { Provider } from 'react-redux';
// import { Router } from 'react-router';
export default {
/**
* ID of DOM Elemen... |
src/routes/home/index.js | quasicrial/quasicrial | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Home from './Home';
impo... |
www/app/components/main_panel/email_section.js | kalikaneko/bitmask-dev | import React from 'react'
//import { Button, Glyphicon, Alert } from 'react-bootstrap'
import SectionLayout from './section_layout'
import Account from 'models/account'
import Spinner from 'components/spinner'
import bitmask from 'lib/bitmask'
export default class EmailSection extends React.Component {
static get d... |
src/components/common/AsyncElement.js | ajkhatibi/wheevy | import React from 'react';
import Router from 'react-router';
import { Route, RouteHandler, Link } from 'react-router';
var AsyncElement = {
loadedComponent: null,
load: function () {
if (this.constructor.loadedComponent) {return;}
this.bundle((component) => {
this.constructor.loadedComponent = component;... |
src/containers/GameOfLifePage.js | svitekpavel/Conway-s-Game-of-Life | import React from 'react';
import { connect } from 'react-redux';
import GameOfLife from '../components/GameOfLife';
import {
setEpoch,
setSpeed,
setEvolutionRunning,
} from '../actions/gameOfLifeActions';
import getNextEpoch from '../utils/getNextEpoch';
import createGrid from '../utils/createGrid';
import grid... |
src/component/event-form/index.js | vagabond0079/casehawk-frontend | import React from 'react';
import * as util from '../../lib/util.js';
import './event-form.scss';
class EventForm extends React.Component {
constructor(props){
super(props);
this.state = props.event
? {...props.event}
: {title: '',
allDay: false,
start: '',
end: '',
... |
actor-apps/app-web/src/app/components/Main.react.js | hejunbinlan/actor-platform | import React from 'react';
import requireAuth from 'utils/require-auth';
import VisibilityActionCreators from '../actions/VisibilityActionCreators';
import FaviconActionCreators from 'actions/FaviconActionCreators';
import FaviconStore from 'stores/FaviconStore';
import ActivitySection from 'components/ActivitySecti... |
fields/types/datearray/DateArrayFilter.js | joerter/keystone | import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
import DayPicker from 'react-day-picker';
import { FormField, FormInput, FormRow, FormSelect } from 'elemental';
const PRESENCE_OPTIONS = [
{ label: 'At least one element', value: 'some' },
{ label: 'No element', value: 'none'... |
src/components/Contentful/Event/presenter.js | ndlib/usurper | // Presenter component for a Event content type from Contentful
import React from 'react'
import PropTypes from 'prop-types'
import typy from 'typy'
import 'static/css/global.css'
import LibMarkdown from 'components/LibMarkdown'
import Link from 'components/Interactive/Link'
import Related from '../Related'
import Imag... |
src/components/usershow/UseritemComponent.js | WishTreeGroup/wishtree_web | 'use strict';
import React from 'react';
require('styles/usershow/Useritem.sass');
class UseritemComponent extends React.Component {
render() {
return (
<div className="useritem-component">
<span>{this.props.itemname}</span>{this.props.itemvalue}
</div>
);
}
}
UseritemComponent.displ... |
web/src/client/createRoutes.js | vampolo/react-experiments | import App from './app/app.react';
import Home from './pages/home.react';
import Login from './pages/auth.react';
import Me from './pages/me.react';
import NotFound from './pages/notFound.react';
import React from 'react';
import Todos from './pages/todos.react';
import Sysdig from './pages/sysdig.react';
import {Index... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.