path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/NotFoundPage.js | oded-soffrin/gkm_viewer | import React from 'react';
import { Link } from 'react-router';
const NotFoundPage = () => {
return (
<div>
<h4>
404 Page Not Found
</h4>
<Link to="/"> Go back to homepage </Link>
</div>
);
};
export default NotFoundPage;
|
frontend/components/AppRoutes.js | heekzz/PowerHour | 'use strict';
import React from 'react';
import { Router, browserHistory } from 'react-router';
import routes from '../routes';
export default class AppRoutes extends React.Component {
render() {
return (
<Router history={browserHistory} routes={routes} onUpdate={() => window.scrollTo(0, 0)}/>
);
}
... |
fixtures/ssr/src/index.js | silvestrijonathan/react | import React from 'react';
import {hydrate} from 'react-dom';
import App from './components/App';
hydrate(<App assets={window.assetManifest} />, document);
|
client/my-sites/media-library/list-plan-promo.js | allendav/wp-calypso | /**
* External dependencies
*/
import React from 'react';
import page from 'page';
import analytics from 'analytics';
import { preventWidows } from 'lib/formatting';
/**
* Internal dependencies
*/
const EmptyContent = require( 'components/empty-content' ),
Button = require( 'components/button' );
module.exports ... |
app/addons/fauxton/notifications/components/NotificationCenterPanel.js | michellephung/couchdb-fauxton | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed un... |
client/main.js | jabhishek/react-express-webpack-boilerplate | import React from 'react';
import ReactDOM from 'react-dom';
import {Router } from 'react-router';
import routes from './routes';
import Main from './Main.less'; // eslint-disable-line no-unused-vars
import createBrowserHistory from 'history/lib/createBrowserHistory';
ReactDOM.render(
(
<Router history={cr... |
app/static/js/App.js | NordicSHIFT/NordicSHIFT | // App.js
import React, { Component } from 'react';
import Main from './components/Main';
class App extends Component {
render() {
return (
<div>
<Main />
</div>
);
}
}
export default App;
|
react/liveevent/components/PowerupCount.js | jaredhasenklein/the-blue-alliance | import React from 'react'
import PropTypes from 'prop-types'
const PowerupCount = (props) => {
const {
color,
type,
count,
played,
isCenter,
} = props
const tooltipTitle = type.charAt(0).toUpperCase() + type.slice(1)
return (
<div className={`powerupCountContainer ${isCenter ? 'powerupC... |
app/index.js | pengfu/react-resume | /**
* Created by chang_su on 2017/5/15.
*/
import React from 'react';
import ReactDOM from 'react-dom';
require('./style/normalize.css')
require('./style/app.css')
require ('./style/fontello/css/fontello.css')
require('./style/transition.css')
import App from './components/App.jsx';
ReactDOM.render(<App />, document... |
src/components/Calculator/Calculator.js | Dynatos/personal-website | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import NavBar from "../NavBar/NavBar";
import CalculatorButtons from "./CalculatorButtons";
export default class Calculator extends Component {
handleNumberClick(operand) {
this.props.pushNumber(operand);
}
handleOperator(operato... |
src/components/ShareExperience/WorkExperiencesForm/WorkInfo/IsEmployed.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import RadioDefault from 'common/form/RadioDefault';
import Select from 'common/form/Select';
import Unit from 'common/form/Unit';
import InputTitle from '../../common/InputTitle';
import {
isEmployedOptions,
jobEndingTimeYearOptions,
jobEndingTime... |
docs/src/components/Home/Preface/Preface.js | seek-oss/seek-style-guide | import React from 'react';
import { PageBlock, Section, Columns, Text } from 'seek-style-guide/react';
export default () => (
<PageBlock>
<Section header>
<Text hero>A principled design process</Text>
</Section>
<Section>
<Text>
SEEK have developed 10 principles that describe the fun... |
client/src/app/components/forms/SignupForm.js | mtiger2k/graphql-tutorial | import React, { Component } from 'react';
import { reduxForm, Field } from 'redux-form';
import { renderTextField } from './formHelpers'
const validate = values => {
const errors = {}
if (!values.dispName) {
errors.dispName = 'Required'
}
if (!values.username) {
errors.username = 'Required'
}
if (!... |
src/components/game/ScoresTable.js | marc-ed-raffalli/geo-game | import React from 'react';
import ScoreCorrect from '../../containers/ScoreCorrect';
import ScoreError from '../../containers/ScoreError';
export default () => (
<div className="d-flex text-nowrap">
<span className="col py-2 badge badge-success"><ScoreCorrect/></span>
<span className="col py-2 badge badge-d... |
src/components/header/newGame/NewGameModal.js | TechyFatih/Nuzlog | import React from 'react';
import { Modal, Button } from 'react-bootstrap';
import { connect } from 'react-redux';
import { actions } from 'react-redux-form';
import games from 'data/games.json';
import ConfirmModal from 'components/other/ConfirmModal';
import { RRForm, RRFControl } from 'components/form/RRF';
impor... |
src-web/js/view/History.js | kwangkim/pigment | import React from 'react';
export default class HistoryView extends React.Component {
render() {
return <div>
<HistoryViewHeader />
</div>;
}
}
class HistoryViewHeader extends React.Component {
render() {
return <span>HISTORY VIEW</span>;
}
}
|
src/routes/Counter/components/Counter.js | yoshiyoshi7/react2chv2 | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
src/routes/Music/components/MusicView.js | jhash/jhash | import './MusicView.scss'
import React from 'react'
import { Link } from 'react-router'
export class MusicView extends React.Component {
static propTypes = {}
render () {
return (
<div className='view--music row'>
<Link to='music/tabitha'>
Tabitha
</Link>
</div>
)
}... |
src/svg-icons/notification/event-busy.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationEventBusy = (props) => (
<SvgIcon {...props}>
<path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V... |
react+redux/src/js/compont/unSend.js | fruitGirl/mm | /**
* Created by Administrator on 2017/8/19 0019.
*/
import React from 'react'
const UnSend = () =>{
return (
<div className="unSend">
<span className="iconfont icon-unhappy icon-md"></span>
<span>还未到配送日期</span>
</div>
)
}
export default UnSend; |
src/components/TimeAndSalary/MobileInfoButtons.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import { InfoButton } from 'common/Modal';
import styles from './MobileInfoButtons.module.css';
const MobileInfoButtons = ({ toggleInfoSalaryModal, toggleInfoTimeModal }) => (
<div className={styles.mobileInfoButtons}>
<div className={styles.infoBut... |
monkey/monkey_island/cc/ui/src/components/attack/techniques/T1158.js | guardicore/monkey | import React from 'react';
import ReactTable from 'react-table';
import {renderMachineFromSystemData, ScanStatus} from './Helpers';
import MitigationsComponent from './MitigationsComponent';
class T1158 extends React.Component {
constructor(props) {
super(props);
}
static getColumns() {
return ([{
... |
app/javascript/mastodon/features/ui/components/drawer_loading.js | TheInventrix/mastodon | import React from 'react';
const DrawerLoading = () => (
<div className='drawer'>
<div className='drawer__pager'>
<div className='drawer__inner' />
</div>
</div>
);
export default DrawerLoading;
|
frontend/js/components/commentView.js | beetwo/toucan | import twitterText from 'twitter-text'
import PropTypes from 'prop-types';
import React from 'react';
import UserLink from './userLink'
class Comment extends React.Component {
render() {
let {comment} = this.props;
let mentions = twitterText.extractMentionsWithIndices(comment);
let parts = [];
if (me... |
frontend/advocatesearch/AdvocateDetail.js | datoszs/czech-lawyers | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {Row} from 'react-bootstrap';
import translate from '../translate';
import router from '../router';
import {ADVOCATE_DETAIL} from '../routes';
import {BasicStatistics} from '../components/statistics';
import {Deta... |
app/javascript/src/components/FormDialog.js | michelson/chaskiq | import React from 'react'
import { Transition } from '@headlessui/react'
function FormDialog (props) {
const [_open, setOpen] = React.useState(props.open)
function handleClose () {
setOpen(false)
props.handleClose && props.handleClose()
}
React.useEffect(() => setOpen(props.open), [props.open])
re... |
ext/lib/site/topic-layout/topic-article/presupuesto-share/component.js | RosarioCiudad/democracyos | import React from 'react'
import Pendiente from './pendiente'
import Proyectado from './proyectado'
export default ({ topic, forum, user, toggleVotesModal }) => (
<div className='presupuesto-container'>
{topic.attrs.state === 'pendiente' &&
<Pendiente
topic={topic}
user={user}
toggl... |
src/containers/Application.js | hannupekka/yabsa | // @flow
import styles from 'styles/containers/Application';
import React, { Component } from 'react';
import CSSModules from 'react-css-modules';
import Header from 'components/Header';
type Props = {
children: ElementType | Array<ElementType>
}
// eslint-disable-next-line react/prefer-stateless-function
class App... |
addons/comments/src/manager/components/CommentsPanel/index.js | nfl/react-storybook | import PropTypes from 'prop-types';
import React from 'react';
import CommentList from '../CommentList';
import CommentForm from '../CommentForm';
import style from './style';
export default function CommentsPanel(props) {
if (props.loading) {
return (
<div style={style.wrapper}>
<div style={style.... |
src/svg-icons/editor/format-italic.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatItalic = (props) => (
<SvgIcon {...props}>
<path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"/>
</SvgIcon>
);
EditorFormatItalic = pure(EditorFormatItalic);
EditorFormatItalic.displayName ... |
react-apollo/src/containers/AuthPage/index.js | strapi/strapi-examples | /**
*
* AuthPage
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { findIndex, get, map, replace, set } from 'lodash';
import { Link } from 'react-router-dom';
import Button from '../../components/Button';
import FormDivider from '../../components/FormDivider';
import Input from '../../c... |
src/components/ui/ServiceIcon.js | meetfranz/franz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import injectSheet from 'react-jss';
import classnames from 'classnames';
import ServiceModel from '../../models/Service';
const styles = theme => ({
root: {
height: 'auto',
},
icon: {
wi... |
src/svg-icons/device/signal-cellular-no-sim.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularNoSim = (props) => (
<SvgIcon {...props}>
<path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 ... |
node_modules/react-bootstrap/es/SplitToggle.js | darklilium/Factigis_2 | import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import DropdownToggle fr... |
client/index.js | vudayagirivaibhav/freecodecamp | import Rx from 'rx';
import React from 'react';
import Fetchr from 'fetchr';
import debugFactory from 'debug';
import { Router } from 'react-router';
import { history } from 'react-router/lib/BrowserHistory';
import { hydrate } from 'thundercats';
import { Render } from 'thundercats-react';
import { app$ } from '../co... |
clients/react/src/routes.js | Boychenko/sample-todo-2016 | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import App from './components/App';
import ItemsListPage from './components/Items/ListPage';
import ItemEdit from './components/Items/EditPage';
import AboutPage from './components/AboutPage';
import NotFoundPage from './components/NotFoundPage... |
frontend/Login/ConnectedLogin.js | fdemian/Morpheus | import React from 'react';
import { connect } from 'react-redux';
import Login from './Login';
import {updateUsernameFn, updatePasswordFn} from '../Register/Actions';
import login from './Actions';
const mapStateToProps = (state) => {
return {
oauthProviders: state.app.oauth,
isLoggedIn: state.session.logged... |
app/components/ConsoleToolbar.js | kidaa/fil | import React from 'react';
import {connect} from 'react-redux';
import {setPreference} from 'actions/preferences';
import {getExtension} from 'helpers';
import {byExtension} from 'interpreters';
class ConsoleToolbar extends React.Component {
handleRunButton(event) {
event.preventDefault();
this.props.onRun(... |
tools/playground/components/Section/Section.js | auth0/web-header | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import styles from './Section.styl';
const cx = classNames.bind(styles);
const Section = ({ children, title, dark }) =>
<div>
<h2 className="container text-center">{title}</h2>
<div className={cx('sectio... |
src/routes/competition-show/competition-show.component.js | YGO/compe-frontend | import React from 'react'
import Radium from 'radium'
import PropTypes from 'prop-types'
import LeadersBoardContainer from './leadersboard.container'
import ScoreToggler from '../../components/leadersboard/score-toggler.component'
import lineBtnImg from './assets/linebutton_82x20.png'
import gnIconImg from './assets/gn... |
pages/index.js | falconi1812/falconi | import React, { Component } from 'react';
import ReactPixel from 'react-facebook-pixel';
import Header from 'components/Header/Header';
import Intro from 'components/Intro/Intro';
import Who from 'components/Who/Who';
import What from 'components/What/What';
import How from 'components/How/How';
import Services from 'c... |
src/components/common/icons/Comment2.js | WendellLiu/GoodJobShare | import React from 'react';
/* eslint-disable */
const Comment2 = (props) => (
<svg {...props} width="148" height="148" viewBox="0 0 148 148">
<g transform="translate(0 6)">
<path d="M13.5463199,136.724864 C14.8088582,138.042797 16.5145543,138.767545 18.3425804,138.767545 C20.6922403,138.767545 23.0372839,1... |
src/App.js | nihalgonsalves/react-cellular-automata | import React from 'react';
import './App.css';
import 'bulma/css/bulma.css';
import { dec2bin, ascii2bin } from './lib/util';
import AutomataIterator from './lib/AutomataIterator';
import SettingsPanel from './components/SettingsPanel';
import PlaybackPanel from './components/PlaybackPanel';
import { MAX_GENERATION... |
src/forms/AddSelection/AddSelectionForm.js | jobdoc/selections-app | import React from 'react'
import { Field } from 'redux-form'
import MenuItem from 'material-ui/MenuItem'
import {
SelectField,
TextField
} from 'redux-form-material-ui'
export const AddSelectionForm = (props) => (
<form onSubmit={props.handleSubmit}>
<Field name='item' component={TextField} hintText='Item' /... |
app/javascript/components/MemberDetailsForm/MemberDetailsForm.js | SumOfUs/Champaign | // weak
import React, { Component } from 'react';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import _ from 'lodash';
import Button from '../Button/Button';
import { updateForm } from '../../state/fundraiser/actions';
import FieldShape from '../FieldShape/FieldShape';
import e... |
app/components/Header.js | Mikkael3/tiea207projekti2015 | /*
* Joonas Vilppunen, Markus Muranen, Niko Heikkinen
* MIT Licence
* 2015
*/
import React from 'react';
import {Link} from 'react-router';
/*import FooterStore from '../stores/FooterStore';
import FooterActions from '../actions/FooterActions';
*/
class Header extends React.Component {
/*
constructor(props) {
super... |
src/svg-icons/editor/border-clear.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderClear = (props) => (
<SvgIcon {...props}>
<path d="M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v... |
src/slides/observer.js | philpl/talk-observe-the-future | import React from 'react'
import { Slide, Text, CodePane } from 'spectacle'
import { codeBackground } from '../constants/colors'
import observerPattern from '~/assets/observer-pattern.example'
export default (
<Slide transition={[ 'slide' ]}>
<Text
textColor='tertiary'
textSize='1.8em'
margin... |
node_modules/react-bootstrap/es/Breadcrumb.js | joekay/awebb | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/components/hero/hero.js | compwhile/compwhile.io | import React, { Component } from 'react';
import { Button, Row, Col } from 'react-bootstrap';
import gitHubLogo from './github.png';
import './hero.css';
class Hero extends Component {
render() {
return (
<div className="hero">
<Row>
<Col>
<div className="text"><strong>compwhi... |
src/views/components/logos/github.js | djfrsn/dashboard-cl | import React from 'react';
export default function GitHubLogo() {
return (
<svg viewBox="0 0 20 20">
<path d="M10 0C4.5 0 0 4.5 0 10c0 4.4 2.9 8.2 6.8 9.5.5.1.7-.2.7-.5v-1.9c-2.5.5-3.2-.6-3.4-1.1-.1-.3-.6-1.2-1-1.4-.4-.2-.9-.6 0-.7.8 0 1.3.7 1.5 1 .9 1.5 2.4 1.1 3 .9.1-.6.4-1.1.6-1.3-2.2-.3-4.6-1.2-4.6-5 ... |
duckr/app/components/Duck/Duck.js | josedab/react-exercises | import React from 'react'
import PropTypes from 'prop-types'
import { formatTimestamp } from 'helpers/utils'
import Reply from 'react-icons/lib/fa/mail-reply'
import Star from 'react-icons/lib/fa/star'
import {
duckContainer, contentContainer, avatar, actionContainer,
header, text, likeReplyContainer, icon, likedIc... |
setup/src/universal/features/routing/hoc/HOCRedirect.js | ch-apptitude/goomi | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import _ from 'lodash';
import { selectUserStatus } from 'features/user/selectors';
import { USER_STATUS } from 'features/user/constants';
import LoginRedirect from... |
src/components/IndicHuitre.js | olivmarcel/aquack | import React, { Component } from 'react';
import { Grid, Col, Jumbotron, Button, ToggleButtonGroup, ToggleButton } from 'react-bootstrap';
import Carte from "./Carte";
export default class Indic extends Component {
altIndic() {
console.log("...");
}
render() {
const indicHuitre = [1,2,4,6,7,8,9,10];
return... |
client/src/entwine/TinyMCE_ssembed.js | open-sausages/silverstripe-assets-gallery | /* global tinymce, window */
import jQuery from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import { loadComponent } from 'lib/Injector';
import ShortcodeSerialiser from 'lib/ShortcodeSerialiser';
import InsertEmbedModal from 'components/InsertEmbedModal/InsertEmbedModal';
import i18n from 'i... |
test/helpers/shallowRenderHelper.js | malecki/gcmeme | /**
* 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'... |
envkey-react/src/containers/invoice_list_container.js | envkey/envkey-app | import React from 'react'
import { connect } from 'react-redux'
import {
billingFetchInvoiceList,
billingFetchInvoicePdf
} from 'actions'
import {
getInvoices,
getIsLoadingInvoices,
getIsLoadingInvoicePdf
} from 'selectors'
import InvoiceRow from 'components/billing/invoice_row'
import SmallLoader from 'compo... |
docs/src/app/components/pages/components/TextField/ExampleSimple.js | w01fgang/material-ui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleSimple = () => (
<div>
<TextField
hintText="Hint Text"
/><br />
<br />
<TextField
hintText="The hint text can be as long as you want, it will wrap."
/><br />
<TextField
id="text-f... |
packages/cf-component-card/src/Card.js | koddsson/cf-ui | import React from 'react';
import PropTypes from 'prop-types';
class Card extends React.Component {
render() {
return (
<section id={this.props.id} className="cf-card">
{this.props.children}
</section>
);
}
}
Card.propTypes = {
id: PropTypes.string,
children: PropTypes.node
};
ex... |
src/app/views/logout.js | webcoding/reactui-starter | import React from 'react';
import authActions from 'actions/auth';
export default React.createClass( {
componentDidMount () {
authActions.logout();
},
render() {
return (
<div id="logout">
<div className="jumbotron">
<h1>Logged Out</h1>
... |
app/javascript/mastodon/features/compose/components/reply_indicator.js | codl/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from '../../../components/avatar';
import IconButton from '../../../components/icon_button';
import DisplayName from '../../../components/display_name';
import { defineMessages, injec... |
node_modules/react-router/es6/Route.js | Win-Myint/ReactChallenge2 | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { component, components } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var func = _React$PropTypes.func;
/**
* A <Route> is use... |
example/examples/PublicMethodsExample.react.js | Neophy7e/react-bootstrap-typeahead | import React from 'react';
import {Button, ButtonToolbar} from 'react-bootstrap';
import {Typeahead} from '../../src/';
import options from '../../example/exampleData';
/* example-start */
const PublicMethodsExample = React.createClass({
render() {
return (
<div>
<Typeahead
labelKey="nam... |
app/components/agents/agentPageResourcesItem.js | nypl-registry/browse | import React from 'react'
import { Link } from 'react-router'
const AgentPageResourcesItem = React.createClass({
getInitialState: function (event) {
return {errored: false}
},
handleError: function (event) {
this.setState({errored: true})
},
render () {
var displayImg = <td />
if (!this.sta... |
src/routes.js | KovDimaY/React-Highcharts | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/app';
import Bar from './components/charts/bar';
import Home from './components/home';
import Line from './components/charts/line';
// import NotFound from './components/notFound'; // TODO: fix router and use 404... |
maodou/events/client/components/admin/eventsList.js | wuyang910217/meteor-react-redux-base | import React, { Component } from 'react';
import {Link} from 'react-router';
import Loading from 'client/components/common/loading';
import moment from 'moment';
import { shortText } from 'lib/helpers';
export default class EventsList extends Component {
render() {
const { data, status } = this.props.events;
... |
public/app/components/player/duration-panel.js | feedm3/unhypem | /**
* @author Fabian Dietenberger
*/
'use strict';
import React from 'react';
import songDispatcher from '../../dispatcher/song-dispatcher';
class DurationLabel extends React.Component {
constructor(props) {
super(props);
this.state = {
duration: 0,
position: 0
}... |
client/components/Player.js | Pocket-titan/Tonlist | import React from 'react'
import {Slider} from 'material-ui'
import {compose, withState, mapProps} from 'recompose'
import {Audio, View, Text, TextInput} from '../components'
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import MyRawTheme from '../components/Theme.js';
import ThemeDecorator from 'mat... |
components/OverlayEngine.js | nvbf/pepper | // @flow
import React from 'react';
import { gql, graphql } from 'react-apollo';
import withData from '../libs/withData';
import Scoreboard from './scoreboard/ApolloScoreboard';
import PlayerList from './playerlist/ApolloPlayerList';
/* we need a component that can subscribe to overlay updates, and change the UI accor... |
ReactJS/exam prep/react-starter-kit-master/src/index.js | Martotko/JS-Web | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { BrowserRouter as Router } from 'react-router-dom';
ReactDOM.render((
<Router>
<App />
</Router>), document.getElementById('ro... |
lib/shared/elements/dynamic-list/container.js | relax/relax | import Component from 'components/component';
import isElementSelected from 'helpers/page-builder/is-element-selected';
import React from 'react';
import PropTypes from 'prop-types';
import {dataConnect} from 'relate-js';
import DynamicList from './dynamic-list';
@dataConnect(
(state, props) => ({
isLinkingData... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | UnSpiraTive/radio | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
packages/reactor-kitchensink/src/examples/D3/Hierarchy/ZoomableSunburst/ZoomableSunburst.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { Panel } from '@extjs/ext-react';
import { D3_Sunburst } from '@extjs/ext-react-d3';
export default class ZoomableSunburst extends Component {
store = Ext.create('Ext.data.TreeStore', {
autoLoad: true,
defaultRootText: 'd3',
fields: [
... |
actor-apps/app-web/src/app/components/common/Text.react.js | berserkertdl/actor-platform | import _ from 'lodash';
import React from 'react';
import memoize from 'memoizee';
import emojify from 'emojify.js';
import hljs from 'highlight.js';
import marked from 'marked';
import emojiCharacters from 'emoji-named-characters';
emojify.setConfig({
mode: 'img',
img_dir: 'assets/img/emoji' // eslint-disable-l... |
admin/client/App/screens/Home/components/Lists.js | jstockwin/keystone | import React from 'react';
import _ from 'lodash';
import { connect } from 'react-redux';
import { plural } from '../../../../utils/string';
import ListTile from './ListTile';
export class Lists extends React.Component {
render () {
return (
<div className="dashboard-group__lists">
{_.map(this.props.lists, ... |
modules/dreamview/frontend/src/components/CameraParam/index.js | xiaoxq/apollo | import React, { Component } from 'react';
import ReactTooltip from 'react-tooltip';
import { inject, observer } from 'mobx-react';
import positionIcon from 'assets/images/icons/position.png';
import rotationIcon from 'assets/images/icons/rotation.png';
const ResetSvg = () => (
<svg viewBox="0 0 1024 1024" width="... |
src/screens/SettingsStack/SettingsScreen.js | AzSiAz/LN-Reader | import React from 'react'
import { View, AsyncStorage, Alert, StyleSheet } from 'react-native'
import { List, ListItem } from 'react-native-elements'
export default class SettingsScreen extends React.PureComponent {
static navigationOptions = {
title: 'Settings',
// headerStyle: {},
headerTitleStyle: {
... |
src/routes/lossSection/participate.js | goldylucks/adamgoldman.me | /* eslint-disable react/jsx-curly-brace-presence */
import React from 'react'
import { MESSENGER_LINK_WELCOME } from '../../constants'
import Markdown from '../../components/Markdown'
export default {
title: 'Participate',
description: 'Description here',
html: (
<div>
<Markdown
source={`
I (... |
examples/passing-props-to-children/app.js | aastey/react-router | import React from 'react'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link, History } from 'react-router'
require('./app.css')
const history = useBasename(createHistory)({
basename: '/passing-props-to-children'
})
const App = React.createClass({
mixins: [ History ],
getInitial... |
modules/Router.js | littlefoot32/react-router | import React from 'react'
import warning from 'warning'
import createHashHistory from 'history/lib/createHashHistory'
import { createRoutes } from './RouteUtils'
import RoutingContext from './RoutingContext'
import useRoutes from './useRoutes'
import { routes } from './PropTypes'
const { func, object } = React.PropTyp... |
app/javascript/mastodon/features/account_gallery/components/media_item.js | KnzkDev/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Icon from 'mastodon/components/icon';
import { autoPlayGif, displayMedia } from 'mastodon/initial_state';
import classNam... |
1l_React_ET_Lynda/Ex_Files_React_EssT/Ch04/04_03/finish/src/index.js | yevheniyc/Autodidact | import React from 'react'
import { render } from 'react-dom'
import './stylesheets/ui.scss'
import { SkiDayCount } from './components/SkiDayCount'
window.React = React
render(
<SkiDayCount />,
document.getElementById('react-container')
)
// render(
// <SkiDayList days={
// [
// {
// resort: "Squ... |
index.js | algolia/react-nouislider | import PropTypes from 'prop-types';
import React from 'react';
import nouislider from 'nouislider';
class Nouislider extends React.Component {
componentDidMount() {
if (this.props.disabled) this.sliderContainer.setAttribute('disabled', true);
else this.sliderContainer.removeAttribute('disabled');
this.cr... |
public/pages/AdminOverview.js | datpham23/datndiana | import React from 'react'
import {Modal,Alert} from 'react-bootstrap';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as GuestActions from '../actions/guestActions';
import Griddle from 'griddle-react';
import '../sass/admin-overview.scss';
const AdminOverview = React.createCl... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.js | ontruck/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({ id, ...rest } = { id: 0, user: { id: 42, ... |
examples/infinite-scrolling/src/components/RepositoryCount.js | lore/lore | import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import PayloadStates from '../constants/PayloadStates';
export default createReactClass({
displayName: 'RepositoryCount',
propTypes: {
pages: PropTypes.array.isRequired
},
getStyles: function... |
js-old/MyTitle.js | aramay/complete-intro-to-react-v2 | import React from 'react'
var MyTitle = React.createClass({
render: function () {
console.log(this.props)
const color = {color: this.props.color}
console.log(color)
return (
<div>
<h1 style={color}>
{this.props.title}
</h1>
</div>
)
}
})
export ... |
src/components/ChaptersList/ChaptersList.js | suhodolskiy/bsuir-evt-laba-2017 | import React from 'react';
import { observer } from 'mobx-react';
import { SortableContainer, SortableElement } from 'react-sortable-hoc';
import './chaptersList.scss';
import ChapterCard from '../СhapterCard/ChapterCard';
export default SortableContainer(
observer(({ chapters, moveChapterToBlank }) => (
<ul cl... |
app/addons/documents/index-results/components/pagination/PaginationFooter.js | popojargo/couchdb-fauxton | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed un... |
src/components/doctrine/original/DoctrineOriginal.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './DoctrineOriginal.svg'
/** DoctrineOriginal */
function DoctrineOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'DoctrineOriginal' +... |
src/index.js | HHPnet/frontend | import React from 'react'
import ReactDOM from 'react-dom'
import injectTapEventPlugin from 'react-tap-event-plugin'
import App from './components/common/app/App'
import 'bootstrap/dist/css/bootstrap.css'
//import 'bootstrap/dist/css/bootstrap-theme.css'
//import 'bootstrap-material-design/dist/css/bootstrap-material-d... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/DefaultPropsInline.js | jamesgpearce/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
static defaultProps: {a: number, b: number, c: number} = {a: 1, b: 2, c: 3};
props: Props;
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extend... |
client/views/admin/federationDashboard/OverviewSection.stories.js | VoiSmart/Rocket.Chat | import React from 'react';
import OverviewSection from './OverviewSection';
export default {
title: 'admin/federationDashboard/OverviewSection',
component: OverviewSection,
};
export const Default = () => <OverviewSection />;
|
docs/app/Examples/elements/Icon/States/index.js | mohammed88/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const IconStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExample
title='Disabled'
description='An... |
docs-ui/components/emptyMessage.stories.js | looker/sentry | import React from 'react';
import {Panel, PanelHeader} from 'app/components/panels';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
import Button from 'app/components/buttons/button';
import EmptyMessage from 'app/views/settings/components/emptyMessage';
storiesOf('EmptyMe... |
classic/src/scenes/wbui/ULinkOR/ULinkORAccountSection/MailboxListItem/MailboxListItemSubServiceItem.js | wavebox/waveboxapp | import React from 'react'
import PropTypes from 'prop-types'
import shallowCompare from 'react-addons-shallow-compare'
import { ListItemSecondaryAction, Tooltip, IconButton } from '@material-ui/core'
import { withStyles } from '@material-ui/core/styles'
import ACAvatarCircle2 from '../../../ACAvatarCircle2'
import Mail... |
node_modules/react-router/es6/Link.js | TheeSweeney/ComplexReactReduxMiddlewareReview | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
example/App.js | BBuzzArt/react-native-infinite | import React from 'react';
import { StyleSheet, Text, View, TouchableHighlight, ScrollView } from 'react-native';
import { StackNavigator } from 'react-navigation';
import * as src from './src';
class App extends React.Component {
render() {
const { props } = this;
return (
<View style={css.viewport}>
... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js | RobzDoom/frame_trap | /**
* Copyright (c) 2015-present, 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.
*/
import Rea... |
source/component/listview/userPostRow.js | togayther/react-native-cnblogs | import React, { Component } from 'react';
import {
View,
Text,
Image,
TouchableHighlight
} from 'react-native';
import _ from 'lodash';
import moment from 'moment';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import { decodeHTML, getBloggerAvatar } from '../../common';
import { ComponentStyles, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.