path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
client/src/app/install/install-step-3-database.js
opensupports/opensupports
import React from 'react'; import _ from 'lodash'; import history from 'lib-app/history'; import i18n from 'lib-app/i18n'; import API from 'lib-app/api-call'; import Button from 'core-components/button'; import Header from 'core-components/header'; import Form from 'core-components/form'; import FormField from 'core-...
src/SubcategoryList/index.js
DuckyTeam/ducky-components
import React from 'react'; import PropTypes from 'prop-types'; import Spacer from '../Spacer'; import ProgressbarLabeledPercentage from '../ProgressbarLabeledPercentage'; import Typography from '../Typography'; import Wrapper from '../Wrapper'; import styles from './styles.css'; class SubcategoryList extends React.Com...
src/lib/middlewares/htmlView.js
kaishui/pwfe-server
import React from 'react' import RenderFacade from './util/facade' import cache from '../common/cache' import env from '../common/env' const App = env.getParam('app') /** * 进行html模板渲染的组件。 * @param ctx * @param next */ async function htmlView(ctx, next) { if (ctx.isMatch) { //获取React静态文本和redux状态数据 ...
src/CarouselItem.js
omerts/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import TransitionEvents from './utils/TransitionEvents'; const CarouselItem = React.createClass({ propTypes: { direction: React.PropTypes.oneOf(['prev', 'next']), onAnimateOutEnd: React.PropTypes.func, active: React.PropTypes.bool, anima...
3-lifecycle-events/src/TodoList.js
mariusz-malinowski/tutorial-react
import React, { Component } from 'react'; import TodoItem from './TodoItem'; import AddTodo from './AddTodo'; class TodoList extends Component { constructor(props) { super(props); this.state = { todos: props.todos }; } onAddTodo = (todoName) => { this.setState({ todos: [{ na...
react-fundamentals-es6/lessons/06-refs/App.js
3mundi/React-Bible
// https://jsbin.com/qiwoxax/edit?js,output import React from 'react'; import ReactDOM from 'react-dom'; class App extends React.Component { constructor(){ super(); this.state = { red: 0, green: 0, blue: 0 } this.update = this.update.bind(this) } update(e){ this.setState({ ...
app/src/Frontend/modules/mission/components/page/index.js
ptphp/ptphp
/** * Created by jf on 15/12/10. */ "use strict"; import React from 'react'; var Tappable = require('react-tappable'); import './index.less'; export default React.createClass( { componentDidMount(){ const {title} = this.props; Utils.set_site_title(title); }, render() { const ...
src/components/animals/AnimalForm.spec.js
pisgrupo9/ash_web
import { expect } from 'chai'; import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import AnimalForm from './AnimalForm'; import { Checkbox } from 'react-bootstrap'; import ImagesDropzone from '../common/ImagesDropzone'; import ProfileDropzone from './ProfileDropzone'; import ModalAn...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.js
TondaHack/create-react-app
/** * 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. */ import Rea...
src/style-controls-block.js
ryapapap/draft-editor
import React, { Component } from 'react'; import { EditorState, RichUtils } from 'draft-js'; import { StyleControls } from './style-controls-base'; export default class BlockStyleControls extends Component { static propTypes = { editorState: React.PropTypes.instanceOf(EditorState).isRequired, onChange: Reac...
tests/components/Counter/Counter.spec.js
oliveirafabio/wut-blog
import React from 'react' import { bindActionCreators } from 'redux' import { Counter } from 'components/Counter/Counter' import { shallow } from 'enzyme' describe('(Component) Counter', () => { let _props, _spies, _wrapper beforeEach(() => { _spies = {} _props = { counter: 5, ...bindActionCre...
client/src/pages/Home.react.js
wenhao/fixed-asset
import React from 'react' import { RaisedButton, FontIcon, Paper, TextField } from 'material-ui' import { State } from 'react-router' import userApi from '../services/user' var Home = React.createClass({ mixins: [State], getInitialState() { return { title: '' } }, render() { ret...
example/examples/Callouts.js
jiaminglu/react-native-maps
import React from 'react'; import { StyleSheet, View, Text, Dimensions, TouchableOpacity, } from 'react-native'; import MapView from 'react-native-maps'; import CustomCallout from './CustomCallout'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 31....
src/Parser/Warlock/Demonology/CHANGELOG.js
enragednuke/WoWAnalyzer
import React from 'react'; import { Chizu } from 'MAINTAINERS'; import Wrapper from 'common/Wrapper'; import ItemLink from 'common/ItemLink'; import ITEMS from 'common/ITEMS'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; export default [ { date: new Date('2017-09-30'), chang...
src/components/CheckoutPane.js
longyarnz/WelFurnish-E-Commerce
import React, { Component } from 'react'; export default class CheckoutPane extends Component { constructor(props){ super(props); this._click = this._click.bind(this); this.state = { pane: "pane", mount: true } } _click(){ this.setState({pane: "delete-node"}); setTimeout(()=>this.props.remov...
app/containers/HomePage/index.js
jilla720/messidge
/* * 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 necessity for you then you can refactor it and remove * the l...
docs/src/app/components/pages/components/IconMenu/Page.js
tan-jerene/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 iconMenuReadmeText from './README'; import IconMenuExampleSimple from './...
server/frontend/src/index.js
cs472-spots/spots
// src/index.js import React from 'react'; import ReactDOM from 'react-dom'; import { hashHistory } from 'react-router'; import { Provider } from 'nectarine'; // eslint-disable-next-line import Store from './store/Store.js'; import Routes from './routes/index.js'; import './index.css'; //Renders the components passed...
webapp/client/src/TourPage.js
mikemag/MonkeyCAM
/* * Copyright 2013-2017 Michael M. Magruder (https://github.com/mikemag) * * This source code is licensed under the Apache license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import { Grid, Row, Col, Panel, Thumbnail } from 'react-bootstrap'...
classic/src/scenes/wbfa/generated/FARBolt.pro.js
wavebox/waveboxapp
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faBolt } from '@fortawesome/pro-regular-svg-icons/faBolt' export default class FARBolt extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faBolt} />) } }
packages/vulcan-i18n/lib/modules/message.js
VulcanJS/Vulcan
import React, { Component } from 'react'; import { intlShape } from './shape'; import { registerComponent } from 'meteor/vulcan:lib'; const FormattedMessage = ({ id, values, defaultMessage = '', html = false, className = '' }, { intl }) => { let message = intl.formatMessage({ id, defaultMessage }, values); const c...
src/TPA/Label/Label.js
skyiea/wix-style-react
import React from 'react'; import {string} from 'prop-types'; import classNames from 'classnames'; import WixComponent from '../../BaseComponents/WixComponent'; import tpaStyleInjector from '../TpaStyleInjector'; let styles = {locals: {}}; try { styles = require('!css-loader?modules&camelCase&localIdentName="[path][...
src/components/views/globals/NewVersionBar.js
martindale/vector
/* Copyright 2015, 2016 OpenMarket Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
app/javascript/mastodon/features/blocks/index.js
amazedkoumei/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 ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import PropType...
lib/component.js
bekher/hyperterm
import React from 'react'; import { StyleSheet, css } from 'aphrodite-simple'; import { shouldComponentUpdate } from 'react-addons-pure-render-mixin'; export default class Component extends React.Component { constructor () { super(); this.styles_ = this.createStyleSheet(); this.cssHelper = this.cssHelpe...
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/__tests__/Badge.spec.js
GoogleCloudPlatform/prometheus-engine
import React from 'react'; import { shallow } from 'enzyme'; import { Badge } from '../'; describe('Badge', () => { it('should render a span by default', () => { const wrapper = shallow(<Badge>Yo!</Badge>); expect(wrapper.type()).toBe('span'); }); it('should render an anchor when when href is provided'...
test/components/Markdown-test.js
primozs/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import {test} from 'tape'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import Markdown from '../../src/js/components/Markdown'; test('loads a paragraph Markdown', (t) => { t.plan(3); const shallowRenderer = TestU...
app/containers/LanguageProvider/index.js
shafeeqonline/xt-quiz-app
/* * * LanguageProvider * * this component connects the redux state language locale to the * IntlProvider component and i18n messages (loaded from `app/translations`) */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { IntlProvider } from 'reac...
docs/src/sections/TransitionSection.js
mmarcant/react-bootstrap
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function TransitionSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> ...
fluxArchitecture/src/js/main.js
3mundi/React-Bible
import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/app' ReactDOM.render(<App />, document.getElementById('main'));
src/BootstrapMixin.js
kwnccc/react-bootstrap
import React from 'react'; import styleMaps from './styleMaps'; import CustomPropTypes from './utils/CustomPropTypes'; const BootstrapMixin = { propTypes: { /** * bootstrap className * @private */ bsClass: CustomPropTypes.keyOf(styleMaps.CLASSES), /** * Style variants * @type {("...
web/react/src/client/pages/BadOS/BadOS.js
JamesMillercus/Portfolio-Website
import React, { Component } from 'react'; import Error from './../../components/locs/Error/Error'; class BadOS extends Component { render() { /** LOGIC FOR DISPLAYING CONTENT CORRECLTY ON DEVICE + BROWSER **/ const htext = "This website can't be displayed on old devices"; const ptext = 'Please update yo...
docs/src/stories/SubComponents.js
byumark/react-table
/* eslint-disable import/no-webpack-loader-syntax */ import React from 'react' import _ from 'lodash' import namor from 'namor' import ReactTable from '../../../lib/index' class Story extends React.PureComponent { constructor (props) { super(props) const data = _.map(_.range(5553), d => { return { ...
web/src/modules/icons/Museum.js
HobartMakers/DigitalWalkingTours
import React from 'react' const MuseumIcon = props => <svg width="15px" height="15px" viewBox="0 0 15 15" style={{enableBackground: 'new 0 0 15 15',}} {...props} > <path id="path7509" d="M7.5,0L1,3.4453V4h13V3.4453L7.5,0z M2,5v5l-1,1.5547V13h13v-1.4453L13,10 V5H2z M4.6152,6c0.169-0.0023,0.3318,0.0639,0.45...
src/svg-icons/device/airplanemode-inactive.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAirplanemodeInactive = (props) => ( <SvgIcon {...props}> <path d="M13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.68l7.83 7.83L21 16v-2l-8-5zM3 5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L1...
src/admin/src/components/controls/renderers/render_number.js
jgretz/zen-express
import React from 'react'; export const renderNumber = (data) => ( <span>{data ? data.toLocaleString() : ''}</span> );
docs-ui/components/tableChart.stories.js
ifduyue/sentry
import React from 'react'; import {storiesOf} from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import {number, text, boolean, array} from '@storybook/addon-knobs'; import TableChart from 'app/components/charts/tableChart'; storiesOf('Charts/TableChart', module).add( 'default', withInfo( ...
text-dream/webapp/src/components/heads/DreamHeadComponent.js
PAIR-code/interpretability
/** * @license * Copyright 2018 Google LLC. All Rights Reserved. * 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 a...
assets/javascripts/sso/components/AdminIndexCard.js
laincloud/sso
import StyleSheet from 'react-style'; import React from 'react'; import {History} from 'react-router'; let AdminIndexCard = React.createClass({ mixins: [History], render() { const buttons = [ { title: "我的应用管理", target: "apps" }, { title: "我的群组管理", target: "groups" }, { title: "用户管理-管理员特供",...
src/__mocks__/react-intl.js
shayc/cboard
import React from 'react'; const Intl = jest.genMockFromModule('react-intl'); // Here goes intl context injected into component, feel free to extend const intl = { formatMessage: ({ defaultMessage }) => defaultMessage }; Intl.injectIntl = Node => { const renderWrapped = props => <Node {...props} intl={intl} />; ...
examples/js/custom/csv-button/fully-custom-csv-button.js
prajapati-parth/react-bootstrap-table
/* eslint max-len: 0 */ /* eslint no-unused-vars: 0 */ /* eslint no-alert: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn, InsertButton } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; ...
js/components/Header/6.js
LetsBuildSomething/vmag_mobile
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text } from 'native-base'; import { Actions } from 'react-native-router-flux'; import { actions } from 'react-native-navigation-redux-helpers'; import { openDra...
packages/react-instantsearch-core/src/core/__tests__/createInstantSearchManager.js
algolia/react-instantsearch
import React from 'react'; import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; import Enzyme, { mount } from 'enzyme'; import algoliasearch from 'algoliasearch/lite'; import { SearchResults } from 'algoliasearch-helper'; import createInstantSearchManager from '../createInstantSearchManager'; import { runAllMicroT...
app/components/material/Material_5.js
tw00089923/kcr_bom
import React from 'react'; import style from './Material.css'; import cx from 'classname'; import _ from 'lodash'; export default class Material_5 extends React.Component { constructor(props) { super(props); this.state ={ show_first:false, show_3_2_1:true, show_3_2_2:false, show_3_1:fal...
node_modules/native-base/Components/Widgets/ProgressBar.android.js
tedsf/tiptap
/* @flow */ 'use strict'; import React from 'react'; import ProgressBar from "ProgressBarAndroid"; import NativeBaseComponent from '../Base/NativeBaseComponent'; import computeProps from '../../Utils/computeProps'; export default class SpinnerNB extends NativeBaseComponent { prepareRootProps() { var ty...
src/lib/plot/hint.js
jameskraus/react-vis
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
src/components/UserList/UserList.js
Pamplemaus/raincloud
import React from 'react'; import UserItem from '../UserItem/UserItem'; import styles from './UserList.scss'; const UserList = ({ users, removeUser, togglePlaylist }) => { return( <div className={styles.userlist}> { users.map((user) => ( <UserItem key={user.id} selected={user.selected} image={user....
frontend/src/components/common/pagination.js
unicef/un-partner-portal
import React, { Component } from 'react'; import withStyles from 'material-ui/styles/withStyles'; import IconButton from 'material-ui/IconButton'; import Input from 'material-ui/Input'; import { MenuItem } from 'material-ui/Menu'; import Select from 'material-ui/Select'; import Toolbar from 'material-ui/Toolbar'; impo...
src/App.js
MichaelKohler/where
import React from 'react'; import Overview from './Overview'; import Footer from './Footer'; import './scss/app.scss'; const App = () => { return ( <div> <Overview /> <Footer /> </div> ); }; export default App;
src/Parser/DeathKnight/Shared/RuneDetails.js
hasseboulen/WoWAnalyzer
import React from 'react'; import { Scatter } from 'react-chartjs-2'; import Analyzer from 'Parser/Core/Analyzer'; import Tab from 'Main/Tab'; import { formatDuration } from 'common/format'; import RuneBreakdown from './RuneBreakdown'; import RuneTracker from './RuneTracker'; class RuneDetails extends Analyzer { s...
src/svg-icons/device/usb.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceUsb = (props) => ( <SvgIcon {...props}> <path d="M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2-1.21 0-2.2.99-2.2 2.2 0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3....
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js
yangchenghu/actor-platform
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import _ from 'lodash'; import React from 'react'; import classnames from 'classnames'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; const {addons: { PureRenderMixin }} = addons; import ActorClient from 'utils/ActorClient'; import...
src/components/SocialIcon/SocialIcon.js
denichodev/personal-web
import React from 'react'; import PropTypes from 'prop-types'; import './SocialIcon.css'; const SocialIcon = ({ to, className }) => { return ( <div> <a href={to} target="_blank" rel="noreferrer noopener"> <i className={`social-icon centered ${className}`} /> </a> </div> ); }; SocialIco...
src/svg-icons/image/camera-front.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCameraFront = (props) => ( <SvgIcon {...props}> <path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-....
PeerAI/index.ios.js
peerism/peer.ai
import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import MainApp from './src/MainApp'; AppRegistry.registerComponent('PeerAI', () => MainApp);
src/svg-icons/action/card-travel.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCardTravel = (props) => ( <SvgIcon {...props}> <path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H...
Example/__tests__/index.ios.js
halilb/react-native-chess-board
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 /> ); });
src/components/bottomBar.item.js
pcyan/dva-example-rn
import React, { Component } from 'react'; import { StyleSheet, Text, View, Image, } from 'react-native'; import { IconToggle } from 'react-native-material-design'; const NORMAL_COLOR = '#2b2b2b'; const SELECTED_COLOR = '#006eff'; class Item extends Component { constructor(props) { super(props); l...
examples/with-firebase-functions/src/server.js
jaredpalmer/react-production-starter
import App from './App'; import React from 'react'; import express from 'express'; import { renderToString } from 'react-dom/server'; const assets = require(process.env.RAZZLE_ASSETS_MANIFEST); const server = express(); server .disable('x-powered-by') .use(express.static(process.env.RAZZLE_PUBLIC_DIR)) .get('/...
docs/app/Examples/collections/Table/Variations/TableExampleTextAlign.js
clemensw/stardust
import React from 'react' import { Table } from 'semantic-ui-react' const TableExampleTextAlign = () => { return ( <Table striped> <Table.Header> <Table.Row> <Table.HeaderCell>Name</Table.HeaderCell> <Table.HeaderCell>Status</Table.HeaderCell> <Table.HeaderCell textAli...
src/components/Header/Header.js
rickyduck/pp-frontend
import React from 'react' import { IndexLink, Link } from 'react-router' import './Header.scss' export const Header = () => ( <div> </div> ) export default Header
app/components/App.js
erlswtshrt/react-es6-boilerplate
import React from 'react'; class App extends React.Component { render() { return ( <div> {this.props.children} </div> ); } } export default App;
src/index.js
hartzis/react-redux
import React from 'react'; import createAll from './components/createAll'; export const { Provider, connect } = createAll(React);
frontend/src/Calendar/Legend/LegendItem.js
lidarr/Lidarr
import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import titleCase from 'Utilities/String/titleCase'; import styles from './LegendItem.css'; function LegendItem(props) { const { name, status, tooltip, colorImpairedMode } = props; return ( <di...
src/client/tests/components/home/hompage.spec.js
kingisaac95/docmanager
import React from 'react'; import expect from 'expect'; import { shallow } from 'enzyme'; import SignInForm from '../../../components/home/SignInForm'; import SignUpModal from '../../../components/modals/SignUpModal'; import { HomePage } from '../../../components/home/HomePage'; /** * @function * @returns {jsx} - ho...
src/svg-icons/action/offline-pin.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionOfflinePin = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"/> </SvgIcon> ...
admin/client/components/ListFilters.js
efernandesng/keystone
import React from 'react'; import filterComponents from '../filters'; import CurrentListStore from '../stores/CurrentListStore'; import Popout from './Popout'; import { Pill } from 'elemental'; const Filter = React.createClass({ propTypes: { filter: React.PropTypes.object.isRequired }, getInitialState () { retu...
src/routes/Home/components/Home/Home-Devs.js
Ryana513/ccproject
import React from 'react' import Paper from 'material-ui/Paper' import ryanj from '../../assets/ryanj.jpg' import drew from '../../assets/drew.jpg' import sdg from '../../assets/sdg.jpg' import ryanW from '../../assets/ryanW.jpg' import bghero from '../../assets/bg-hero-online.jpg' // import { BrowserRouter as NavLink ...
src/lists.js
Zyj163/React_learning
/** * Created by ddn on 16/11/7. */ import React from 'react'; import ReactDOM from 'react-dom'; //A "key" is a special string attribute you need to include when creating lists of elements. //并且key必须是唯一的,在一个数组中 function NumberList(props) { const numbers = props.numbers; const listItems = numbers.map((number,...
src/js/ui/pages/welcome/loadDiary.js
hiddentao/heartnotes
import _ from 'lodash'; import React from 'react'; import Icon from '../../components/icon'; import Button from '../../components/button'; import Loading from '../../components/loading'; import Layout from './layout'; import { connectRedux, routing } from '../../helpers/decorators'; var Component = React.createClass...
src/frontend/components/survey-renderers/BSDPhonebankRSVPSurvey.js
al3x/ground-control
import React from 'react'; import Relay from 'react-relay' import BSDSurvey from './BSDSurvey' import {BernieColors, BernieText} from '../styles/bernie-css' import {GoogleMapLoader, GoogleMap, Marker} from 'react-google-maps'; import {FlatButton, Paper} from 'material-ui'; import moment from 'moment'; import FontIcon f...
packages/react/src/components/ContentSwitcher/next/index.js
carbon-design-system/carbon-components
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { settings } from 'carbon-components'; import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; imp...
stories/typography.stories.js
buildkite/frontend
/* global module */ import React from 'react'; import PropTypes from 'prop-types'; import { storiesOf } from '@storybook/react'; const Example = function(props) { return <div className={`my3 border-left border-${props.border || "gray"} pl4 py2`}>{props.children}</div>; }; Example.propTypes = { children: PropTypes.n...
react/redux-start/react-redux-todos-review/src/components/TodoList.js
kobeCan/practices
import React from 'react'; import Todo from './Todo' const TodoList = ({ todos, onClick }) => ( todos.map(todo => ( <Todo key={todo.id} {...todo} onClick={() => onClick(todo.id)} /> )) ); export default TodoList
examples/basic/app.js
revolunet/cmp1
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import Cmp1 from '../../lib/index'; class App extends Component { click() { alert('Roger that !'); } render() { return ( <div className='example'> <h1>cmp1</h1> <Cmp1 click={ this.click } name='Click me'/...
ReactNativeExampleApp/node_modules/react-native/Libraries/Text/Text.js
weien/Auth0Exercise
/** * 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...
test/ButtonSpec.js
mcraiganthony/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Button from '../src/Button'; describe('Button', function () { it('Should output a button', function () { let instance = ReactTestUtils.renderIntoDocument( <Button> Title </Button> ); assert.equal(...
js/src/components/TextAlignControl/__test__/textAlignControlTest.js
andresin87/react-draft-wysiwyg
/* @flow */ import React from 'react'; import { expect, assert } from 'chai';// eslint-disable-line import/no-extraneous-dependencies import { spy } from 'sinon';// eslint-disable-line import/no-extraneous-dependencies import { shallow, mount } from 'enzyme';// eslint-disable-line import/no-extraneous-dependencies imp...
examples/huge-apps/routes/Course/routes/Announcements/components/Announcements.js
mjw56/react-router
import React from 'react'; class Announcements extends React.Component { render () { return ( <div> <h3>Announcements</h3> {this.props.children || <p>Choose an announcement from the sidebar.</p>} </div> ); } } export default Announcements;
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleResponsiveWidth.js
mohammed88/Semantic-UI-React
import React from 'react' import { Grid, Image } from 'semantic-ui-react' const GridExampleResponsiveWidth = () => ( <div> <Grid> <Grid.Column mobile={16} tablet={8} computer={4}> <Image src='http://semantic-ui.com/images/wireframe/paragraph.png' /> </Grid.Column> <Grid.Column mobile={1...
app/components/Message.js
alexbooker/pusher-realtime-chat
import React from 'react' import Time from './Time' const Message = React.createClass({ render () { return ( <div className='message'> <div className='message__top'> <img className='message__author-avatar' src={this.props.message.user.avatarUrl} alt={this.props.message.user.username} /> ...
src/shared/tests/components.spec.js
stephan281094/react-blog
import expect from 'expect' import expectJSX from 'expect-jsx' import React from 'react' import TestUtils from 'react-addons-test-utils' import { Link } from 'react-router' import PostListItem from '../components/PostListItem' expect.extend(expectJSX) describe('component tests', () => { it('should render PostListI...
docs/app/Examples/elements/Icon/Groups/IconExampleCornerGroup.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Icon } from 'semantic-ui-react' const IconExampleCornerGroup = () => ( <Icon.Group size='huge'> <Icon name='puzzle' /> <Icon corner name='add' /> </Icon.Group> ) export default IconExampleCornerGroup
src/js/components/icons/base/BackTen.js
kylebyerly-hp/grommet
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
resources/apps/frontend/src/pages/attendance/index.js
johndavedecano/PHPLaravelGymManagementSystem
import React from 'react'; import Loadable from 'components/Loadable'; import {PrivateLayout} from 'components/Layouts'; import renderRoutes from './../routes'; export default { exact: false, auth: true, path: '/attendance', component: ({routes}) => { return <PrivateLayout>{renderRoutes(routes)}</PrivateL...
src/parser/priest/discipline/modules/features/Checklist/Module.js
FaideWW/WoWAnalyzer
import React from 'react'; import BaseChecklist from 'parser/shared/modules/features/Checklist2/Module'; import CastEfficiency from 'parser/shared/modules/CastEfficiency'; import Combatants from 'parser/shared/modules/Combatants'; import ManaValues from 'parser/shared/modules/ManaValues'; import PreparationRuleAnalyze...
src/components/MainLayout/Header.js
waltcow/newsApp
import React from 'react'; import { Menu, Icon } from 'antd'; import { Link } from 'dva/router'; function Header({ location }) { return ( <Menu selectedKeys={[location.pathname]} mode="horizontal" theme="dark" > <Menu.Item key="/users"> <Link to="/users"><Icon type="bars" />Us...
react/features/room-lock/components/RoomLockPrompt.native.js
KalinduDN/kalindudn.github.io
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Dialog } from '../../base/dialog'; import { endRoomLockRequest } from '../actions'; /** * Implements a React Component which prompts the user for a password to lock a * conference/room. */ class RoomLockPrompt extends Compon...
src/components/Column/RadioButtonColumn.js
TheBurningRed/react-gridview
'use strict'; import React from 'react'; require('styles/GridView/RadioButtonColumn.css'); let RadioButtonColumnComponent = (props) => ( <div className="radiobuttoncolumn-component"> Please edit src/components/gridView//RadioButtonColumnComponent.js to update this component! </div> ); RadioButtonColumnCompo...
frontend/src/components/YoutubeVideo.js
carlosascari/opencollective-website
import React from 'react'; export default ({ video, width='560', height='315' }) => { if(!video || !video.match(/watch\?v=/)) { return; } const id = video.match(/watch\?v=([^&]*)/)[1]; return ( <div className='YoutubeVideo height-100'> <iframe width={width} height={height...
src/svg-icons/maps/directions-walk.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsWalk = (props) => ( <SvgIcon {...props}> <path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-...
src/svg-icons/action/gavel.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionGavel = (props) => ( <SvgIcon {...props}> <path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z...
src/svg-icons/image/brightness-3.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBrightness3 = (props) => ( <SvgIcon {...props}> <path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"/> </SvgIcon> ); I...
__tests__/app/app.js
pcstl/app-saber
import 'react-native'; import React from 'react'; import App from 'saber-app'; import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <App /> ); });
src/components/cropper-view/index.js
olofd/react-native-insta-photo-studio
import { View, Text, StyleSheet, TouchableOpacity, Dimensions, Image, Animated, ScrollView, InteractionManager } from 'react-native'; import React, { Component } from 'react'; import ImageCopperView from './image-cropper-view'; import BlockView from 'react-native-scroll-block-view'; import { BlurView ...
client/components/MasterPage.js
JSVillage/military-families-backend
import React from 'react'; import {Link} from 'react-router'; class MasterPage extends React.Component { render() { return <div> <div className="container"> <div className ="row"> <nav className="navbar navbar-default navbar-fixed-top"> <div className="container-fluid"> ...
app/packs/src/admin/text_templates/TextTemplateIcon.js
ComPlat/chemotion_ELN
import React from 'react'; import PropTypes from 'prop-types'; const TextTemplateIcon = ({ template }) => { if (!template) return <span />; const { data, name } = template; if (data.icon) { return ( <i className={data.icon} /> ); } const text = (data || {}).text || name; return ( <spa...
packages/bonde-styleguide/src/content/IconColorful/svg/Abc.js
ourcities/rebu-client
import React from 'react' const Icon = () => ( <svg xmlns='http://www.w3.org/2000/svg' width='46' height='40' viewBox='0 0 46 40'> <g fill='none' fillRule='evenodd' transform='translate(-27)'> <circle cx='52' cy='20' r='20' fill='#E09' opacity='.297' /> <circle cx='52' cy='20' r='16' fill='#E09' opac...
src/components/Toggle/Toggle-story.js
jzhang300/carbon-components-react
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import Toggle from '../Toggle'; const toggleProps = { onToggle: action('toggle'), className: 'some-class', }; storiesOf('Toggle', module).addWithInfo( 'Default', ` Toggles are cont...
fields/types/relationship/RelationshipFilter.js
ratecity/keystone
import _ from 'lodash'; import async from 'async'; import React from 'react'; import { findDOMNode } from 'react-dom'; import xhr from 'xhr'; import { FormField, FormInput, SegmentedControl, } from '../../../admin/client/App/elemental'; import PopoutList from '../../../admin/client/App/shared/Popout/PopoutList'; ...