path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/common/components/AuthenticationManager.js
BitLooter/Stuffr-frontend
import React from 'react' import { connect } from 'react-redux' import PropTypes from 'prop-types' import log from 'loglevel' import LoginDialog from './LoginDialog' import RegisterDialog from './RegisterDialog' import PasswordResetDialog from './PasswordResetDialog' const MODE_LOGIN = Symbol('MODE_LOGIN') ...
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/__tests__/ModalBody.spec.js
GoogleCloudPlatform/prometheus-engine
import React from 'react'; import { shallow } from 'enzyme'; import { ModalBody } from '../'; describe('ModalBody', () => { it('should render with "modal-body" class', () => { const wrapper = shallow(<ModalBody>Yo!</ModalBody>); expect(wrapper.text()).toBe('Yo!'); expect(wrapper.hasClass('modal-body'))....
src/index.js
nebgnahz/marry-guess
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
src/index.js
mitchallen/react-card-grey
/* Module: @mitchallen/react-card-grey Author: Mitch Allen */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; // import { withRouter } from 'react-router-dom'; import Paper from 'material-ui/Paper'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; const paperSt...
node_modules/antd/es/anchor/index.js
prodigalyijun/demo-by-antd
import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-run...
src/svg-icons/social/group-add.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialGroupAdd = (props) => ( <SvgIcon {...props}> <path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91....
modules/__tests__/Redirect-test.js
cold-brew-coding/react-router
/*eslint-env mocha */ import expect from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import Redirect from '../Redirect' import Router from '../Router' import Route from '../Route' describe('A <Redirect>', function () { let node beforeEach(function () { node =...
src/encoded/static/components/anno_viz.js
T2DREAM/t2dream-portal
import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import _ from 'underscore'; import moment from 'moment'; import globals from './globals'; import { Panel, PanelHeading, TabPanel, TabPanelPane } from '../libs/bootstrap/panel'; import { Modal, ModalHeader, ...
src/Footer.js
leeppolis/bookmarks
import React, { Component } from 'react'; class Footer extends Component { render() { return ( <div className="body-wrapper"> <footer> <small> © <a href="https://simonelippolis.com">Simone Lippolis</a>. All opinions are mine. </small> </footer> </div> ); } } export default Footer;
app/javascript/mastodon/features/getting_started/index.js
ikuradon/mastodon
import React from 'react'; import Column from '../ui/components/column'; import ColumnLink from '../ui/components/column_link'; import ColumnSubheading from '../ui/components/column_subheading'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import Prop...
src/parser/core/tests/snapshotTest.js
sMteX/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import renderer from 'react-test-renderer'; import { i18n } from 'interface/RootLocalizationProvider'; import { loadLog, parseLog } from './log-tools'; class ParserContextProvider extends React.PureComponent { static propTypes = { parser: PropTypes...
src/components/sortable_list/sortable_list.js
thinktopography/reframe
import PropTypes from 'prop-types' import React from 'react' import Item from './item' import _ from 'lodash' class SortableList extends React.Component { render() { const { items } = this.props return ( <div className="reframe-sortable-list"> { items.map((item, index) => ( <Item key...
src/routes/Editor/components/EmailsTab.js
peksi/ilmomasiina
import React from 'react'; import PropTypes from 'prop-types'; import { Textarea } from 'formsy-react-components'; class EmailsTab extends React.Component { static propTypes = { onDataChange: PropTypes.func.isRequired, event: PropTypes.object, }; render() { return ( <div> <Textarea ...
docs/src/examples/elements/Step/Variations/StepExampleSizeBig.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Icon, Step } from 'semantic-ui-react' const StepExampleSizeBig = () => ( <Step.Group size='big'> <Step> <Icon name='truck' /> <Step.Content> <Step.Title>Shipping</Step.Title> </Step.Content> </Step> <Step active> <Icon name='payment' /> ...
src/Divider/Divider.js
IsenrichO/mui-with-arrows
import React from 'react'; import PropTypes from 'prop-types'; const Divider = (props, context) => { const { inset, style, ...other } = props; const { baseTheme, prepareStyles, } = context.muiTheme; const styles = { root: { margin: 0, marginTop: -1, marginLeft: ins...
spec/components/layout.js
rahultaglr/taglr-toolbox
import React from 'react'; import { AppBar, Checkbox, Dropdown, IconButton, RadioGroup, RadioButton } from '../../components'; import { Layout, NavDrawer, Panel, Sidebar } from '../../components'; const dummyText = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the ind...
app/components/HomeComponents/TransactionTable.js
hlynn93/basic_ims
import React, { Component } from 'react'; import { Table, Icon, Button, Container } from 'semantic-ui-react'; class TransactionTable extends Component { props: { transactions: [], items: [], onDelete: () => void, onOrder: () => void } render() { const { transactions, items, onOrder, onDelete...
javascript/containers/current-stock-page.js
kdoran/moriana-react
import React from 'react' import { connect } from 'react-redux' import { getItems } from 'store/items' import h from 'utils/helpers' import {buildStockCardHref} from 'components/stockcard-link' const CurrentStockPage = class extends React.Component { state = { activeFilter: 'all', displayedItems: null } component...
src/components/category_frequency_all.js
xuan6/admin_dashboard_local_dev
import React from 'react'; import ReactDOM from 'react-dom'; var SimpleTooltipStyle = require('react-d3-tooltip').SimpleTooltip; var BarTooltip = require('react-d3-tooltip').BarTooltip; //category by frequency const CategoryFreAll = ({data}) => { //activity trend by departments var generalChartData = data; var w...
test/PagerSpec.js
nickuraltsev/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Pager from '../src/Pager'; import PageItem from '../src/PageItem'; describe('Pager', () => { it('Should output a unordered list as root element with class "pager"', () => { let instance = ReactTestUtils.renderIntoDocument( ...
test/PopoverSpec.js
HorizonXP/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Popover from '../src/Popover'; describe('Popover', function () { it('Should output a popover title and content', function () { let instance = ReactTestUtils.renderIntoDocument( <Popover title="Popover title"> <...
src/components/SideMenu/index.js
PalmasLab/palmasplay
import React from 'react' import styles from './styles.css' const MenuSection = ({title, icon, children}) => ( <ul> <li className={styles.title}><strong>{title}</strong><i className={`fa fa-${icon}`}></i></li> {children} </ul> ) export const SideMenu = () => ( <div className={styles.sideMe...
src/components/numeric-input.js
bhongy/react-components
/** * A thin wrapper around HTMLInputElement that state as number type * rather than string - avoid ad-hoc string/number handling at use sites. * Handles precision and trailing period. See unit tests for the detail spec. * * TODO: handle formatting (could be tricky with change event value) * * @flow */ import ...
pages/blog/test-article-one.js
fmarcos83/mdocs
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>Test Article 1</h1> <p>Co...
js/jqwidgets/demos/react/app/chart/dashboard/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxChart from '../../../jqwidgets-react/react_jqxchart.js'; class App extends React.Component { render() { let data1 = [ { text: 'Used', value: 55 }, { text: 'Available', value: 9 } ...
app/boards/motec-d153/components/warnings.js
fermio/motorsport-display
import React from 'react'; import _ from 'lodash'; import { EngineWarnings } from '../../constants'; const Warnings = React.createClass({ propTypes: { warnings: React.PropTypes.array }, getDefaultProps: function() { return { warnings: [] } }, shouldComponent...
packages/@lyra/vision/src/containers/LoadingContainer.js
VegaPublish/vega-studio
import React from 'react' import PropTypes from 'prop-types' import request from '../util/request' // Yeah, inheritance and all that. Deal with it. class LoadingContainer extends React.PureComponent { constructor() { super() if (!this.getSubscriptions) { throw new Error( `${ this.con...
webapp/app/components/Spinner/index.js
EIP-SAM/SAM-Solution-Node-js
// // Spinner components to display during ajax requests // Props: // color: optional, choose the spinner's color // size: optional, choose the spinner's size // className: optional, add your own css here, to center the component etc... // Example: // import Spinner from 'components/Spinner'; // ... // ...
node_modules/enzyme/test/ReactWrapper-spec.js
PanJ/SimplerCityGlide
import { describeWithDOM, describeIf } from './_helpers'; import React from 'react'; import { expect } from 'chai'; import { mount, render, ReactWrapper, } from '../src/'; import sinon from 'sinon'; import { REACT013 } from '../src/version'; describeWithDOM('mount', () => { describe('context', () => { con...
fields/types/datetime/DatetimeField.js
xyzteam2016/keystone
import DateInput from '../../components/DateInput'; import Field from '../Field'; import moment from 'moment'; import React from 'react'; import { Button, FormField, FormInput, FormNote, InputGroup } from 'elemental'; module.exports = Field.create({ displayName: 'DatetimeField', statics: { type: 'Datetime', }, ...
src/routes/mypolls/index.js
binyuace/vote
import React from 'react'; import Layout from '../../components/Layout'; async function action({ fetch, store }) { const resp = await fetch('/api/polls', { method: 'GET', }); const data = await resp.json(); const state = store.getState(); if (!data) throw new Error('Failed to load the polls feed.'); co...
node_modules/enzyme/src/ReactWrapper.js
aurimas-darguzis/react-intro
import React from 'react'; import cheerio from 'cheerio'; import { flatten, unique, compact } from 'underscore'; import createWrapperComponent from './ReactWrapperComponent'; import { instHasClassName, childrenOfInst, parentsOfInst, buildInstPredicate, instEqual, treeFilter, getNode, } from './MountedTrav...
app/components/TagsForm/index.js
54vanya/ru-for-you-front
/** * * TagsInput * */ import React from 'react'; import styled from 'styled-components'; import Input from 'components/Input'; import Button from 'components/Button'; const AddButtonWrapper = styled.div` position:relative; float: right; input{ height:42px; border-bottom-left-radius:0; border-to...
src/svg-icons/av/repeat.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvRepeat = (props) => ( <SvgIcon {...props}> <path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/> </SvgIcon> ); AvRepeat = pure(AvRepeat); AvRepeat.displayName = 'AvRepeat'; AvRepeat.mu...
docs/app/Examples/elements/Button/Groups/index.js
vageeshb/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const ButtonGroupsExamples = () => ( <ExampleSection title='Groups'> <ComponentExample title='Group' description='But...
vgdb-frontend/src/components/nav/NavItem.js
mattruston/idb
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import './NavItem.css'; /* Link or Text item on the nav */ class NavItem extends Component { static defaultProps = { bold: false } render() { return ( /* Probably needs to be a router-link or some...
addons/storyshots/stories/directly_required/Button.js
enjoylife/storybook
import PropTypes from 'prop-types'; import React from 'react'; const buttonStyles = { border: '1px solid #eee', borderRadius: 3, backgroundColor: '#FFFFFF', cursor: 'pointer', fontSize: 15, padding: '3px 10px', margin: 10, }; const Button = ({ children, onClick }) => <button style={buttonStyles} onCli...
src/containers/Admin/Chats/Chats.js
EncontrAR/backoffice
import React, { Component } from 'react'; import ContactList from '../../../components/admin/conversations/contactList'; import chatActions from '../../../redux/chat/actions'; import { connect } from 'react-redux'; const { indexAllConversations } = chatActions; class Chats extends Component { render() { retu...
src/js/components/App.js
MarcusWasTaken/ArmelloCards
import React from 'react' import Deck from '../containers/Deck' import DeckList from '../containers/DeckList' import Filters from '../containers/Filters' import 'css/app' const App = () => ( <div className="app clearfix"> <div className="main"> <DeckList /> <Deck /> </div> <aside className="a...
docs/src/pages/premium-themes/onepirate/modules/views/AppForm.js
lgollut/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import Container from '@material-ui/core/Container'; import Box from '@material-ui/core/Box'; import { withStyles } from '@material-ui/core/styles'; import Paper from '../components/Paper'; const styles = (theme) => ({ root: { display: 'flex', ba...
react/features/conference/components/native/ConferenceTimerDisplay.js
bgrozev/jitsi-meet
// @flow import React from 'react'; import { Text } from 'react-native'; import styles from './styles'; /** * Returns native element to be rendered. * * @param {string} timerValue - String to display as time. * * @returns {ReactElement} */ export default function renderConferenceTimer(timerValue: string) { ...
app/components/Settings/ChannelSelector.js
TheCbac/MICA-Desktop
// @flow /* ********************************************************** * File: ChannelSelector.js * * Brief: React component for choosing which of the sensor * channels that are active. * * Authors: Craig Cheney * * 2017.09.12 CC - Document created * ********************************************************* */ import R...
webapp/app/components/Tr/index.js
EIP-SAM/SAM-Solution-Node-js
// // Component <tr></tr> // import React from 'react'; /* eslint-disable react/prefer-stateless-function */ export default class Tr extends React.Component { render() { const ComponentToRender = this.props.component; let content = null; content = this.props.items.map((item, index) => ( <Componen...
app/js/components/header.js
pauloelias/simple-webpack-react
import React from 'react'; export default class Header extends React.Component { render() { return ( <div> <p>This is the amazing <b>header</b>.</p> </div> ) }; }
react-router-webpack-code-splitting/src/app.js
LiuuY/code-splitting-demo
import React from 'react' import {BrowserRouter, Link, Route} from 'react-router-dom' // getComponent is a function that returns a promise for a component // It will not be called until the first mount function asyncComponent(getComponent) { return class AsyncComponent extends React.Component { static Component =...
js/components/loaders/ProgressBar.android.js
fahrulrizall/projectuts
import React, { Component } from 'react'; import ProgressBar from 'ProgressBarAndroid'; export default class SpinnerNB extends Component { render() { return ( <ProgressBar {...this.prepareRootProps()} styleAttr="Horizontal" indeterminate={false} progress={this.props.prog...
imports/components/Signup.js
adderpositive/chat-app
/*================================================ Signup ====== - is component for UI architecture of sign up @imports - react ================================================ */ // imports import React from 'react'; const Signup = ({ name, email, password, passwordRepeated, setName, setEmail,...
packages/mineral-ui-icons/src/IconLineWeight.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 IconLineWeight(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconPro...
src/svg-icons/av/stop.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvStop = (props) => ( <SvgIcon {...props}> <path d="M6 6h12v12H6z"/> </SvgIcon> ); AvStop = pure(AvStop); AvStop.displayName = 'AvStop'; AvStop.muiName = 'SvgIcon'; export default AvStop;
src/client/components/TrippianListItemRoundWidget/TrippianListItemRoundWidget.js
trippian/trippian
import log from '../../log' import React from 'react' import { Link } from 'react-router' const TrippianListItemRoundWidget = ({ name = 'Amanda . Sydney', id, picture = 'lorempixel.com/200/200/people/' }) => { return ( <div className="popular-trippians-item text-center"> <Link to={`trippian/${id}`}> ...
client/common/components/DropdownFilter.js
Haaarp/geo
import React from 'react'; import { SplitButton, MenuItem } from 'react-bootstrap'; /* * Props: * items: Array * title: String */ const DropdownFilter = (props) => ( <div className="guide-dropdown-wrap"> <SplitButton title={props.title} pullLeft className="guide-dropdown-custom"> {props.items...
client/views/admin/settings/inputs/ActionSettingInput.js
VoiSmart/Rocket.Chat
import { Button, Field } from '@rocket.chat/fuselage'; import React from 'react'; import { useMethod } from '../../../../contexts/ServerContext'; import { useToastMessageDispatch } from '../../../../contexts/ToastMessagesContext'; import { useTranslation } from '../../../../contexts/TranslationContext'; function Acti...
src/components/search_bar.js
scepticulous/react-video-player
import React, { Component } from 'react'; // const SearchBar = () => { // return <input />; // }; class SearchBar extends Component{ constructor(props) { super(props); this.state = { term: '' }; } render = () => { return ( <div className="search-bar"> ...
src/index.js
vladpolonskiy/news-feed-react-redux
import React from 'react'; import ReactDOM from 'react-dom'; import store from './store'; import {Provider} from 'react-redux'; import {Router, browserHistory} from 'react-router'; import {routes} from './routes'; ReactDOM.render( <Provider store={store}> <Router history={browserHistory} routes={routes} /> </Pr...
src/layouts/ErrorPage/index.js
IntellectionStudio/intellection.kz
import React from 'react'; import Page from 'layouts/Page'; import styles from './index.css'; const STATUS_CODE_NOT_FOUND = 404; const ErrorPage = ({ error = STATUS_CODE_NOT_FOUND, errorText = 'Page Not Found', ...restProps }) => { const pageProps = Page.pickPageProps(restProps); return ( <Page ...
HomeScreen.js
bakin-bacon/app
import React, { Component } from 'react'; import { StyleSheet, View, Text, } from 'react-native'; import * as Colors from './Colors'; export class HomeScreen extends Component { static navigationOptions = { title: "Bakin' Bacon", }; render() { return ( <View style={styles.c...
integration_tests/babel-plugin-jest-hoist/__tests__/integration-test.js
blainekasten/jest
/** * Copyright (c) 2014-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. * * @emails onca...
src/containers/About.js
u-wave/web
import React from 'react'; import UwaveContext from '../context/UwaveContext'; import Overlay from '../components/Overlay'; import About from '../components/About'; const { useContext, } = React; function AboutContainer(props) { const uwave = useContext(UwaveContext); const component = uwave.getAboutPageCompone...
app/components/Footer/index.js
jdelatorreitrs/react-boilerplate
import React from 'react'; import { FormattedMessage } from 'react-intl'; import A from 'components/A'; import LocaleToggle from 'containers/LocaleToggle'; import Wrapper from './Wrapper'; import messages from './messages'; function Footer() { return ( <Wrapper> <section> <FormattedMessage {...mes...
test/ProgressBarSpec.js
bvasko/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ProgressBar from '../src/ProgressBar'; import {shouldWarn} from './helpers'; const getProgressBarNode = wrapper => { return React.findDOMNode(ReactTestUtils.findRenderedDOMComponentWithClass(wrapper, 'progress-bar')); }; descri...
examples/PopoverExample.js
instea/react-native-popup-menu
import { Menu, MenuProvider, MenuOptions, MenuTrigger, renderers, } from 'react-native-popup-menu'; import { Text, View, StyleSheet } from 'react-native'; import React from 'react'; const { Popover } = renderers const MyPopover = () => ( <Menu renderer={Popover} rendererProps={{ preferredPlacement: 'botto...
src/plugins/position/components/TableEnhancer.js
joellanciaux/Griddle
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from '../../../utils/griddleConnect'; import compose from 'recompose/compose'; import mapProps from 'recompose/mapProps'; import getContext from 'recompose/getContext'; import { setScrollPosition } from '../actions'; cons...
src/app/components/AudioEditor.js
skratchdot/audio-editor
import React, { Component } from 'react'; import { Row, Col, Jumbotron } from 'react-bootstrap'; import { connect } from 'react-redux'; import AudioPlayer from './AudioPlayer'; import WaveformAmplitude from './display/WaveformAmplitude'; import DisplayContainer from './DisplayContainer'; import DisplayMessage from './D...
frontend/src/components/common/hoc/tableWithStateInUrl.js
unicef/un-partner-portal
// eslint-disable-next-line import React, { Component } from 'react'; import R from 'ramda'; import PropTypes from 'prop-types'; import { browserHistory as history, withRouter } from 'react-router'; import { connect } from 'react-redux'; import { updateOrder, calculatePaginatedPage, updatePageNumberSize, update...
admin/client/App/screens/Item/index.js
dvdcastro/keystone
/** * Item View * * This is the item view, it is rendered when users visit a page of a specific * item. This mainly renders the form to edit the item content in. */ import React from 'react'; import { Container, Spinner } from 'elemental'; import { connect } from 'react-redux'; import { Link } from 'react-router'...
src/svg-icons/editor/mode-comment.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorModeComment = (props) => ( <SvgIcon {...props}> <path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/> </SvgIcon> ); EditorModeComment = pure(EditorModeComment); Edito...
packages/frint-react-server/src/renderToString.spec.js
Travix-International/frint
/* eslint-disable import/no-extraneous-dependencies, func-names, react/prop-types */ /* global describe, it */ import React from 'react'; import { expect } from 'chai'; import { createApp } from 'frint'; import { observe, streamProps, Region } from 'frint-react'; import renderToString from './renderToString'; descri...
docs/src/app/pages/components/Modal/ExampleModalCustomTitle.js
GetAmbassador/react-ions
import React from 'react' import Modal from 'react-ions/lib/components/Modal' import Header from 'react-ions/lib/components/Modal/Header' import Button from 'react-ions/lib/components/Button' class ExampleModalCustomTitle extends React.Component { constructor(props) { super(props) this.state = { open: ...
docs/app/Examples/addons/Radio/States/index.js
Rohanhacker/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' import { Message } from 'semantic-ui-react' const RadioStatesExamples = () => ( <ExampleSection title='States'> <ComponentExample...
src/app/components/menuComponents/SettingsMenuItems.js
preeminence/react-redux-skeleton
import React from 'react'; import Settings from 'material-ui/svg-icons/action/settings'; import MenuListItem from './MenuListItem'; import appActions from '../../appActions'; class SettingsMenuItems extends React.Component { handleThemeChange() { this.props.dispatch(appActions.themeChanged()); } handleToggl...
examples/draft-0-10-0/tex/js/components/TeXEditorExample.js
tonygentilcore/draft-js
/** * Copyright (c) 2013-present, Facebook, Inc. All rights reserved. * * This file provided by Facebook is for non-commercial testing and evaluation * purposes only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCL...
client/components/AltFooter/index.js
Elektro1776/Project_3
import React, { Component } from 'react'; import { Button } from 'react-toolbox/lib/button'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; class AltFooter extends Component { constructor() { super(); this.state = { }; } render() { const styles = { basic: { ...
test/app/components/TodoItem.spec.js
atixlabs/TrelloDescriptionChangelog
// /*import { expect } from 'chai'; // import sinon from 'sinon'; // import React from 'react'; // import TestUtils from 'react-addons-test-utils'; // import TodoItem from '../../../app/components/TodoItem'; // import style from '../../../app/components/TodoItem.css'; // import TodoTextInput from '../../../app/componen...
src/browser/users/UsersPage.js
reedlaw/read-it
// @flow import OnlineUsers from './OnlineUsers'; import React from 'react'; import linksMessages from '../../common/app/linksMessages'; import { Box, PageHeader } from '../../common/components'; import { Title } from '../components'; const UsersPage = () => ( <Box> <Title message={linksMessages.users} /> <P...
src/toolbar/SearchField.js
prajapati-parth/react-bootstrap-table
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; class SearchField extends Component { getValue() { return ReactDOM.findDOMNode(this).value; } setValue(value) { ReactDOM.findDOMNode(this).value = value; } render() { const { c...
src/app/components/blocks/_copyright.js
maullerz/eve-react
import React from 'react' const _copyright = ({info}) => { return <div className='row'> <div className='col-md-12'> <div className='grayback t-small'> <div className="row"> <div className="col-md-9 col-first"> EVE Online and the EVE logo are the registered trademarks of CCP h...
electron/app/components/PlusButton.js
zindlerb/motif
import React from 'react'; import classname from 'classname'; function PlusButton(props) { return ( <i onClick={props.onClick} className={classnames("fa fa-plus-circle", props.className)} aria-hidden="true" /> ); } export default PlusButton;
src/lib/plugins/hostname.js
Hyperline/hyperline
import os from 'os' import React from 'react' import Component from 'hyper/component' import SvgIcon from '../utils/svg-icon' class PluginIcon extends Component { render() { return ( <SvgIcon> <g fill="none" fillRule="evenodd"> <g className="hostname-icon" tra...
tests/unit/autoComplete/autoComplete.handleItemMouseDown.spec.js
Travix-International/travix-ui-kit
import React from 'react'; import { shallow } from 'enzyme'; import AutoComplete from '../../../components/autoComplete/autoComplete'; import AutoCompleteItem from '../../../components/autoComplete/autoCompleteItem'; describe('AutoComplete: handleItemMouseDown', () => { it('should call passed preventDefault', () => ...
client/extensions/woocommerce/woocommerce-services/views/shipping-label/label-purchase-modal/packages-step/add-item.js
Automattic/woocommerce-services
/** @format */ /** * External dependencies */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { localize } from 'i18n-calypso'; import { includes, size, some } from 'lodash'; import { CheckboxControl } from '@wor...
src/components/SettingsPage.js
guilhermehn/all-mangas-reader
import React from 'react' import SettingsStore from '../stores/SettingsStore' import SettingsAPI from '../apis/SettingsAPI' import { SETTINGS_SECTIONS } from '../constants/SettingsConstants' import SettingsHolder from './settings/SettingsHolder' import MigrationNotice from './settings/MigrationNotice' import Settin...
services/web/src/index.js
ojedarob/tennis-buddy
import React from 'react' import { render } from 'react-dom' import { createStore, dispatch, applyMiddleware } from 'redux' import thunk from 'redux-thunk' import logger from 'redux-logger' import { Provider } from 'react-redux' import App from './containers/App' import reducer from './reducers/reducer' const middlew...
src/containers/Accounts/ResetPassword/Complete/index.js
westoncolemanl/tabbr-web
import React from 'react' import Link from 'react-router-dom/Link' import Card, { CardActions, CardContent } from 'material-ui/Card' import Typography from 'material-ui/Typography' import Button from 'material-ui/Button' import { CardLogoHeader } from 'components' export default () => <Card raised > ...
examples/js/app.js
echaouchna/react-bootstrap-tab
import React from 'react'; import ReactDOM from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import { IndexRoute, Router, Route, hashHistory } from 'react-router'; import App from './components/App'; import Home from './components/Home'; import GettingStarted from './components/GettingStarted'; import...
app/javascript/mastodon/components/status_content.js
Arukas/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { isRtl } from '../rtl'; import { FormattedMessage } from 'react-intl'; import Permalink from './permalink'; import classnames from 'classnames'; export default class StatusContent extends ...
client/src/MyJobsButton.js
roxroy/codeploy
import React, { Component } from 'react'; class MyJobsButton extends Component { constructor(props) { super(props); this.viewJobs = this.viewJobs.bind(this); } viewJobs() { this.props.closeResourceModal(); this.props.viewJobs(); } render(){ return( <div> <button className="m...
src/templates/category-template.js
wall3/wall3.github.io
// @flow strict import React from 'react'; import { graphql } from 'gatsby'; import Layout from '../components/Layout'; import Sidebar from '../components/Sidebar'; import Feed from '../components/Feed'; import Page from '../components/Page'; import Pagination from '../components/Pagination'; import { useSiteMetadata }...
src/controls/filefield/preview.js
thinktopography/reframe
import ImageFileToken from './image_file_token' import PlainFileToken from './plain_file_token' import PropTypes from 'prop-types' import React from 'react' import qs from 'qs' class Preview extends React.Component { static propTypes = { file: PropTypes.object, preview: PropTypes.string, onRemove: PropT...
addons/info/src/components/types/InstanceOf.js
rhalff/storybook
import React from 'react'; import { TypeInfo, getPropTypes } from './proptypes'; const InstanceOf = ({ propType }) => <span>{getPropTypes(propType)}</span>; InstanceOf.propTypes = { propType: TypeInfo.isRequired, }; export default InstanceOf;
app/jsx/new_user_tutorial/ConfirmEndTutorialDialog.js
djbender/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...
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
UKForeignOffice/ETD-prototype-upload
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
app/components/Options-bar.js
L-A/Little-Jekyll
import React, { Component } from 'react'; import Dispatcher from '../utils/front-end-dispatcher'; import SimpleButton from './simple-button' var OptionsBar = React.createClass({ requestNewSite: function() { Dispatcher.send('addSite'); }, createNewSite: function() { Dispatcher.send('createSite'); }, r...
winearb/static/react/js/articles.js
REBradley/WineArb
import React from 'react'; import ReactDOM from 'react-dom'; import Col from 'react-bootstrap/lib/Col'; import Jumbotron from 'react-bootstrap/lib/Jumbotron'; import Image from 'react-bootstrap/lib/Image'; import Button from 'react-bootstrap/lib/Button'; import ButtonGroup from 'react-bootstrap/lib/ButtonGroup'; impor...
src/main.js
dontexpectanythingsensible/password-checker
import React from 'react'; import ReactDOM from 'react-dom'; import createStore from './store/createStore'; import AppContainer from './containers/AppContainer'; import * as OfflinePluginRuntime from 'offline-plugin/runtime'; OfflinePluginRuntime.install(); // ======================================================== ...
tests/client/core/components/TestLoginPage.js
mstriemer/usetopscore-widgets
import React from 'react'; import { renderIntoDocument } from 'react-addons-test-utils'; import { findDOMNode } from 'react-dom'; import config from 'config'; import LoginPage from 'core/components/LoginPage'; describe('<LoginPage />', () => { function render(props = {}) { return findDOMNode(renderIntoDocument(...
client/src/universal/routes/async.js
mariocoski/express-typescript-react-redux-universal
import React from 'react'; import Loadable from 'react-loadable'; function loadAsync(loader){ return Loadable({ loader, loading: ()=>(<div>Loading...</div>) }); } export const Home = loadAsync(() => import('universal/containers/pages/HomeContainer.jsx')); export const Todos = loadAsync(() => ...
src/Card/__tests__/CardMedia-test.js
Graf009/react-mdl
/* eslint-env mocha */ import expect from 'expect'; import React from 'react'; import { render } from '../../__tests__/render'; import { CardMedia } from '../'; describe('Card', () => { describe('CardMedia', () => { it('should render a div with the card media css class', () => { const output = ...
app/jsx/courses/ModulesHomePage.js
djbender/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...
src/pwa.js
tpphu/react-pwa
import React from 'react'; import ReactDOM from 'react-dom/server'; import Html from './helpers/Html'; export default function () { return `<!doctype html>${ReactDOM.renderToStaticMarkup(<Html />)}`; }
demo/components/switch/PagerOptions.js
ctco/rosemary-ui
import React from 'react'; import OptionsTable from '../../helper/OptionsTable'; import {MonthPager, Pager} from '../../../src'; export default () => { let propDescription = { onPrevBtnClick: { values: 'function', description: 'Is called when a left btn is clicked' }, ...