path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/components/Home/Home.spec.js
lucaslencinas/react-node-template
import React from 'react'; import { shallow } from 'enzyme'; import Home from './Home'; describe('Home', () => { let games; let home; let selectedGame; let onSelectGame; let onDeleteGame; let onEditGame; let onCreateGame; let onEnterCreateMode; let onLeaveCreateMode; let onEnterEditMode; let onLe...
app/javascript/src/client/sessions/destroy.js
rringler/billtalk
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { destroySession } from './actions'; class SessionDestroy extends Component { componentWillMount() { this.props.destroySession(); this.props.history.push('/'); } render() { return <div></div>; } } export defau...
node_modules/react-bootstrap/es/NavbarBrand.js
C0deSamurai/muzjiks
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 ...
demo/src/mockups/calculator/interfaces/calculator-interface.js
tuantle/hypertoxin
'use strict'; // eslint-disable-line import { Hf } from 'hyperflow'; import { Ht } from 'hypertoxin'; import React from 'react'; import ReactNative from 'react-native'; // eslint-disable-line import EVENT from '../events/calculator-event'; const KEYPADLABELS = [ [ `C`, `7`, `4`, `1`, `0` ], [ `±`, `8`, `5...
src/SvgIcon/SvgIcon.spec.js
ngbrown/material-ui
/* eslint-env mocha */ import React from 'react'; import sinon from 'sinon'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import SvgIcon from './SvgIcon'; import getMuiTheme from '../styles/getMuiTheme'; describe('<SvgIcon />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (nod...
modules/dqt/jsx/react.notice.js
aces/Loris
import React from 'react'; const NoticeMessage = (props) => { let alert; // Display load alert if alert is present if (props.alertLoaded) { alert = ( <div className='alert alert-success' role='alert'> <button type='button' className='close' aria-label='Close' ...
src/components/common/svg-icons/image/monochrome-photos.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageMonochromePhotos = (props) => ( <SvgIcon {...props}> <path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3...
src/demo/App.js
sergiocruz/react-logbook
import React, { Component } from 'react'; import { Link } from 'react-router'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <h1>React Logbook</h1> <div className="App-intro"> <ul className="A...
packages/material-ui-icons/src/DialerSip.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let DialerSip = props => <SvgIcon {...props}> <path d="M17 3h-1v5h1V3zm-2 2h-2V4h2V3h-3v3h2v1h-2v1h3V5zm3-2v5h1V6h2V3h-3zm2 2h-1V4h1v1zm0 10.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.01.24l-2.2 2.2c-2.83-1...
client/src/components/setup-workflow/inprogress_lists.js
safv12/trello-metrics
'use strict'; import React from 'react'; import { DropTarget } from 'react-dnd'; import InprogressListsItem from './inprogress_list_item'; const listTarget = { drop(props, monitor) { const list = monitor.getItem(); props.onMoveList({ list: list.list, destination: 'inprogressLists' }); } }; ...
src/index.js
sblesson/resume
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();
test/server/ModalSpec.js
westonplatter/react-bootstrap
import React from 'react'; import {assert} from 'chai'; import Modal from '../../src/Modal.js'; describe('Modal', () => { it('Should be rendered on the server side', () => { let noOp = () => {}; assert.doesNotThrow(function renderOnServerSide() { return React.renderToString( <Modal onHide={noO...
src/components/Navbar/Navbar.js
bryanlelliott/bryan_site_react
/* * 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. */ import './Navbar.less'; import React from 'react'; // eslint-disable-line no-unused-vars ...
indico/web/client/js/jquery/widgets/jinja/duration_widget.js
indico/indico
// This file is part of Indico. // Copyright (C) 2002 - 2022 CERN // // Indico is free software; you can redistribute it and/or // modify it under the terms of the MIT License; see the // LICENSE file for more details. import React from 'react'; import ReactDOM from 'react-dom'; import {WTFDurationField} from 'indico/...
js/components/sideBar/index.js
amandamfielding/Coffee-Shop-Mobile
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Image, View } from 'react-native'; import { Content, Text, List, ListItem, ProgressBar } from 'native-base'; import { firebaseApp } from "../auth/authentication"; import { Font } from 'exponent'; import FontAwesome from 'react-nat...
examples/dynamic-segments/app.js
fiture/react-router
import React from 'react'; import { Router, Route, Link, Redirect } from 'react-router'; var App = React.createClass({ render() { return ( <div> <ul> <li><Link to="/user/123">Bob</Link></li> <li><Link to="/user/abc">Sally</Link></li> </ul> {this.props.children} ...
src/components/Nav.js
jeremyburr/psyburr
import React from 'react' import Radium from 'radium' import NavLink from '../containers/NavLink.js' const rowStyle = { textAlign: 'center', '@media (min-width: 320px)' : { marginTop: '30px' }, '@media (min-width: 375px)' : { marginTop: '40px' }, '@media (min-width: 414px)' : { marginTop: '5...
docs/app/Examples/elements/Header/Content/HeaderExampleSubheaderProp.js
aabustamante/Semantic-UI-React
import React from 'react' import { Header } from 'semantic-ui-react' const HeaderExampleSubheaderProp = () => ( <Header as='h2' content='Account Settings' subheader='Manage your account settings and set email preferences' /> ) export default HeaderExampleSubheaderProp
js/src/components/Scene/SceneControls.js
scottdonaldson/voxcel
import React from 'react'; import CONFIG from '../../config'; import swal from 'sweetalert'; class SceneControls extends React.Component { constructor() { super(); } takeSnapshot() { let canvas = $(this.props.controlManager.canvas); canvas.addClass('faded'); $.ajax({ url: CONFIG.imgurEndpoint, type...
app/app.js
projectcashmere/admin
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ // Needed for redux-saga es6 generator support import 'babel-polyfill'; // Import all the third party stuff import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; impor...
node_modules/react-bootstrap/es/MediaListItem.js
mohammed52/something.pk
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/app/Examples/views/Card/index.js
aabustamante/Semantic-UI-React
import React from 'react' import Content from './Content' import Types from './Types' import Variations from './Variations' const CardExamples = () => ( <div> <Types /> <Content /> <Variations /> </div> ) export default CardExamples
packages/xo-web/src/xo-app/settings/cloud-configs/index.js
vatesfr/xo-web
import _ from 'intl' import ActionButton from 'action-button' import decorate from 'apply-decorators' import defined from '@xen-orchestra/defined' import React from 'react' import SortedTable from 'sorted-table' import { addSubscriptions } from 'utils' import { AvailableTemplateVars, DEFAULT_CLOUD_CONFIG_TEMPLATE } fro...
src/index.js
chasm/tic-tac-routes
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import { Router, Route } from 'react-router' import { createHistory } from 'history' import { syncReduxAndRouter } from 'redux-simple-router' import store from './store' import HomeView from './views/home' import GamesVie...
src/stories/mobile/cityInfo.js
Cirych/WeatherApp
import React from 'react'; import { storiesOf, addDecorator, action, linkTo } from '@kadira/storybook'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import MobileTearSheet from './MobileTearSheet'; import weatherData from '../api/data'; import forecastData from '../api/forecast'; import CityInf...
src/components/callout/index.js
adrienlozano/stephaniewebsite
import React from 'react'; import Section from '~/components/section'; import styled from 'styled-components'; import Typography from '~/components/typography'; import PageSection from "~/components/page-section"; import CalloutButton from './button'; import withSettings from "~/enhancers/with-settings"; const Callout...
test/components/WorldMap-test.js
davrodpin/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import {test} from 'tape'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import WorldMap from '../../src/js/components/WorldMap'; import CSSClassnames from '../../src/js/utils/CSSClassnames'; const CLASS_ROOT = CSSClas...
packages/react-events/src/Drag.js
STRML/react
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type { ReactResponderEvent, ReactResponderContext, } from 'shared/ReactTypes'; import React from 'react'; ...
src/components/Html.js
Maryanushka/masterskaya
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-...
demo/containers/FormV1/Fields.js
vbait/vb-react-form
import React from 'react'; import PropTypes from 'prop-types'; import { Button, FormGroup, ControlLabel, FormControl, HelpBlock, Alert } from 'react-bootstrap'; import { VBForm, connectForm } from '../../../src/Forms'; const Actions = ({ form }) => { const isValid = form.isValid(); return ( <Button type="submi...
src/svg-icons/av/forward-10.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvForward10 = (props) => ( <SvgIcon {...props}> <path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0...
examples/todomvc/test/components/Footer.spec.js
paulkogel/redux
import expect from 'expect' import React from 'react' import TestUtils from 'react-addons-test-utils' import Footer from '../../components/Footer' import { SHOW_ALL, SHOW_ACTIVE } from '../../constants/TodoFilters' function setup(propOverrides) { const props = Object.assign({ completedCount: 0, activeCount: ...
node_modules/react-router/es6/withRouter.js
TheeSweeney/ComplexReactReduxMiddlewareReview
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; import invariant from 'invariant'; import React from 'react';...
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-forms-v3-slider.js
UnicornCollege/ucl.itkpd.configurator
import React from 'react'; import Environment from '../environment/environment.js'; import {BaseMixin, ElementaryMixin, ContentMixin, Tools} from './../common/common.js'; import {Glyphicon} from './../bricks/bricks.js'; import Slid from './../bricks/slider.js'; import InputMixin from './mixins/input-mixin.js'; import N...
frontend/src/components/eois/details/overview/projectDetails.js
unicef/un-partner-portal
import React from 'react'; import PropTypes from 'prop-types'; import Typography from 'material-ui/Typography'; import Grid from 'material-ui/Grid'; import Button from 'material-ui/Button'; import { browserHistory as history } from 'react-router'; import SectorForm from '../../../forms/fields/projectFields/sectorField/...
web/src/components/preview.js
ajmalafif/ajmalafif.com
import React from 'react' import tw, { css } from 'twin.macro' export const Preview = React.forwardRef(function Preview(props, ref) { return ( <div {...props} tw="block relative bg-gradient-to-t" css={{ height: 'max(40rem, 30vmin)', marginTop: '-40rem', '--tw-gradient-fr...
test/index.js
zhbhun/react-window-kit
/** * Created by zhbhun on 2015/9/17. */ import React from 'react'; import {Window, Modal, Confirm, Tip} from './bootstrap'; import assign from 'object-assign'; // modal demo class ModalDemo extends React.Component { constructor(props) { super(props); this.state = { show: false ...
service-worker-prototype/src/index.js
ericapisani/service-worker-prototype
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
public/containers/CourseList/UserPaymentBlock.js
ninjiangstar/hackSChedule
import React, { Component } from 'react'; import classnames from 'classnames'; import api from '../../utils/api-interface'; import StripeCheckout from 'react-stripe-checkout'; class UserPaymentBlock extends Component { constructor(props) { super(props); this.state = { errorMessage: '', paymentInProgress: f...
auth/src/components/common/CardSection.js
DaveWJ/LearningReact
/** * Created by david on 2/22/17. */ import React from 'react'; import { View } from 'react-native'; const CardSection = (props) => { return ( <View style={styles.containerStyle}> {props.children} </View> ); }; const styles = { containerStyle: { borderBottomWidth: 1, padding: 5, ba...
src/components/Icons/Mute/index.js
jmikrut/keen-2017
import React from 'react'; import './Mute.css'; export default (props) => { if (props.color) { this.color = props.color; } else { this.color = '#4df7ca'; } return ( <svg className="mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"> <polyline stroke={this.color} points="8.47 14.91 11.07 17.74...
app/containers/CreateBundle.js
kaunio/gloso
// @flow import React, { Component } from 'react'; import { withRouter } from 'react-router' import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import LanguagePair from '../components/LanguagePair'; import * as glosorActions from '../actions/glosorActions'; class HomePage extends Compon...
src/components/Feedback/Feedback.js
hang-up/react-whatever
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback extends Component { render() { return ( <div className="Feedback...
examples/huge-apps/routes/Grades/components/Grades.js
ArmendGashi/react-router
import React from 'react'; class Grades extends React.Component { render () { return ( <div> <h2>Grades</h2> </div> ); } } export default Grades;
app/containers/App.js
pavelkomiagin/npmr
// @flow import React, { Component } from 'react'; export default class App extends Component { props: { children: HTMLElement }; render() { return ( <div> {this.props.children} </div> ); } }
src/Register.js
RobertMcCoy/CodeCollaborator
import React, { Component } from 'react'; import './Register.css'; import './main.css'; import { Redirect } from 'react-router'; import axios from 'axios'; import validator from 'validator'; class Register extends Component { constructor(props) { super(props); this.state = { errors: {}...
src/svg-icons/av/loop.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvLoop = (props) => ( <SvgIcon {...props}> <path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2....
app/javascript/mastodon/features/ui/components/modal_loading.js
danhunsaker/mastodon
import React from 'react'; import LoadingIndicator from '../../../components/loading_indicator'; // Keep the markup in sync with <BundleModalError /> // (make sure they have the same dimensions) const ModalLoading = () => ( <div className='modal-root__modal error-modal'> <div className='error-modal__body'> ...
client/src/components/ApartmentList/components/Apartment.js
uramen/apartments
import React, { Component } from 'react'; import FontAwesome from 'react-fontawesome' import Tooltip from 'rc-tooltip'; import { Link } from 'react-router'; import 'rc-tooltip/assets/bootstrap.css'; import _ from 'lodash'; export default class Apartment extends Component { constructor(props) { super(props); ...
client/modules/Post/__tests__/components/PostList.spec.js
caleb272/PollIt
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import PostList from '../../components/PostList'; const posts = [ { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" }, { name: 'Mayank', title: 'Hi Mern', slug: ...
packages/cockpit/ui/src/components/Converter.js
iurimatias/embark-framework
import PropTypes from "prop-types"; import React from 'react'; import { Card, CardBody, CardHeader, Col, FormGroup, Input, Row, Label } from 'reactstrap'; import CopyButton from './CopyButton'; import { calculateUnits } from '../services/unitConverter'; class Converter extends React.Component { cons...
CompositeUi/src/views/component/SectionHeader.js
kreta-io/kreta
/* * This file is part of the Kreta package. * * (c) Beñat Espiña <benatespina@gmail.com> * (c) Gorka Laucirica <gorka.lauzirika@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import './../../scss/components/_section-...
docs/src/app/components/pages/components/AppBar/Page.js
igorbt/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 appBarReadmeText from './README'; import AppBarExampleIcon from './ExampleI...
src/layouts/CoreLayout.js
terakilobyte/rumbl_front
import React from 'react'; import 'styles/core.scss'; export default class CoreLayout extends React.Component { static propTypes = { children : React.PropTypes.element } render () { return ( <div className='page-container'> <div className='view-container'> {this.props.children} ...
src/views/pages/admin-dashboard/admin-dashboard.js
Metaburn/doocrate
import React, { Component } from 'react'; import { OrderedMap } from 'immutable'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Redirect } from 'react-router'; import { firebaseDb } from 'src/firebase'; import { CSVLink } from 'react-csv'; import './admin-dashboard.css'; import B...
website/src/pages/index.js
wix/react-native-navigation
import React from 'react'; import { Redirect } from '@docusaurus/router'; function Home() { return <Redirect to="/react-native-navigation/docs/before-you-start/" />; } export default Home;
test/specs/views/Card/CardGroup-test.js
aabustamante/Semantic-UI-React
import faker from 'faker' import React from 'react' import { SUI } from 'src/lib' import CardGroup from 'src/views/Card/CardGroup' import * as common from 'test/specs/commonTests' describe('CardGroup', () => { common.isConformant(CardGroup) common.hasUIClassName(CardGroup) common.rendersChildren(CardGroup) c...
components/slider/__tests__/index.spec.js
jasonleibowitz/react-toolbox
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import sinon from 'sinon'; import expect from 'expect'; import { ProgressBar } from '../../progress_bar/ProgressBar.js'; import Input, { Input as RawInput } from '../../input/Input.js'; import Slider, { Slider as RawSlider } from '../Slider.js'...
app/src/client/components/app/Notifications.js
dvdschwrtz/DockDev
import React from 'react'; import {Link} from 'react-router'; // import { remote } from 'electron'; const Notifications = ({ DOToken, updateToken }) => ( <div className="full-page"> <div className="notification-content"> <div className="list-group"> <a href="#" className="list-group-item active"> ...
src/components/search/AccountFilter.js
whphhg/vcash-ui
import React from 'react' import { translate } from 'react-i18next' import { inject, observer } from 'mobx-react' /** Ant Design */ import Select from 'antd/lib/select' @translate(['common']) @inject('send', 'wallet') @observer class AccountFilter extends React.Component { constructor(props) { super(props) ...
src/step-23/ReOrganize.js
gufsky/react-native-workshop
import React, { Component } from 'react' import Highlight from 'react-syntax-highlight' import Note from '../Note' import structurePng from './Structure.png' const HomeScreen = `import React from 'react' import { connect } from 'react-redux' import { searchBars } from './../store/actions/actions' import { AppRegist...
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js
TondaHack/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ import Rea...
examples/sidebar/app.js
rkaneriya/react-router
import React from 'react' import { createHistory, useBasename } from 'history' import { Router, Route, Link } from 'react-router' import data from './data' require('./app.css') const history = useBasename(createHistory)({ basename: '/sidebar' }) class Category extends React.Component { render() { const categ...
examples/basic/index.js
hhhonzik/react-createjs
import React from 'react'; import { render } from 'react-dom'; import { App } from './App'; render(<App />, document.getElementById('main'));
app/components/ItemInput.js
dxu/electric-trumpet
import React from 'react' // renders a single list, handles the list of lists const ItemInput = React.createClass({ onKeyAddContent: function(evt) { if (evt.keyCode === 13 && !evt.shiftKey) { evt.preventDefault() this.props.dispatchAddItem({ // NOTE: ASSUMING CLIENT ONLY, no xss sanitization ...
src/client.js
sandfox/webdebs-links
import React from 'react'; import Router from 'react-router'; import routes from './routes'; import fetchData from './utils/fetch-data'; let first = true; const rehydrate = () => { const data = window.DATA; delete window.DATA; return data; }; const render = (Root, state, data) => { React.render(<Root data={...
src/app.js
vk92kokil/My-react-boilerplate
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ /* eslint-disable */ import 'babel/polyfill'; import React from 'react'; import Router from 'react-router'; var Redirect = Router.Redirect; import FastClick from 'fastclick'; import App from './components/App'; import HomePage from './components/...
src/browser/createRoutes.js
jks8787/react-redux-yay
import App from './app/App.react'; import Auth from './auth/Page.react'; import Firebase from './firebase/Page.react'; import Home from './home/Page.react'; import Me from './me/Page.react'; import NotFound from './notfound/Page.react'; import Profile from './me/Profile.react'; import React from 'react'; import Setting...
visualizations/mapWidgets/source/scripts/MapWidgetComponent.js
EITIorg/eiti
import React, { Component } from 'react'; import { renderToString } from 'react-dom/server'; import { Map, Marker, Popup, TileLayer, GeoJson } from 'react-leaflet'; import { countryGeoJson } from './data/countries.js'; //import { countryInfo } from './data/implementing_country.js'; import { helpers } from './helpers....
frontend/app/components/Phrasebook/edit.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' import Immutable from 'immutable' import ProviderHelpers from 'common/ProviderHelpers' import StateLoading from 'components/Loading' import StateErrorBoundary from 'components/ErrorBoundary' import StateSuccessEdit from './states/successEdit' import StateSucc...
client/Pets.js
lizraeli/react-personal-boilerplate
import React from 'react' import { Card, CardImage, Text, Heading, Section } from 'rebass' import { Grid, Row, Col } from 'react-flexbox-grid'; const Pets = () => ( <Section> <Row center="xs"> <Col xs={12} sm={3}> <Card> <CardImage width={256} src={require('./photos/fred.jpeg'...
src/components/topic/UpdateForStorySearchWarning.js
mitmedialab/MediaCloud-Web-Tools
import React from 'react'; import { FormattedMessage, FormattedHTMLMessage } from 'react-intl'; import { WarningNotice } from '../common/Notice'; const localMessages = { title: { id: 'errors.storySwitchover.title', defaultMessage: 'Update for Story-Level Searches' }, intro: { id: 'errors.storySwitchover.intro', de...
resources/js/react/search/SearchResultListItem.js
chekun/spore
import React from 'react'; var Avatar = require('../Avatar'); //<SearchResultListItem item=[] /> class SearchResultListItem extends React.Component { render() { var item = this.props.item; if (item["title"]) { item.type = 3; } else if (item["intro"]) { item.type = 2...
create-react-app/src/router.js
wumouren/react-demo
// import React, { Component } from 'react'; import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import App from './components/app/App'; import Home from './components/home/Home'; // 两种写法都可以 // export default class Routers extends Component { // render() { // re...
src/componentOrElement.js
react-bootstrap/prop-types-extra
import React from 'react'; import createChainableTypeChecker from './utils/createChainableTypeChecker'; function validate(props, propName, componentName, location, propFullName) { const propValue = props[propName]; const propType = typeof propValue; if (React.isValidElement(propValue)) { return new Error( ...
demo/containers/badges-icons.js
nbonamy/react-native-app-components
import React, { Component } from 'react'; import { StyleSheet, ScrollView, View, Text } from 'react-native'; import { theme, Badge, Icon } from 'react-native-app-components'; export default class BadgesIcons extends Component { constructor(props) { super(props); } render() { return ( <ScrollView...
app/javascript/mastodon/containers/admin_component.js
Kirishima21/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; const { localeData, messages } = getLocale(); addLocaleData(localeData); export default class AdminComponent extends React.PureComponent { static propType...
4.2.0/src/routes.js
erikras/redux-form-docs
import React from 'react' import { Router, Route, hashHistory } from 'react-router' import markdownPage from 'components/markdownPage' import App from 'pages/App' import Home from 'pages/Home' import Simple from 'pages/examples/Simple' import ComplexValues from 'pages/examples/ComplexValues' import File from 'pages/exa...
packages/react/src/components/Portal/__tests__/Portal-test.js
carbon-design-system/carbon-components
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { render, screen } from '@testing-library/react'; import React from 'react'; import { Portal } from '../'; describe('Portal', () => {...
src/containers/ProductHotItem/ProductHotItem.js
kingpowerclick/kpc-web-backend
import React, { Component } from 'react'; import classNames from 'classnames'; import { FilterPage, Breadcrumb } from 'components'; import { DropdownButton, MenuItem, Modal } from 'react-bootstrap'; export default class ProductHotItem extends Component { state = { displayCompleteModal: false, displayLineProduc...
packages/docs/pages/plugin/emoji/index.js
nikgraf/draft-js-plugin-editor
/* eslint-disable no-template-curly-in-string */ import React, { Component } from 'react'; // eslint-disable-next-line import/no-unresolved import gettingStarted from '!!raw-loader!../../../components/Examples/emoji/gettingStarted'; // eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no...
src/index.js
justinkahrs/portfolio
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import '../node_modules/bootstrap/dist/css/bootstrap.css'; import '../node_modules/bootstrap/dist/css/bootstrap-theme.css'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root'), );
client/src/components/calculateButton.js
BukhariH/finimizeChallenge
import React, { Component } from 'react'; import 'bootstrap/dist/css/bootstrap.css'; import '../App.css'; import PropTypes from 'prop-types'; class CalculateButton extends Component { render() { return ( <button id="calc-btn" name="calc-btn" className="btn btn-success" onClick={this.props.calcFunc}>Figur...
src/components/WebResults/TotalResults.js
nicolas-adamini/littleblue
import React from 'react'; export default function TotalResults(props) { const number = props.number; function format(num) { let n = num.toString(), p = n.indexOf('.'); return n.replace(/\d(?=(?:\d{3})+(?:\.|$))/g, function ($0, i) { return p < 0 || i < p ? ($0 + ',') : $0; }); } return (...
app/scripts/Mobilization/__tests__/components/MobilizationListHeader.spec.js
igr-santos/hub-client
import React from 'react' import { expect } from 'chai' import { shallow } from 'enzyme' import MobilizationsHeader from '../../components/MobilizationsHeader' describe('app/scripts/Mobilization/components/MobilizationsHeader', () => { const context = { router: {} } let wrapper const props = { location: { p...
springboot/GReact/src/main/resources/static/app/components/forms/wizards/Wizard.js
ezsimple/java
import React from 'react' export default class Wizard extends React.Component { componentDidMount() { let self = this; let element = $(this.refs.wizard); var stepsCount = $('[data-smart-wizard-tab]').length; var currentStep = 1; var validSteps = []; var $form = element.closest('form'); ...
src/client/app/boot.js
jsilvestre/tasky
import Application from './components/application'; import logger from 'debug'; import React from 'react'; import { Provider } from 'react-redux'; import startRouter from './router'; import { configureStore } from './store.js'; import en from './locales/en'; import fr from './locales/fr'; const debug = logger('app:bo...
src/components/ChallengeList.js
quintel/etmobile
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Challenge from './Challenge'; const sortChallenges = (left, right) => ( left.name.toLowerCase() < right.name.toLowerCase() ? 0 : 1 ); class ChallengeList extends React.Component { constructor() { ...
app/javascript/mastodon/components/attachment_list.js
pixiv/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; export default class AttachmentList extends Immutabl...
src/components/Header/Header.js
langpavel/react-starter-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import { defineMessages, For...
source/PhoneInputBrowser.js
halt-hammerzeit/react-phone-number-input
import React from 'react' import PropTypes from 'prop-types' import PhoneInput_ from './PhoneInput' import InputSmart from './InputSmart' import InputBasic from './InputBasic' export function createInput(defaultMetadata) { function PhoneInput({ smartCaret, ...rest }, ref) { return ( <PhoneInput_ {...re...
src/js/components/widget/Overview.js
kukua/dashboard
import _ from 'underscore' import React from 'react' import ControlsWidget from './Controls' import DevicePickerWidget from './DevicePicker' import AlertOverviewWidget from './AlertOverview' import FilterGraphWidget from './FilterGraph' import DownloadWidget from './Download' import NotFoundWidget from './NotFound' co...
client/src/javascript/components/icons/FeedIcon.js
stephdewit/flood
import React from 'react'; import BaseIcon from './BaseIcon'; export default class FeedIcon extends BaseIcon { render() { return ( <svg className={`icon icon--feed ${this.props.className}`} viewBox={this.getViewBox()}> <path d="M18.47,47.88A6.49,6.49,0,1,0,12,54.38,6.5,6.5,0,0,0,18.47,47.88Zm18,3....
client/pages/examples/threejs/sph/sph.js
fdesjardins/webgl
import React from 'react' import * as THREE from 'three' import { MarchingCubes } from 'three/examples/jsm/objects/MarchingCubes' import tinygradient from 'tinygradient' import { createAxes, addControls, createParticle, addAxesLabels, } from '../graphing/utils' // import { buildCells, buildCellNeighbors, assi...
packages/react-jsx-highcharts/src/components/FunnelSeries/FunnelSeries.js
AlexMayants/react-jsx-highcharts
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Series from '../Series'; class FunnelSeries extends Component { static propTypes = { id: PropTypes.string.isRequired }; render () { return ( <Series {...this.props} type="funnel" /> ); } } export default Fu...
packages/material-ui-icons/src/SettingsInputAntenna.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let SettingsInputAntenna = props => <SvgIcon {...props}> <path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.6...
src/app/User.js
halhenke/life-letters
import React from 'react'; import classnames from 'classnames'; import styles from './User.css'; import {GeneSequence, SequenceKey} from './Genetics.js'; import {Card, CardHeader, Avatar, CardMedia, CardTitle} from 'material-ui'; import {Paper} from 'material-ui'; import Colors from 'material-ui/src/styles/colors'; imp...
node_modules/babel-preset-react-hmre/test/Test.js
ajames72/MovieDBReact
import React from 'react' export default class Test extends React.Component { render() { return ( <div>Winning?</div> ) } }
docs/examples/Checkbox/Example1.js
romagny13/react-form-validation
import React from 'react'; import { Checkbox } from 'romagny13-react-form-validation'; const Example1 = () => { let values = ['a','c']; return ( <div> <h4>Direct check</h4> <Checkbox checked name="g1" /> <h4>Grouped by name (all checked are checked)</h4> ...
server/sonar-web/src/main/js/apps/system/section.js
joansmith/sonarqube
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...