path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
examples/huge-apps/routes/Course/routes/Assignments/routes/Assignment/components/Assignment.js | migolo/react-router | /*globals COURSES:true */
import React from 'react'
class Assignment extends React.Component {
render() {
let { courseId, assignmentId } = this.props.params
let { title, body } = COURSES[courseId].assignments[assignmentId]
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
... |
actor-apps/app-web/src/app/components/modals/AppCacheUpdate.react.js | luoxiaoshenghustedu/actor-platform | import React from 'react';
import Modal from 'react-modal';
//import pureRender from 'pure-render-decorator';
import { Styles, FlatButton } from 'material-ui';
import AppCacheStore from 'stores/AppCacheStore';
import AppCacheActionCreators from 'actions/AppCacheActionCreators';
import { KeyCodes } from 'constants/Act... |
packages/react-devtools-shared/src/devtools/views/Icon.js | jzmq/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import styles from './Icon.css';
export type IconType =
| 'arrow'
| 'components'
| '... |
src/decorators/selection_disableable_deco.js | catalin-enache/ab_utils | 'use strict';
import React from 'react';
export default function SelectionDisableableDeco (Component) {
class Decorated extends Component {
constructor(props) {
super(props);
this._disableSelection = this._disableSelection.bind(this);
this._killSelection = this._killSelection.bind(this);
this._enable... |
src/parser/deathknight/blood/modules/features/BoneShield.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatDuration, formatPercentage } from 'common/format';
import { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import StatisticBox from 'interface/oth... |
components/dashboard/dashboard.js | Yutenko/stories360 | import React from 'react'
import TextField from 'material-ui/TextField'
import Paper from 'material-ui/Paper'
import {observer} from 'mobx-react'
import DashboardStore from '../../stores/dashboardstore'
import {lightBlue400,amber600} from 'material-ui/styles/colors'
import {Container,Row,Col} from 'react-grid-sys... |
lib/next/wrapPage.js | lukemorton/republic | import React from 'react'
import PropTypes from 'prop-types'
export default function wrapPage (app, Component) {
return class extends React.Component {
static displayName = `Page(${Component.displayName || Component.name})`
static async getInitialProps (ctx) {
const { query } = ctx
const { actio... |
src/svg-icons/action/translate.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTranslate = (props) => (
<SvgIcon {...props}>
<path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.7... |
Example/components/Login2.js | Wondermall/react-native-router-flux | import React from 'react';
import {View, Text, StyleSheet} from "react-native";
import Button from "react-native-button";
import {Actions} from "react-native-router-flux";
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgr... |
app/components/shared/PageWithMenu.js | fotinakis/buildkite-frontend | import React from 'react';
import PropTypes from 'prop-types';
export default class PageWithMenu extends React.PureComponent {
static propTypes = {
children: PropTypes.node.isRequired
};
render() {
const children = React.Children.toArray(this.props.children);
return (
<div className="containe... |
src/components/IntlEditor.js | jimf/intl-live | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import * as IcuMessage from '../icu_message';
const insertionMap = {
number: IcuMessage.tidy('{foo, number}'),
date: IcuMessage.tidy('{foo, date, medium}'),
time: IcuMessage.tidy('{foo, time, medium}'),
select: IcuMessage.tid... |
src/svg-icons/image/grain.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageGrain = (props) => (
<SvgIcon {...props}>
<path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.... |
packages/website/builder/pages/docs/doc.js | yusufsafak/cerebral | import React from 'react'
function Doc(props) {
return (
<div className="docs-doc">
<div className="docs-doc-content">
<div className="docs-doc-edit">
<a href={props.githubUrl} target="_new">Edit on Github</a>
</div>
{props.doc}
</div>
</div>
)
}
export defaul... |
src/svg-icons/maps/directions-bus.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let 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... |
src/components/Letter.js | akoskaaa/typ-fastr | import React from 'react';
import extend from 'extend';
const letterBaseStyle = {
color: '#aaaaaa',
fontSize: '36px',
borderLeft: '1px solid transparent'
};
const currentLetterStyle = extend({}, letterBaseStyle, {
borderLeft: '1px solid #000000'
});
const missedLetterStyle = extend({}, letterBaseStyl... |
src/components/Events/Events.js | softwareniagara/softwareniagara.com | import React from 'react'
import BlankSlate from './BlankSlate'
import EventCard from '../EventCard'
import StyledEvents, {
StyledLink,
StyledList,
StyledListItem
} from './Events.css'
export default ({ events = [] }) => {
if (!events.length) {
return <BlankSlate>No events yet. Check back soon.</BlankSlat... |
src/svg-icons/av/forward-30.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvForward30 = (props) => (
<SvgIcon {...props}>
<path d="M9.6 13.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4... |
src/components/search-result.js | josebigio/PodCast | import React from 'react';
const SearchResult = ({searchResult, onResultClicked})=>{
return (
<li onClick={()=>onResultClicked(searchResult)}>
<p>{searchResult.title}</p>
</li>
)
}
export default SearchResult; |
app/javascript/mastodon/features/notifications/index.js | dunn/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import { expandNotifications, scrollTopNotifications,... |
client/components/footer.js | twistedSynapse/nodeServerBareBones | import React from 'react';
function Footer() {
return (
<footer>
<hr />
<a href="https://github.com/r0bot/nodeServerBareBones.git" target="_blank" rel="noopener noreferrer">Repo</a>
</footer>
);
}
export default Footer;
|
Neos.Media.Browser/packages/neos-media-browser/src/index.js | bwaidelich/neos-development-collection | import React from 'react';
import ReactDOM from 'react-dom';
import VariantsApp from "./Variants/index";
const variantsInformation = JSON.parse(document.getElementById('variants-information').innerHTML);
const originalInformation = JSON.parse(document.getElementById('original-information').innerHTML);
ReactDOM.render... |
example/examples/Geojson.js | lelandrichardson/react-native-maps | import React from 'react';
import MapView, { Geojson } from 'react-native-maps';
const myPlace = {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {},
geometry: {
type: 'Point',
coordinates: [64.165329, 48.844287],
},
},
],
};
const GeojsonMa... |
scripts/components/ProgressControl.js | send2moran/react_video_editor_imgur | import React from 'react';
import {ProgressBar} from 'react-bootstrap';
//import ReactSlider from 'react-slider';
import {toVideoDuration} from '../utils/';
import Thumbnail from '../components/Thumbnail';
import BarMarker from '../components/BarMarker';
import ReactSlider from '../components/slider';
export default R... |
board/src/App.js | google-research/fool-me-twice | // Copyright 2019 Google LLC.
//
// 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 ... |
js/components/inputgroup/success.js | bengaara/simbapp |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Text, Body, Left, Right, IconNB, Item, Input } from 'native-base';
import { Actions } from 'react-native-router-flu... |
src/components/account/settings/profile-tab.js | datea/datea-webapp-react | import React from 'react';
import {toJS} from 'mobx';
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';
import ImageField from '../../image-field';
import {observer, inject} from 'mobx-react';
import {Tr} from '../../../i18n';
@inject('store')
@observer
export default ... |
app/javascript/mastodon/features/compose/components/upload_button.js | increments/mastodon | import React from 'react';
import IconButton from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 're... |
src/forms/output/BenefitsTable.js | codeforboston/cliff-effects | // REACT COMPONENTS
import React from 'react';
import { Table } from 'semantic-ui-react';
// BENEFIT LOGIC
import { applyAndPushBenefits } from '../../benefits/applyAndPushBenefits';
// OBJECT MANIPULATION
import { cloneDeep } from 'lodash';
// @todo Move to utils file somewhere?
const getSignSymbol = function (num... |
src/Figure.js | glenjamin/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { elementType } from 'prop-types-extra';
import { createBootstrapComponent } from './ThemeProvider';
import FigureImage from './FigureImage';
import FigureCaption from './FigureCaption';
class Figure extends Re... |
ajax/libs/react-instantsearch/3.2.2-beta0/Dom.js | pvnr0082t/cdnjs | /*! ReactInstantSearch 3.2.2-beta0 | © Algolia, inc. | https://community.algolia.com/instantsearch.js/react/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof d... |
addons/info/example/Button.js | bigassdragon/storybook | import PropTypes from 'prop-types';
import React from 'react';
const Button = ({ disabled, label, style, onClick }) => (
<button disabled={disabled} onClick={onClick}>
{label}
</button>
);
Object.assign(Button, {
displayName: 'Button',
propTypes: {
label: PropTypes.string.isRequired,
style: PropTy... |
src/js/components/Search.js | mudrenok/bookmarks | import React from 'react';
import PropTypes from 'prop-types';
import { FOLDER } from '../constants/ItemTypes';
import { Redirect, Link } from 'react-router-dom';
class Search extends React.Component {
constructor(props) {
super(props);
this.state = {
value: this.props.search || '',
};
... |
node_modules/react-router/es6/IndexLink.js | SlateRobotics/slate-website | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import React from 'react';
import Link from '.... |
src/svg-icons/hardware/gamepad.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareGamepad = (props) => (
<SvgIcon {...props}>
<path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/>
</SvgIcon>
);
HardwareGamepad = pure(Hardw... |
src/routes/index.js | shane-arthur/currency-calculator | import React from 'react';
import { Router, Route } from 'react-router';
import CurrencyCalculatorContainer from '../containers/currency-calculator/currencyCalculatorContainer';
export default function (history) {
return (
<Router history={history}>
<Route path="/" component={CurrencyCalculatorContainer} /... |
RNApp/app/index.js | reyvera/raceDay | import React from 'react';
import Meteor, { createContainer } from 'react-native-meteor';
import LoggedOut from './layouts/LoggedOut';
import LoggedIn from './layouts/LoggedIn';
import Loading from './components/Loading';
import config from './config';
Meteor.connect(config.METEOR_URL);
const RNApp = (props) => {
... |
src/index.js | AaronBDC/blogRRR | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import promise from 'redux-promise';
import reducers from './reducers';
import PostsIndex from './c... |
src/components/MoonPhaseIcon.react.js | danesparza/Dashboard | import React, { Component } from 'react';
// Stylesheets & images
import 'weathericons/css/weather-icons.css';
class MoonPhaseIcon extends Component{
render() {
// Set the default icon:
var iconClass = "wi-moon-waning-crescent-6";
if (this.props.phase < .03) { iconClass = "wi-moon-new"; } else
... |
src/docs/reference/Accessibility.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import DocsArticle from '../../components/DocsArticle';
import Code from '../../components/Code';
import App from 'grommet/components/App';
import Anchor from 'grommet/components/Anchor';
import Heading from ... |
frontend/src/Movie/Details/MovieDetailsPageConnector.js | Radarr/Radarr | import { push } from 'connected-react-router';
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import NotFound from ... |
blueocean-material-icons/src/js/components/svg-icons/content/sort.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ContentSort = (props) => (
<SvgIcon {...props}>
<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>
</SvgIcon>
);
ContentSort.displayName = 'ContentSort';
ContentSort.muiName = 'SvgIcon';
export default ContentSort;
|
src/components/String/Tile/Tile.js | ShaneDrury/clicker | 'use strict';
import React from 'react';
import './Tile.less';
var Tile = React.createClass({
propTypes: {
parentCoordsGetter: React.PropTypes.func.isRequired,
getContext: React.PropTypes.func.isRequired,
top: React.PropTypes.number,
left: React.PropTypes.number,
width: R... |
src/scenes/home/thanks/thanks.js | alexspence/operationcode_frontend | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Section from 'shared/components/section/section';
class Thanks extends Component {
render() {
return (
<Section title="Thanks for joining">
<span>Thanks for joining operation code. Please check your email for... |
packages/starter-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.js | chungchiehlun/create-starter-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 = 0, ...rest }) {
return [
{ id:... |
src/Gallery.js | Luanre/react-transform-boilerplate | import React, { Component } from 'react';
export default class Gallery extends Component {
render () {
return (
<div>
<h1>Simple gallery page</h1>
</div>
)
}
} |
src/containers/App/App.js | phaneendra/stinter-web | import React, { Component } from 'react';
export default class App extends Component {
render () {
return (<div>Hello Universal Redux!</div>);
}
}
|
packages/node_modules/@webex/react-component-spaces-list/src/index.js | adamweeks/react-ciscospark-1 | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {AutoSizer, List} from 'react-virtualized';
import {Spinner} from '@momentum-ui/react';
import SpaceItem from '@webex/react-component-space-item';
import {getBadgeState, getGlobalNotificationState, hasMentions}... |
examples/with-apollo-and-redux/lib/withData.js | nahue/next.js | import 'isomorphic-fetch'
import React from 'react'
import { ApolloProvider, getDataFromTree } from 'react-apollo'
import { initClient } from './initClient'
import { initStore } from './initStore'
export default (Component) => (
class extends React.Component {
static async getInitialProps (ctx) {
const hea... |
assets/jqwidgets/demos/react/app/tabs/fluidsize/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTabs from '../../../jqwidgets-react/react_jqxtabs.js';
class App extends React.Component {
render () {
let tabsHTML = `
<ul>
<li style="margin-left: 30px;">Node.js</li>
<li>JavaServer Pages</li>
... |
docs/pages/_document.js | lgollut/material-ui | import React from 'react';
import { ServerStyleSheets } from '@material-ui/styles';
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { rewriteUrlForNextExport } from 'next/dist/next-server/lib/router/rewrite-url-for-export';
import { LANGUAGES_SSR } from 'docs/src/modules/constants';
impor... |
src/index.js | Gullskatten/hierarchy-webapp | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
components/rsvp-form/test.js | joeybaker/rachelandjoey | import test from 'tape'
import React from 'react'
import {addons} from 'react/addons'
import RsvpForm from './index.jsx'
const {TestUtils} = addons
const {Simulate, renderIntoDocument, isElement, createRenderer} = TestUtils
const getReactNode = (dom, node) => TestUtils.findRenderedDOMComponentWithTag(dom, node)
const g... |
node_modules/react-scripts/template/src/index.js | LuoPengFei/todo-app | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
src/components/icon/TriangleWaveIcon.js | reklawnos/synthesizer | import React from 'react';
export default function TriangleWaveIcon() {
return (
<svg viewBox="0 25 100 50" className="waveform-icon">
<path d="M57.5 61.7l-15-20-15 20-15.8-21.1 1.6-1.2 14.2 18.9 15-20 15 20 15-20 15.8 21.1-1.6 1.2-14.2-18.9z"/>
</svg>
);
}
|
src/imports/ui/builder/components/cart/CartTotals.js | hwillson/meteor-recommendation-builder | import React from 'react';
import s from 'underscore.string';
import maybePluralizeItemsLabel from './CartTotalsHelpers';
const CartTotals = ({ cartTotals }) => (
<div className="cart-totals">
{cartTotals.totalItems}
{maybePluralizeItemsLabel(cartTotals.totalItems)} for
${s.numberFormat(cartTotals.total... |
ui/src/containers/identity/edit_profile/edit_profile.stories.js | MonarchApp/monarch | import React from 'react';
import configureStore from 'redux-mock-store';
import { EditProfileForm } from './index.js';
import { Provider } from 'react-redux';
import { storiesOf } from '@storybook/react';
import { reducer } from 'redux-form';
const initialState = reducer({});
const store = configureStore([])(initialS... |
src/chat/messages/ChatMessages.js | easyCZ/enlighten | import React, { Component } from 'react';
import { Col } from 'react-flexbox-grid';
import Firebase from '../../firebase/Firebase';
class ChatMessages extends Component {
constructor(props) {
super(props);
}
renderMessages(messages) {
return messages
? messages.map((m) => <div key={m.id}>{m.te... |
src/routes/home/index.js | ChrisWC/MaterL | /**
* 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... |
js/app.js | xuorig/form-check-app | /* @flow */
import 'babel/polyfill';
import App from './components/App';
import React from 'react';
import ReactDOM from 'react-dom';
import Relay from 'react-relay';
import { RelayRouter } from 'react-router-relay';
const createBrowserHistory = require('history/lib/createBrowserHistory');
import routes from './rou... |
app/javascript/components/Service/Return.js | luckypike/mint | import React from 'react'
import PropTypes from 'prop-types'
import { useI18n } from '../I18n'
import { path } from '../Routes'
import page from '../Page'
// import styles from './Service.module.css'
import buttons from '../Buttons.module.css'
Return.propTypes = {
user: PropTypes.object,
locale: PropTypes.string... |
tests/site7/code2/components/component1.js | dominikwilkowski/cuttlebelle | import PropTypes from 'prop-types';
import React from 'react';
/**
* The Component1 component for the header
*/
const Component1 = ({
_ID,
_pages,
_storeSet,
_store,
_body
}) => {
_storeSet({ title: _pages[ _ID ].title }); // getting the title from the store (to test the store)
return (
<header>
<h1>{ ... |
react/features/video-menu/components/web/KickButton.js | jitsi/jitsi-meet | /* @flow */
import React from 'react';
import ContextMenuItem from '../../../base/components/context-menu/ContextMenuItem';
import { translate } from '../../../base/i18n';
import { IconCloseCircle } from '../../../base/icons';
import { connect } from '../../../base/redux';
import AbstractKickButton, {
type Props
... |
fields/types/password/PasswordColumn.js | andreufirefly/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
var PasswordColumn = React.createClass({
displayName: 'PasswordColumn',
propTypes: {
col: React.PropTypes.ob... |
src/components/Articles/Single/Views/Mobile/tpl.js | HopeUA/tv.hope.ua-react | import React from 'react';
import Styles from './Styles/main.scss';
export default function Common() {
const imageStyle = {
backgroundImage: 'url(https://cdn.hope.ua/media/shows/ADUU/episodes/00317/ADUU00317-cover.jpg)'
};
return (
<section className={ Styles.singleComponent }>
... |
examples/js/manipulation/export-csv-table.js | dana2208/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,
... |
src/components/HomePage.js | justin0022/student-services-forms | import React from 'react';
const HomePage = () => {
return (
<div>
<h1>Welcome, First-Name Last-Name</h1>
</div>
);
};
export default HomePage; |
src/components/StartOfNightView.js | IShin00biI/Ktulu | import React from 'react'
import {
Text,
View,
Button
} from 'react-native'
import { Top } from './index'
export const StartOfNightView = ({statueHolder, onSubmit, onMenu}) => {
return (
<View>
<Top statueHolder={statueHolder} onMenu={onMenu} />
<Text> Wszyscy idą spać </Text>
<Button tit... |
src/svg-icons/notification/sms.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSms = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/>
</SvgIcon>
);
NotificationSm... |
nailgun/static/views/dialogs.js | huntxu/fuel-web | /*
* Copyright 2014 Mirantis, Inc.
*
* 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 ... |
frontend/src/index.js | unicef/un-partner-portal | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import './styles/index.css';
import App from './App';
// eslint-disable-next-line
ReactDOM.render(<App />, document.getElementById('root'));
|
src/components/iconsgrid/ROSIconsGrid.js | uditalias/react-os | import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import ROSIconWrapper from './ROSIconWrapper';
import utils from '../../utils';
import draggableConnector from '../../compositions/draggableConnector';
import droppableConnector from '../../compositions/droppableConnector'... |
app/components/BodyContainer/index.js | audoralc/pyxis | /**
*
* BodyContainer
*
*/
import React from 'react';
class BodyContainer extends React.PureComponent {
render() {
const bodyStyle ={
gridRow: '2 / 6',
gridColumn: '1 / 6 span',
background: '#f6edeb',
}
return (
<div style={bodyStyle}>
{this.props.children}
</di... |
src/components/Footer/Footer.js | luznlun/kkRoom | /**
* 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 withStyles from 'isomorp... |
app/javascript/mastodon/components/avatar_composite.js | 5thfloor/ichiji-social | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class AvatarComposite extends React.PureComponent {
static propTypes = {
accounts: ImmutablePropTypes.list.isRequired,
ani... |
components/Layout/index.js | shinosakarb/tebukuro-client | // @flow
import React from 'react'
import type { ComponentType } from 'react'
import TopAppBar from '@material/react-top-app-bar'
import MaterialIcon from '@material/react-material-icon'
import UserInfo from '../UserInfo'
import Head from '../Head';
import '../../styles/style.css'
type Props = {}
const withLayout = (... |
src/v2/components/UI/Modal/index.js | aredotna/ervell | /* global this */
import React from 'react'
import { wrapWithProviders, initClientSideApolloClient } from 'v2/apollo'
import mount from 'v2/util/mount'
import unmount from 'v2/util/unmount'
import ModalComponent from 'v2/components/UI/Modal/Modal'
const isClientSide = typeof window !== 'undefined'
export default c... |
app/components/PreschoolCircle/PreschoolCircle.js | klpdotorg/tada-frontend | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import isEmpty from 'lodash.isempty';
import { Spinner } from '../../containers/common';
import { CreatePreschool } from '../../containers/Preschool';
import { EditCircle } from '../../containers/PreschoolCircle';
cons... |
src/svg-icons/image/filter-1.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter1 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/>
... |
packages/xo-web/src/xo-app/pool/action-bar.js | vatesfr/xo-web | import _ from 'intl'
import ActionBar, { Action } from 'action-bar'
import Component from 'base-component'
import React from 'react'
import { createGetObjectsOfType, createSelector, isAdmin } from 'selectors'
import { find } from 'lodash'
import { addSubscriptions, connectStore, noop } from 'utils'
import { addHostsToP... |
dev/components/atoms/searchField.js | Thr1ve/Dispense | import React from 'react'
import Mui from 'material-ui'
let { TextField } = Mui
let SearchField = React.createClass({
handleChange () {
this.props.onUserInput(
this.refs.filterTextInput.getValue()
)
},
handleBlur () {
this.refs.filterTextInput.focus()
},
// this should be handled automa... |
js/CSNavigator.js | kilimondjaro/react-native-couchsurfing-app | // @flow
import React, { Component } from 'react';
import {
Navigator,
Platform,
StyleSheet
} from 'react-native';
import {connect} from 'react-redux';
import Parse from 'parse/react-native';
import TabsView from './tabs/TabsView';
import EnterScreen from './login/EnterScreen';
import LoginScreen from './login/Lo... |
src/middleware/router.js | worb/launchpad | import React from 'react';
import { createMemoryHistory, match, RouterContext } from 'react-router';
import { renderToString } from 'react-dom/server';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
import configureStore from '../store';
import routes from '../routes... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | ryardley/react-router | import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
render () {
var announcements = COURSES[this.props.params.courseId].announcements;
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{announcemen... |
app/javascript/mastodon/containers/admin_component.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class AdminComponent extends React.PureComponent {
static propType... |
src/app/component/slider-button/slider-button.js | all3dp/printing-engine-client | import PropTypes from 'prop-types'
import React from 'react'
import propTypes from '../../prop-types'
import cn from '../../lib/class-names'
import Icon from '../icon'
import backIcon from '../../../asset/icon/back-large.svg'
import nextIcon from '../../../asset/icon/next-large.svg'
const Button = ({classNames, bac... |
site/src/components/post-layout.js | ajfisher/ajfisher.me | /** layout for poasts **/
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { useStaticQuery, graphql } from 'gatsby';
import { PostArticle } from './article';
import Header from './header';
import PostData from './postdata';
import { device } from './device... |
frontend/src/Search/AddNewItem.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import TextInput from 'Components/Form/TextInput';
import Icon from 'Components/Icon';
import Button from 'Components/Link/Button';
import Link from 'Components/Link/Link';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
i... |
Js/Ui/Components/Wizard/Container.js | Webiny/Webiny | import React from 'react';
import Webiny from 'webiny';
import _ from 'lodash';
import Step from './Step';
import styles from './styles.scss';
/**
* Wizard component, makes it easier to create wizards, without worrying about common features like steps, navigation, content etc.
*/
class Container extends Webiny.Ui.Co... |
docs/src/examples/elements/Step/States/StepExampleCompleted.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Icon, Step } from 'semantic-ui-react'
const StepExampleCompleted = () => (
<Step.Group>
<Step completed>
<Icon name='credit card' />
<Step.Content>
<Step.Title>Billing</Step.Title>
<Step.Description>Enter billing information</Step.Description>
... |
blueocean-material-icons/src/js/components/svg-icons/file/folder-shared.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const FileFolderShared = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z... |
client/src/components/Transaction.js | Nauktis/inab | import React from 'react';
import FontAwesome from 'react-fontawesome';
import Amount from './Amount';
export default class Transaction extends React.Component {
static propTypes = {
date: React.PropTypes.string,
payee: React.PropTypes.string,
category: React.PropTypes.string,
description: React.Prop... |
www/oldhawaii_metadata/apps/static/jsx/components/LatLngMap.js | oldhawaii/oldhawaii-metadata | import React from 'react';
import GoogleMapsLoader from 'google-maps';
class LatLngMap extends React.Component {
constructor(props) {
super(props);
this.placeMarker = this.placeMarker.bind(this);
this.state = {
map: null,
marker: null,
lat: this.props.lat,
lng: this.props.lng
... |
common/routes/Service/containers/Service.js | luanlv/minhphat | // /* global $ */
import { provideHooks } from 'redial'
import React from 'react'
import { connect } from 'react-redux'
import { loadData } from '../actions'
import Helmet from 'react-helmet'
import {Link} from 'react-router'
const redial = {
fetch: ({dispatch, params: { slug }}) => dispatch(loadData(slug))
}
const... |
client/src/components/dashboard/common/UserLabel.js | FCC-Alumni/alumni-network | import { isEqual } from 'lodash';
import propTypes from 'prop-types';
import React from 'react';
export default class UserLabel extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
}
render() {
const {
color,
folder,
image,
label,
... |
fixtures/ssr/server/render.js | AlmeroSteyn/react | import React from 'react';
import {renderToString} from 'react-dom/server';
import App from '../src/components/App';
let assets;
if (process.env.NODE_ENV === 'development') {
// Use the bundle from create-react-app's server in development mode.
assets = {
'main.js': '/static/js/bundle.js',
'main.css': '',... |
frontend/src/components/Post/ActionButtons.js | romerorocha/readable | import React from 'react';
import { Button } from 'semantic-ui-react';
const ActionButtons = ({ voteScore, vote, edit, remove }) => {
return (
<Button.Group basic floated="right">
<Button icon="thumbs up" onClick={() => vote('upVote')} circular />
<Button.Or text={voteScore > 0 ? '+'.concat(voteScore... |
src/svg-icons/action/settings-power.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsPower = (props) => (
<SvgIcon {...props}>
<path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-... |
frontend/src/app/components/ExperimentPreFeedbackDialog.js | 6a68/idea-town | import React from 'react';
import classnames from 'classnames';
export default class ExperimentPreFeedbackDialog extends React.Component {
render() {
const { experiment, surveyURL } = this.props;
const l10nArgs = JSON.stringify({
title: experiment.title
});
return (
<div className="mod... |
src/components/BookingCalendar.js | qandobooking/booking-frontend | import React from 'react';
import $ from 'jquery';
import 'fullcalendar';
import 'fullcalendar/dist/fullcalendar.css';
export default class BookingCalendar extends React.Component {
updateCalendarEvents(events) {
const { calendar } = this.refs;
$(calendar)
.fullCalendar('removeEvents')
$(calendar)... |
Ethereum-based-Roll4Win/node_modules/react-overlays/es/Modal.js | brett-harvey/Smart-Contracts | function _extends() { _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; }; return _extends.apply(this, arguments); }
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.