path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
dva/porsche-e3/src/routes/MainPage.js
imuntil/React
import React from 'react' import { connect } from 'dva' import QueueAnim from 'rc-queue-anim' import './MainPage.scss' import E3Carousel from '../components/Carousel' import Item from '../components/Item' import BottomBar from '../components/BottomBar' function Title() { const text = ' 全新 Cayenne — 齐心并驰'.split('') ...
src/React/Widgets/QueryDataModelWidget/Number.js
Kitware/paraviewweb
import React from 'react'; import PropTypes from 'prop-types'; import style from 'PVWStyle/ReactWidgets/QueryDataModelWidget.mcss'; /** * This React component expect the following input properties: * - model: * Expect a QueryDataModel instance. * - listener: * Expect a Boolean based on the automa...
docs/src/IntroductionPage.js
pombredanne/react-bootstrap
import React from 'react'; import CodeExample from './CodeExample'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; const IntroductionPage = React.createClass({ render() { return ( <div> <NavMain activePage="introduction" /> <...
client/components/Footer/index.js
DarkHorseJP/RPGScenarist
import React from 'react' //import { FormattedMessage } from 'react-intl' //import messages from './messages' function Footer() { return ( <span></span> ) } export default Footer
src/routes/error/index.js
poeschko/ask-refugeescode
/** * 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 React from 'react'; import ErrorPage from './Err...
client/src/app.js
cashyu/reactNode
'use strict' import React from 'react'; import ReactDOM from 'react-dom'; import {createStore, applyMiddleware} from 'redux'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import { Provider } from 'react-redux'; import { Router, Route, IndexRoute, Link, IndexLink, browserHistory, h...
docs/app/Examples/elements/Reveal/Types/RevealExampleMoveUp.js
clemensw/stardust
import React from 'react' import { Image, Reveal } from 'semantic-ui-react' const RevealExampleMoveUp = () => ( <Reveal animated='move up'> <Reveal.Content visible> <Image src='http://semantic-ui.com/images/wireframe/square-image.png' size='small' /> </Reveal.Content> <Reveal.Content hidden> ...
src/lib/markers/TimelineMarkersRenderer.js
namespace-ee/react-calendar-timeline
import React from 'react' import { TimelineMarkersConsumer } from './TimelineMarkersContext' import { TimelineMarkerType } from './markerType' import TodayMarker from './implementations/TodayMarker' import CustomMarker from './implementations/CustomMarker' import { TimelineStateConsumer } from '../timeline/TimelineStat...
src/scripts/app-controller.js
Dolpator/jonportfolio
import Backbone from 'backbone' import React from 'react' import $ from 'jquery' import ProjectsPage from './projects-page.js' import SkillsPage from './skills-page.js' // import Resume from './resume.js' import HomePage from './home-page.js' const AppController = React.createClass({ render: function(){ swi...
src/routes/Dashboard/components/quote.js
daizhen256/i5xwxdoctor-web
import React from 'react' import styles from './quote.less' function Quote (props) { const { name, content, title, avatar } = props return ( <div className={styles.quote}> <div className={styles.inner}> {content} </div> <div className={styles.footer}> <div className={styles.de...
pages/api/collapse.js
AndriusBil/material-ui
// @flow import React from 'react'; import withRoot from 'docs/src/modules/components/withRoot'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './collapse.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default withRoot(Page);
src/SettingsStrip.js
sidler/react_dirlist
/** * Created by sidler on 03.02.17. */ import React, { Component } from 'react'; import Settings from './Settings'; class SettingsStrip extends Component { constructor(props) { super(props); this.changeSizeCheckbox = this.changeSizeCheckbox.bind(this); } changeSizeCheckbox = func...
examples/todomvc/src/index.js
lsm/alfa
import { Provider } from 'alfa' import React from 'react' import { render } from 'react-dom' import App from './containers/App' import * as TODO_FILTERS from './constants/TodoFilters' import * as actions from './actions' import 'todomvc-app-css/index.css' /** * Initial state of applicaiton. */ const data = { todo...
blueocean-material-icons/src/js/components/svg-icons/toggle/radio-button-unchecked.js
jenkinsci/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ToggleRadioButtonUnchecked = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/> </SvgIcon> ); ToggleRadioButtonUnchecked....
app/javascript/mastodon/features/ui/components/modal_root.js
KnzkDev/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Base from '../../../components/modal_root'; import BundleContainer from '../containers/bundle_container'; import BundleModalError from './bundle_modal_error'; import ModalLoading from './modal_loading'; import ActionsModal from './actions_modal'; imp...
src/App.js
naoufal/react-transform-boilerplate
import React, { Component } from 'react'; import { NICE, SUPER_NICE } from './colors'; class Counter extends Component { constructor(props) { super(props); this.state = { counter: 0 }; this.interval = setInterval(() => this.tick(), 1000); } tick() { this.setState({ counter: this.state.coun...
src/views/components/NavigationScreen.js
physiii/home-gateway
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import {withAppContext} from '../AppContext.js'; import {connect} from 'react-redux'; import {withRouter} from 'react-router-dom'; import {compose} from 'redux'; import {loadContext, loadScreen, unloadContext, unloadScreen}...
app/classifier/annotation-renderer/svg.spec.js
amyrebecca/Panoptes-Front-End
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import SVGRenderer from './svg'; import tasks from '../tasks'; import { workflow, subject } from '../../pages/dev-classifier/mock-data'; const viewBoxDimensions = { height: 0, width: 0, x: 0, y: 0 }; const naturalHeigh...
client/src/javascript/components/icons/ChevronRightIcon.js
stephdewit/flood
import React from 'react'; import BaseIcon from './BaseIcon'; export default class ChevronRightIcon extends BaseIcon { render() { return ( <svg className={`icon icon--chevron-right ${this.props.className}`} viewBox={this.getViewBox()}> <polygon points="18.66 58.8 12.65 52.79 35.4 30.04 12.58 7.21 ...
src/components/header/menu/index.js
appunnicer13/profile
import React from 'react'; import "./menu.scss"; import FontIcon from 'material-ui/FontIcon'; import {red500, yellow500, blue500} from 'material-ui/styles/colors'; const iconStyles = { marginRight: 24, }; const ProfileMenu = ({open}) => ( <div> <FontIcon className="material-icons" style={iconStyles}>...
src/blocks/wavefolder/block.js
rsimmons/plinth
import React from 'react' import ReactDOM from 'react-dom'; import BlockRoot from '../../components/BlockRoot'; import Knob from '../../components/Knob'; class View extends React.Component { constructor(props) { super(props); } render() { const {stages, setStages, smoothness, setSmoothness} = this.props...
frontend/src/components/FoodInfoCard.js
zuhairp/CrowdFood
import React from 'react'; import { Col } from 'react-bootstrap'; import { Link } from 'react-router'; export default (props) => { const { name, distance, id, index } = props; const nameStyle = { fontWeight: 'bold', padding: 0, }; const distanceStyle = { padding: 0, }; return ( <Col...
entry_types/scrolled/package/spec/frontend/ThemeIcon-spec.js
codevise/pageflow
import React from 'react'; import {ThemeIcon} from 'pageflow-scrolled/frontend'; import {renderInEntry} from '../support'; import '@testing-library/jest-dom/extend-expect'; describe("ThemeIcon", () => { it('renders fallback icon by default', () => { const {container} = renderInEntry(<ThemeIcon name="share" />)...
app/app.js
bruceli1986/react-qdp
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ import 'babel-polyfill'; /* eslint-disable import/no-unresolved */ // Load the manifest.json file and the .htaccess file import '!file?name=[name].[ext]!./manifest.json'; import 'file?name=[name].[ext]!./.htaccess';...
docs/app/Examples/elements/Step/States/index.js
aabustamante/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const States = () => ( <ExampleSection title='States'> <ComponentExample title='Active' description='A step can be hi...
assets/node_modules/react-router/es6/IndexRedirect.js
janta-devs/janta
import React from 'react'; import warning from './routerWarning'; import invariant from 'invariant'; import Redirect from './Redirect'; import { falsy } from './InternalPropTypes'; var _React$PropTypes = React.PropTypes; var string = _React$PropTypes.string; var object = _React$PropTypes.object; /** * An <IndexRedir...
src/components/Menus.js
Grilados/site
import React, { Component } from 'react'; import './css/Menus.css'; export class MenuHeader extends Component { renderMenu() { if (!this.props.menu) return console.error('Os itens não foram encontrados!'); return( <div> { this.props.menu.map((item, index)=> ...
src/pages/about.js
saschajullmann/gatsby-starter-gatsbythemes
/* eslint-disable no-undef, react/prop-types */ import React from 'react'; import { graphql } from 'gatsby'; import Img from 'gatsby-image'; import { css } from 'react-emotion'; import { Box } from '../components/Layout'; import PageWrapper from '../components/PageWrapper'; import colors from '../utils/colors'; const ...
tech_stack/src/app.js
victorditadi/IQApp
import React from 'react'; import { View } from 'react-native'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import reducer from './reducers'; import { Header } from './components/common'; import LibraryList from './components/LibraryList.js'; const App = () => { return ( <Provide...
collect-webapp/frontend/src/scenes/DataCleansingPage.js
openforis/collect
import React, { Component } from 'react'; import Constants from 'Constants'; import MaxAvailableSpaceContainer from 'common/components/MaxAvailableSpaceContainer'; class DataCleansingPage extends Component { render() { return ( <MaxAvailableSpaceContainer> <iframe src={Constants.BASE_URL + 'dataclean...
src/svg-icons/av/fiber-smart-record.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberSmartRecord = (props) => ( <SvgIcon {...props}> <g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g> </S...
springboot/GReact/node_modules/react-bootstrap/es/Thumbnail.js
ezsimple/java
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/Accommodations.js
seripap/wedding.seripap.com
import React from 'react'; import Page from './Page'; export default class Accommodations extends React.Component { constructor(props) { super(props); } render() { return ( <div> <Page title="Amanda & Dan's Wedding - Accomodations" /> <section className="section"> <div cl...
src/backward/Widgets/Icon.js
sampsasaarela/NativeBase
import React, { Component } from 'react'; import { connectStyle } from 'native-base-shoutem-theme'; import Ionicons from 'react-native-vector-icons/Ionicons'; import Entypo from 'react-native-vector-icons/Entypo'; import FontAwesome from 'react-native-vector-icons/FontAwesome'; import Foundation from 'react-native-ve...
docs/src/app/components/pages/components/RefreshIndicator/ExampleLoading.js
frnk94/material-ui
import React from 'react'; import RefreshIndicator from 'material-ui/RefreshIndicator'; const style = { container: { position: 'relative', }, refresh: { display: 'inline-block', position: 'relative', }, }; const RefreshIndicatorExampleLoading = () => ( <div style={style.container}> <RefreshI...
src/shared/routes/index.js
jferrettiboke/dynatic
import React from 'react'; import { Route } from 'react-router'; import App from '../components/App/App'; export default ( <Route path="*" component={App} /> );
app/components/Header/index.js
audoralc/pyxis
/** * * Header * */ import React from 'react'; import glamorous from 'glamorous'; import FontIcon from 'material-ui/FontIcon'; const NavLink = glamorous.a({ padding: '0 .5em', textDecoration: 'none', color: '#000000', ':hover' : { color: '#0c3a7f', }, height: '24px', }) const SubButton = gla...
node_modules/rc-select/es/FilterMixin.js
prodigalyijun/demo-by-antd
import _extends from 'babel-runtime/helpers/extends'; import React from 'react'; import { getValuePropValue, defaultFilterFn, UNSELECTABLE_ATTRIBUTE, UNSELECTABLE_STYLE } from './util'; import { Item as MenuItem, ItemGroup as MenuItemGroup } from 'rc-menu'; import warning from 'warning'; export default { filterOptio...
test/components/body.spec.js
Boluwatifes/andela24
import 'jsdom-global/register'; import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import GoogleLogin from 'react-google-login'; import Body from '../../src/app/components/Body'; global.localStorage = window.localStorage; describe('Test for <Body /> components', () => { it('...
client/services/axios.js
iykyvic/fcc-voting
import React from 'react'; import Snackbar from 'material-ui/Snackbar'; import IconButton from 'material-ui/IconButton'; import CloseIcon from 'material-ui-icons/Close'; import { default as axiosHttp } from 'axios'; import { store } from '../store/storeConfiguration'; import { API_CALL_STATUS, LOGOUT } from '../store/a...
lib/cli/test/snapshots/webpack_react/index.js
rhalff/storybook
import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root') );
extensions/roc-package-web-app-react/app/client/dev-tools.js
rocjs/roc-package-web-app-react
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; import { rocConfig } from '../shared/universal-config'; export default createDevTools( <DockMonitor {...rocConfig.dev.redux.devToo...
src/Picker/test/DropdownMenuGroupSpec.js
suitejs/suite
import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import { getDOMNode } from '@test/testUtils'; import DropdownMenuGroup from '../DropdownMenuGroup'; const classPrefix = 'dropdown-menu-group'; const titleClassName = `.${classPrefix}-title`; describe('picker - DropdownMenuGroup', () => { ...
packages/storybook/examples/core/Avatar.stories.js
iCHEF/gypcrete
import React from 'react'; import Avatar from '@ichef/gypcrete/src/Avatar'; import FlexRow from 'utils/FlexRow'; export default { title: '@ichef/gypcrete|Avatar', component: Avatar, }; export const basicUsage = () => ( <FlexRow> <Avatar alt="Avatar of Design" src="https://api.adorable.io/avatars/285/design...
__tests__/index.ios.js
Schenn/character_sheet
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
js/containers/ListForm.js
eugeneglova/react-redux-form
import React from 'react'; import { connect } from 'react-redux'; import Pagination from '../components/Pagination'; import { applyFilter } from '../actions'; import { change } from 'redux-form'; import Filter from './Filter'; import ListItem from './ListItem'; import PerPage from './PerPage'; const ListForm = connect...
src/compoments/UploadFromCameraRoll.js
purple-net/react-native-purple
'use strict'; import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, CameraRoll, DeviceEventEmitter, ActivityIndicatorIOS, Image, TouchableOpacity, Modal, } from 'react-native'; var RNUploader = require('NativeModules').RNUploader; class UploadFromCameraRoll ext...
client/src/components/LoginForm.js
MattMcFarland/reactathon
import React from 'react'; import { Link } from 'react-router'; import { FormErrors } from './partials'; import { Center, LoginWith } from './partials/Elements'; import { Button, Input, ButtonInput } from 'react-bootstrap'; import { AppActions } from '../actions/AppActions'; import { AppStore } from '../stores/A...
src/view/result.js
blgm/convulator
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Number } from './number' import { style } from 'typestyle' export const resultStyle = style({ display: 'flex', padding: '10px 20px', height: '45px' }) function Result ({ result }) { return ( <div cl...
app/components/CompositionBar/index.js
mhoffman/CatAppBrowser
/** * * CompositionBar * */ import React from 'react'; import { withStyles } from 'material-ui/styles'; import PropTypes from 'prop-types'; import { isMobile } from 'react-device-detect'; import { styles } from './styles'; const atomicNumbers = { X: 0, H: 1, He: 2, Li: 3, Be: 4, B: 5, C: 6, N: 7, O: 8, F: 9, Ne: 10,...
tests/components/Select.spec.js
TempusWebDev/ComponentLibrary
import assert from 'assert'; import React from 'react'; import {mount, render, shallow} from 'enzyme'; import Select from 'components/Select'; import { DropdownMenuItem } from 'components/Select'; describe('A Select Dropdown', function () { let _component beforeEach(() => { _component = Select.component(); ...
src/static/utils/requireAuthentication.js
CRUDNS/CRUDNS
import React from 'react'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; export default function requireAuthentication(Component) { class AuthenticatedComponent extends React.Component { static propTypes = { isAuthenticated: React.PropTypes.bool.isRequired, ...
assets/js/src/main/index.js
stechDevSP/stechDev
import React from 'react'; import ReactDOM from 'react-dom'; import { StartPage } from '../main/_startPage.js'; import { ResetPassword } from '../main/_resetPassword.js'; import { ContactUs } from '../main/_contactUs.js'; (function(APP) { "use strict"; APP.MAIN = {}; APP.MAIN.init = function() { ...
src/components/exercises/letter-rotated.component.js
serlo-org/serlo-abc
import React, { Component } from 'react'; import { View } from 'react-native'; import RoundTextButton from '../common/RoundTextButton'; import { PortraitScreenOrientation } from '../helpers/screen-orientation'; export class LetterRotated extends Component { getTransform = index => { const angleIndex = this.prop...
code/web/node_modules/react-bootstrap/es/DropdownMenu.js
zyxcambridge/RecordExistence
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _Array$from from 'babel-runtime/core-js/array/from'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtim...
src/Events.js
csepreghy/final-handin
import React, { Component } from 'react'; import Event from './Event'; class Events extends Component { constructor(props) { super(); } render() { return ( <section id="events" className="content events container row"> <div className="col s12"> { this.props.title...
app/javascript/mastodon/components/column.js
ashfurrow/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { supportsPassiveEvents } from 'detect-passive-events'; import { scrollTop } from '../scroll'; export default class Column extends React.PureComponent { static propTypes = { children: PropTypes.node, label: PropTypes.string, bindToDoc...
src/Parser/Warrior/Arms/Modules/BuffDebuff/TacticianProc.js
enragednuke/WoWAnalyzer
import React from 'react'; import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox'; import SpellIcon from 'common/SpellIcon'; import SPELLS from 'common/SPELLS'; import Analyzer from 'Parser/Core/Analyzer'; const debug = false; class TacticianProc extends Analyzer { totalProcs = 0; on_byPlayer_applybu...
frontend/src/components/rename.js
miurahr/seahub
import React from 'react'; import PropTypes from 'prop-types'; import { gettext } from '../utils/constants'; import toaster from './toast'; const propTypes = { hasSuffix: PropTypes.bool, name: PropTypes.string.isRequired, onRenameConfirm: PropTypes.func.isRequired, onRenameCancel: PropTypes.func.isRequired, };...
app/components/Sidebar/index.js
dreamweaver1231/frontend
/** * * Sidebar * */ import React from 'react'; import { Drawer } from 'material-ui'; const { bool, func, node } = React.PropTypes; const Sidebar = ({ open, onToggleSidebar, children }) => ( <Drawer docked={false} open={open} onRequestChange={onToggleSidebar} > {children} </Drawer> ); Sidebar....
examples/simple/main.js
vgno/roc-web-react
import React from 'react'; import styles from './style.scss'; export default class Main extends React.Component { render() { const image = require('./roc.png'); return ( <div className={styles.main}> <h1>Bacon ipsum dolor?</h1> <img src={image}/> ...
stories/buttons.js
JAdshead/j-react-ui
import React from 'react'; import { storiesOf } from '@storybook/react'; import { withInfo } from '@storybook/addon-info'; import { action } from '@storybook/addon-actions'; import { Button, ButtonRaised } from 'j-react-ui'; const buttonStory = storiesOf('Buttons', module) buttonStory.add( 'Default', () => <But...
node_modules/react-router/es6/IndexLink.js
orionwei/mygit
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 './Link'; /** *...
src/components/Ace/MainContainer.js
nagucc/jkef-web-react
/* 使用Ace Admin Template的MainContainer组件 */ import SideBarShortcuts from './SideBarShortcuts'; import SideBarNavList from './SideBarNavList'; import Footer from './Footer'; import Breadcrumbs from './Breadcrumbs'; import React from 'react'; export default class MainContainer extends React.Component { static prop...
src/ReactClient.js
Chyzwar/iso-basics
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import { syncHistoryWithStore } from 'react-router-redux'; import { Router, Route, browserHistory } from 'react-router' class ReactClient{ constructor(register) { this.routes = register.routes; this.store = re...
src/components/AboutPage.js
wdzulc/x-dev-team
import React from 'react'; import {Link} from 'react-router'; import '../styles/about-page.css'; // Since this component is simple and static, there's no parent container for it. const AboutPage = () => { return ( <div> <h2 className="alt-header">About</h2> <p> This example app is part of the...
src/menu-icon/index.js
aruberto/react-foundation-components
import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import cxBinder from 'classnames/bind'; import styles from './_styles.scss'; const cxStyles = cxBinder.bind(styles); export const MenuIcon = ({ className, dark, controls, open, ...restProps, }) => { const classNam...
src/components/common/icons/CollectionIcon.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; const DEFAULT_WIDTH = 73.645; const DEFAULT_HEIGHT = 55.91; const SCALE = DEFAULT_WIDTH / DEFAULT_HEIGHT; const MediaSourceIcon = (props) => { const height = props.height || DEFAULT_HEIGHT; const width = height * SCALE; return ( <div className="...
src/components/Game/Game.js
jackgardner/tactics
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import s from './Game.scss'; import Engine from '../../Engine'; // Move to NPM module? import { TestScreen } from '../../Game/debug/TestScreen'; import withStyles from '../../decorators/withStyles'; @wit...
examples/files/react/complexRendering.js
dabbott/react-express
import React from 'react' import { render } from 'react-dom' function Card({ loading, error, title, subtitle }) { let content if (error) { content = 'Error' } else if (loading) { content = <h3 style={styles.empty}>Loading...</h3> } else { content = ( <div> <h1 style={styles.title}>{t...
examples/macOs/components/toolbarNav.js
gabrielbull/react-desktop
import React, { Component } from 'react'; import { TitleBar, Toolbar, ToolbarNav, ToolbarNavItem } from 'react-desktop/macOs'; const circle = ( <svg x="0px" y="0px" width="25px" height="25px" viewBox="0 0 25 25"> <circle cx="12.5" cy="12.5" r="12.5"/> </svg> ); const star = ( <svg x="0px" y="0px" width="25p...
pootle/static/js/welcome/components/RandomMessage.js
evernote/zing
/* * Copyright (C) Zing contributors. * * This file is a part of the Zing project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import React from 'react'; // passed `items` prop is an array...
pages/postcss.js
frontendyteam/www.frontendy.com
import React from 'react' import './example.css' import DocumentTitle from 'react-document-title' import { config } from 'config' export default class PostCSS extends React.Component { render () { return ( <DocumentTitle title={`${config.siteTitle} | Hi PostCSSy friends`}> <div> <h1 class...
modules/__tests__/createRoutesFromReactChildren-test.js
axross/react-router
/*eslint-env mocha */ /*eslint react/prop-types: 0*/ import expect from 'expect' import React from 'react' import { createRoutesFromReactChildren } from '../RouteUtils' import IndexRoute from '../IndexRoute' import Route from '../Route' describe('createRoutesFromReactChildren', function () { const Parent = React.cr...
src/utils/ValidComponentChildren.js
snadn/react-bootstrap
import React from 'react'; /** * Maps children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * * @param {?*} ...
src/components/examples/exampleHideShow.js
Jguardado/HiRproject
import React, { Component } from 'react'; export default class HideShow extends Component { constructor(props) { super(props); this.state = { visible: false, }; this.show = this.show.bind(this); this.hide = this.hide.bind(this); } show() { this.setState({ visible: true }); } ...
src/AudioMessage/__tests__/AudioMessage.js
Detaysoft/react-chat-elements
import React, { Component } from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import AudioMessage from '../AudioMessage'; describe('AudioMessage component', () => { it('should render without issues', () => { const component = shallow(<AudioMessage />); expect(component.leng...
index.js
dmsakamoto/nim
'use strict' import React from 'react'; import ReactDOM from 'react-dom'; class NimGame extends React.Component { constructor() { super(); this.state = { 'board': [3,5,8], 'turns': 0, 'gameOver': false } } checkGameOver() { let gameOver = this.state.gameOver; let winner ...
src/views/UploadMaterialView/index.js
juanda99/react-redux-material-ui
import React from 'react' import {MaterialForm} from 'components/materials' import FullWidthSection from 'components/full-width-section' import { defineMessages, FormattedMessage } from 'react-intl' const messages = defineMessages({ appUploadMaterial: { id: 'appuploadmaterial.title', description: 'Title for ...
src/scripts/components/user/UserForm.component.spec.js
kodokojo/kodokojo-ui
/** * Kodo Kojo - Software factory done right * Copyright © 2017 Kodo Kojo (infos@kodokojo.io) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at ...
examples/cancel/index.js
chentsulin/react-redux-sweetalert
import React from 'react'; import { render } from 'react-dom'; import App from './components/App'; render( <App />, document.getElementById('root') );
website/core/WebPlayer.js
negativetwelve/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/Meta/GraphDescription.js
Swizec/h1b-software-salaries
import React, { Component } from 'react'; class GraphDescription extends Component { get jobTitleFragment() { const { jobTitle } = this.props.filteredBy; let title; if (jobTitle === '*') { title = 'in tech'; }else{ if (jobTitle === "other") { ...
src/components/positions/positions-list.js
sunpietro/LeagueManager
import React, { Component } from 'react'; import DefaultLayout from '../layouts/default'; import PositionsGroup from './positions-group'; import PositionForm from '../forms/position-form'; import WPAPI from '../../tools/wpapi'; class PositionsList extends Component { constructor() { super(); this....
www/src/views/Marketing.js
naemono/bootstrap-carousel-react
import React from 'react' class Marketing extends React.Component { render() { return ( <div id='marketing'> <div className="row"> <div className="col-lg-4"> <img className="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAAL...
src/components/Pre.js
mikebarkmin/gestyled
import React from 'react'; import styled from 'styled-components'; import withStyle from './Base'; const StyledPre = styled.pre``; const Pre = props => <StyledPre {...props} />; export default withStyle(Pre);
src/input/__tests__/Search.js
kosiakMD/react-native-elements
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import Search from '../Search'; describe('Search component', () => { it('should render without issues', () => { const component = shallow(<Search />); expect(component.length).toBe(1); expect(toJson(compone...
src/components/icons/DescriptionIcon.js
austinknight/ui-components
import React from 'react'; const DescriptionIcon = props => ( <svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24"> {props.title && <title>{props.title}</title>} <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h...
__tests__/js/scenes/Map.js
arcturus/journey
import 'react-native'; import React from 'react'; import { Map } from '../../../js/scenes/Map'; import renderer from 'react-test-renderer'; // jest.mock('../../../js/components/MagnetMap', () => 'MagnetMap'); jest.mock('../../../js/components/Header', () => 'Header'); it('renders correctly', () => { const tree = re...
src/svg-icons/image/camera-rear.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCameraRear = (props) => ( <SvgIcon {...props}> <path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-...
app/layout/Navigation.js
phoenixmusical/web-client
import React, { Component } from 'react'; import Relay from 'react-relay'; import { Link } from 'react-router'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; import CommitteeMenuItem from '....
index.android.js
davejmac/test-react-native-app
import React, { Component } from 'react'; import Index from './Todo/components/Index' import { AppRegistry, StyleSheet, Text, View } from 'react-native'; class TDN extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Todo! <...
docs/src/examples/addons/Radio/Types/RadioExampleToggle.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Radio } from 'semantic-ui-react' const RadioExampleToggle = () => <Radio toggle /> export default RadioExampleToggle
pages/shows.js
parkerproject/conceptionarts
import React, { Component } from 'react'; import Link from 'next/link'; import Head from 'next/head'; import axios from 'axios'; import { map, size } from 'lodash'; import { nextConnect } from '../store'; import { FETCH_EVENTS } from '../actions/types'; import HeaderSocial from '../components/HeaderSocial'; import Head...
src/parser/priest/holy/modules/spells/Renew.js
FaideWW/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import Analyzer from 'parser/core/Analyzer'; import DistanceMoved from 'parser/shared/modules/others/DistanceMoved'; import SpellUsable from 'parser/shared/modules/SpellUsable'; import SpellLink from 'common/SpellLink'; import { ABILITIES_THAT_TRIGGER_END...
src/components/Projects/Cell.js
karajrish/karajrish.github.io
import React from 'react'; import PropTypes from 'prop-types'; import dayjs from 'dayjs'; const Cell = ({ data }) => ( <div className="cell-container"> <article className="mini-post"> <header> <h3><a href={data.link}>{data.title}</a></h3> <time className="published">{dayjs(data.date).format...
src/svg-icons/action/help-outline.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHelpOutline = (props) => ( <SvgIcon {...props}> <path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c...
tests/containers/FinishVotePage.spec.js
eugenrein/voteshirt
import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import { Link } from 'react-router'; import { FinishVotePage } from '../../src/containers/FinishVotePage.js'; import NavigationPage from '../../src/components/NavigationPage.js'; import ResultPanel from '../../src/components/Res...
app/packs/src/components/LiteratureCommon.js
ComPlat/chemotion_ELN
import React from 'react'; import PropTypes from 'prop-types'; import { Button, FormControl, OverlayTrigger, Tooltip, Popover } from 'react-bootstrap'; import uuid from 'uuid'; import Literature from './models/Literature'; import { CitationType, CitationTypeMap } from './CitationType'; const RefByUserInfo = ({ info, l...
src/routes/contact/index.js
TodoWishlist/VizResume
/** * 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 Layout from '../../compo...