path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/containers/articles/pricing_collection.js
b0ts/react-redux-sweetlightstudios-website
import React, { Component } from 'react'; import { articleMounting, getCollectionProducts } from '../../actions/index'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import ThreeColumnProducts from '../three_column_products'; class PricingCollection extends Component { // willRece...
src/js/components/App.js
Zerchan/ytApp
import React, { Component } from 'react'; import { observer } from 'mobx-react'; import DevTools from 'mobx-react-devtools'; import axios from 'Axios'; import _ from 'lodash'; import SearchResults from './searchResults'; const APIkey = 'AIzaSyDHh9YS3c-k9Rzkc5AgaGD4Kl-W_ACJ0oA'; @observer class App extends Component ...
src/app/components/gridFormView/schgridview.js
Kikonejacob/nodeApp
import React from 'react'; import 'backbone.paginator'; import Griddle from 'griddle-react'; import _ from 'underscore'; var SchGridView = React.createClass({ getInitialState: function(){ return { 'results': [], 'currentPage': 0, 'maxPages': 0, 'externalResultsPerPage...
src/TextEditor.js
ship-components/ship-components-texteditor
/** * @file TextEditor React Component based on Draft * @author Isaac Suttell <isaac@isaacsuttell.com> * @see https://facebook.github.io/draft-js/docs/overview.html */ // Modules import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Immutable from ...
src/js/components/NameValueList/stories/Layout.js
grommet/grommet
import React from 'react'; import { Box, NameValueList, NameValuePair, Text } from 'grommet'; import { data, metricData } from './data'; export const Layout = () => ( // Uncomment <Grommet> lines when using outside of storybook // <Grommet theme={...}> <Box pad="small" gap="large"> <> <Text weight="bol...
YEAR 3/SEM 1/MOBILE/non-native/PhotoReact/components/__tests__/StyledText-test.js
Zephyrrus/ubb
import 'react-native'; import React from 'react'; import { MonoText } from '../StyledText'; import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create(<MonoText>Snapshot test!</MonoText>).toJSON(); expect(tree).toMatchSnapshot(); });
app/containers/FootSectionControlContainer.js
MutatedBread/binary-academy-rn
import React, { Component } from 'react'; import { bindActionCreators } from 'redux' import { connect } from 'react-redux'; import FootSectionControl from './../components/navigators/footSection/FootSectionControl.js'; const mapStateToProps = state => ({ selectedTab: state.selectedTab }); const mapDispatchToProps =...
lib/treeview/component.js
landaujs/atom-landau-viewer
'use babel'; import React from 'react'; class TreeView extends React.Component { constructor(props, context) { super(props, context); this.state = { treeContents: this.props.delegate.treeContents, }; } state: { treeContents: null, }; componentDidMount() { this.props.delegate.onD...
frontend/modules/browse/components/Pagination.js
RyanNoelk/OpenEats
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { Link } from 'react-router-dom' const Pagination = ({ offset, limit, count, buildUrl }) => { offset = offset ? parseInt(offset) : 0; limit = limit ? parseInt(limit) : 0; count = count ? parseInt(count) : 0; ...
docs/app/Examples/elements/Input/States/InputExampleLoading.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Input } from 'semantic-ui-react' const InputExampleLoading = () => ( <Input loading icon='user' placeholder='Search...' /> ) export default InputExampleLoading
packages/wix-style-react/src/NumberInput/NumberInput.js
wix/wix-style-react
import React from 'react'; import PropTypes from 'prop-types'; import Input from '../Input'; class NumberInput extends React.PureComponent { static displayName = 'NumberInput'; constructor(props) { super(props); const { value } = props; this.state = { value: this._defaultValueNullIfEmpty(value),...
src/components/button/index.js
mich8060/portfolio
import React from 'react' import './button.scss' function Button(props){ return( <a href={props.href} className="button" target="_blank" rel="noopener noreferrer">{props.label}</a> ) } export default Button
client/components/settings/emails/report-item.js
bnjbvr/kresus
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { displayLabel, assert, assertHas, translate as $t } from '../../../helpers'; import { actions, get } from '../../../store'; import DeleteAlertButton from './confirm-delete-alert'; class ReportItem extends Re...
src/containers/App/App.js
justinbutt3r/boilerplate
import React, { Component } from 'react'; import { Switch, Route, withRouter } from 'react-router'; import { Link } from 'react-router-dom'; import logo from './logo.svg'; import styles from './App.scss'; @withRouter export default class App extends Component { componentDidMount() { let history = window.history...
app/components/CardsList/CardsList.js
medialab/hyphe-browser
import './CardsList.styl' import React from 'react' const CardsList = ({ children }) => { return ( <div className="cards-list" > <ul className="list-container"> {children} </ul> </div> ) } export default CardsList
packages/react/components/messagebar.js
iamxiaoma/Framework7
import React from 'react'; import Utils from '../utils/utils'; import Mixins from '../utils/mixins'; import F7Input from './input'; import F7Link from './link'; import __reactComponentWatch from '../runtime-helpers/react-component-watch.js'; import __reactComponentDispatchEvent from '../runtime-helpers/react-component-...
docs/app/Examples/elements/Header/Content/index.js
ben174/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const HeaderContentExamples = () => ( <ExampleSection title='Content'> <ComponentExample title='Image' description='A...
js/pages/logframe/components/main.js
mercycorps/TolaActivity
import React from 'react'; import { inject } from 'mobx-react'; import SubTitleRow from './subtitle'; import LogframeTable from './table'; const LogframeApp = () => { return ( <React.Fragment> <SubTitleRow /> <table className="logframe__table table table-sm table-bordered bg-white ...
src/svg-icons/maps/directions-railway.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsRailway = (props) => ( <SvgIcon {...props}> <path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2...
src/components/AuthorInput.js
my-contributions/my-contributions.github.io
import 'primer-buttons/index.scss'; import 'primer-forms/index.scss'; import React from 'react'; import PropTypes from 'prop-types'; import {authorPattern} from '../api/GitHub'; export default class AuthorInput extends React.PureComponent { render() { const buttonStyle = { display: this.props....
src/indexLogin.js
phouri/display-server
import {render} from 'react-dom'; import {Router, Route, browserHistory}from 'react-router'; import React from 'react'; import Login from './components/login/Login'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import injectTapEventPlugin from 'react-tap-event-plugin'; // Needed for onTouchTap /...
ui/src/js/planting/customPlantPage/CustomPlantPage.js
Dica-Developer/weplantaforest
import axios from 'axios'; import React, { Component } from 'react'; import { slideToggle } from '../../3rd/jquery-alternative'; import BottomPart from '../BottomPart'; import ButtonBar from '../ButtonBar'; import Project from './Project'; require('./customPlantPage.less'); export default class CustomPlantPage extend...
ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/FieldTypeForm.js
LearningLocker/learninglocker
import React from 'react'; import uuid from 'uuid'; import { COLUMN_TYPES, COLUMN_TYPE_LABELS, COLUMN_ACCOUNT_KEY } from 'lib/constants/personasImport'; import { InputField } from './InputField'; const FieldTypeForm = ({ columnType, onChange, disabled, }) => { const formId = uuid.v4(); return ( <In...
src/svg-icons/notification/airline-seat-legroom-extra.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatLegroomExtra = (props) => ( <SvgIcon {...props}> <path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1....
client/src/components/YearEndGift/YearEndDonationForm.js
BhaveshSGupta/FreeCodeCamp
/* eslint-disable react/sort-prop-types */ /* eslint-disable react/jsx-sort-props */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Row, Col, ControlLabel, FormControl, FormGroup, Button } from '@freecodecamp/react-bootstrap'; import { StripeProvider, Elements } from ...
loveFish/assets/icon.js
fangzhou37/WebExperiment
import React from 'react'; export default class Icon extends React.Component { render() { return <img src={this.props.source} />; } }
app/containers/App/Nav.js
vollmerr/app-hub
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import { createStructuredSelector } from 'reselect'; import { compose } from 'redux'; import { Nav as OfficeNav } from 'office-ui-fabri...
frontend/src/Components/Form/FormGroup.js
geogolem/Radarr
import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import { map } from 'Helpers/elementChildren'; import { sizes } from 'Helpers/Props'; import styles from './FormGroup.css'; function FormGroup(props) { const { className, children, size, advancedSettin...
src/svg-icons/editor/border-right.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorBorderRight = (props) => ( <SvgIcon {...props}> <path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h...
node_modules/react-scripts/template/src/index.js
AngeliaGong/AngeliaGong.github.io
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
src/common/components/reduxed/Packages.js
ThinkingInReact/ThinkingInReact.xyz
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Package from 'components//reduxed/Package'; import packages from 'content//Packages'; class Packages extends Component { static defaultProps = { packages } render() { let packages = []; this.props.packages.map((packge...
frontend/src/components/App.js
Yacenko/PetsInHome
import React from 'react'; import { BrowserRouter as Router, Route, Link } from 'react-router-dom'; import '../App.css'; import Menu from './Menu'; import StepperContainer from './StepperContainer'; import Text from './Text'; import Contact from './Contact'; import AnimalContainer from './AnimalContainer'; impo...
src/FadeMixin.js
deerawan/react-bootstrap
import React from 'react'; import domUtils from './utils/domUtils'; import deprecationWarning from './utils/deprecationWarning'; // TODO: listen for onTransitionEnd to remove el function getElementsAndSelf(root, classes) { let els = root.querySelectorAll('.' + classes.join('.')); els = [].map.call(els, function(e...
src/components/ReduxFormFields/AvatarImageField.js
zerkedev/zerke-app
import React, { Component } from 'react'; import { Field } from 'redux-form'; import FontIcon from 'material-ui/FontIcon'; import { Avatar } from '../../containers/Avatar'; import FlatButton from 'material-ui/FlatButton'; import { ImageCropDialog } from '../../containers/ImageCropDialog'; import PropTypes from 'prop-ty...
src/app/components/Hold.js
lubosz/tetris.js
/** * Created by bmonkey on 8/31/15. */ import React from 'react'; import OneBlockCanvas from './OneBlockCanvas' class Hold extends OneBlockCanvas { constructor(props) { super(props); this.holdUsedThisTurn = false; } drop() { this.holdUsedThisTurn = false; } setHold(court,...
src/files/modals/new-folder-modal/NewFolderModal.stories.js
ipfs/webui
import React from 'react' import { storiesOf } from '@storybook/react' import { action } from '@storybook/addon-actions' import i18n from '../../../i18n-decorator' import NewFolderModal from './NewFolderModal' storiesOf('Files/Modals', module) .addDecorator(i18n) .add('New Folder', () => ( <div className='ma3'...
examples/with-scss/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('/...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/AllGood.js
samwgoldman/flow
// @flow import React from 'react'; class MyComponent extends React.Component<DefaultProps, Props, State> { static defaultProps: BadDefaultProps = {}; props: BadProps; state: BadState = {}; } const expression = () => class extends React.Component<DefaultProps, Props, State> { static defaultProps: BadDefa...
server/dashboard/js/components/BenchNav.react.js
timofey-barmin/mzbench
import React from 'react'; import PropTypes from 'prop-types'; class BenchNav extends React.Component { render() { const tabs = { overview: "Overview", scenario: "Scenario", reports: "Reports", logs: "Logs" }; return ( <ul cl...
cakemake/src/index.js
leventgunay/experimental
import React from 'react'; import ReactDOM from 'react-dom'; import App from './app/App'; ReactDOM.render(<App />, document.getElementById('root'));
packages/idyll-cli/test/basic-project/src/components/custom-component.js
idyll-lang/idyll
import React from 'react'; class CustomComponent extends React.PureComponent { render() { const { hasError, updateProps, idyll, ...props } = this.props; return <div {...props}>This is a custom component</div>; } } export default CustomComponent; CustomComponent.IndexedComponent = class extends React.Pure...
clients/packages/admin-client/src/pages/admin/mobilizations/widgets/form/settings/autofire/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'; import { IntlProvider } from 'react-intl'; const intlProvider = new IntlProvider({ locale: 'en' }, {}); const { intl } = intlProvider.getChild...
app/javascript/mastodon/features/ui/components/__tests__/column-test.js
Ryanaka/mastodon
import { render, fireEvent, screen } from '@testing-library/react'; import React from 'react'; import Column from '../column'; describe('<Column />', () => { describe('<ColumnHeader /> click handler', () => { it('runs the scroll animation if the column contains scrollable content', () => { const scrollToMo...
src/Parser/Hunter/BeastMastery/Modules/Talents/DireFrenzy.js
hasseboulen/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import STATISTIC_ORDER from 'Main/STATISTIC_ORDER'; import { formatPerc...
js/components/Login.js
shuted/campus
import React from 'react'; let Login = React.createClass({ render() { return(<div>Welcome to login</div>); } }); export default Login;
packages/showcase/parallel-coordinates/brushed-parallel-coordinates.js
uber-common/react-vis
// Copyright (c) 2016 - 2017 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...
client/components/authenticated.js
akileh/fermtempctrl
import React from 'react' import RaisedButton from 'material-ui/RaisedButton' import TextField from 'material-ui/TextField' function Authenticated(props) { return ( <div> <TextField floatingLabelText={'Device name'} disabled style={{ width: '100%' }} defaultValue={props.auth...
src/components/WhoAmI/WhoAmI.js
karim88/karim88.github.io
import React, { Component } from 'react'; import './WhoAmI.css'; class WhoAmI extends Component { render() { return ( <div className="who"> <div className="row"> <div className="col-md-4 who-img"> </div> <div className...
src/parser/warlock/demonology/modules/pets/PetTimelineTab/TabComponent/DeathEvents.js
fyruna/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import Tooltip from 'common/Tooltip'; import { formatDuration } from 'common/format'; class DeathEvents extends React.PureComponent { static propTypes = { start: PropTypes.number.isRequired, secondWidth: PropTypes.number.isRequired, deaths: ...
app/javascript/mastodon/features/compose/components/upload_progress.js
RobertRence/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,...
webApp/src/Components/BroadcastStats.js
s-law/silent-disco
import React from 'react'; // MATERIAL DESIGN import CardText from '../../node_modules/material-ui/lib/card/card-text'; import TrendingUp from '../../node_modules/material-ui/lib/svg-icons/action/trending-up'; import Favorite from '../../node_modules/material-ui/lib/svg-icons/action/favorite'; import Face from '../../...
modules/gui/src/widget/imageConstraints/imageConstraints.js
openforis/sepal
import {Buttons} from '../buttons' import {Constraint} from './constraint' import {Layout} from 'widget/layout' import {Panel} from 'widget/panel/panel' import {activatable} from 'widget/activation/activatable' import {compose} from 'compose' import {msg} from '../../translate' import {withMapContext} from 'app/home/ma...
tests/routes/Projects/routes/Project/components/SettingsDialog.spec.js
prescottprue/devshare-site
import React from 'react' import SettingsDialog from 'routes/Projects/routes/Project/components/SettingsDialog/SettingsDialog' import { shallow } from 'enzyme' describe('(Project:Component) SettingsDialog', () => { let _component const exampleProject = { name: 'test', owner: 'tester' } beforeEach(() => { _c...
node_modules/@material-ui/core/es/internal/svg-icons/CheckBox.js
pcclarke/civ-techs
import React from 'react'; import createSvgIcon from './createSvgIcon'; /** * @ignore - internal component. */ export default createSvgIcon(React.createElement("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" }), 'Che...
src/common/containers/select-repositories.js
canonical-websites/build.snapcraft.io
import React, { Component } from 'react'; import Helmet from 'react-helmet'; import BetaNotification from '../components/beta-notification'; import SelectRepositoriesPage from '../components/select-repositories-page'; import UserAvatar from '../components/user-avatar'; import styles from './container.css'; class Sele...
app/containers/NotFoundPage/index.js
easingthemes/berlinmap
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a 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...
client/modules/core/components/.stories/navigation.js
TheAncientGoat/mantra-sample-blog-coffee
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; const Navigation = require('../navigation.coffee'); storiesOf('core.Navigation', module) .add('default view', () => { return ( <Navigation /> ); });
wrappers/json.js
alonsogodinez/AlamedaWebPageGatsby
import React from 'react' import Helmet from 'react-helmet' import { config } from 'config' module.exports = React.createClass({ propTypes () { return { route: React.PropTypes.object, } }, render () { const data = this.props.route.page.data return ( <div> <Helmet tit...
src/components/Toast.js
vivaxy/react-scaffold
/** * @since 2016-08-06 16:56 * @author vivaxy */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { AutoHideToast } from 'react-pianist/Toast'; import * as toastConfig from '../config/toast'; export default class extends Component { static propTypes = { toastState...
src/Components/App.js
NTU-ArtFest22/Monitor-web
import React from 'react'; import classNames from 'classnames'; import SendMsg from '../Containers/SendMsg'; import ChatList from '../Containers/ChatList'; const App = ({ showChat, children, showLegalHint, closeLegalHint, windowLoaded }) => ( <div className="root-container"> {children} <div className={class...
src/helpers/dice.js
vNakamura/pocket-campaign
// @flow import React from 'react'; import droll from 'droll'; import seedrandom from 'seedrandom'; import replace from 'string-replace-to-array'; import NotationLink from '../components/Chat/NotationLink'; export const notationLimits = { minNumDice: 1, maxNumDice: 10, minNumSides: 2, maxNumSides: 100, min...
test/common/components/App-test.js
pheuter/essential-react
import test from 'ava'; import React from 'react'; import { shallow } from 'enzyme'; import App from '../../../src/common/components/App'; test('render with container div', t => { const wrapper = shallow(React.createElement(App)); t.is(wrapper.find('#container').length, 1); });
app/containers/Dashboard/App.js
klpdotorg/tada-frontend
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Notifications from 'react-notification-system-redux'; import { connect } from 'react-redux'; import { setUserProfile, fetchUserPermissions, fetchStates } from '../../actions/'; import { MainHeader, MainNavBar, SecondaryNavBarCont } fr...
src/components/structures/HomePage.js
martindale/vector
/* Copyright 2016 OpenMarket Ltd Copyright 2017 Vector Creations 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 la...
app/app.js
brightleaf/adelphos
'use strict'; import React from 'react'; import Adelphos from './components/adelphos-app'; var appElement = document.getElementById('app'); React.render(<Adelphos />, appElement);
docs/src/app/components/pages/components/Card/ExampleControlled.js
mmrtnz/material-ui
import React from 'react'; import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card'; import FlatButton from 'material-ui/FlatButton'; import Toggle from 'material-ui/Toggle'; export default class CardExampleControlled extends React.Component { constructor(props) { super(pro...
src/shared/components/Products/Sidebar/ProductCategorySidebar.js
Grace951/ReactAU
import { Link} from 'react-router-dom'; import React from 'react'; import { isvalidRoute} from '../../../Data/RouteData'; const Classify = (props) => ( <li>{props.title} <ul> <li className={props.isActive( 'All' )}><Link to={`/products/${props.productType}/All`} >All ({props.count.All})</Link></li> ...
src/client/react/user/stages/Registration/RegisterForm/Form1.js
bwyap/ptc-amazing-g-race
import React from 'react'; import autobind from 'core-decorators/es/autobind'; import { Button, Intent } from '@blueprintjs/core'; import FormInput from '../../../../../../../lib/react/components/forms/FormInput'; import Validator from '../../../../../../../lib/react/components/forms/validation/Validator'; import NotEm...
demos/demo1/Demo.js
nygardk/react-loader-advanced
/* eslint-disable react/jsx-boolean-value */ import React, { Component } from 'react'; import Loader from 'react-loader-advanced'; const customMessageElement = ( <div>custom message element</div> ); class Demo extends Component { render() { return ( <div> <Loader show={true} message={customMessa...
test/integration/Menu.spec.js
dsslimshaddy/material-ui
// @flow weak import React from 'react'; import keycode from 'keycode'; import { assert } from 'chai'; import { ReactWrapper } from 'enzyme'; import { createMount } from 'src/test-utils'; import Popover from 'src/internal/Popover'; import SimpleMenu from './fixtures/menus/SimpleMenu'; describe('<Menu> integration', (...
src/components/__tests__/InfoBar-test.js
leopoldjoy/react-ethereum-dapp-example
import React from 'react'; import { renderIntoDocument, findRenderedDOMComponentWithTag, findRenderedDOMComponentWithClass } from 'react-dom/test-utils'; import { expect } from 'chai'; import { InfoBar } from 'components'; import { Provider } from 'react-redux'; import { browserHistory } from 'react-router'; impo...
example/hoc/useMounted.js
DavidLazic/react-augment
import React, { Component } from 'react'; /** * @description * Higher order component * Component wrapper used for toggling component's mounted state * * @param {Function} WrappedComponent * @return {Object} * @public */ export const useMounted = (WrappedComponent = () => null, config) => class UseMounted...
src/svg-icons/communication/stay-primary-portrait.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationStayPrimaryPortrait = (props) => ( <SvgIcon {...props}> <path d="M17 1.01L7 1c-1.1 0-1.99.9-1.99 2v18c0 1.1.89 2 1.99 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/> </SvgIcon> );...
.storybook/stories/index.js
osmelmora/md-grid
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import styled, { injectGlobal } from 'styled-components'; import Row from 'Row'; import Col from 'Col'; injectGlobal` body { background: #2196f3; padding: 16px; } `; const CustomRow = styled(Col) ` color: #fff; backgro...
src/index.js
alavkx/kmbs-twitter-search
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
L10_InClass_CameraRollPicker/__tests__/index.ios.js
kobkrit/learn-react-native
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 /> ); });
client/modules/Mentorship/components/SubjectDrawer.js
mygithub1216/MERN_SelfCar_Dashboard
import React from 'react'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import RaisedButton from 'material-ui/RaisedButton'; import SvgIcon from 'material-ui/SvgIcon'; import {Link} from 'react-router'; import {Grid, Row, Col} from 'react-bootstrap'; const styles = { drawer: ...
actor-apps/app-web/src/app/components/dialog/messages/Image.react.js
dut3062796s/actor-platform
import React from 'react'; import classnames from 'classnames'; import Lightbox from 'jsonlylightbox'; // lightbox init const lightbox = new Lightbox(); const lightboxOptions = { animation: false, controlClose: '<i class="material-icons">close</i>' }; lightbox.load(lightboxOptions); let cache = {}; class Image ...
src/client/components/App.js
wpcfan/calltalent_web
import React from 'react'; import Footer from './Footer'; import AddTodo from '../containers/AddTodo'; import VisibleTodoList from '../containers/VisibleTodoList'; const App = () => ( <div> <AddTodo /> <VisibleTodoList /> <Footer /> </div> ); export default App;
packages/react/src/components/organisms/CalloutAlert/CalloutAlert.stories.js
massgov/mayflower
import React from 'react'; import { StoryPage } from 'StorybookConfig/preview'; import { svgOptions } from 'MayflowerReactBase/Icon/Icon.knob.options'; import Paragraph from 'MayflowerReactText/Paragraph'; import OrderedList from 'MayflowerReactLists/OrderedList'; import DecorativeLink from 'MayflowerReactLinks/Decorat...
src/svg-icons/content/low-priority.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentLowPriority = (props) => ( <SvgIcon {...props}> <path d="M14 5h8v2h-8zm0 5.5h8v2h-8zm0 5.5h8v2h-8zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7....
src/Stepper/Stepper.spec.js
manchesergit/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import Step from './Step'; import StepConnector from './StepConnector'; import Stepper from './Stepper'; import FontIcon from '../FontIcon'; import getMuiTheme from '../styles/getMuiTheme'; describe('<Steppe...
app/src/components/AlbumDetail.js
Rhadammanthis/BreadScraps
import React from 'react'; import { Text, View, Image, Linking } from 'react-native'; import Card from './Card'; import CardSection from './CardSection'; import Button from './Button'; const AlbumDetail = ({ album }) => { const { title, artist, thumbnail_image, image, url } = album; const { thumbnailStyle, ...
packages/ringcentral-widgets-docs/src/app/pages/Components/Badge/index.js
ringcentral/ringcentral-js-widget
import React from 'react'; import { parse } from 'react-docgen'; import CodeExample from '../../../components/CodeExample'; import ComponentHeader from '../../../components/ComponentHeader'; import PropTypeDescription from '../../../components/PropTypeDescription'; import Demo from './Demo'; // eslint-disable-next-lin...
app/scripts/components/UpdateNotification.js
henry40408/awesome-stars
import React from 'react' import { version } from '../../../package.json' export default () => ( <div> <div className='flash flash-full flash-notice'> <div className='container'> <button className='flash-close js-flash-close' type='button' aria-label='Dismiss this mes...
lib/site/topic-layout/topic-article/cant-comment/component.js
DemocracyOS/app
import React from 'react' import t from 't-component' const CantComment = () => ( <p className='text-mute overlay-vote'> <span className='icon-lock' /> <span className='text'> {t('privileges-alert.not-can-vote-and-comment')} </span> </p> ) export default CantComment
packages/wix-style-react/src/MultiSelect/test/MultiSelect.spec.js
wix/wix-style-react
import React from 'react'; import multiSelectDriverFactory from '../MultiSelect.driver'; import { multiselectUniDriverFactory } from '../MultiSelect.uni.driver'; import MultiSelect from '../MultiSelect'; import { createRendererWithDriver, createRendererWithUniDriver, cleanup, } from '../../../test/utils/unit'; im...
components/Content.js
tendotosystems/lunchblast-client
import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; import FancyButton from './FancyButton'; import Result from './Result'; import { connect } from 'react-redux'; class Content extends React.Component { render() { const { onButtonPress, onResultPress, destination } = this.props ...
js/App/Lib/NavigationService.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or *...
app/SearchScreen.js
zqqiang/household-manager
import React, { Component } from 'react'; import { Text, View, Image, ListView, StyleSheet, } from 'react-native'; import { SearchBar } from './SearchBar'; class SearchScreen extends React.Component { constructor(props) { super(props); const ds = new ListView.DataSource({ rowHa...
app/jsx/gradebook/default_gradebook/GradebookGrid/editors/InvalidGradeIndicator.js
djbender/canvas-lms
/* * Copyright (C) 2018 - 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/components/options/OptionsHr.js
m0sk1t/react_email_editor
import React from 'react'; const OptionsHr = ({ block, language, onPropChange }) => { return ( <div> <div> <label>{language["Custom style"]}: <input type="checkbox" checked={block.options.container.customStyle? 'checked': '' } onChange={(e) => onPropChange('customStyle', !block.options.container.customStyle,...
app/javascript/mastodon/features/standalone/compose/index.js
SerCom-KC/mastodon
import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; import ModalContainer from '../../ui/containers/mo...
app/js/pages/InfoPage.js
niksoc/srmconnect
import React from 'react'; import {PageHeader} from 'react-bootstrap'; import axios from 'axios'; import Markdown from '../components/Markdown'; import * as constants from '../constants'; import {getViewPortWidth} from '../utils'; class InfoPage extends React.Component{ constructor(){ super(); this.state = { ...
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledIcon.js
vageeshb/Semantic-UI-React
import React from 'react' import { Button } from 'semantic-ui-react' const ButtonExampleLabeledIcon = () => ( <div> <Button content='Pause' icon='pause' labelPosition='left' /> <Button content='Next' icon='right arrow' labelPosition='right' /> </div> ) export default ButtonExampleLabeledIcon
packages/react-jsx-highcharts/test/components/Axis/AxisTitle.spec.js
AlexMayants/react-jsx-highcharts
import React from 'react'; import { mount } from 'enzyme'; import AxisTitle from '../../../src/components/Axis/AxisTitle'; describe('<Axis.Title />', function () { beforeEach(function () { this.update = sinon.spy(); }); describe('when mounted', function () { it('sets the correct axis title', function (...
frontend/Root.js
datoszs/czech-lawyers
import React from 'react'; import {Provider} from 'react-redux'; import './include.less'; import AppRouter from './AppRouter'; // eslint-disable-next-line react/prop-types, #scaffolding const Root = ({store}) => ( <Provider store={store}> <AppRouter /> </Provider> ); export default Root;
frontend/src/app/components/ExperimentCardList.js
dannycoates/testpilot
import React from 'react'; import ExperimentRowCard from './ExperimentRowCard'; import Loading from './Loading'; import LayoutWrapper from './LayoutWrapper'; export default class ExperimentCardList extends React.Component { getExperiments() { if (!this.props.except) { return this.props.experiments; } ...
frontend/app/components/Form/FormMoveButtons.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' // eslint-disable-next-line const { array, func, object, number, string, element } = PropTypes class FormMoveButtons extends React.Component { static propTypes = { id: string, idDescribedByItemMove: string, textBtnMoveItemUp: string, textB...
react/features/video-menu/components/web/MuteEveryoneDialog.js
jitsi/jitsi-meet
// @flow import React from 'react'; import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; import { Switch } from '../../../base/react'; import { connect } from '../../../base/redux'; import AbstractMuteEveryoneDialog, { abstractMapStateToProps, type Props } from '../Abstra...