path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/encoded/static/components/browse/components/above-table-controls/AboveBrowseViewTableControls.js | hms-dbmi/fourfront | 'use strict';
import React from 'react';
import memoize from 'memoize-one';
import _ from 'underscore';
import { AboveTableControlsBase } from '@hms-dbmi-bgm/shared-portal-components/es/components/browse/components/above-table-controls/AboveTableControlsBase';
import { ChartDataController } from './../../../viz/chart... |
src/js/routes.js | mileszs/dwtools | import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
import App from './components/App';
import FriendListApp from './containers/FriendListApp/FriendListApp';
import MonsterFinderApp from './containers/MonsterFinderApp';
import MoveFinderApp from './containers/MoveFinderApp';
import M... |
src/index.js | laere/grocery-app | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
// STORE METHODS
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
// MIDDLEWARE
import Thunk from 'redux-thunk';
import Promise from 'redux-promise';
// ROUTING METHODS
// import { Router, ... |
src/svg-icons/maps/local-pharmacy.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPharmacy = (props) => (
<SvgIcon {...props}>
<path d="M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z"/>
</SvgIcon>
);
MapsLocalPharmacy = pure... |
app/javascript/flavours/glitch/features/favourites/index.js | vahnj/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from 'flavours/glitch/components/loading_indicator';
import { fetchFavourites } from 'flavours/glitch/actions/interactions';
import { ... |
npm-scripts/modules/Link.js | zipongo/react-router | import React from 'react'
import warning from 'warning'
const { bool, object, string, func, oneOfType } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
}
function isEmpt... |
packages/material-ui-icons/src/PermDataSetting.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-... |
webApp/src/Components/BroadcastProfile.js | s-law/silent-disco | import React from 'react';
// ROUTER
import { History } from 'react-router';
import reactMixin from 'react-mixin';
// COMPONENTS
import NavBar from './NavBar.js'
import BroadcastProfileView from './BroadcastProfileView.js'
import BroadcastProfileViewEdit from './BroadcastProfileViewEdit.js'
import Loading from './Loa... |
app/src/containers/MyTradesScreen.js | joshlevy89/the-book-thing | import React, { Component } from 'react';
import { connect } from 'react-redux';
import MyTrade from '../components/MyTrade';
require('../../styles/index.scss');
class MyTradesScreen extends Component {
render() {
const { mytrades } = this.props
// if (mytrades === undefined) {
// mytr... |
server/sonar-web/src/main/js/apps/project-admin/quality-gate/Header.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
packages/web/src/components/BudgetItemForm.js | hwaterke/inab | import {
amountToCents,
BudgetItemResource,
getSelectedMonthMoment,
ResourceFormProvider,
} from '@inab/shared'
import PropTypes from 'prop-types'
import React from 'react'
import {Field, Form} from 'react-final-form'
import {connect} from 'react-redux'
import {crudThunks} from '../thunks/crudThunks'
const map... |
docs/src/app/components/pages/components/Dialog/Page.js | owencm/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import dialogReadmeText from './README';
import DialogExampleSimple from './Exam... |
docs/app/Examples/elements/Label/Types/LabelExampleImageColored.js | koenvg/Semantic-UI-React | import React from 'react'
import { Label } from 'semantic-ui-react'
const LabelExampleImage = () => (
<div>
<Label as='a' color='blue' image>
<img src='http://semantic-ui.com/images/avatar/small/veronika.jpg' />
Veronika
<Label.Detail>Friend</Label.Detail>
</Label>
<Label as='a' col... |
modules/Link.js | rdjpalmer/react-router | import React from 'react'
import warning from './warning'
const { bool, object, string, func, oneOfType } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
}
function isEm... |
docs/src/app/components/pages/components/IconMenu/ExampleSimple.js | lawrence-yu/material-ui | import React from 'react';
import IconMenu from 'material-ui/IconMenu';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton';
import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert';
/**
* Simple Icon Menus demonstrating some of the layouts possible using the `anc... |
time-app/src/App.js | jongsoojong/timelement | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Timer from './Timer.js';
import DiceRoller from './DiceRoller.js';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} cl... |
src/routes.js | jhabdas/lumpenradio-com | import React from 'react';
import http from './core/HttpClient';
import { Router } from 'react-routing';
import ContentPage from './components/ContentPage';
import NotFoundPage from './components/NotFoundPage';
import ErrorPage from './components/ErrorPage';
const router = new Router(on => {
on('*', async (state, ne... |
src/svg-icons/maps/layers.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLayers = (props) => (
<SvgIcon {...props}>
<path d="M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"/>
</SvgIcon>
);
MapsLayers = pure(MapsLayer... |
src/createSelectable.js | leopoldjoy/react-selectable-extended | import React from 'react';
import ReactDOM from 'react-dom';
const createSelectable = (WrappedComponent) => {
class SelectableItem extends React.Component {
componentDidMount () {
this.context.selectable.register(this.props.selectableKey, ReactDOM.findDOMNode(this));
}
componentWillUnmount () {
this.co... |
src/svg-icons/action/subject.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSubject = (props) => (
<SvgIcon {...props}>
<path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/>
</SvgIcon>
);
ActionSubject = pure(ActionSubject);
ActionSubject.displayName = 'Acti... |
src/Jumbotron.js | jamon/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Jumbotron = React.createClass({
render() {
return (
<div {...this.props} className={classNames(this.props.className, 'jumbotron')}>
{this.props.children}
</div>
);
}
});
export default Jumbotron;
|
src/svg-icons/image/add-a-photo.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAddAPhoto = (props) => (
<SvgIcon {...props}>
<path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-... |
packages/components/src/Emphasis/Emphasis.stories.js | Talend/ui | import React from 'react';
import Emphasis from './Emphasis.component';
export default {
title: 'Design Principles/Typography/Emphasis',
};
export const WithValue = () => (
<div>
<h1>With value</h1>
<p>The emphasised text is returned (value = BroWn) :</p>
<Emphasis value="BroWn" text="The quick brown fox jum... |
WasteApp/js/components/list/index.js | airien/workbits |
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 } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import styles from './styles';
const {
... |
src/parser/shaman/restoration/modules/features/TidalWaves.js | sMteX/WoWAnalyzer | import React from 'react';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
class TidalWaves extends Analyzer {
static depe... |
src/components/ImageCropped.js | mikebarkmin/gestyled | import React from 'react';
import styled from 'styled-components';
import withStyle from './Base';
import Paper from './Paper';
import PropTypes from 'prop-types';
const StyledImageCropped = styled.div`
border-radius: ${props => (props.circle ? '50%' : '')};
height: ${props => (props.circle ? props.width : props.h... |
src/svg-icons/action/flip-to-back.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFlipToBack = (props) => (
<SvgIcon {...props}>
<path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2... |
dashboard-ui/app/components/settings/invoices.js | CloudBoost/cloudboost | import moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import RefreshIndicator from 'material-ui/RefreshIndicator';
import TransparentLoader from 'react-loader-advanced';
import { Table, Button } from 'react-bootstrap';
import {... |
docs/app/Examples/elements/Label/Content/LabelExampleDetail.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Label } from 'semantic-ui-react'
const LabelExampleDetail = () => (
<Label>
Dogs
<Label.Detail>214</Label.Detail>
</Label>
)
export default LabelExampleDetail
|
src/react/JSONTree/JSONNumberNode.js | cyhunter/redux-devtools | import React from 'react';
import reactMixin from 'react-mixin';
import { SquashClickEventMixin } from './mixins';
import hexToRgb from '../../utils/hexToRgb';
const styles = {
base: {
paddingTop: 3,
paddingBottom: 3,
paddingRight: 0,
marginLeft: 14
},
label: {
display: 'inline-block',
ma... |
src/scripts/views/suggestedView.js | nicomesa88/Kforce-Challenge | import React from 'react'
import HomeView from './homeView'
import {SearchCollection, SearchArtistModel, SuggestedAlbumsCollection} from '../models/models'
const SuggestedAlbumsView = React.createClass({
render: function(){
console.log(this.props)
return (
<div className="suggested-albums-wrapper">
<HomeV... |
app/components/Widgets/PhotoWidget.js | rjzheng/kzhomepanel | import React, { Component } from 'react';
class PhotoWidget extends Component {
render () {
return (
<div className="widget">
</div>
)
};
};
export default PhotoWidget;
|
examples/shopping-cart/src/containers/CartContainer.js | gaearon/redux | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { checkout } from '../actions'
import { getTotal, getCartProducts } from '../reducers'
import Cart from '../components/Cart'
const CartContainer = ({ products, total, checkout }) => (
<Cart
products={product... |
app/components/login-signup/FormInput.js | adrilo/headek | import React from 'react';
import { Glyphicon } from 'react-bootstrap';
import UserFlowActions from '../../actions/UserFlowActions';
let FormInput = React.createClass({
getInitialState() {
return {
value: null
}
},
render() {
let inputContainerStyle = {
li... |
src/components/Sentry/ErrorBoundary.js | ayastreb/money-tracker | import React from 'react';
import * as Sentry from '@sentry/browser';
class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = { error: null };
}
componentDidCatch(error, errorInfo) {
this.setState({ error });
console.log('sentry error', error);
Sentry.wi... |
docs/src/NavMain.js | apkiernan/react-bootstrap | import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
introduction: {
link: '/introduction.html',
title: 'Introduction'
},
'getting-started': {
link: '/getting-started.html',
title: 'Getting star... |
src/static/containers/CategoryNavigation/index.js | qwertypomy/rental | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actionCreators from '../../actions/category';
import TreeView from '../../components/TreeView';
import './styles.scss';
class CategoryNavigationView extends React.Component {
static propTypes... |
src/app/containers/Statistics/components/test.js | MarcusKolman/www | import React, { Component } from 'react';
const Link = (props) => {
return (
<div>
Hello
</div>
);
}
export default Link; |
src/DatePicker/CalendarYear.js | rscnt/material-ui | import React from 'react';
import ReactDOM from 'react-dom';
import YearButton from './YearButton';
import {cloneDate} from './dateUtils';
class CalendarYear extends React.Component {
static propTypes = {
displayDate: React.PropTypes.object.isRequired,
maxDate: React.PropTypes.object,
minDate: React.Prop... |
src/components/members/store.js | bugdrip/omgr-admin | import React from 'react'
import { connect } from 'react-redux'
import { Table, Breadcrumb, Tooltip } from 'antd'
import request from 'superagent'
import TooltipLabel from '../commons/tooltipLabel'
const rowSelection = {
onChange(selectedRowKeys, selectedRows) {
console.log(`selectedRowKeys: ${selectedRo... |
frontend/app/components/ItemIcon/IconStarburst.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
import './IconStarburst.css'
/**
* @summary IconStarburst
* @version 1.0.1
* @component
*
* @param {object} props
*
* @returns {node} jsx markup
*/
function IconStarburst({ className }) {
return (
<svg
className={`IconStarburst ${className... |
.history/src/instacelebs_20171001003252.js | oded-soffrin/gkm_viewer |
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack to load favicon.ico
import './styles/styles.scss'; // Yep, that's right. You can import SASS/CSS files too! Webpack will r... |
docs/src/pages/components/toggle-button/CustomizedDividers.js | lgollut/material-ui | import React from 'react';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import FormatAlignLeftIcon from '@material-ui/icons/FormatAlignLeft';
import FormatAlignCenterIcon from '@material-ui/icons/FormatAlignCenter';
import FormatAlignRightIcon from '@material-ui/icons/FormatAlignRight';
import For... |
test/unit/lib/static/components/utils.js | gemini-testing/html-reporter | import React from 'react';
import _ from 'lodash';
import configureStore from 'redux-mock-store';
import {Provider} from 'react-redux';
import defaultState from 'lib/static/modules/default-state';
exports.mkState = ({initialState} = {}) => {
return _.defaultsDeep(initialState, defaultState);
};
exports.mkStore = ... |
app/javascript/mastodon/components/hashtag.js | dunn/mastodon | import React from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Permalink from './permalink';
import { shortNumberFormat } from '../utils/numbers';
const Hashtag = ({ hashtag }) ... |
src/components/Profile.js | leonardoelias/social-media-profile | import React from 'react';
import { connect } from 'react-redux';
import { Content, CardContent, Card, CardImage, Image} from 're-bulma'
const Profile = ({ user: { profile } }) => {
const { avatar, username, description } = profile;
return (
<Card>
<CardImage>
<Image src={ avatar } />
</C... |
Web/src/containers/Home/index.js | CMITInternational/Guitars | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { button, Jumbotron } from 'react-bootstrap';
import appActions from '../App/Actions';
import type IApp from '../App/IApp';
import appPropTypes from '../App/PropTypes';
type IProps = {
app: IApp,
sh... |
app/javascript/mastodon/components/column_header.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { createPortal } from 'react-dom';
import classNames from 'classnames';
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
import Icon from 'mastodon/components/icon';
const messages = defineMessages({
show: { id: 'column_h... |
src/svg-icons/av/recent-actors.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvRecentActors = (props) => (
<SvgIcon {...props}>
<path d="M21 5v14h2V5h-2zm-4 14h2V5h-2v14zM14 5H2c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM8 7.75c1.24 0 2.25 1.01 2.25 2.25S9.... |
examples/with-ioc/components/component2.js | BlancheXu/test | import React from 'react'
import Endpoint from './endpoint'
import EndButton from './endbutton'
export default () => (
<div
style={{ marginTop: '5px', border: '1px dashed #0000ff', padding: '10px' }}
>
<h3>Component2</h3>
Knows nothing about any custom `Link` or `Router` components or prop
<Endpoin... |
src/components/PhotoFooter.js | kakapo2016-projects/tooth-and-pail | import React from 'react'
import ProgressBar from './ProgressBar'
import Rate from './Rate'
export default React.createClass({
render () {
return (
<div className='photoFooter'>
<p className='photo-footer-name'>{this.props.name}</p>
<p className='galleryProgressBar'>
<ProgressBar ... |
src/components/TableHeadingCell.js | joellanciaux/Griddle | import React from 'react';
const TableHeadingCell = ({ title, columnId, onClick, onMouseEnter, onMouseLeave, icon, style, className }) => (
<th
onClick={onClick}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
style={style}
className={className}
>
{title}
</th>
)
export default T... |
docs/src/app/components/pages/components/Stepper/HorizontalLinearStepper.js | andrejunges/material-ui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* Horizontal steppers are ideal when the contents of one step depend on an earlier step.
* Avoid using long step ... |
packages/mwp-app-route-plugin/src/route.js | meetup/meetup-web-platform | // @flow
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import getHandler from './handler';
import { CLICK_PLUGIN_NAME } from 'mwp-tracking-plugin/lib/click';
export const onPreResponse = {
/*
* This function processes the route response before it is sent to the client.
*
* - In dev, ... |
app/containers/Root.js | NightBrownie/RedisViewer | import React from 'react'
import { Provider } from 'react-redux'
import { IntlProvider } from 'react-intl'
import { ConnectedRouter as Router } from 'react-router-redux'
export default function Root ({store, history, children}) {
return (
<IntlProvider locale='en'>
<Provider store={store}>
<Router ... |
example/examples/Overlays.js | phantomlds/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LATITUDE_DELTA = 0.092... |
assets/static/index.js | rachardking/builder | import 'babel-core/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from './store/configureStore';
import App from './containers/App';
import UserPage from './co... |
src/components/atoms/List/index.js | ygoto3/artwork-manager | // @flow
import React, { Component } from 'react';
import { ListItem } from './ListItem';
import styles from './styles.css';
export type ListProps = {
children: ListItem;
className: string;
};
export class List extends Component<*, ListProps, *> {
props: ListProps;
render() {
const { children, clas... |
Libraries/Modal/Modal.js | wenpkpk/react-native | /**
* 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.
*
* @provides... |
src/components/EventListPage.js | chrisfitkin/cf-event-planner-3 | import React from 'react'
import Filter from '../containers/Filter'
import EventListContainer from '../containers/EventListContainer'
import FloatingActionButton from 'material-ui/FloatingActionButton';
import ContentAdd from 'material-ui/svg-icons/content/add';
import { Link } from 'react-router'
const style = {
po... |
src/pages/activity/Detail.js | zzelune/neam | /*
* @Author: zhaozheng1.zh
* @Date: 2017-09-29 10:47:42
* @Last Modified by: zhaozheng1.zh
* @Last Modified time: 2017-12-06 10:28:51
*/
import React, { Component } from 'react';
import { LayoutAnimation, UIManager, View, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, Image } from 'react-native';... |
demos/forms-demo/src/index.js | idream3/cerebral | import React from 'react'
import {render} from 'react-dom'
import {Controller} from 'cerebral'
import {Container} from 'cerebral/react'
import Devtools from 'cerebral/devtools'
import Router from 'cerebral-router'
import app from './modules/app'
import simple from './modules/simple'
import checkout from './modules/chec... |
examples/sidebar/app.js | bs1180/react-router | import React from 'react'
import { render } from 'react-dom'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
import data from './data'
require('./app.css')
const history = useBasename(createHistory)({
basename: '/sidebar'
})
class Category extends React.Compo... |
time-app/src/Timer.js | jongsoojong/timelement | import React, { Component } from 'react';
class Timer extends Component {
constructor(props) {
super(props);
this.state = { secondsElapsed: 0 }
}
tick() {
this.setState((prevState) => ({
secondsElapsed : prevState.secondsElapsed + 1
}));
}
timeFormat(ti... |
test/fixtures/infer.js | jquense/react-component-metadata | import React from 'react';
class InferedComponent {
static propTypes = {
/**
* An object hash of field errors for the form.
*/
objProp: React.PropTypes.object
}
render(){
}
}
export default InferedComponent;
|
src/app/components/pages/Home.js | cmseguin/react-express-boilerplate | import Nav from '~/app/components/modules/Nav'
import React from 'react'
export default class Home extends React.Component {
render () {
return (
<div>
<Nav />
<h1>Homepage</h1>
</div>
)
}
}
|
tutorial/lesson-3/client/components/Header.js | reimagined/resolve | import React from 'react'
// The react-helmet library allows you to manage the document *head* section.
import { Helmet } from 'react-helmet'
import { useStaticResolver } from '@resolve-js/react-hooks'
const Header = ({ title, css }) => {
// Use the *useStaticResolver* hook to obtain the full path to a static resour... |
node_modules/react-bootstrap/es/MenuItem.js | ProjectSunday/rooibus | 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/Modal/Modal.js | DaveSpringer/bmg-rap-sheets | import React from 'react'
import './style/Modal.scss'
class Modal extends React.Component {
render () {
// Render nothing if the "show" prop is false
if (!this.props.show) {
return null
}
let clickFunction = this.props.onClose
if (this.props.allowClicks) {
clickFunction = () => {}
... |
src/Footer.js | honmanyau/muup-story | import React, { Component } from 'react';
// This class is used purely for rendering the map array generated by logic.generateLevel
class Footer extends React.Component {
render() {
const footerContainerStyles = {
marginTop: "3rem"
};
const footerIconStyles = {
margin: "0.2rem",
fontSi... |
src/server.js | remcorakers/strava-segment-rank | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import path from 'path';
import express from 'express';... |
packages/plugins/i18n/admin/src/components/CMEditViewInjectedComponents/CMEditViewLocalePicker/index.js | wistityhq/strapi | import React from 'react';
import PropTypes from 'prop-types';
import get from 'lodash/get';
import { Box } from '@strapi/design-system/Box';
import { Divider } from '@strapi/design-system/Divider';
import { Select, Option } from '@strapi/design-system/Select';
import { Typography } from '@strapi/design-system/Typograp... |
src/js/admin/photos/photo-flow/photo-item/photo-item-move-group-dialog/photo-item-move-group-dialog.js | ucev/blog | import React from 'react'
import { connect } from 'react-redux'
import OptionDialog from '$components/dialogs/option-dialog'
import { photoMoveDialogVisible, photoMoveSingle } from '$actions/photos'
class PhotoItemMoveGroupDialog extends React.Component {
constructor (props) {
super(props)
this.hide = this.... |
src/containers/HomeSearch/SearchBar.js | kokengthecoder/github-user-search | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Form, Input } from 'semantic-ui-react';
import { bindActionCreators } from 'redux';
import { searchUser } from '../../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { val... |
src/components/Tooltip/index.js | badT/Chatson | import React from 'react';
import { styles } from './styles.scss';
export default function Tooltip(props) {
return (
<div className={`${styles}`}>
<div className={`tooltip ${props.position}`}>
<span>{props.text}</span>
</div>
</div>
);
}
Tooltip.propTypes = {
position: React.PropType... |
src/components/Charts/HeatMap/index.js | ascrutae/sky-walking-ui | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... |
src/svg-icons/image/tag-faces.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTagFaces = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.... |
src/components/todo/screens/TodoAdd/views/TodoAddView.js | yasavbrain/yasav | import React from 'react';
import { Container, Content, Text, Form, Item, Input, Label, Button, Icon } from 'native-base';
import { View, TextInput } from 'react-native';
import I18n from 'yasav/locales/i18n';
import Style from '../styles/style.js';
import { GenericHeader } from 'yasav/src/viewElements/shared/Header';... |
examples/babel-plugin-react-transform/app/index.js | danieldunderfelt/delicate-error-reporter | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
const root = document.getElementById('root');
ReactDOM.render(<App />, root);
|
blueocean-material-icons/src/js/components/svg-icons/action/gif.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionGif = (props) => (
<SvgIcon {...props}>
<path d="M11.5 9H13v6h-1.5zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1z"/>
</SvgIcon>
);
ActionGif.displayName = ... |
src/Parser/DeathKnight/Unholy/Modules/Items/Tier21_4p.js | enragednuke/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
class Tier21_4p ex... |
examples/async-portals/src/Portal.js | gaearon/react-hot-loader | import React from 'react';
import { Portal } from 'react-portal';
import hidden from './HiddenComponent';
const Hidden = hidden();
const InPortal = ({ children }) => <div> + {children}</div>;
export default () => (
<Portal>
<InPortal>
This is a first portal
<Hidden.counter />
</InPortal>
</Po... |
src/components/icons/CloudsBrokenIcon.js | maximgatilin/weathernow | import React from 'react';
export default function CloudsBrokenIcon() {
return (
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 163.1 127.59"><path d="M456.46,167h0c0-.25,0-0.5,0-0.75a36.25,36.25,0,1,0-72.51,0s0,0,0,.07a29.59,29.59,0,0,0,1.39,59.16h71.12A29.24,29.24,0,1,0,456... |
index.ios.js | amostap/react-native-todo | import React from 'react';
import { AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import App from './js/App';
import Store from './js/redusers';
const AppWithStore = () => (
<Provider store={crea... |
curator-web/src/js/components/form/textField.js | rajeshnaroth/curator | import React from 'react'
const TextField = React.createClass({
valueChange(ev) {
if (typeof this.props.binder === 'function') this.props.binder(ev.target.value)
},
keyPress(ev) {
if(ev.key === 'Enter') {
this.props.onEnter(ev.target.value)
}
},
render() {
let pval = this.props.presetValue
r... |
src/Parks.js | jcarapia/nationalParks | import React, { Component } from 'react';
import axios from 'axios';
import NavBar from './NavBar';
import Footer from './Footer';
import Select from './Select';
import Video from './Video';
import Chart from './Chart';
import TwitterTimeline from './TwitterTimeline';
import Data from './data/data';
class Parks ext... |
src-client/admin/containers/DevTools.js | helinjiang/xman-admin | 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="ctrl-h"
changePositionKey="ctrl-w">
<LogMonitor />
... |
demos/demo/src/components/Projects/index.js | idream3/cerebral | import React from 'react'
import {connect} from 'cerebral/react'
import listProps from '../../common/Collection/props/list'
import translations from '../../common/computed/translations'
import Project from '../Project'
export default connect(
listProps('projects', {t: translations}),
function Projects ({enterPres... |
app/components/settings/terms-and-conditions/index.js | Vizzuality/forest-watcher | // @flow
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import Hyperlink from 'react-native-hyperlink';
import { trackScreenView } from 'helpers/analytics';
import i18n from 'i18next';
import Theme from 'config/theme';
import styles from './styles';
class TermsAndConditions exte... |
frontend/src/containers/ModalContainer.js | leemac/kyro | import React from 'react'
import { connect } from 'react-redux'
import AddLibraryModal from '../components/modals/AddLibraryModal'
import { hideModal } from '../actions/modals'
import { addLibrary } from '../actions/library'
const MODAL_COMPONENTS = {
'ADD_LIBRARY': AddLibraryModal
}
const ModalRoot = ({ modalTyp... |
src/svg-icons/device/battery-charging-full.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryChargingFull = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H... |
imports/ui/components/JustifiedLayout/components/snippet/JustifiedSelectIcon.js | ShinyLeee/meteor-album-app | import PropTypes from 'prop-types';
import React from 'react';
import { SelectIcon } from './snippet.style';
const JustifiedSelectIcon = (props) => {
const { activate } = props;
return (
<SelectIcon activate={activate} width="24px" height="24px" viewBox="0 0 24 24">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48... |
node_modules/react-select/src/utils/defaultMenuRenderer.js | pris54/reactjs-simple-form | import classNames from 'classnames';
import React from 'react';
function menuRenderer ({
focusedOption,
instancePrefix,
labelKey,
onFocus,
onSelect,
optionClassName,
optionComponent,
optionRenderer,
options,
valueArray,
valueKey,
onOptionRef
}) {
let Option = optionComponent;
return options.map((option,... |
app/index.js | whitebird08/sprintly-kanban | import client from './lib/sprintly-client';
import router from './router';
import React from 'react';
// Enable React dev tools
window.React = React;
window.manifold = router(client);
|
src/svg-icons/communication/call-made.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallMade = (props) => (
<SvgIcon {...props}>
<path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/>
</SvgIcon>
);
CommunicationCallMade = pure(CommunicationCallMade);
CommunicationCallMade.displ... |
gritsurvey/src/index.js | Alex-Gardner/grit-survey | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
packages/vx-geo/src/projections/Orthographic.js | Flaque/vx | import React from 'react';
import Projection from './Projection';
export default function Orthographic(props) {
return <Projection projection="orthographic" {...props} />;
}
|
app/javascript/mastodon/features/search/index.js | tootcafe/mastodon | import React from 'react';
import SearchContainer from 'mastodon/features/compose/containers/search_container';
import SearchResultsContainer from 'mastodon/features/compose/containers/search_results_container';
const Search = () => (
<div className='column search-page'>
<SearchContainer />
<div className='... |
src/svg-icons/social/sentiment-dissatisfied.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentDissatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 1... |
src/containers/auth/AuthenticateView.js | LancCJ/react-native-cyber-police | /**
* Authenticate Screen
* - Entry screen for all authentication
* - User can tap to login, forget password, signup...
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import {
View,
Image,
StyleSheet,
} from 'react-native';
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.