path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
blueocean-material-icons/src/js/components/svg-icons/hardware/developer-board.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const HardwareDeveloperBoard = (props) => ( <SvgIcon {...props}> <path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z"/> ...
docs/src/App.js
GWShark0/hello-package
import React, { Component } from 'react'; import Hello from '../../src/Hello'; import '../../src/Hello.css'; class App extends Component { render() { return ( <div className="app"> <Hello /> </div> ); } } export default App;
app/components/UnitCard/index.js
medevelopment/UMA
import React from 'react'; import {Link, browserHistory} from 'react-router'; import {CardTitle} from 'material-ui/Card'; import styled from 'styled-components'; const PropCard = styled.div` position: relative; margin-bottom: 25px; background-position: 50% 50%; background-size: cover; width: 100% !important...
PhotoSpace/imports/ui/layouts/MainLayout.js
gergi30/elte-ik-szakdolgozat
// Llamado por /imports/startup/client/routes.js import React from 'react'; import {createContainer} from 'meteor/react-meteor-data'; import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import getMuiTheme from 'material-ui/styles...
webapp/src/NewPlayerButton.js
mathieu-pousse/go-dart
import React, { Component } from 'react'; import { browserHistory } from 'react-router'; import {Input} from 'react-materialize' class NewPlayerButton extends Component { constructor(props) { super(props) this.state = { boards: [] } this.handleBoardChange = this.handleBoardChange.bind(this)...
test/test_helper.js
nfcortega89/nikkotoonaughty
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/shared/components/form/formInput/formInput.js
sethbergman/operationcode_frontend
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Label from 'shared/components/label/label'; import styles from './formInput.css'; class FormInput extends Component { constructor() { super(); this.state = { text: '', isValid: true }; } handleChange = (...
src/js/components/nodes/registerNodes/RegisterNodesForm.js
knowncitizen/tripleo-ui
/** * Copyright 2017 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
src/GridList/GridList.spec.js
rscnt/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import GridList from './GridList'; import getMuiTheme from '../styles/getMuiTheme'; describe('<GridList />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (node) => shallow(node, {con...
src/GridList/GridTile.spec.js
ichiohta/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import GridTile from './GridTile'; import getMuiTheme from '../styles/getMuiTheme'; describe('<GridTile />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (node) => shallow(node, {co...
src/svg-icons/notification/vibration.js
verdan/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationVibration = (props) => ( <SvgIcon {...props}> <path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0...
src/components/feed/posts/link.js
alexcurtis/react-fbpage
'use strict'; import React from 'react'; class LinkPost extends React.Component { constructor(props){ super(props); } render(){ return ( <div> <a href={this.props.link}> <img src={this.props.full_picture} ...
packages/material-ui-icons/src/PhonePaused.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1...
packages/jsbattle-webpage/src/containers/test/LeagueReplayScreen.spec.js
jamro/jsbattle
import 'babel-polyfill'; import React from 'react'; import {shallow} from 'enzyme'; import {LeagueReplayScreen} from '../LeagueReplayScreen.js'; import Loading from '../../components/Loading.js'; import DuelResultScreen from "../../components/DuelResultScreen.js"; import JsBattleBattlefield from "jsbattle-react"; cons...
src/app/views/myFriendsRecipes.js
webcoding/reactui-starter
import _ from 'lodash'; import React from 'react'; import Reflux from 'reflux'; import meFriendsRecipesStore from 'stores/myFriendsRecipes'; import meActions from 'actions/me'; import RecipeListItem from 'components/recipeListItem'; import Spinner from 'components/spinner'; export default React.createClass( { ...
src/components/Main.js
ryanism37/Gallery-By-React
require('normalize.css/normalize.css'); require('styles/App.scss'); import React from 'react'; import ReactDOM from 'react-dom'; //获取相册图片的相关数据 var imageData = require('../data/imageData.json'); //利用自执行函数,将图片名信息转换为图片url路径信息 imageData = (function getImageUrl(imageDataArr){ for(var i = 0;i < imageDataArr.length;i ++){ ...
examples/js/column-filter/select-filter-with-sort.js
prajapati-parth/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; const qualityType = { 0: 'good', 1: 'bad', 2: 'unknown' }; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; i++) ...
src/esm/components/graphics/icons/stats-icon/index.js
KissKissBankBank/kitten
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; var _excluded = ["color", "title"]; import React from 'react'; import PropTypes from 'prop-types'; export var StatsIcon = function StatsIcon(_ref) { var color = _ref....
src/components/conversation-admin/participant-header.js
colinmegill/polis-admin-console
/* * Copyright 2012-present, Polis Technology 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 for non-commercial use can be found in the PATENTS file * in the sam...
client/components/FlassCommon/Video/VideoControllerWrapper/VideoControllerWrapperComponent.js
Nexters/flass
import React from 'react'; import PropTypes from 'prop-types'; import './VideoControllerWrapperStyle.scss'; const { arrayOf, element } = PropTypes; const propTypes = { children: arrayOf(element).isRequired }; const VideoControllerWrapperComponent = props => ( <div className="video-controller-wrapper"> { pro...
src/Pagination.js
adampickeral/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import PaginationButton from './PaginationButton'; import CustomPropTypes from './utils/CustomPropTypes'; import SafeAnchor from './SafeAnchor'; const Pagination = React.createClass({ mixins: [BootstrapMixi...
archimate-frontend/src/main/javascript/components/view/nodes/model_m/outcome.js
zhuj/mentha-web-archimate
import React from 'react' import { BaseMotivationWidget } from './_base' export const TYPE='outcome'; export class OutcomeWidget extends BaseMotivationWidget { getClassName(node) { return 'a-node model_m outcome'; } }
src/components/Modal.js
Minishlink/DailyScrum
// @flow import React, { Component } from 'react'; import { StyleSheet, View, Modal as RCTModal, TouchableWithoutFeedback } from 'react-native'; export default class Modal extends Component<Props> { // FUTURE remove shouldComponentUpdate if children can change shouldComponentUpdate(nextProps: Props) { return n...
web/src/components/Footer.js
MauriceMahan/FocusOverlay
import React from 'react'; import { Link } from 'gatsby'; const Footer = props => ( <footer id="footer"> <section> <h2>Aliquam sed mauris</h2> <p> Sed lorem ipsum dolor sit amet et nullam consequat feugiat consequat magna adipiscing tempus etiam dolore veroeros. eget dapibus mauris. C...
src/pages/Home.js
mtomcal/reactjs-hooligans-tv
import React, { Component } from 'react'; import { Jumbotron, Button } from 'react-bootstrap'; import Player from '../player'; import { Containers } from '../data'; import { Card } from '../cards'; import {api_url} from '../config.js'; var Home = React.createClass({ propTypes: { queryData: React.PropTypes.ob...
src/routes/login/index.js
cineindustria/site
/** * 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 Layout from '../../co...
docs/src/app/components/pages/components/Avatar/ExampleSimple.js
igorbt/material-ui
import React from 'react'; import Avatar from 'material-ui/Avatar'; import FileFolder from 'material-ui/svg-icons/file/folder'; import FontIcon from 'material-ui/FontIcon'; import List from 'material-ui/List/List'; import ListItem from 'material-ui/List/ListItem'; import { blue300, indigo900, orange200, deepOr...
examples/js/column/column-title-table.js
echaouchna/react-bootstrap-tab
/* 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/routes/index.js
hirako2000/react-hackathon-board
import React from 'react'; import { Route } from 'react-router'; // NOTE: here we're making use of the `resolve.root` configuration // option in webpack, which allows us to specify import paths as if // they were from the root of the ~/src directory. This makes it // very easy to navigate to files regardless of how de...
test/render/Sidebar.spec.js
caljrimmer/financial-redux-app
import React from 'react'; import addons from 'react/addons'; import expect from 'expect'; import Sidebar from '../../src/common/components/layout/Sidebar'; const TestUtils = React.addons.TestUtils; describe('Sidebar Rending', function(){ const user = { name : 'John Smith', dept : 'Web Team', lastLogin : ne...
docs/src/pages/style/TypographyTheme.js
AndriusBil/material-ui
// @flow weak import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; const styles = theme => ({ root: theme.typography.button, }); function TypograpghyTheme(props) { return <div className={props.classes.root}>{'This div looks like a button.'}</div>; } Typ...
src/react/jsx/样式.js
huangming1994/react-tutorial
import React from 'react' import ReactDOM from 'react-dom' const h1Style = { color: red } ReactDOM.render( <h1 style={h1Style}>Hello World</h1>, document.getElementById('root') )
src/lib/components/Example.js
thepixelninja/react-component-test
import React from 'react'; import './Example.scss'; const Example = () => ( <div className="Example"> <h1 className="Example-text">Create React Libraries</h1> </div> ); export default Example;
tests/layouts/PageLayout.spec.js
crssn/funfunapp
import React from 'react' import PageLayout from 'layouts/PageLayout/PageLayout' import { shallow } from 'enzyme' describe('(Layout) PageLayout', () => { it('renders as a <div>', () => { shallow(<PageLayout />).should.have.tagName('div') }) it('renders a project title', () => { shallow(<PageLayout />).f...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.js
IamJoseph/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 './assets/style.css'; export default () => <p id="feature-css-inclusion">We love useless text.</p>;
src/core/requireAuth.js
yanivefraim/mobile-device-manager
import React from 'react'; import auth from './auth'; var requireAuth = (Component) => { return class Authenticated extends React.Component { static willTransitionTo(transition) {debugger; if (!auth.loggedIn()) { transition.redirect('/login', {}, {'nextPath' : transition.path}); } } ...
docs/app/Examples/modules/Popup/Usage/PopupExampleControlled.js
vageeshb/Semantic-UI-React
import React from 'react' import { Button, Grid, Header, Popup } from 'semantic-ui-react' const timeoutLength = 2500 class PopupExampleControlled extends React.Component { state = { isOpen: false } handleOpen = () => { this.setState({ isOpen: true }) this.timeout = setTimeout(() => { this.setState...
src/js/ui/components/welcome/footerBar.js
hiddentao/heartnotes
import React from 'react'; import Icon from '../icon'; import ExternalLink from '../externalLink'; import Loading from '../loading'; import { connectRedux, routing } from '../../helpers/decorators'; import Footer from '../footer'; class Component extends React.Component { constructor() { super(); } render...
modules/__tests__/Redirect-test.js
nvartolomei/react-router
import expect from 'expect' import React from 'react' import { render, unmountComponentAtNode } from 'react-dom' import createHistory from '../createMemoryHistory' import Redirect from '../Redirect' import Router from '../Router' import Route from '../Route' describe('A <Redirect>', function () { let node beforeE...
src/components/mobile/AdOne/AdOne.js
pppp22591558/ChinaPromotion
import React, { Component } from 'react'; import reactDOM from 'react-dom'; import styles from './AdOne.css'; import withStyles from '../../../decorators/withStyles'; import Modal from '../Modal'; import { get as getContent } from '../../../constants/ABTest'; @withStyles(styles) class AdOne extends Component{ const...
modules/Header.js
marquesarthur/learning_react
import React from 'react'; import { Router, Route, browserHistory, IndexRoute } from 'react-router'; import { Link } from 'react-router' import { Nav, NavItem, NavDropdown, Glyphicon, DropdownButton, MenuItem, ProgressBar, Grid, Row, Col } from 'react-bootstrap'; import Navbar, {Brand} from 'react-bootstrap/lib/Navbar...
examples/huge-apps/routes/Grades/components/Grades.js
chrisirhc/react-router
import React from 'react'; class Grades extends React.Component { render () { return ( <div> <h2>Grades</h2> </div> ); } } export default Grades;
src/components/Feedback/Feedback.js
egut/react-docker-demo
/** * 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 withStyles from 'isom...
src/StyleButton.js
isuttell/react-texteditor
/** * @file Text Editor StyleButton * @author Isaac Suttell <isaac@isaacsuttell.com> */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; // CSS Module import css from './StyleButton.css'; export default class StyleButton extends Component { /** ...
src/js/views/form.js
unidevel/touchstonejs-starter
import Container from 'react-container'; import dialogs from 'cordova-dialogs'; import React from 'react'; import Tappable from 'react-tappable'; import { UI } from 'touchstonejs'; const scrollable = Container.initScrollable(); // html5 input types for testing // omitted: button, checkbox, radio, image, hidden, reset...
src/tools/web/client/src/utils.js
e1528532/libelektra
import React from 'react' export const toElektraBool = (val) => val ? '1' : '0' export const fromElektraBool = (val) => (val === '1') ? true : false export const RANGE_REGEX = /([-+]?[0-9]*\.?[0-9]+)-([-+]?[0-9]*\.?[0-9]+)/ export const HOST_REGEX = /(https?:\/\/[^/]+)(\/.*)?/ export const ARRAY_KEY_REGEX = /#(_...
src/components/Sample2/Sample2.js
tinkertrain/qsenseistyleguide
import React, { Component } from 'react'; import CodeBlock from '../CodeBlock'; import './Sample2.scss'; export class Sample2 extends Component { state = { classSize: 'qs_Base--16' }; render() { return ( <div className={this.state.classSize}> <div className="fontSizeSwitcher qs_Bg--light...
templates/rubix/rails/rails-example/src/common/sidebar.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import React from 'react'; import { Sidebar, SidebarNav, SidebarNavItem, SidebarControls, SidebarControlBtn, LoremIpsum, Grid, Row, Col, FormControl, Label, Progress, Icon, SidebarDivider } from '@sketchpixy/rubix'; import { Link } from 'react-router'; class ApplicationSidebar extends React.Component { h...
examples/auth-with-shared-root/app.js
zenlambda/react-router
import React from 'react' import { render } from 'react-dom' import { browserHistory, Router } from 'react-router' import routes from './config/routes' render(<Router history={browserHistory} routes={routes}/>, document.getElementById('example'))
src/pages/resume/education/index.fr.js
angeloocana/angeloocana
import React from 'react'; import EducationsPage from '../../../components/Resume/EducationsPage'; import graphql from 'graphql'; export default (props) => <EducationsPage {...props} />; export const pageQuery = graphql` query ResumeEducationsFr { site { siteMetadata { resume { m...
src/ShallowTraversal.js
dustinsanders/enzyme
import React from 'react'; import isEmpty from 'lodash/isEmpty'; import isSubset from 'is-subset'; import { coercePropValue, propsOfNode, splitSelector, isCompoundSelector, selectorType, AND, SELECTOR, nodeHasType, } from './Utils'; export function childrenOfNode(node) { if (!node) return []; cons...
src/components/ImgFigure.js
movingStars/gallery-by-react-from-xiongjiao
require('normalize.css/normalize.css'); import React from 'react'; class ImgFigure extends React.Component { render(){ let { data } = this.props; return( <figure className="img-figure"> <img className="img-img" src={data.imageURL} alt={data.title}/> <figcaption> <h2 className="img-title">{data.tit...
src/Snackbar/Snackbar.spec.js
mmrtnz/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import Snackbar from './Snackbar'; import SnackbarBody from './SnackbarBody'; import getMuiTheme from '../styles/getMuiTheme'; describe('<Snackbar />', () => { const muiTheme = getMuiTheme(); const shallo...
src/svg-icons/av/forward-10.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvForward10 = (props) => ( <SvgIcon {...props}> <path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0...
docs/app/Examples/elements/Button/Usage/index.js
shengnian/shengnian-ui-react
import React from 'react' import { Message } from 'shengnian-ui-react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const ButtonUsageExamples = () => ( <ExampleSection title='Usage'> <ComponentExampl...
src/Paper/Paper.js
AndriusBil/material-ui
// @flow import React from 'react'; import type { ComponentType } from 'react'; import classNames from 'classnames'; import warning from 'warning'; import withStyles from '../styles/withStyles'; export const styles = (theme: Object) => { const shadows = {}; theme.shadows.forEach((shadow, index) => { shadows[...
actor-apps/app-web/src/app/components/sidebar/HeaderSection.react.js
gale320/actor-platform
import _ from 'lodash'; import React from 'react'; import mixpanel from 'utils/Mixpanel'; import ReactMixin from 'react-mixin'; import { IntlMixin, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import MyProfileActions from 'actions/MyProfileActions'; import LoginActionCreators from 'action...
ui/src/components/role/AddMemberToRoles.js
yahoo/athenz
/* * Copyright 2020 Verizon Media * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
fixtures/output/webpack-message-formatting/src/AppNoDefault.js
IamJoseph/create-react-app
import React, { Component } from 'react'; import myImport from './ExportNoDefault'; class App extends Component { render() { return <div className="App">{myImport}</div>; } } export default App;
superset/assets/spec/javascripts/explore/components/ExploreViewContainer_spec.js
dmigo/incubator-superset
// this test must be commented out because ChartContainer is now importing files // from visualizations/*.js which are also importing css files which breaks in the testing env. // import React from 'react'; // import { expect } from 'chai'; // import { describe, it } from 'mocha'; // import { shallow } from 'enzyme'; ...
example/src/index.js
romainberger/react-portal-tooltip
import React from 'react' import ReactDOM from 'react-dom' import App from './app' ReactDOM.render(<App />, document.querySelector('#root'))
node_modules/semantic-ui-react/dist/es/collections/Form/FormInput.js
SuperUncleCat/ServerMonitoring
import _extends from 'babel-runtime/helpers/extends'; import React from 'react'; import { customPropTypes, getElementType, getUnhandledProps, META } from '../../lib'; import Input from '../../elements/Input'; import FormField from './FormField'; /** * Sugar for <Form.Field control={Input} />. * @see Form * @see In...
src/index.js
fmakdemir/react-boilerplate
import React from 'react'; import ReactDom from 'react-dom'; import App from 'containers/app'; import Pages from 'pages'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; // theming import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import theme from 'lib/theme'; // redux thing...
packages/component/src/Attachment/ImageAttachment.js
billba/botchat
import PropTypes from 'prop-types'; import React from 'react'; import ImageContent from './ImageContent'; import readDataURIToBlob from '../Utils/readDataURIToBlob'; const ImageAttachment = ({ attachment }) => { let imageURL = attachment.thumbnailUrl || attachment.contentUrl; // To support Content Security Polic...
src/ui/pages/App.js
notifapi/notifapi-web
import React from 'react'; import { Component } from 'react'; import AppContainer from '../containers/AppContainer'; import HeaderContainer from '../containers/HeaderContainer'; import FooterContainer from '../containers/FooterContainer'; export default class App extends Component { render() { return ( ...
src/encoded/static/components/item-pages/FileSetCalibrationView.js
4dn-dcic/fourfront
'use strict'; import React from 'react'; import _ from 'underscore'; import { FilesInSetTable } from './components/FilesInSetTable'; import DefaultItemView from './DefaultItemView'; /** * Page view for a FileSetCalibration Item. * Renders out a {@link module:item-pages/components.FilesInSetTable} Component. * * ...
src/components/Chat/Input/EmojiSuggestion.js
welovekpop/uwave-web-welovekpop.club
import React from 'react'; import PropTypes from 'prop-types'; import ListItemAvatar from '@material-ui/core/ListItemAvatar'; import ListItemText from '@material-ui/core/ListItemText'; import Suggestion from './Suggestion'; const shortcode = emoji => `:${emoji.shortcode}:`; const EmojiSuggestion = ({ value: emoji, ...
examples/with-react-intl/components/Layout.js
sedubois/next.js
import React from 'react' import {defineMessages, injectIntl} from 'react-intl' import Head from 'next/head' import Nav from './Nav' const messages = defineMessages({ title: { id: 'title', defaultMessage: 'React Intl Next.js Example' } }) export default injectIntl(({intl, title, children}) => ( <div> ...
source/common/components/App/App.js
shery15/react
import React from 'react'; import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom'; import CSSModules from 'react-css-modules'; import styles from '../../css/bulma.css'; import Greeter from '../Greeter'; import Todo from '../Todo'; import MarkdownEditor from '../MarkdownEditor'; import I...
src/svg-icons/action/delete.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDelete = (props) => ( <SvgIcon {...props}> <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/> </SvgIcon> ); ActionDelete = pure(ActionDelete); ActionDelete.display...
src/Paper/Paper.js
dsslimshaddy/material-ui
// @flow import React from 'react'; import classNames from 'classnames'; import warning from 'warning'; import withStyles from '../styles/withStyles'; export const styles = (theme: Object) => { const shadows = {}; theme.shadows.forEach((shadow, index) => { shadows[`shadow${index}`] = { boxShadow: shado...
__tests__/Layout-test.js
marcosaftertype/React-Redux-App-Boilerplate
'use strict' import React from 'react' import { shallow } from 'enzyme' import Layout from '../js/components/layout' describe('Component: Layout', () => { const layout = shallow(<Layout />) it('renders properly, is <div>', () => { expect(layout.is('div')).toEqual(true) }) it('has H1 with default title: Layo...
src/encoded/static/components/viz/components/Legend.js
4dn-dcic/fourfront
'use strict'; import React from 'react'; import _ from 'underscore'; import memoize from 'memoize-one'; import * as vizUtil from '@hms-dbmi-bgm/shared-portal-components/es/components/viz/utilities'; import { barplot_color_cycler } from './../ColorCycler'; import { console, isServerSide, object, logger } from '@hms-dbm...
1_simple_server_render/app.js
chkui/react-server-demo
'use strict'; import React from 'react' const s_contain = { width: '40rem', display: 'inline-block' },s_h3 = { display: 'inline-block' } const App = props => <div style={s_contain}> <h3 style={s_h3}>这是一个简单的服务器端渲染展示页面。</h3> <P /> <P2 /> </div> class P extends React.Componen...
tests/react_children/text.js
popham/flow
// @flow import React from 'react'; class Text extends React.Component<{children: string}, void> {} class TextOptional extends React.Component<{children?: string}, void> {} class TextLiteral extends React.Component<{children: 'foo' | 'bar'}, void> {} <Text />; // Error: `children` is required. <TextOptional />; // O...
blueocean-material-icons/src/js/components/svg-icons/hardware/keyboard-arrow-up.js
jenkinsci/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const HardwareKeyboardArrowUp = (props) => ( <SvgIcon {...props}> <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/> </SvgIcon> ); HardwareKeyboardArrowUp.displayName = 'HardwareKeyboardArrowUp'; HardwareKeyboardArrowUp.muiName = 'SvgIcon'...
app/javascript/mastodon/components/dropdown_menu.js
MitarashiDango/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from './icon_button'; import Overlay from 'react-overlays/lib/Overlay'; import Motion from '../features/ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; imp...
src/components/Dashboard.js
jainvabhi/PWD
import React from 'react'; import PropTypes from 'prop-types'; import Webcam from '../actions/webcam'; import TimeTable from './TimeTable'; const Dashboard = ({user, logout}) => { Webcam.reset(); const userImage = { backgroundImage: `url(${user.webcam.image})`, }; return ( <div className="medical-porta...
popup-study/components/StyledText.js
Morhaus/popupstudy
import React from 'react'; import { Text } from 'react-native'; export class MonoText extends React.Component { render() { return ( <Text {...this.props} style={[this.props.style, {fontFamily: 'space-mono'}]} /> ); } }
internals/scaffold/testTemplate.js
jgunnison/react-boilerplate
module.exports = function (name) { return (`import React from 'react'; import { shallow } from 'enzyme'; import ${name} from './'; describe('Component: ${name}', () => { it('It renders without errors', () => { expect( shallow( <${name} text="Hello; World" /> ).length, ).toEqual(1); });...
src/js/components/ui/FullWidthButton.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import shouldPureComponentUpdate from 'react-pure-render/function'; export default class FullWidthButton extends Component { shouldComponentUpdate = shouldPureComponentUpdate; static propTypes = { disabled: PropTypes.bool, ...
src/components/Form/InlineInput/__tests__/StyledInlineInput.js
thegrinder/basic-styled-uikit
import React from 'react'; import { ThemeProvider } from 'styled-components'; import { render, cleanup } from '@testing-library/react'; import theme from '../../../../theme/theme'; import StyledInlineInput from '../StyledInlineInput'; const renderComponent = () => render( <ThemeProvider theme={theme}> <St...
app/jsx/gradezilla/default_gradebook/components/ComingSoonContent.js
venturehive/canvas-lms
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
front/src/utils/ebetsCategories.js
ethbets/ebets
/* Copyright (C) 2017 ethbets * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ import React from 'react'; const ebetsCategories = [ { name: 'Fighting', subcategory: [ { name: 'Boxing', ...
local_modules/react-component-redux/decorators/pure.js
pashaigood/react-component-redux
/** * @author PBelugin */ import React from 'react'; import container from './container'; import {functionName} from '../helpers/functions'; /** * * @param {React.Component} Component * @param {{actions: Object, state: Object, name: String, reducers: String, view: Function}} params * @returns {Container} */ exp...
packages/material-ui-icons/src/PhotoSizeSelectLarge.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let PhotoSizeSelectLarge = props => <SvgIcon {...props}> <path d="M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h...
docs/src/components/Homepage/Heading/index.js
rhalff/storybook
import React from 'react'; import './style.css'; import storybookLogo from '../../../design/homepage/storybook-logo.svg'; const Heading = () => ( <div id="heading" className="row"> <div className="col-xs-12"> <img className="sb-title" src={storybookLogo} alt="Storybook Logo" /> <h3 className="sb-tag...
src/components/concent/steps/Step5.js
golemfactory/golem-electron
import React from 'react'; import Lottie from 'react-lottie'; import animData from './../../../assets/anims/Concent05'; const defaultOptions = { loop: false, autoplay: true, animationData: animData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } }; export default class Step5...
example/MyMousetrap.js
georgeOsdDev/react-mousetrap-mixin
'use strict'; import React from 'react'; import {MousetrapMixin} from '../index.js'; let MyMousetrap = React.createClass({ mixins: [MousetrapMixin], getInitialState(){ return { color: 'red', greenChecked: false } }, getMousetrap(){ return { 'y e l l o w':() => { this.se...
index.js
l-urence/react-native-autocomplete-input
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { FlatList, Platform, StyleSheet, Text, TextInput, View, ViewPropTypes as RNViewPropTypes } from 'react-native'; // Keep this line for downwards compatibility with RN. // eslint-disable-next-line react/forbid-foreign-pro...
011/src/components/app.js
StephenGrider/RallyCodingWeekly
import React, { Component } from 'react'; import { Link } from 'react-router'; export default class App extends Component { render() { return ( <div> <h4>App</h4> <Link to="/users">Users</Link> <hr /> {this.props.children} </div> ); } }
src/components/login/login.js
ndxm/nd-react-scaffold
/** * Created by hjx on 11/3/2015. */ import styles from './login.css'; import React from 'react'; import Router from 'react-router'; const { Navigation } = Router; export default React.createClass({ mixins: [ Navigation ], getInitialState: function () { return { username: '', ...
blueprints/layout/files/__test__/layouts/__name__Layout.spec.js
simonvpe/borrkoll-react
import React from 'react' describe('(Layout) <%= pascalEntityName %>', () => { it('should exist', () => { }) })
packages/demos/demo/src/components/Project/card.js
garth/cerebral
import React from 'react' import { connect } from '@cerebral/react' import { signal } from 'cerebral/tags' import projectWithDetails from '../../compute/projectWithDetails' import { displayElapsed } from '../../helpers/dateTime' export default connect( { item: projectWithDetails, penClick: signal`projects.pe...
docs/src/app/components/pages/components/TimePicker/Page.js
ngbrown/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 timePickerReadmeText from './README'; import TimePickerExampleSimple from...
RelayExample/src/Book.js
davidpaulmcintyre/graphql-stockticker
import React from 'react'; import Relay from 'react-relay'; import './Book.css'; function Book({ book }) { console.log(book.image) return ( <div className="book"> <img src={book.image} /> <div>{book.title}</div> </div> ); } export default Relay.createContainer(Book, { fragments: { boo...
src/ui/auth/RegisterScreen.js
exponentjs/xde
/** * @flow */ import React from 'react'; import RegisterForm from './components/RegisterForm'; import { actions } from 'xde/state'; import { connectToData } from 'xde/state/utils'; import type { AppActions, AppState } from 'xde/state/types'; import type { UserOrLegacyUser } from 'xdl/build/User'; import type { R...
src/components/HomeScreen.js
teamstrobe/mancreact-client
import React, { Component } from 'react'; import apiFetch from '../apiFetch'; import { eventsURI } from '../config/urls'; import UpcomingEventHero from './UpcomingEventHero'; import PreviousMeetupsList from './PreviousMeetupsList'; import Spinner from './Spinner'; class HomeScreen extends Component { state = { ...
src/containers/CreateCategory.js
nickeblewis/walkapp
/** * Component for category creation */ import React from 'react' import { withRouter } from 'react-router' import { graphql } from 'react-apollo' import gql from 'graphql-tag' class CreateCategory extends React.Component { static propTypes = { router: React.PropTypes.object, addName: React.PropTypes.fun...
assets/TopNav.js
rmccue/new-list-tables
import React from 'react'; const PageLink = props => { const { children, isActive } = props; if ( ! isActive ) { return <span className='tablenav-pages-navspan'>{ children }</span>; } // Remove the isActive prop. const otherProps = Object.assign( {}, props ); delete otherProps.isActive; return <a { ...other...