path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/javascript/mastodon/features/ui/components/column_subheading.js
PlantsNetwork/mastodon
import React from 'react'; import PropTypes from 'prop-types'; const ColumnSubheading = ({ text }) => { return ( <div className='column-subheading'> {text} </div> ); }; ColumnSubheading.propTypes = { text: PropTypes.string.isRequired, }; export default ColumnSubheading;
src/screens/Calendar/index.js
msmsmsmsms/redux-period
import React, { Component } from 'react'; import { Text, View, } from 'react-native'; import styles from './styles'; class Calendar extends Component { render() { return ( <View style={styles.view}> <Text>Calendar View</Text> </View> ); } } export default Calendar;
client/containers/MainMenu/MainMenu.js
chenfanggm/steven-react-starter-kit
import './MainMenu.scss' import React from 'react' class MainMenu extends React.Component { constructor(props) { super(props) this.logoutHandler = this.logoutHandler.bind(this) } logoutHandler() { } render() { return ( <nav className='menu-container'> <div className='dropdown-co...
src/pages/Exec/ExecUsers.js
BoilerMake/frontend
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { Header} from 'semantic-ui-react' import ReactTable from 'react-table' import 'react-table/react-table.css' class ExecUsers extends Component { componentDidMount() { this.props.fetchUsers(); } render () { ...
src/components/common/legend/legend-item.js
impact-initiatives/reach-jor-zaatari-webmap
import React from 'react'; import styles from '../../../styles/index.js'; export default ({ name, color }) => ( <div className={`${styles.flex.horizontalCenterY} ${styles.inline.height36}`}> <div className={styles.inline.padding12x24}> <div className={styles.component.legendItem} style={{ backgr...
client/js/pages/NotFound.js
ongmin/shopshop
import React from 'react' import UniversalLink from 'components/UniversalLink' export default () => { return ( <div> <h2>Page not found</h2> <p> <UniversalLink to="/"> Go back to home page </UniversalLink> </p> </div> ) }
clients/packages/admin-client/src/pages/admin/mobilizations/templates/list/page.spec.js
nossas/bonde-client
import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import * as mock from '../../../../../utils/mock'; import Page from './page'; describe('routes/admin/authenticated/sidebar/templates-list/page', () => { let wrapper; const props = { toggleMenu: mock.noop, menuActiv...
docs/src/ComponentsPage.js
apisandipas/react-bootstrap
/* eslint react/no-did-mount-set-state: 0 */ import React from 'react'; import getOffset from 'dom-helpers/query/offset'; import css from 'dom-helpers/style'; import Affix from '../../src/Affix'; import Nav from '../../src/Nav'; import SubNav from '../../src/SubNav'; import NavItem from '../../src/NavItem'; import N...
src/components/TooltipDefinition/TooltipDefinition-story.js
joshblack/carbon-components-react
/** * 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 React from 'react'; import { storiesOf } from '@storybook/react'; import { withKnobs, select, text } from '@storybook/addon-knobs'; i...
React_Router_tutorial/modules/About.js
luongthomas/React-Portfolio
import React from 'react'; export default React.createClass({ render() { return <div>About</div>; }, });
docs/src/app/components/pages/components/Dialog/ExampleDialogDatePicker.js
pradel/material-ui
import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; import DatePicker from 'material-ui/DatePicker'; /** * Dialogs can be nested. This example opens a Date Picker from within a Dialog. */ export defa...
docs/src/components/browser-dev-panel.js
kwangkim/nuclear-js
import React from 'react' export default React.createClass({ render() { return <div className="browser-component--dev-panel"> {this.props.children} </div> } })
src/scenes/home/footer/footer.js
NestorSegura/operationcode_frontend
import React from 'react'; import { Link } from 'react-router-dom'; import ScrollUpButton from 'react-scroll-up-button'; import SocialMedia from 'shared/components/socialMedia/socialMedia'; import centerLogo from 'images/icons/Medal-Icon.svg'; import styles from './footer.css'; const Footer = () => ( <div className=...
dispatch/static/manager/src/js/vendor/dispatch-editor/embeds/PullQuoteEmbed.js
ubyssey/dispatch
import React from 'react' import { TextInput } from '../../../components/inputs' import * as Form from '../../../components/Form' function PullQuoteEmbedComponent(props) { return ( <div className='o-embed o-embed--quote'> <Form.Container> <Form.Input label='Content'> <TextInput ...
app/javascript/mastodon/features/compose/components/upload_progress.js
hyuki0000/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Motion from 'react-motion/lib/Motion'; import spring from 'react-motion/lib/spring'; import { FormattedMessage } from 'react-intl'; export default class UploadProgress extends React.PureComponent { static propTypes = { active: PropTypes.bool,...
containers/ViewButton/index.js
bmagic/acdh-client
import React from 'react' import { connect } from 'react-redux' import { createStructuredSelector } from 'reselect' import PropTypes from 'prop-types' import Head from 'next/head' import { addView, deleteView } from 'actions/user' import { makeEmail, makeViewList, makeLoading } from 'selectors/user' import stylesheet...
src/components/Fact/FactItem/FactItem.spec.js
easingthemes/notamagic
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import FactItem from 'components/Fact/FactItem/FactItem'; function shallowRender (component) { const renderer = TestUtils.createRenderer(); renderer.render(component); return renderer.getRenderOutput(); } function shallowRenderWithProps (...
src/components/icons/MicrosoftIcon.js
InsideSalesOfficial/insidesales-components
import React from 'react'; const MicrosoftIcon = props => ( <svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 49 49"> {props.title && <title>{props.title}</title>} <path d="M0,0 L23.7179487,0 C23.7165242,7.92857143 23.7179487,15.8571429 23.7165242,23.7857143 L0,23.7857143 L0,0...
app/screens/articles/articles2.js
it-surya/hack-jeninvest
import React from 'react'; import { FlatList, Image, View, TouchableOpacity } from 'react-native'; import { RkText, RkCard, RkStyleSheet } from 'react-native-ui-kitten'; import {SocialBar} from '../../components'; import {data} from '../../data'; let moment = require('moment'); export class Articles2 exten...
src/components/Gallery/Gallery.js
undefinedist/sicario
import React from 'react' import PropTypes from 'prop-types' import {Carousel} from 'react-responsive-carousel' import styles from 'react-responsive-carousel/lib/styles/carousel.min.css' function Gallery({images}) { return ( <Carousel axis="horizontal" showArrows showStatus={false} showTh...
docs/app/Examples/elements/Input/Variations/InputExampleRightLabeledBasic.js
koenvg/Semantic-UI-React
import React from 'react' import { Input } from 'semantic-ui-react' const InputExampleRightLabeledBasic = () => ( <Input label={{ basic: true, content: 'kg' }} labelPosition='right' placeholder='Enter weight...' /> ) export default InputExampleRightLabeledBasic
src/svg-icons/toggle/check-box.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleCheckBox = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/> </SvgIcon> );...
packages/react-error-overlay/src/containers/RuntimeError.js
mangomint/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. */ /* @flow */ import React from 'react'; import Header from '../components/Header'; import StackTrace from './StackTrace'; import type { ...
definitions/npm/styled-components_v2.x.x/flow_v0.42.x-/test_styled-components_native_v2.x.x.js
echenley/flow-typed
// @flow import nativeStyled, { ThemeProvider as NativeThemeProvider, withTheme as nativeWithTheme, keyframes as nativeKeyframes, } from 'styled-components/native' import React from 'react' import type { Theme as NativeTheme, Interpolation as NativeInterpolation, // Temporary ReactComponentFunctional as ...
src/ButtonGroup.js
xsistens/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import CustomPropTypes from './utils/CustomPropTypes'; const ButtonGroup = React.createClass({ mixins: [BootstrapMixin], propTypes: { vertical: React.PropTypes.bool, justified: React.PropTypes.b...
src/game-middleware/speechReducer.js
DelvarWorld/some-game
import { Kbd } from 'components'; import React from 'react'; import { ENTER, SPACE, } from 'helpers/KeyCodes'; const textExpandTime = 900; const textCloseTime = 500; const msPerLetter = 35; function generateText( text:string, index:number ) { return <span> { text.substr( 0, index, ) } { index >= t...
packages/material-ui-icons/src/AlarmOn.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 ...
app/routes.js
cdiezmoran/AlphaStage-2.0
/* eslint flowtype-errors/show-errors: 0 */ import React from 'react'; import { Switch, Route } from 'react-router'; import PropTypes from 'prop-types'; import App from './containers/App'; import BrowsePage from './containers/BrowsePage'; import GamePage from './containers/GamePage'; import CreateGamePage from './cont...
src/components/ReactSignupLoginComponent.js
akiokio/ReactSignupLoginComponent
import PropTypes from 'prop-types'; import React from 'react'; import Login from './Login'; import Signup from './Signup'; import RecoverPassword from './RecoverPassword'; // Our only css dependency import './normalize.css'; class ReactSignupLoginComponent extends React.Component { constructor(props) { super(p...
src/components/NotFoundPage/NotFoundPage.js
elurye/ReactJestBoiler
/* * React.js Starter Kit * Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ 'use strict'; //require('./NotFoundPage.less'); import React, { Component } from 'react...
201601react/许海英/react/app/components/button/button.js
zhufengreact/homework
import React, { Component } from 'react'; class Button extends Component { handleClick(){ alert('戳我干嘛!'); } render(){ const style = require('./button.less'); return ( <button className="my-button" onClick={this.handleClick.bind(this)}> 快戳我 </button> ); } } export defau...
examples/auth-with-shared-root/components/Landing.js
shunitoh/react-router
import React from 'react' const Landing = React.createClass({ render() { return ( <div> <h1>Landing Page</h1> <p>This page is only shown to unauthenticated users.</p> <p>Partial / Lazy loading. Open the network tab while you navigate. Notice that only the required components are do...
app/components/Commissioned/CommissionedWork.js
1Green/projectAout
import React from 'react'; import { Link } from 'react-router'; import { RouteTransition } from 'react-router-transition'; export default React.createClass({ getInitialState(){ return { photoCategories: [], videoCategories: [] } }, componentWillMount(){ fetch('http://localhost:...
resource/csdk/stack/samples/webos/com.example.app.iotivity/src/App/App.js
iotivity/iotivity
import kind from '@enact/core/kind'; import MoonstoneDecorator from '@enact/moonstone/MoonstoneDecorator'; import Panels from '@enact/moonstone/Panels'; import React from 'react'; import MainPanel from '../views/MainPanel'; import css from './App.less'; const App = kind({ name: 'App', styles: { css,...
src/index.js
uiureo/react-outside-event
import React from 'react'; import ReactDOM from 'react'; /** * @param {ReactClass} Target The component that defines `onOutsideEvent` handler. * @param {String[]} supportedEvents A list of valid DOM event names. Default: ['mousedown']. * @return {ReactClass} */ export default (Target, supportedEvents = ['mousedown...
packages/components/src/List/Toolbar/SelectAll/SelectAll.component.js
Talend/ui
import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import getDefaultT from '../../../translate'; import theme from './SelectAll.scss'; function SelectAll({ id, items, isSelected, onToggleAll, t }) { const isAllSelected = () => items.length > 0 && items.findIndex(item ...
modules/__tests__/isActive-test.js
tylermcginnis/react-router
import expect from 'expect' import React from 'react' import { render, unmountComponentAtNode } from 'react-dom' import createHistory from '../createMemoryHistory' import IndexRoute from '../IndexRoute' import Router from '../Router' import Route from '../Route' import qs from 'qs' describe('isActive', function () { ...
src/routes/app.js
hrSoft-FE/mobile-vote
import React from 'react' import { connect } from 'dva' import NProgress from 'nprogress' import Layout from '../components/layout/main.jsx' const App = (props) => { const {children, loading, location} = props NProgress.start() !loading.global && NProgress.done() return ( <Layout children={children} locati...
js/Quadrat.js
nathanjameshill/ReefWatchPrototype
import React from 'react' import { Grid, Col, Row } from 'react-bootstrap' import CustomGrid from './components/GridControl/Grid' import * as services from "../data/services" export default class Quadrat extends React.Component { constructor(props) { super(props); this.state = { observ...
src/components/TodoList.js
stevewillard/relay-todomvc
import React from 'react'; import Relay from 'react-relay'; import MarkAllTodosMutation from '../mutations/MarkAllTodosMutation'; import Todo from './Todo'; class TodoList extends React.Component { static propTypes = { viewer: React.PropTypes.object.isRequired }; onToggleAllChange = (e) => { const {vi...
app/util/short-aliases.js
igr-santos/hub-client
import React from 'react' import { Route } from 'react-router' export const r = (path, component) => <Route path={path} component={component} />
js/components/icon/index.js
soltrinox/MarketAuth.ReactNative
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, View } from 'native-base'; import { openDrawer } from '../../actions/drawer'; import styles from './styles'; class NHForm extends Component { // eslint-disable-line static pr...
src/svg-icons/action/settings-backup-restore.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettingsBackupRestore = (props) => ( <SvgIcon {...props}> <path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2....
src/website/app/demos/Tooltip/Tooltip/examples/placement.js
mineral-ui/mineral-ui
/* @flow */ import styled from '@emotion/styled'; import IconDelete from 'mineral-ui-icons/IconDelete'; import React from 'react'; import Button from '../../../../../../library/Button'; import Tooltip from '../../../../../../library/Tooltip'; import type { StyledComponent } from '@emotion/styled-base/src/utils'; const...
node_modules/react-bootstrap/es/Radio.js
joekay/awebb
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 ...
docs-ui/components/tagsTable.stories.js
beeftornado/sentry
import React from 'react'; import {withInfo} from '@storybook/addon-info'; import {text} from '@storybook/addon-knobs'; import TagsTable from 'app/components/tagsTable'; const event = { id: 'deadbeef', tags: [ {value: 'prod', key: 'environment', _meta: null}, {value: 'info', key: 'level', _meta: null}, ...
src/containers/UsersContainer/UsersContainer.js
anvk/redux-portal-boilerplate
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Users } from '../../components'; import * as usersActions from '../../actions/usersActions.js'; class UsersContainer extends Component { render() { const { onSearch, ...props } = this.props; return <Users {...this.prop...
src/components/TalentStats.js
dfilipidisz/overfwolf-hots-talents
import React from 'react'; import { connect } from 'react-redux'; import AppPopup from './AppPopup'; const lvls = ['1', '4', '7', '10', '13', '16', '20']; const GraphIcon = ({lvl, openStatDetails}) => { const open = () => { openStatDetails(lvl); }; return ( <i className='fa fa-line-chart' onClick={open...
test/containers/admin/AdminHomePage.js
caTUstrophy/frontend
// must emulate DOM _very first_ import '../../helpers/emulateDom'; import unexpected from 'unexpected'; import unexpectedReact from 'unexpected-react'; import unexpectedSinon from 'unexpected-sinon'; import sinon from 'sinon'; const expect = unexpected.clone() .use(unexpectedReact) .use(unexpectedSinon); impor...
packages/mineral-ui-icons/src/IconColorLens.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconColorLens(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProp...
packages/material-ui-docs/src/NProgressBar/NProgressBar.js
lgollut/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import NProgress from 'nprogress'; import { withStyles } from '@material-ui/core/styles'; import NoSsr from '@material-ui/core/NoSsr'; import { exactProp } from '@material-ui/utils'; NProgress.configure({ template: ` <div class="nprogress-bar" role="...
app-1/old-src/js/components/Product.js
alexisbellido/api-examples
import React from 'react'; class Product extends React.Component { // Class components should always call the base constructor with props. constructor (props) { // any time we define our own custom component methods, we have to manually bind this to the component ourselves. super(props); ...
Lumino/js/components/WrappedComponents/Switch.js
evonove/lumino
import React from 'react'; import PropTypes from 'prop-types'; import { Switch as NativeSwitch } from 'react-native'; const Switch = ({ input: { onChange, value }, ...custom }) => ( <NativeSwitch value={value === '' ? true : value} onValueChange={onChange} {...custom} /> ); Switch.propTypes = { inp...
src/svg-icons/action/work.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionWork = (props) => ( <SvgIcon {...props}> <path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"/>...
docs/pages/Home/index.js
jossmac/react-images
// @flow // @jsx glam import glam from 'glam' import React, { Component } from 'react' import { type ProviderProps } from '../../ImageProvider' import { Code, CodeBlock, Heading, Title } from '../components' import PrettyProps from '../../PrettyProps' import GalleryExample from './GalleryExample' import { carouselProp...
web/static/app/components/App.js
jochakovsky/chores
import React from 'react'; import ChoreList from '../containers/ChoreList'; import AddChore from '../containers/AddChore'; import NavBar from '../components/NavBar'; import './App.css'; const App = () => ( <div> <NavBar /> <AddChore /> <ChoreList /> </div> ); export default App;
docs/src/app/components/pages/components/IconMenu/Page.js
xmityaz/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 './...
examples/05 Customize/Handles and Previews/Container.js
jowcy/react-dnd
import React, { Component } from 'react'; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd/modules/backends/HTML5'; import BoxWithImage from './BoxWithImage'; import BoxWithHandle from './BoxWithHandle'; @DragDropContext(HTML5Backend) export default class Container extends Component { ...
addons/comments/src/manager/components/CommentItem/index.js
nfl/react-storybook
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { window } from 'global'; import moment from 'moment'; import renderHTML from 'react-render-html'; import insertCss from 'insert-css'; import style from './style'; import commentCSS from './style.css'; insertCss(commentCSS); export d...
src/svg-icons/content/remove-circle.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentRemoveCircle = (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 2zm5 11H7v-2h10v2z"/> </SvgIcon> ); ContentRemoveCircle = pure(ContentRemoveCir...
src/js/components/icons/base/Rewind.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...
client/pages/filespage/breadcrumb.js
mickael-kerjean/nuage
import React from 'react'; import PropTypes from 'prop-types'; import { DropTarget } from 'react-dnd'; import { EventEmitter, BreadCrumb, PathElement } from '../../components/'; import { pathBuilder, filetype, basename } from '../../helpers/'; export class BreadCrumbTargettable extends BreadCrumb { constructor(pr...
src/svg-icons/notification/airline-seat-recline-extra.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatReclineExtra = (props) => ( <SvgIcon {...props}> <path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0...
docs/src/layouts/doc-wrapper.js
adrianleb/nuclear-js
import React from 'react' import Wrapper from './wrapper' import DocSidebar from '../components/doc-sidebar' import Nav from '../components/nav' export default React.createClass({ propTypes: { title: React.PropTypes.string.isRequired, contents: React.PropTypes.string.isRequired, }, render() { return...
src/svg-icons/file/file-upload.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let FileFileUpload = (props) => ( <SvgIcon {...props}> <path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/> </SvgIcon> ); FileFileUpload = pure(FileFileUpload); FileFileUpload.displayName = 'FileFileUpload'; FileFil...
fields/types/url/UrlField.js
Redmart/keystone
import React from 'react'; import Field from '../Field'; import { Button, FormInput } from 'elemental'; module.exports = Field.create({ displayName: 'URLField', openValue () { var href = this.props.value; if (!href) return; if (!/^(mailto\:)|(\w+\:\/\/)/.test(href)) { href = 'http://' + href; } window...
resources/js/components/FormInput/TextInput.js
DoSomething/northstar
import React from 'react'; import PropTypes from 'prop-types'; /** * Base text input. */ const TextInput = ({ attributes, className, clearErrors, id, name, placeholder, setData, value, }) => { function handleChange(event) { clearErrors(event.target.name); setData(event.target.name, event.t...
app/javascript/mastodon/features/favourited_statuses/index.js
tateisu/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites'; import Column from '../ui/components/column'; import ColumnHeade...
src/templates/blog-post.js
H3yfinn/finbarmaunsell.com
import React from 'react'; import Helmet from 'react-helmet'; import Footer from '../pages/components/footer.js'; import classifier_img from '../pages/classifier_test.png'; // import '../css/blog-post.css'; // make it pretty! export default function Template({ data // this prop will be injected by the GraphQL query ...
ReduxThunkNews/src/app.js
fengnovo/webpack-react
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import { createStore, applyMiddleware } from 'redux'; import thunkMiddleware from 'redux-thunk'; import { createLogger } from 'redux-logger'; import { reducers } from './js/reducers'; import injectTapEventPlugin from 'r...
examples/passing-props-to-children/app.js
brenoc/react-router
import React from 'react' import { render } from 'react-dom' import { createHistory, useBasename } from 'history' import { Router, Route, Link, History } from 'react-router' require('./app.css') const history = useBasename(createHistory)({ basename: '/passing-props-to-children' }) const App = React.createClass({ ...
pages/people/dasabogals.js
pcm-ca/pcm-ca.github.io
import React from 'react' import { Link } from 'react-router' import Helmet from 'react-helmet' import { config } from 'config' import { prefixLink } from 'gatsby-helpers' import info from './info' import PersonPage from '../../components/PersonPage' export default class Index extends React.Component { render() { ...
src/index.js
bofa/demography-portal
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
src/ModalFooter.js
PeterDaveHello/react-bootstrap
import React from 'react'; import classnames from 'classnames'; class ModalFooter extends React.Component { render() { return ( <div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}> {this.props.children} </div> ); } } ModalFooter.propTypes = { ...
frontend/src/containers/Blinker/Blinker.js
webrecorder/webrecorder
import React from 'react'; import { connect } from 'react-redux'; import BlinkerUI from 'components/BlinkerUI'; const mapStateToProps = ({ app }) => { const bytes = app.getIn(['infoStats', 'pending_size']) || 0; return { bytes }; }; export default connect( mapStateToProps )(BlinkerUI);
src/components/ShowMoreProducts/ShowMoreProducts.js
unam3/oshop
import React from 'react'; export const ShowMoreProducts = ({onShowMoreProducts}) => { require('./ShowMoreProducts.css'); return ( <a href="#" className="show-more text-color" onClick={ (e) => {e.preventDefault(); onShowMoreProducts(); } }> Показать еще 6 то...
src/containers/VisionContainer.js
rexxars/sanity-vision
import React from 'react' import DelayedSpinner from '../components/DelayedSpinner' import ErrorDialog from '../components/ErrorDialog' import VisionGui from '../components/VisionGui' import LoadingContainer from './LoadingContainer' // Loads the most basic data from a Sanity project class VisionContainer extends Load...
app/components/ContainerView.js
pbillerot/reacteur
'use strict'; import React from 'react' import ReactDOM from 'react-dom' import 'whatwg-fetch' import { Link } from 'react-router' import scrollIntoView from 'scroll-into-view' // W3 const { Alerter, Button, Card, Content, Footer, Header, IconButton , Menubar, Nav, Navbar, NavGroup, Sidebar, Window } = require('./...
src/components/dropdown/index.js
KleeGroup/focus-components
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import uuid from 'uuid'; import ActionMenu from './action-menu'; /** * Dropdown component * * @class Dropdown * @extends {Component} */ class Dropdown extends Component { /** * Creates an in...
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js
bunnyblue/actor-platform
import _ from 'lodash'; import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; const {addons: { PureRenderMixin }} = addons; import ActorClient from 'utils/ActorClient'; import { Styles, FlatButton } from 'material-ui'; import { KeyCodes } from 'constants/ActorAppConstant...
src/routes/Mytracks/components/MyTracksView.js
synchu/schema
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { List, Navigation } from 'react-toolbox' import Input from 'react-toolbox/lib/input' import SongItem from '../../../components/SongItem' import Infinite from 'react-infinite' import trackObject from '../interfaces/track.js' import cla...
app/src/Frontend/modules/weui/pages/swiper/index.js
ptphp/ptphp
/** * Created by jf on 15/12/10. */ "use strict"; import React from 'react'; import Page from '../../component/page'; import SwiperBox from "../../../../components/swiper/index"; export default React.createClass({ render() { let slides = [ { url:"#/", pic:"h...
examples/CollectionWithHref.js
15lyfromsaturn/react-materialize
import React from 'react'; import Collection from '../src/Collection'; import CollectionItem from '../src/CollectionItem'; export default <Collection> <CollectionItem href='#'>Alvin</CollectionItem> <CollectionItem href='#' active>Alvin</CollectionItem> <CollectionItem href='#'>Alvin</CollectionItem> <Collecti...
src/index.js
huangtingting827/gallery-by-react
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
app/components/Header/index.js
j921216063/chenya
import React from 'react'; import { FormattedMessage } from 'react-intl'; import Wrapper from './Wrapper'; import NavBar from './NavBar'; import NavItem from './NavItem'; import messages from './messages'; import Title from './Title'; class Header extends React.Component { // eslint-disable-line react/prefer-stateless...
src/containers/tool/Doraemon/AlertBar.js
mydearxym/mastani
import React from 'react' import { ICON_CMD } from '@/config' import { Trans } from '@/utils/i18n' import { cutRest } from '@/utils/helper' import { Wrapper, WarningIcon, Info, Title, Desc } from './styles/alert_bar' const AlertBar = ({ value, searchThread }) => ( <Wrapper> <WarningIcon src={`${ICON_CMD}/shell_...
src/svg-icons/maps/hotel.js
mit-cml/iot-website-source
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsHotel = (props) => ( <SvgIcon {...props}> <path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/> </SvgIcon> ); MapsHotel = pure(MapsHot...
src/svg-icons/file/cloud-download.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let FileCloudDownload = (props) => ( <SvgIcon {...props}> <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-...
_viewlayers/react/app/app.js
mjanssen/graduation-frontend-setups
import React from 'react'; import { render } from 'react-dom'; import 'style/global'; // Define base component import App from './components/App/App'; // Create init function to render application from function init() { render(<App />, document.querySelector('#root')); } // While developing, enable HMR if (module...
packages/ringcentral-widgets/components/BackButton/index.js
u9520107/ringcentral-js-widget
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import dynamicsFont from '../../assets/DynamicsFont/DynamicsFont.scss'; import styles from './styles.scss'; export default function BackButton({ label, showIcon, }) { return ( <span className={styles.backButt...
src/index.js
joakikr/SAAS
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import DevTools from './containers/devTools'; import { store } from './store/index'; import { Router, browserHistory } from 'react-router'; import routes from './routes/index'; ReactDOM.render( <Provider store={stor...
fields/types/html/HtmlField.js
ligson/keystone
import _ from 'underscore'; import Field from '../Field'; import React from 'react'; import tinymce from 'tinymce'; import { FormInput } from 'elemental'; /** * TODO: * - Remove dependency on underscore */ var lastId = 0; function getId() { return 'keystone-html-' + lastId++; } module.exports = Field.create({ ...
src/parts/section-card-link.js
economist-components/component-sections-card
import React from 'react'; import PropTypes from 'prop-types'; import Button from '@economist/component-link-button'; export default function SectionCardLink({ buttonClassName, linkClassName, title, buttonProps, prefix }) { const customLinkClassName = linkClassName ? `${ prefix }__list-item ${ prefix }__list-item-...
docs/client.js
nickuraltsev/react-bootstrap
import 'bootstrap/less/bootstrap.less'; import './assets/docs.css'; import './assets/style.css'; import './assets/carousel.png'; import './assets/logo.png'; import './assets/favicon.ico'; import './assets/thumbnail.png'; import './assets/thumbnaildiv.png'; import 'codemirror/mode/htmlmixed/htmlmixed'; import 'codemir...
docs/src/CodeExample.js
xuorig/react-bootstrap
import React from 'react'; export default class CodeExample extends React.Component { render() { return ( <pre className="cm-s-solarized cm-s-light"> <code> {this.props.codeText} </code> </pre> ); } componentDidMount() { if (CodeMirror === undefined) { ret...
docs/app/Examples/views/Statistic/Types/StatisticExampleBottomLabel.js
clemensw/stardust
import React from 'react' import { Statistic } from 'semantic-ui-react' const StatisticExampleBottomLabel = () => ( <div> <Statistic> <Statistic.Value>5,550</Statistic.Value> <Statistic.Label>Downloads</Statistic.Label> </Statistic> <Statistic value='5,500' label='Downloads' /> </div> ) e...
src/views/info/data/chart.js
rekyyang/ArtificalLiverCloud
/** * Created by reky on 2016/11/9. */ import React from 'react'; import ReactEcharts from 'echarts-for-react'; import {Slider} from 'antd'; export default class Chart extends React.Component{ /*propTypes = { yAxisName: React.PropTypes.string.isRequired, };*/ getInitialOption = function (){ return ...
app/components/form/index.js
Vizzuality/forest-watcher
// @flow import type { Question, Answer } from 'types/reports.types'; import React, { Component } from 'react'; import i18n from 'i18next'; import { Platform, View } from 'react-native'; import debounceUI from 'helpers/debounceUI'; import { trackScreenView, trackReportingConcluded } from 'helpers/analytics'; import st...
src/js/components/icons/base/Aid.js
linde12/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...
web/assets/js/buypage/Buy.js
xuqiantong/NY_Auto
/* Buy Page Author: ML2436 */ import React, { Component } from 'react'; import './Buy.css'; var Grid = require('react-bootstrap/lib/Grid'); var Row = require('react-bootstrap/lib/Row'); var Col = require('react-bootstrap/lib/Col'); var Form = require('react-bootstrap/lib/Form'); var FormGroup = require('react-boots...