path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js | picter/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';
export default () => (
<span id="feature-shell-env-variables">
{process.env.REACT_APP_SHELL_ENV_MESSAG... |
components/animals/krajtaKobercova.child.js | marxsk/zobro | // je potřeba zarovnat na střed
import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../... |
src/main.js | Q42/CT-3000 | import './assets/style/main.less';
import React from 'react';
import { render } from 'react-dom';
import { Route, Redirect, Switch, BrowserRouter } from 'react-router-dom';
// Polyfill default objects with ES6-like prototype methods
import Polyfill from 'babel-polyfill';
import LandingPageComponent from './component... |
src/Tabs/TabIndicator.js | AndriusBil/material-ui | // @flow weak
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import { capitalizeFirstLetter } from '../utils/helpers';
export const styles = (theme: Object) => ({
root: {
position: 'relative',
height: 2,
... |
src/routes.js | AnthonyWhitaker/redux-boilerplate | import React from 'react';
import { Route } from 'react-router';
import App from './containers/App';
import * as containers from './containers';
const {
CounterPage
} = containers;
export default (
<Route component={App}>
<Route path="/" component={CounterPage} />
</Route>
);
|
client/app.js | crosshj/cents | //import React from 'react/cjs/react.production.min.js';
//import { render } from 'react-dom/cjs/react-dom.production.min.js';
import React from 'react';
import { render } from 'react-dom';
import { setup as setupStore } from './redux/store';
import { init as initActions } from './redux/actions';
import AppContainer... |
docs/app/Examples/collections/Form/Shorthand/FormExampleFieldLabelObject.js | shengnian/shengnian-ui-react | import React from 'react'
import { Checkbox, Form } from 'shengnian-ui-react'
const FormExampleFieldLabelObject = () => (
<Form>
<Form.Field
control={Checkbox}
label={{ children: 'I agree to the Terms and Conditions' }}
/>
</Form>
)
export default FormExampleFieldLabelObject
|
src/index.js | aisingoro/gallery-by-react | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
packages/material-ui-icons/src/ViewStream.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ViewStream = props =>
<SvgIcon {...props}>
<path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z" />
</SvgIcon>;
ViewStream = pure(ViewStream);
ViewStream.muiName = 'SvgIcon';
export default ViewStream;
|
src/assets/js/react/components/Template/TemplateContainer.js | GravityPDF/gravity-forms-pdf-extended | import PropTypes from 'prop-types'
import React from 'react'
import CloseDialog from '../Modal/CloseDialog'
/**
* Renders our Advanced Template Selector container which is shared amongst the components
*
* @package Gravity PDF
* @copyright Copyright (c) 2021, Blue Liquid Designs
* @license http://openso... |
src/components/profile/View.js | juniorconsulting/internarena | 'use strict';
import * as actionCreators from '../../actions';
import React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Table, Image, Grid, Row, Col, Button, Glyphicon} from 'react-bootstrap';
let placeholderImage = require('../../images/user_placeholder.png');... |
src/components/views/NotFound.js | elbstack/react-redux-toolbox | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
fixtures/fiber-debugger/src/index.js | yangshun/react | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
|
web/src/js/utils.js | cortesi/mitmproxy | import _ from 'lodash'
import React from 'react'
window._ = _;
window.React = React;
export var Key = {
UP: 38,
DOWN: 40,
PAGE_UP: 33,
PAGE_DOWN: 34,
HOME: 36,
END: 35,
LEFT: 37,
RIGHT: 39,
ENTER: 13,
ESC: 27,
TAB: 9,
SPACE: 32,
BACKSPACE: 8,
SHIFT: 16
};
// Add... |
screens/home/components/balance-graph.js | keuss/react-router-redux-sandbox | /**
* Created by Adrien on 17/04/2016.
*/
import React from 'react'
export default class BalanceGraph extends React.Component {
render() {
return (
<div id="graph">
<h5>Graph Dépenses</h5>
<img src="http://i.imgur.com/KTEj96F.png" />
</div>
)
}
}
|
src/components/ReleaseList/index.js | benceg/dani | import React from 'react';
import Color from 'color';
import Album from '../../components/Album';
if (process.env.WEBPACK) require('./stylesheet.styl');
const ReleaseList = ({
releases,
tint
}) =>
<section className='ReleaseList'>
<h2 style={{backgroundColor: Color(tint).lighten(0.16).hexString()}}>Releases</... |
1m_Redux_Lynda/Ex_Files_Learning_Redux/Exercise Files/Ch05/05_01/finished/src/index.js | yevheniyc/C | import C from './constants'
import React from 'react'
import { render } from 'react-dom'
import routes from './routes'
import sampleData from './initialState'
import storeFactory from './store'
import { Provider } from 'react-redux'
const initialState = (localStorage["redux-store"]) ?
JSON.parse(localStorage["redu... |
src/routes.js | magnusbae/arcadian-rutabaga | /*! 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 AdminPage from './components/AdminPage'... |
client/src/Assistant/ApartmentFeatureInputs/KitchenFeatures.js | ciex/mietlimbo | // @flow
import React from 'react'
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'
import { CardText} from 'material-ui/Card'
import CheckboxInput from './CheckboxInput'
import type { RangeInputProps } from './RangeSelectionGroup'
import FeatureInput from './FeatureInput'
import './Styles.c... |
src/components/settlement/SettlementInput.js | HuZai/react_settlement | /**
* Created by zhengHu on 16-10-8.
* 单条信息展示组件
*/
import React from 'react';
class SettlementInput extends React.Component {
componentDidMount() {
console.log(this.props.data.focus)
if(this.props.data.focus && this.props.data.refName){
this.refs[this.props.data.refName].focus();
}
}
render... |
ui/src/plugins/epl-timeline/components/Component.js | Hajto/erlangpl | // @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Highlight from 'react-highlight';
import { Link } from 'react-router-dom';
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import List from 'react-virtualized/dist/commonjs/List';
import ArrowKeyStepper f... |
src/universalMiddleware/index.js | DAppx/SharpReact | /* */
// Needed for redux-saga es6 generator support
//import 'babel-polyfill';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { ServerRouter, createServerRenderContext } from 'react-router';
import { Provider } from 'react-redux';
import { CodeSplitProvider, createRenderCon... |
src/renderer/components/DevTools.js | venobo/app | import DockMonitor from 'redux-devtools-dock-monitor'
import LogMonitor from 'redux-devtools-log-monitor'
import { createDevTools } from 'redux-devtools'
import React from 'react'
export default createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-H"
changePositionKey="ctrl-Q">
<LogMonitor />
</DockM... |
src/component/smsModal/SmsInput.js | simors/yjbAdmin | /**
* Created by lilu on 2017/10/21.
*/
import React from 'react'
import {Table, Popconfirm, Input,Button,message} from 'antd'
import {connect} from 'react-redux';
import {action as authAction,selector} from '../../util/auth'
class SmsInput extends React.Component {
constructor(props) {
super(props)
this.... |
examples/todo/src/components/Todos.js | drabinowitz/react-slices | import React from 'react';
import Slices from 'slices';
import Todo from './Todo';
class Todos extends React.Component {
static propTypes = {
todos: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
}
render() {
var todos = this.props.todos.map(todo => (
<Todo key={todo.id} todo={todo} /... |
src/svg-icons/action/line-weight.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLineWeight = (props) => (
<SvgIcon {...props}>
<path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"/>
</SvgIcon>
);
ActionLineWeight = pure(ActionLineWeight);
ActionLineWeight.displayN... |
src/svg-icons/action/cached.js | mit-cml/iot-website-source | 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/components/ActionList/ActionList.story.js | creditornot/wolt-web-common | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, text } from '@storybook/addon-knobs';
import ActionList from './ActionList';
export default storiesOf('ActionList', module)
.addDecorator(withKnobs)
.add('base', () => (
... |
www/imports/mapPage/shortlist/BarChartPres.js | ucscHexmap/hexagram | /*
* Presentational component for the bar chart in the shortlist.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {
XYPlot,
VerticalBarSeries,
} from 'react-vis';
const BarChartPres = ({ data }) => (
<div>
<XYPlot
xDomain={[0, 2]}
width={240}
... |
examples/server-rendering/server.js | acdlite/redux-router | import express from 'express';
import webpack from 'webpack';
import React from 'react';
import {renderToString} from 'react-dom/server';
import {Provider} from 'react-redux';
import {createStore} from 'redux';
import {ReduxRouter} from '../../src'; // 'redux-router'
import {reduxReactRouter, match} from '../../src/ser... |
src/components/pages/reading/reading.js | guangqiang-liu/OneM | /**
* Created by guangqiang on 2017/9/4.
*/
import React from 'react'
import {View, StyleSheet, Text, TouchableOpacity, Image, ScrollView} from 'react-native'
import {BaseComponent} from '../../base/baseComponent'
import {connect} from 'react-redux'
import Action from '../../../actions'
import ViewPager from 'react-n... |
nativeExample/react/src/js/example/address.js | zhanglizhao/react-native-knowledge | /**
* Created by Administrator on 2016/11/19 0019.
*/
import React from 'react';
import {Nav,NavTitle,NavLeft} from '../../assets/components/nav/nav.js';
import Btn from '../../assets/components/btn/btn.js';
import "../../assets/css/form.css";
import Select from 'react-cmos-select';
import DatePicker from "react-cmos... |
src/containers/BarPage.js | barrystaes/react-trebuchet | import React from 'react';
class BarPage extends React.Component {
render() {
return (
<div>
<h1>The Bar Page</h1>
<p>There is nothing to see here.</p>
</div>
);
}
}
export default BarPage;
|
src/app.js | bttl/web | import React from 'react';
import ReactDOM from 'react-dom';
// For babel and es2015+, make sure to import the file:
import 'whatwg-fetch';
// all singletons inside a root
import AppDispatcher from './app-dispatcher';
//import {MyApp} from './my-app.js';
import Workspace from 'aaa';
console.log('Workspace', Workspac... |
src/TextField/TextFieldLabel.js | hai-cea/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import transitions from '../styles/transitions';
function getStyles(props) {
const defaultStyles = {
position: 'absolute',
lineHeight: '22px',
top: 38,
transition: transitions.easeOut(),
zIndex: 1, // Needed to display label above Chr... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-16/shared/Page.js | Brandon-J-Campbell/codemash | import React from 'react';
import classNames from 'classnames';
import theme from '../theme/static';
import styles from './Page.css';
export default function Page({ children }) {
return (
<div className={classNames(styles.page, styles[theme])}>
<div className={styles.content}>{children}</div>
</div>
... |
src/index.js | mikadamsterdam/react_for_project | import './stylesheets/app.scss'
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, Link, browserHistory } from 'react-router';
import App from './App';
import Project from './Project';
import ProjectBoard from './ProjectBoard';
ReactDOM.render((
<Router history={browserH... |
src/components/Rating.js | afonsobarros/reactnd-project-readable | import React, { Component } from 'react';
import { connect } from 'react-redux'
import themeDefault from '../theme-default';
import { Badge, IconButton } from 'material-ui';
import { votePostDown, votePostUp } from '../actions/posts'
import { voteCommentDown, voteCommentUp } from '../actions/comments'
import * as Read... |
stories/components/idme/index.js | NestorSegura/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import Idme from 'shared/components/idme/idme';
storiesOf('shared/components/idme', module)
.add('Default', () => (
<Idme />
)); |
client/src/pages/order/OrderListItem.js | ccwukong/lfcommerce-react | import React from 'react';
import PropTypes from 'prop-types';
import { Button, Badge } from 'reactstrap';
import { injectIntl, FormattedMessage } from 'react-intl';
const OrderListItem = props => {
const { formatMessage } = props.intl;
const {
number,
customer,
date,
paidOn,
status,
onClic... |
src/index.js | bcgodfrey91/tier-2 | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, IndexRoute, Route, browserHistory } from 'react-router';
const firebase = require('./firebase');
const provider = new firebase.auth.GoogleAuthProvider();
import SignIn from './SignIn';
import Home from './Home';
import NewContact from './NewC... |
inlineStyles/src/Main.js | 3mundi/React-Bible | import React from 'react';
import Example from './components/Example/Example';
React.render(<Example content='hello world' />, document.getElementById('app'));
|
react-ui/src/containers/About.js | MaGuangChen/resume-maguangchen | import React from 'react';
import { connect } from 'react-redux';
import AboutMe from '../components/about/AboutMe';
import Skill from '../components/about/Skill';
import Experience from '../components/about/Experience';
import { changeAbout } from '../actions/actions';
const About = (props) => {
const { aboutSe... |
app/containers/Web3Alerts/index.js | acebusters/ab-web | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import {
makeSelectHasWeb3,
makeSelectNetworkSupported,
makeSelectWrongInjected,
makeSelectIsLocked,
makeSelectWeb3MethodValue,
makeSelectIsWeb3Connecte... |
website/src/components/typography.js | spacy-io/spaCy | import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import Tag from './tag'
import Button from './button'
import Icon from './icon'
import { isString, github, headingTextClassName } from './util'
import classes from '../styles/typography.module.sass'
export const H1 = ({ C... |
src/svg-icons/action/settings-input-composite.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputComposite = (props) => (
<SvgIcon {...props}>
<path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.... |
node_modules/react-router/es/IndexRedirect.js | nikhil-ahuja/Express-React | import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import Redirect from './Redirect';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes,
string = _React$PropTypes.string,
object = _React$PropTypes.object;
/**
* An <IndexRedir... |
packages/strapi-helper-plugin/lib/src/app.js | lucusteen/strap | /**
* app.js
*
* This is the entry file for the application,
* only setup and plugin code.
*/
import React from 'react';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
import App from 'containers/App'; // eslint-disable-line
import { selectLocationState } from '... |
client/src/index.js | jsalonen/swarmist | import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './app';
import { Provider } from 'mobx-react';
import NodeStore from './stores/NodeStore';
// Required for onTouchTap (http://stackoverflow.com/a/34015469/98894... |
src/buttons/Button.js | fengshanjian/react-native-komect-uikit | /**
* @Author: will
* @Date: 2017-06-20T09:43:15+08:00
* @Filename: Button.js
* @Last modified by: will
* @Last modified time: 2017-06-20T11:43:06+08:00
*/
import PropTypes from 'prop-types';
import React from 'react';
import {
TouchableNativeFeedback,
TouchableHighlight,
StyleSheet,
View,
Image,... |
assets/search-view/profile-view/components/BasicDetails.js | janta-devs/nyumbani | import React, { Component } from 'react';
class BasicDetails extends Component{
render() {
var userInfo = this.props.data;
return (
<div className="card" id="profile-employment">
<header className="employment-header">
<h2>
Basic Details
</h2... |
src/js/components/icons/base/Menu.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/HomePage.js | chelsea-le/nastywoman | /*home page!*/
import React from 'react';
import './css/Home.css';
import '../node_modules/font-awesome/css/font-awesome.css';
var HomePage = React.createClass({
render:function() {
return(
<div className="homeContainer container">
<div className="logo">
<img src="..... |
examples/files/react/classComponent.js | dabbott/react-express | import React from 'react'
import { render } from 'react-dom'
class MyComponent extends React.Component {
render() {
return (
<div style={{ padding: '30px', backgroundColor: 'lightblue' }}>
<button>{this.props.text}</button>
</div>
)
}
}
const myElement = <MyComponent text="Hello, world... |
examples/basic/src/App.js | casesandberg/react-color | /* eslint-disable no-console */
import React from 'react'
import { SketchPicker } from 'react-color'
export const App = () => {
const handleColorChange = ({ hex }) => console.log(hex)
return (
<div>
<SketchPicker
color="#333"
onChangeComplete={ handleColorChange }
/>
</div>
... |
src/svg-icons/content/content-copy.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentContentCopy = (props) => (
<SvgIcon {...props}>
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
</SvgIcon>
);... |
src/svg-icons/image/flash-auto.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFlashAuto = (props) => (
<SvgIcon {...props}>
<path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/>
</SvgIcon>
);
ImageFlashAuto = pure(ImageFla... |
src/svg-icons/action/restore-page.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRestorePage = (props) => (
<SvgIcon {...props}>
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.... |
src/applications/yellow-ribbon/components/FindYellowRibbonPage/index.js | department-of-veterans-affairs/vets-website | // Node modules.
import React from 'react';
// Relative imports.
import SearchForm from '../../containers/SearchForm';
import SearchResults from '../../containers/SearchResults';
import { CURRENT_SCHOOL_YEAR } from '../../constants';
export const FindYellowRibbonPage = () => (
<>
{/* Title */}
<h1 className=... |
src/containers/DevTools/DevTools.js | aleksUIX/ultraInput | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor toggleVisibilityKey="H"
changePositionKey="Q">
<LogMonitor />
</Dock... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/friend-detail/FriendDetail.js | Brandon-J-Campbell/codemash | import React from 'react';
import { Link } from 'react-router-dom';
import Page from '../shared/Page';
import Card from '../shared/Card';
import FriendFlipper from './FriendFlipper';
import styles from './FriendDetail.css';
function renderFriend(friend) {
if (friend === undefined) {
return <h1>Loading...</h1>;
... |
app/containers/HomePage.js | bryanveloso/shiver-electron | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Twitch from 'twitch-sdk/twitch';
import { ActionCreators as UserActions } from '../actions/user'
import Greeter from '../components/greeter';
import LoginButton from '../components/login-button';
impor... |
packages/logos/src/couchbase.js | yldio/joyent-portal | import React from 'react';
import calcFill from './fill';
export default ({
fill = null,
light = false,
disabled = false,
colors = {},
...rest
}) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" {...rest}>
<title>Artboard 1 copy 7</title>
<path
fill={calcFill({ fill, disabled,... |
jenkins-design-language/src/js/components/material-ui/svg-icons/editor/vertical-align-top.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const EditorVerticalAlignTop = (props) => (
<SvgIcon {...props}>
<path d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"/>
</SvgIcon>
);
EditorVerticalAlignTop.displayName = 'EditorVerticalAlignTop';
EditorVerticalAlignTop.muiName = 'SvgIcon';
export... |
src/app/jsx/Test.js | hjzheng/react-practice | import React from 'react';
class TestComponent extends React.Component {
render() {
return <div>Test</div>;
}
}
export default TestComponent;
|
src/pages/Page/index.js | feedcast/hurley | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Page from './Page';
import feedcastApi from 'feedcast-client';
class PageContainer extends Component {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
};
constructor(props) {
super(props... |
app/utils/injectReducer.js | warrend/warrend.github.io | import React from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { ReactReduxContext } from 'react-redux';
import getInjectors from './reducerInjectors';
/**
* Dynamically injects a reducer
*
* @param {string} key A key of the reducer
* @param {function} reducer A reducer that will be... |
src/components/QuoteCard.js | petersandor/quote-machine | import React from 'react';
import { Card, CardActions, CardHeader, CardText } from 'material-ui/Card';
import FormatQuote from 'material-ui/svg-icons/editor/format-quote';
import RaisedButton from 'material-ui/RaisedButton';
import LinearProgress from 'material-ui/LinearProgress';
import Chip from 'material-ui/Chip';
... |
html.js | lilac/lilac.github.io | import React from 'react';
import Helmet from 'react-helmet';
import { prefixLink } from 'gatsby-helpers';
import {config} from 'config';
const BUILD_TIME = new Date().getTime();
module.exports = React.createClass({
displayName: 'HTML',
propTypes: {
body: React.PropTypes.string,
},
render() {
const { ... |
src/app/containers/AuthenticatedComponent/AuthenticatedComponent.js | batazor/LMap | import React from 'react' // eslint-disable-line no-unused-vars
import { connect } from 'react-redux'
import { ROUTING } from '../../constants/Routing'
export default function requireAutentication(Component) {
class AuthenticatedComponent extends React.Component {
componentWillMount() {
this.checkAuth(th... |
src/app/components/ui/UiAutocomplete.js | backpackcoder/world-in-flames | import React from 'react'
export default class UiAutocomplete extends React.Component{
componentDidMount(){
$(this.refs.input).autocomplete({
source: this.props.source
});
}
render () {
const { source, ...props} = {...this.props};
return <input type="text" {...pro... |
tests/react_custom_funs/clone_element.js | popham/flow | // @flow
import React from 'react';
import type {Element} from 'react';
declare var any: any;
class A extends React.Component<{foo: number}, void> {}
class B extends React.Component<{foo: number, bar: number}, void> {}
class C extends React.Component<{children: number}, void> {}
class D extends React.Component<{chil... |
src/svg-icons/action/trending-down.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTrendingDown = (props) => (
<SvgIcon {...props}>
<path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"/>
</SvgIcon>
);
ActionTrendingDown = pure(ActionTrendingDown);
ActionTre... |
src/components/common/UserInfo.js | gongmingqm10/Dribbble-ReactNative | import React from 'react';
import {
View,
Image,
Text,
TouchableOpacity,
StyleSheet
} from 'react-native';
import {Colors} from '../../utils/Theme';
const UserInfo = ({user, style = {}, onItemClick}) => (
<TouchableOpacity
onPress={onItemClick}
activeOpacity={0.2}>
<View style={[styles.userCon... |
src/components/AudioPlayer/svg/PlayIcon.js | littlewin-wang/mufly | import React from 'react'
const PlayIcon = props => (
<svg width="7.71px" height="12.12px" viewBox="0 0 7.71 12.12" {...props}>
<path fill="#EFEFEF" d="M7.28,6.48c0.3-0.24,0.3-0.62,0-0.85l-6.56-5.2C0.43,0.2,0.2,0.32,0.2,0.7v10.72c0,0.38,0.23,0.5,0.52,0.26
L7.28,6.48z"/>
</svg>
)
export default PlayIcon
|
src/routes/home/index.js | nagucc/wechat-enterprise-signup | import React from 'react';
import Home from './Home';
export default {
path: '/',
async action() {
return <Home />;
},
};
|
client/components/Home/Home.js | pandaben7890/react-panda-style-level-2 | import React, { Component } from 'react';
import axios from 'axios'
export default class Home extends Component {
constructor(props) {
super(props);
this.state = {
logs: []
};
}
addLog(...messages) {
this.setState({
logs: [...this.state.logs, messages.join(' ')]
});
}
apiHel... |
stories/utils/Components/Story/index.js | skyiea/wix-style-react | import React from 'react';
import PropTypes from 'prop-types';
import {storiesOf} from '@storybook/react';
import TextLink from '../../../../src/TextLink';
import Loader from '../../../../src/Loader/Loader';
import Markdown from '../Markdown';
import CodeBlock from '../CodeBlock';
import AutoDocs from '../AutoDocs';
... |
examples/js/cell-edit/click-to-edit-table.js | pvoznyuk/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
app/containers/DashboardPage.js | cdiezmoran/AlphaStage-2.0 | import React from 'react';
import { graphql, compose } from 'react-apollo';
import { connect } from 'react-redux';
import { array, bool, func, object } from 'prop-types';
import jwtDecode from 'jwt-decode';
import Dashboard from '../components/Dashboard/Dashboard';
import Empty from '../components/Dashboard/Empty';
im... |
src/lib/plugins/hostname.js | edoren/hyperline | import React from 'react'
import Component from 'hyper/component'
import SvgIcon from '../utils/SvgIcon'
import os from 'os'
class PluginIcon extends Component {
styles() {
return {
'hostname-icon': {
fill: '#fff'
}
}
}
template(css) {
return (
<SvgIcon>
<g fill="no... |
src/index.js | akshatsinha/medicare-client | import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware } from 'redux'
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import thunk from 'redux-thunk'
import App from './containers/App'
import Admin from './contain... |
www/src/templates/components/ExternalLinkSvg/index.js | yangshun/react | /**
* Copyright (c) 2013-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.
*
* @emails react-core
*/
'use strict';
import React from 'react';
const ExternalLinkSvg = ({cssProps = {}}) => (
<svg
x="0px"
... |
shared/modules/users/containers/Register.js | founderlab/fl-base-webapp | import _ from 'lodash' // eslint-disable-line
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import { connect } from 'react-redux'
import { push } from 'react-router-redux'
import { register } from 'fl-auth-redux'
import { saveProfile, loadActiveProfile } from '../actions... |
src/svg-icons/action/rowing.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRowing = (props) => (
<SvgIcon {...props}>
<path d="M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-... |
src/pages/links.js | nvasquez97/CataVasken | import React from 'react';
class Links extends React.Component {
render(){
return(
<div class="container">
<div class="col-md-4 link">
<img src="/imgs/DecoratedTiles.jpg" style={{width:'100%'}} class="img-responsive" title="Tiles" alt="Tiles"/>
</div>
<div class="c... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Listing/Listing.js | lakmali/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
client/components/settings/bank-accesses/disable-access-modal.js | jankeromnes/kresus | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { actions } from '../../../store';
import { translate as $t } from '../../../helpers';
import Modal from '../../ui/modal';
class DisableAccessModal extends React.PureComponent {
constructor(props) {
... |
src/components/other/Other.react.js | justin-uy/react-spa-boilerplate | import React from 'react';
let Other = React.createClass({
render() {
return(
<div>
<h1>Other</h1>
<p>Another Page</p>
</div>
);
}
});
export default Other;
|
ui/src/containers/DashboardTemplates/TemplateCard.js | LearningLocker/learninglocker | import React from 'react';
import { Card } from 'ui/containers/DashboardTemplates/styled';
const TemplateCard = ({
title,
image,
onSelect,
}) => (
<Card onClick={onSelect}>
<img
src={image}
alt={title} />
<p>{title}</p>
</Card>
);
export default React.memo(TemplateCard);
|
packages/showcase/flexible/flexible-examples.js | uber/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
bundle.js | jyothishnt/GPS-Project-Website | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... |
src/svg-icons/maps/streetview.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsStreetview = (props) => (
<SvgIcon {...props}>
<path d="M12.56 14.33c-.34.27-.56.7-.56 1.17V21h7c1.1 0 2-.9 2-2v-5.98c-.94-.33-1.95-.52-3-.52-2.03 0-3.93.7-5.44 1.83z"/><circle cx="18" cy="6" r="5"/><path d... |
src/components/Table/Table.js | Landish/react-spectre-css | import React from 'react';
import { bool, string } from 'prop-types';
import classNames from 'classnames';
const Table = ({ isStriped, isHover, children, className, ...rest }) => {
return (
<table
className={classNames(
'table',
{ 'table-striped': isStriped },
{ 'table-hover': isHov... |
techCurriculum/ui/solutions/2.1/src/App.js | jennybkim/engineeringessentials | /**
* Copyright 2017 Goldman Sachs.
* 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 writ... |
test/integration/font-optimization/fixtures/with-google/pages/nonce.js | zeit/next.js | import React from 'react'
import Head from 'next/head'
const Page = () => {
return (
<>
<Head>
<link
href="https://fonts.googleapis.com/css2?family=Modak"
rel="stylesheet"
nonce="VmVyY2Vs"
/>
</Head>
<div>Hi!</div>
</>
)
}
export default Page... |
app/Components/Board.js | serkansokmen/connect4 | import React from 'react'
import DropPiece from './DropPiece'
import Piece from './Piece'
import { constants } from '../gameStore'
const Board = ({ grid, player, boardActive, hoverColumnIndex, pieceIndex, onPieceClick, onPieceHover, onPieceBlur }) => {
// Array of cells
const pieces = grid.map((column, y) => {
... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentSimplifyTypeArgs/__tests__/fixtures/DefaultPropsUninitialized.js | mroch/flow | // @flow
import React from 'react';
class MyComponent extends React.Component<DefaultProps, Props> {
static defaultProps: DefaultProps;
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component<DefaultProps, Props... |
node_modules/@material-ui/core/esm/test-utils/testRef.js | pcclarke/civ-techs | import React from 'react';
import { assert } from 'chai';
function assertDOMNode(node) {
// duck typing a DOM node
assert.ok(node.nodeName);
}
/**
* Utility method to make assertions about the ref on an element
* @param {React.ReactElement} element - The element should have a component wrapped
* ... |
packages/material-ui-icons/src/DirectionsSubway.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let DirectionsSubway = props =>
<SvgIcon {...props}>
<path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.