path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/components/AppraisalFormat.js
wiserl/appraisal-frontend
import React from 'react'; const styles = { border: '4px #545454', margin: '90px', padding: '40px', }; export default appraisal => ( <div style={{...styles}}> <h4> Requester Email: {appraisal._email}</h4> <p>Type: {appraisal._type}</p> <div><em>Start Date: {appraisal._start}</em></div> <di...
app/javascript/mastodon/features/follow_requests/index.js
rainyday/mastodon
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debou...
src/components/UserRegistration.js
dkadrios/zendrum-stompblock-client
import React from 'react' import PropTypes from 'prop-types' import { withStyles, Button, DialogActions, DialogContent, DialogContentText, DialogTitle, SvgIcon, } from '@material-ui/core' import UserRegistrationForm from './UserRegistrationForm' import GravatarIcon from '../images/Gravatar.svg' import Dia...
app/components/BaseComponent.js
timothyvanderaerden/React-TMDb
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withRouter } from 'react-router-dom'; class BaseComponent extends Component { componentDidUpdate(prevProps) { if (this.props.location !== prevProps.location) { window.scrollTo(0, 0); } } render() { return ( ...
src/containers/NoteDialogContainer.js
dggriffin/noteworthee
import React from 'react'; import NoteDialog from 'components/NoteDialog'; import Rebase from 're-base'; const base = Rebase.createClass('https://noteworthyapp.firebaseio.com'); class NoteDialogContainer extends React.Component { constructor(props) { super(props); } addNote(newNote) { let noteKey = bas...
packages/material-ui/src/GridList/GridList.js
cherniavskii/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import withStyles from '../styles/withStyles'; export const styles = { root: { display: 'flex', flexWrap: 'wrap', overflowY: 'auto', listStyle: 'none', padding: 0, WebkitOverflowScrolling: 'tou...
docs/src/modules/components/GoogleTag.js
cherniavskii/material-ui
import React from 'react'; import config from 'docs/src/config'; class GoogleTag extends React.Component { componentDidMount() { // Wait for the title to be updated. this.googleTimer = setTimeout(() => { window.gtag('config', config.google.id, { page_path: window.location.pathname, }); ...
lib/carbon-fields/vendor/htmlburger/carbon-fields/assets/js/containers/components/container/tabs.js
boquiabierto/wherever-content
/** * The external dependencies. */ import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; /** * The internal dependencies. */ import ContainerBase from 'containers/components/container/base'; /** * Render the tabs of the container. * * @param {Object} props * @par...
test/connect/batch-force-update.js
nofluxjs/noflux-react
import test from 'ava'; import '../helpers/setup-test-env'; import React, { Component } from 'react'; import { mount } from 'enzyme'; import { connect, state } from '../../src'; test('should batch forceUpdate', t => { state.set({ name: 'Ssnau' }); let forceUpdateCallTimes = 0; let renderCallTimes = 0; @conne...
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js
allengaller/actor-platform
import _ from 'lodash'; import React from 'react'; import { PureRenderMixin } from 'react/addons'; import ActorClient from 'utils/ActorClient'; import { Styles, FlatButton } from 'material-ui'; import { KeyCodes } from 'constants/ActorAppConstants'; import ActorTheme from 'constants/ActorTheme'; import MessageAction...
src/svg-icons/hardware/security.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareSecurity = (props) => ( <SvgIcon {...props}> <path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/> </SvgIcon> ); Hardwa...
playground/client/src/index.js
JHerrickII/NewsTree
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();
src/components/VideoPlayer/HLS/Stream.js
matmoi/react-adaptive-streaming
import React from 'react' import PropTypes from 'prop-types' import DropdownPanel from '../../utils/DropdownPanel.js' export default class HLSStream extends React.Component { render() { const { mediaPlayer } = this.props return ( <DropdownPanel title={"HLS Stream"} data={{ ...
packages/wix-style-react/src/TableActionCell/docs/examples/PrimarySecondaryRTLExample.js
wix/wix-style-react
import React from 'react'; import Star from 'wix-ui-icons-common/Star'; import Download from 'wix-ui-icons-common/Download'; import Duplicate from 'wix-ui-icons-common/Duplicate'; import Print from 'wix-ui-icons-common/Print'; import { classes } from '../TableActionCell.story.st.css'; import { TableActionCell } from ...
src/svg-icons/action/favorite.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionFavorite = (props) => ( <SvgIcon {...props}> <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6...
pages/index.js
nickroberts404/meadowlab
import React from 'react' import { Link } from 'react-router' import { prefixLink } from 'gatsby-helpers' import Helmet from 'react-helmet' import { config } from 'config' import PhotoCollage from '../components/PhotoCollage' export default class Index extends React.Component { render () { return ( <div> ...
src/svg-icons/device/access-time.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAccessTime = (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 8zm.5-1...
examples/js/expandRow/manage-expanding.js
rolandsusans/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/parser/priest/shadow/modules/spells/ShadowWordPain.js
sMteX/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage } from 'common/format'; import SmallStatisticBo...
site/pages/ExamplePage.js
tomulin1/react-dnd
import React from 'react'; import Header from '../components/Header'; import PageBody from '../components/PageBody'; import SideBar from '../components/SideBar'; import { ExamplePages } from '../Constants'; export default class ExamplesPage { render() { return ( <div> <Header/> <PageBody ha...
client/node_modules/react-router/es6/RouteContext.js
Discounty/Discounty
'use strict'; import React from 'react'; var object = React.PropTypes.object; /** * The RouteContext mixin provides a convenient way for route * components to set the route in context. This is needed for * routes that render elements that want to use the Lifecycle * mixin to prevent transitions. */ var RouteCon...
app/javascript/mastodon/features/compose/components/autosuggest_account.js
8796n/mastodon
import React from 'react'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; class AutosuggestAccount extends ImmutablePureComponen...
client/src/javascript/components/modals/torrent-details-modal/TorrentFiles.js
stephdewit/flood
import _ from 'lodash'; import {Button, Checkbox, Form, FormRow, FormRowItem, Select, SelectItem} from 'flood-ui-kit'; import classnames from 'classnames'; import {FormattedMessage, injectIntl} from 'react-intl'; import React from 'react'; import ConfigStore from '../../../stores/ConfigStore'; import Disk from '../../...
src/svg-icons/image/camera.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCamera = (props) => ( <SvgIcon {...props}> <path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4...
docs/src/app/components/pages/components/CircularProgress/ExampleDeterminate.js
w01fgang/material-ui
import React from 'react'; import CircularProgress from 'material-ui/CircularProgress'; export default class CircularProgressExampleDeterminate extends React.Component { constructor(props) { super(props); this.state = { completed: 0, }; } componentDidMount() { this.timer = setTimeout(() ...
admin/client/App/shared/Popout/PopoutHeader.js
frontyard/keystone
/** * Render a header for a popout */ import React from 'react'; import Transition from 'react-addons-css-transition-group'; const PopoutHeader = React.createClass({ displayName: 'PopoutHeader', propTypes: { leftAction: React.PropTypes.func, leftIcon: React.PropTypes.string, title: React.PropTypes.string.is...
src/components/typography/caption.js
mattmischuk/m1x
// @flow import React from 'react' import type { Node } from 'react' import styled from 'styled-components' import cx from 'classnames' import { myTheme } from '../../styles' const { fontSize } = myTheme const StyledCaption = styled.h6` font-size: ${fontSize.seven}; text-transform: uppercase; ` const styles = {...
src/components/ProjectPostEditor.js
Hylozoic/hylo-redux
/* eslint-disable camelcase */ import React from 'react' import { connect } from 'react-redux' import Icon from './Icon' import DatetimePicker from 'react-datetime' import { debounce } from 'lodash' import { get, map, pick, filter } from 'lodash/fp' import { getPost, getVideo } from '../models/post' const { array, func...
__tests__/index.android.js
aksharora/ReactNativeDemoBasic
import 'react-native'; import React from 'react'; import Index from '../index.android.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
app/containers/HomePage/index.js
Illyism/sample-dashboard
/* * HomePage * * This is the first thing users see of our App, at the '/' route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a neccessity for you then you can refactor it and remove * the ...
src/index.js
nsipplswezey/iifym
import React from 'react'; import { render } from 'react-dom'; import { App } from './App'; render(<App />, document.getElementById('root'));
src/svg-icons/device/nfc.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceNfc = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2...
client/source/js/models/t_groups_m.js
Vladimir37/Planshark
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import {submitting, getData} from '../submitting.js'; import {Waiting, Error, Empty, Menu, Forbidden} from './templates.js'; import toast from '../toaster.js'; import {colorpick} from '../picker.js'; //responses var actions_r = ['Succ...
src/routing/routes.js
dopry/netlify-cms
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from '../containers/App'; import DashboardPage from '../containers/DashboardPage'; import CollectionPage from '../containers/CollectionPage'; import EntryPage from '../containers/EntryPage'; import SearchPage from '../containers/Sea...
test/integration/scss-fixtures/multi-page/pages/_app.js
azukaru/next.js
import React from 'react' import App from 'next/app' import '../styles/global1.scss' import '../styles/global2.scss' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
packages/playground/src/createDevModeAttachmentMiddleware.js
billba/botchat
import React from 'react'; import DebugAdaptiveCardAttachment from './DebugAdaptiveCardAttachment'; import JSONDebugView from './JSONDebugView'; export default function () { return () => next => ({ activity, attachment }) => attachment.contentType === 'application/vnd.microsoft.card.adaptive' ? ( <DebugAda...
src/components/operations/operations-by-series.js
FranckCo/Operation-Explorer
import React from 'react'; import { sparqlConnect } from 'sparql-connect'; import OperationList from './operation-list'; import Spinner from 'components/shared/spinner' import D, { getLang } from 'i18n' /** * Builds the query that retrieves the series of a given family. */ const queryBuilder = series => ` PREFIX dc...
actor-apps/app-web/src/app/components/ActivitySection.react.js
jamesbond12/actor-platform
import React from 'react'; import classNames from 'classnames'; import { ActivityTypes } from 'constants/ActorAppConstants'; import ActivityStore from 'stores/ActivityStore'; import UserProfile from 'components/activity/UserProfile.react'; import GroupProfile from 'components/activity/GroupProfile.react'; const getS...
blueprints/layout/files/__test__/layouts/__name__Layout.spec.js
ashelkov/hexa
import React from 'react' describe('(Layout) <%= pascalEntityName %>', () => { it('should exist', () => { }) })
packages/fyndiq-icons/src/bubbles.js
fyndiq/fyndiq-ui
import React from 'react' import SvgWrapper from './svg-wrapper' const Bubbles = ({ className, color }) => ( <SvgWrapper className={className} viewBox="0 0 37 32"> <path d="m22.92 0.81055a4.6385 4.6385 0 1 0 0.001953 9.2773 4.6385 4.6385 0 0 0 -0.001953 -9.2773zm0 1.2656a3.376 3.376 0 0 1 3.373 3.373 3.376...
packages/rmw-shell/src/providers/Firebase/Paths/with.js
TarikHuber/react-most-wanted
import Context from './Context' import React from 'react' const withContainer = (Component) => { const ChildComponent = (props) => { return ( <Context.Consumer> {(value) => { return <Component {...value} {...props} /> }} </Context.Consumer> ) } return ChildComponent...
src/Hello/Hello.js
kashjs/muszoo-react
import React from 'react'; export class Hello extends React.Component { render() { return <h1>Hello React! yey</h1>; } }
app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js
ikuradon/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import AsyncSelect from 'react-select/async'; import { NonceProvider } from 'react-sele...
app/components/elements/TimeAgoWrapper.js
enisey14/platform
/* eslint react/prop-types: 0 */ import React from 'react'; import { FormattedRelative } from 'react-intl'; export default class TimeAgoWrapper extends React.Component { render() { let {date} = this.props if(date && /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d$/.test(date)) { date = date + 'Z' // F...
ui/src/components/IssueProviderList/index.js
denniss17/status-dashboard
import React, { Component } from 'react'; import IssueProvider from './IssueProvider'; import PropTypes from 'prop-types'; class IssueProviderList extends Component { render() { const { issueProviders, statusesForIssues } = this.props; return ( <div> {issueProviders && Object.keys(issueProvider...
app/config/routes.js
cshutchinson/sk
import React, { Component } from 'react'; import Main from '../components/Main'; import Home from '../components/Home'; import { Router, Route, IndexRoute, Link } from 'react-router' module.exports = ( <Route path="/" component={Main}> <IndexRoute component={Home} /> </Route> );
packages/react-static/src/browser/components/SiteData.js
nozzle/react-static
import React from 'react' import useSiteData from '../hooks/useSiteData' export function SiteData({ children }) { return children(useSiteData()) } export function withSiteData(Comp) { return function componentWithSiteData(props) { const routeData = useSiteData() return <Comp {...props} {...routeData} /> ...
src/components/common/Button.js
amir5000/react-native-manager-app
import React from 'react'; import { Text, TouchableOpacity } from 'react-native'; const Button = ({ onPress, children }) => { const { buttonStyle, buttonTextStyle } = styles; return ( <TouchableOpacity onPress={onPress} style={buttonStyle}> <Text style={buttonTextStyle}>{children}</Text> </Touchable...
packages/material-ui-icons/src/ArrowForward.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let ArrowForward = props => <SvgIcon {...props}> <path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" /> </SvgIcon>; ArrowForward = pure(ArrowForward); ArrowForward.muiName = 'SvgIcon'; exp...
src/svg-icons/notification/folder-special.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationFolderSpecial = (props) => ( <SvgIcon {...props}> <path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29...
client/android/app/src/pages/SignUp.js
blusclips/zonaster
import React, { Component } from 'react'; import {Image, StyleSheet, AsyncStorage} from 'react-native'; import { StackNavigator } from 'react-navigation'; import { Container, Content, Text, H1, H3, Button, Item, Input, Grid, Col} from 'native-base'; import general from '../styles/general'; import Icon from 'react-nativ...
docs/src/app/components/pages/components/SelectField/ExampleFloatingLabel.js
rhaedes/material-ui
import React from 'react'; import SelectField from 'material-ui/SelectField'; import MenuItem from 'material-ui/MenuItem'; const items = [ <MenuItem key={1} value={1} primaryText="Never" />, <MenuItem key={2} value={2} primaryText="Every Night" />, <MenuItem key={3} value={3} primaryText="Weeknights" />, <Menu...
src/components/js/Contacts.js
ucev/chatroom
import React, { Component } from 'react'; import UserItem from './UserItem'; import MyAction from '../../state/action'; class Contacts extends Component { render() { var state = MyAction.getState(); var userid = state.userid; var users = state.users.filter((user) => { return user.id != userid; ...
source/src/components/App.js
mondalamit/mondalamit.github.io
import React, { Component } from 'react'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <h2>Welcome to React</h2> </div> <p className="App-intro"> To get started, edit <code>src/App.js</co...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js
GreenGremlin/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import tiniestCat from './assets/tiniest-cat.jpg'; export default () => ( <img id="feature-image-inclusion...
src/hucha.web/test/helpers/shallowRenderHelper.js
jparaya/hucha
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
docs/src/PageFooter.js
nickuraltsev/react-bootstrap
import React from 'react'; import packageJSON from '../../package.json'; let version = packageJSON.version; if (/docs/.test(version)) { version = version.split('-')[0]; } const PageHeader = React.createClass({ render() { return ( <footer className="bs-docs-footer" role="contentinfo"> <div c...
demo/src/demo-components/indicators.js
Strikersoft/striker-store
import React from 'react'; import { shape, func, string } from 'prop-types'; import { observer } from 'mobx-react'; const IndicatorComponent = observer(({ indicator, type }) => { if (indicator.get()) { return <span>({type})</span>; } return null; }); IndicatorComponent.propTypes = { indicator: shape({ ge...
src/__tests__/component-for-fields-test.js
Uber5/u5-forms
import React from 'react' import { Provider } from 'react-redux' import { reduxForm } from 'redux-form' import { componentForFields } from '../' import configureMockStore from 'redux-mock-store' describe('componentForFields', () => { it('constructs fields for each field type', () => { const fields = [ { n...
node_modules/react-router/es/MemoryRouter.js
AngeliaGong/AngeliaGong.github.io
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
src/icons/ViewModuleIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class ViewModuleIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M8 22h10V10H8v12zm0 14h10V24H8v12zm12 0h10V24H20v12zm12 0h10V24H32v12zM20 22h10V10H20v12zm12-12v12h10V1...
app/components/Button.js
RogerZZZZZ/widget_electron
import React from 'react' import { Component } from 'react' let assetsPrefix = process.env.DEV? '..': '.' class Button extends Component{ constructor(props){ super(props); let picName = (this.props.status === false || this.props.status === undefined? this.props.name: this.props.name+"-done"); ...
tilapp/src/containers/Scenes/Capture/Index/index.js
tilap/tilapp
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import merge from 'deep-assign'; import { Container } from 'native-base'; import processBarcode from './services/processBarcode'; import { ReverseCameraIcon, ReverseCameraActiveIcon, FlashCameraIcon, Fla...
src/modules/settings/components/Feedback.js
CaronaBoard/caronaboard-native
import React from 'react' import { WebView } from 'react-native' export const Feedback = () => { return ( <WebView source={{uri: 'https://goo.gl/forms/IxVqYmchYVrHkNLq2'}} style={{flex: 1}} /> ) }
packages/benchmarks-utils/src/index.js
A-gambit/CSS-IN-JS-Benchmarks
import React from 'react'; function getTable(max = 30) { let table = []; for (let i = 0; i < max; i++) { table[i] = [1]; for (let j = 1; j < max; j++) { const next = table[i][j - 1] - Math.random() * table[i][j - 1] / 10; table[i].push(next.toFixed(4)); } } return table; } function get...
src/MessageBox/__tests__/MessageBox.js
Detaysoft/react-chat-elements
import React, { Component } from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import MessageBox from '../MessageBox'; describe('MessageBox component', () => { it('should render without issues', () => { const component = shallow(<MessageBox status='read'/>); expect(componen...
src/App.js
one19/hourmon
import React, { Component } from 'react'; import { GOLD, BLACK } from './colors'; class Counter extends Component { constructor(props) { super(props); this.state = { counter: 0 }; this.interval = setInterval(() => this.tick(), 2000); } tick() { this.setState({ counter: this.state.counter +...
pages/nosotros.js
markhker/newCyK
import React, { Component } from 'react'; import './scss/about.scss'; import Paper from 'material-ui/lib/paper'; import CardTitle from 'material-ui/lib/card/card-title'; import CardText from 'material-ui/lib/card/card-text'; import Link from '../components/Link'; import MyRawTheme from '../components/theme'; import T...
generators/app/templates/src/components/hello-world.js
trigun539/generator-ep-react-simple
import React, { Component } from 'react'; export default class HelloWorld extends Component { render () { return <h1>Hello World</h1>; } }
src/pages/Bookmarks/index.js
bogas04/SikhJS
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import styled from 'react-emotion'; import { BOOKMARK_TYPES } from '../../constants'; import { clearAllBookmarks, getAllBookmarks, updateBookmarkTitle } from '../../bookmarks'; import { Textfield, Butt...
src/routes/Dashboard/View.js
cesine/rickshaw-react-sample
import React from 'react'; import PropTypes from 'prop-types'; import ChartByDayOfTheWeek from '../../components/ChartByDayOfTheWeek'; import ChartByHour from '../../components/ChartByHour'; import ChartDaysWithout from '../../components/ChartDaysWithout'; import ChartHistogram from '../../components/ChartHistogram'; i...
src/front-end/js/pages/Registration.js
aleksey-gonchar/emmofret
import React from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import _ from 'lodash' import * as AppActions from '../actions/AppActions.js' import FullNameInput from '../components/inputs/FullNameInput.js' import EmailInput from '../components/inputs/EmailInput.js' import ...
test/ButtonGroupSpec.js
mcraiganthony/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ButtonGroup from '../src/ButtonGroup'; import Button from '../src/Button'; import { shouldWarn } from './helpers'; describe('ButtonGroup', function () { it('Should output a button group', function () { let instance = ReactTe...
src/Stepper/StepConnector.spec.js
hai-cea/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import {PlainStepConnector as StepConnector} from './StepConnector'; import getMuiTheme from '../styles/getMuiTheme'; describe('<StepConnector />', () => { const muiTheme = getMuiTheme(); const themedShal...
src/assets/js/react/components/FontManager/FontVariantLabel.js
GravityPDF/gravity-forms-pdf-extended
/* Dependencies */ import React from 'react' import PropTypes from 'prop-types' import { sprintf } from 'sprintf-js' /** * @package Gravity PDF * @copyright Copyright (c) 2021, Blue Liquid Designs * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 6.0 */ /** * Disp...
src/svg-icons/maps/local-play.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalPlay = (props) => ( <SvgIcon {...props}> <path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4....
jenkins-design-language/src/js/components/material-ui/svg-icons/maps/directions-bus.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const MapsDirectionsBus = (props) => ( <SvgIcon {...props}> <path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5...
kit/entry/browser.js
Mahi22/MedTantra
// Browser entry point, for Webpack. We'll grab the browser-flavoured // versions of React mounting, routing etc to hook into the DOM // ---------------------- // IMPORTS /* NPM */ // Enable async/await and generators, cross-browser import 'regenerator-runtime/runtime'; // Patch global.`fetch` so that Apollo calls...
app/src/scripts/widgets/UserProfile/UserProfile.js
vyorkin/assignment
import React from 'react'; export default class UserProfile { render() { return ( <dl> <dt>Фамилия:</dt><dd>{this.props.lastName}</dd> <dt>Имя:</dt><dd>{this.props.firstName}</dd> <dt>Отчество:</dt><dd>{this.props.middleName}</dd> </dl> ); } }
src/Affix.js
pandoraui/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import AffixMixin from './AffixMixin'; const Affix = React.createClass({ mixins: [AffixMixin], render() { let holderStyle = { top: this.state.affixPositionTop, // we don't want to expose the `style` property ...this.props.style...
test/test_helper.js
rickywid/micdb
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
src/svg-icons/av/web.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvWeb = (props) => ( <SvgIcon {...props}> <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/> </SvgIcon> ); AvWeb = pur...
React-Youtube/src/components/videoDetail.js
vivekbharatha/ModernReactWithReduxCourseUdemy
import React from 'react'; const VideoDetail = ({ video }) => { if (!video) { return <div>Started the Engine, hold you sugar !</div> } const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed...
src/components/gameTimerComponent/gameTimerComponent.js
craigbilner/quizapp
'use strict'; import React from 'react'; import radium from 'radium'; class GameTimerComponent extends React.Component { constructor(props) { super(props); } timeFunc() { this.props.onTimeChange(this.props.gameTime - (this.props.timeInterval / 1000)); if (this.props.gameTime !== 0) { this.sta...
examples/dynamic-segments/app.js
upraised/react-router
import React from 'react'; import { Router, Route, Link, Redirect } from 'react-router'; var App = React.createClass({ render() { return ( <div> <ul> <li><Link to="/user/123">Bob</Link></li> <li><Link to="/user/abc">Sally</Link></li> </ul> {this.props.children} ...
node_modules/react-navigation/src/routers/__tests__/StackRouter-test.js
joan17cast/Enigma
/* @flow */ /* eslint no-shadow:0, react/no-multi-comp:0, react/display-name:0 */ import React from 'react'; import StackRouter from '../StackRouter'; import TabRouter from '../TabRouter'; import NavigationActions from '../../NavigationActions'; const ListScreen = () => <div />; const ProfileNavigator = () => <div...
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js
GreenGremlin/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; function load() { return [ { id: 1, name: '1' }, ...
src/components/Image/Image.js
dialogs/dialog-web-components
/* * Copyright 2019 dialog LLC <info@dlg.im> * @flow */ import React from 'react'; import classNames from 'classnames'; import getImageSize from '../../utils/getImageSize'; import ImagePreloader, { type ImagePreloaderState, STATE_SUCCESS, } from '../ImagePreloader/ImagePreloader'; import styles from './Image.c...
src/svg-icons/device/settings-system-daydream.js
spiermar/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSettingsSystemDaydream = (props) => ( <SvgIcon {...props}> <path d="M9 16h6.5c1.38 0 2.5-1.12 2.5-2.5S16.88 11 15.5 11h-.05c-.24-1.69-1.69-3-3.45-3-1.4 0-2.6.83-3.16 2.02h-.16C7.17 10.18 6 11.45 6 13c0 1....
src/containers/Home/Home.js
trueter/react-redux-universal-hot-example
import React, { Component } from 'react'; import { Link } from 'react-router'; import { CounterButton, GithubButton } from 'components'; import config from '../../config'; import Helmet from 'react-helmet'; export default class Home extends Component { render() { const styles = require('./Home.scss'); // req...
app/routes.js
ndnhat/te-starter
'use strict'; import React from 'react'; import Router from 'react-router'; let { Route, DefaultRoute, NotFoundRoute } = Router; // -- Import base components import Layout from './components/layout'; import Login from './components/auth/login'; export default ( <Route handler={Layout} path='/'> <Route name='login...
app/javascript/flavours/glitch/features/getting_started_misc/index.js
im-in-space/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Column from 'flavours/glitch/features/ui/components/column'; import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-imm...
lib/index.js
thatPamIAm/weathrly
import React from 'react'; import ReactDOM from 'react-dom'; import App from './containers/App'; import reset from '../css/reset'; import styles from '../css/styles'; ReactDOM.render(<App />, document.getElementById('application'));
docs/app/Examples/modules/Progress/Content/ProgressExampleProgress.js
vageeshb/Semantic-UI-React
import React from 'react' import { Progress } from 'semantic-ui-react' const ProgressExampleProgress = () => ( <Progress percent={44} progress /> ) export default ProgressExampleProgress
examples/real-world/containers/Root.js
Lucifier129/redux
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { Router, Route } from 'react-router'; import configureStore from '../store/configureStore'; import App from './App'; import UserPage from './UserPage'; import RepoPage from './RepoPage'; const store = configureStore(); export de...
Realization/frontend/czechidm-acc/src/content/system/SystemRoles.js
bcvsolutions/CzechIdMng
import React from 'react'; import _ from 'lodash'; // import { Basic, Domain } from 'czechidm-core'; import RoleSystemTableComponent, { RoleSystemTable } from '../role/RoleSystemTable'; const uiKey = 'system-roles-table'; /** * Table to display roles, assigned to system * * @author Petr Hanák * @author Radek Tomi...
react-flux-mui/js/material-ui/src/svg-icons/device/battery-90.js
pbogdan/react-flux-mui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBattery90 = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1...
app/javascript/mastodon/features/compose/containers/warning_container.js
kibousoft/mastodon
import React from 'react'; import { connect } from 'react-redux'; import Warning from '../components/warning'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\S+)/i; const mapStateToProps = sta...
app/components/Home.js
rondobley/meal-planner
import React from 'react'; import ReactDOM from 'react-dom'; import HomeStore from '../stores/HomeStore'; import HomeActions from '../actions/HomeActions'; class Home extends React.Component { constructor(props) { super(props); this.state = HomeStore.getState(); this.onChange = this.onChang...
src/svg-icons/social/people-outline.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialPeopleOutline = (props) => ( <SvgIcon {...props}> <path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.7...