path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
test/checkbox-spec.js | bjfletcher/material-ui | import React from 'react';
import Checkbox from 'checkbox';
import injectTheme from './fixtures/inject-theme';
import TestUtils from 'react-addons-test-utils';
describe('Checkbox', () => {
/* eslint-disable max-len */
const CHECKMARK_PATH = 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89... |
actor-apps/app-web/src/app/components/DialogSection.react.js | ganquan0910/actor-platform | import _ from 'lodash';
import React from 'react';
import { PeerTypes } from 'constants/ActorAppConstants';
import MessagesSection from 'components/dialog/MessagesSection.react';
import TypingSection from 'components/dialog/TypingSection.react';
import ComposeSection from 'components/dialog/ComposeSection.react';
i... |
imports/ui/pages/TransactionReport/TransactionReport.js | jamiebones/Journal_Publication | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Row , Col , Button , Modal ,
Well , Form , Image , InputGroup , Jumbotron ,
FormControl,FormGroup, ControlLabel , Alert , Table } from 'react-bootstrap';
import { createContainer } from 'meteor/react-me... |
docs/tutorial/DO_NOT_TOUCH/10/src/components/App/index.js | FWeinb/cerebral | import React from 'react'
import {connect} from 'cerebral/react'
import {state, signal} from 'cerebral/tags'
import Toast from '../Toast'
export default connect({
title: state`title`,
subTitle: state`subTitle`,
buttonClicked: signal`buttonClicked`
},
function App (props) {
return (
<div className='o-... |
node_modules/react-bootstrap/es/ModalDialog.js | jkahrs595/website | 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 ... |
src/components/search/AddressFilter.js | whphhg/vcash-electron | import React from 'react'
import { translate } from 'react-i18next'
import { inject, observer } from 'mobx-react'
/** Ant Design */
import Button from 'antd/lib/button'
import Popover from 'antd/lib/popover'
import Switch from 'antd/lib/switch'
/** Component */
import { SwitchIcon } from '../utilities/Common.js'
@tr... |
src/components/Markdown/Heading.js | jonahjoughin/blog.jough.in | import React from 'react';
const sharedStyle = "mb3 tracked b lh-copy sans-serif dark-blue mt0";
const Heading = ({children,level}) => {
const H = `h${level}`;
const f = ` f${level+1}`;
return(<H className = {sharedStyle+f}>{children}</H>);
};
export default Heading;
|
src/svg-icons/image/brush.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrush = (props) => (
<SvgIcon {...props}>
<path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25... |
pages/blog/test-article-one.js | creeperyang/react-static-boilerplate | /**
* 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... |
src/components/Banner/index.js | Kalcode/Gatsby-Boilerplate | import React from 'react'
import PropTypes from 'prop-types'
import Img from 'gatsby-image'
import styles from './styles.module.scss'
import ScrollDown from './ScrollDown'
export default function Banner({ children, sizes }) {
return (
<div>
<div className={styles.wrapper}>
<Img
className=... |
docs/app/Examples/modules/Dropdown/Types/DropdownExampleMultipleSearchInMenu.js | shengnian/shengnian-ui-react | import React from 'react'
import { Dropdown, Input } from 'shengnian-ui-react'
import { tagOptions } from '../common'
// tagOptions = [
// {
// text: 'Important',
// value: 'Important',
// label: { color: 'red', empty: true, circular: true },
// },
// ...
// ]
const DropdownExampleMultipleSearchInM... |
pages/faq.js | jacobhamblin/drew | import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div className="faq">
<section className="light">
<div className="contained">
<h1>FAQ Page</h1>
<p>Coming soon.</p>
</div>
</section>
... |
app/components/member/Edit/remove.js | fotinakis/buildkite-frontend | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import Button from '../../shared/Button';
import Panel from '../../shared/Panel';
import FlashesStore from '../../../stores/FlashesStore';
import OrganizationMemberDeleteMutation from '../../../mutations/Organizat... |
gatsby-ssr.js | mohebifar/restact | import React from 'react'
import { Provider } from 'react-redux'
import { renderToString } from 'react-dom/server'
import { ServerStyleSheet, StyleSheetManager } from 'styled-components'
import createStore from './src/redux/createStore'
global.__SERVER__ = true
global.XMLHttpRequest = require('xmlhttprequest').XMLHtt... |
src/Badge/Badge.spec.js | rhaedes/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import Badge from './Badge';
import getMuiTheme from '../styles/getMuiTheme';
describe('<Badge />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => shallow(node, {context: {mu... |
news/routes/Show/components/Author.js | HKuz/FreeCodeCamp | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ArticleMeta from '../../../components/ArticleMeta';
const propTypes = {
article: PropTypes.shape({
author: PropTypes.objectOf(PropTypes.string)
})
};
const styles = `
.author-block {
display: flex;
... |
app/components/AddConsignmentForms/AddConsignmentPage3.js | RichAbrahams/electron-project | import React from 'react';
import { reduxForm, reset } from 'redux-form';
import { push } from 'react-router-redux';
import Form from '../stc/Form';
import BottomNav from './BottomNav';
import ConsignmentTable from './ConsignmentTable';
import ProductsTable from './ProductsTable';
const AddConsignmentPage3 = (props) =... |
blueocean-material-icons/src/js/components/svg-icons/action/settings.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionSettings = (props) => (
<SvgIcon {...props}>
<path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2... |
lib/components/Application.js | Peter-Springer/tier-two | import React from 'react';
import firebase from '../firebase';
import SignInScreen from './SignInScreen';
import HomeScreen from './HomeScreen';
import SetBudget from './SetBudget';
import PurchasesList from './PurchasesList';
import database from '../references';
const _ = require('lodash');
const auth = firebase.au... |
packages/test-studio/src/components/CustomStringInput.js | VegaPublish/vega-studio | import React from 'react'
import PropTypes from 'prop-types'
import {PatchEvent, set} from 'part:@lyra/form-builder/patch-event'
export default class CustomStringInput extends React.Component {
static propTypes = {
value: PropTypes.string,
type: PropTypes.object,
onChange: PropTypes.func
}
handleChan... |
manga-reader-web/modules/ui/add_author.js | gillessed/manga-reader | import React from 'react'
import serverConstants from '../model/server_constants'
import catalogueController from '../controllers/catalogue_controller'
import messages from './messages'
export default class AddManga extends React.Component {
constructor() {
super()
this.state = {
creating: false
}... |
src/parser/monk/brewmaster/modules/spells/azeritetraits/ElusiveFootwork.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import HIT_TYPES from 'game/HIT_TYPES';
import { calculateAzeriteEffects } from 'common/stats';
import { formatNumber } from 'common/format';
import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/... |
src/components/Text.js | Root-App/react-native-mock-render | /**
* https://github.com/facebook/react-native/blob/master/Libraries/Text/Text.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import styleSheetPropType from '../propTypes/StyleSheetPropType';
import TextStylePropTypes from '../propTypes/TextStyl... |
web/src/server/frontend/render.js | nezaidu/este | import DocumentTitle from 'react-document-title';
import Html from './html.react';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import config from '../config';
import createLocation from 'history/lib/createLocation';
import createRoutes from '../../client/createRoutes';
import createStore f... |
src/icons/font/CreateIcon.js | skystebnicki/chamel | import React from 'react';
import PropTypes from 'prop-types';
import FontIcon from '../../FontIcon';
import ThemeService from '../../styles/ChamelThemeService';
/**
* Close or clear button
*
* @param props
* @param context
* @returns {ReactDOM}
* @constructor
*/
const CreateIcon = (props, context) => {
let t... |
node_modules/react-router/es6/Redirect.js | ottomajik/react-demo | 'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must e... |
examples/auth-with-shared-root/components/Landing.js | bs1180/react-router | import React from 'react'
const Landing = React.createClass({
render() {
return (
<div>
<h1>Landing Page</h1>
<p>This page is only shown to unauthenticated users.</p>
<p>Partial / Lazy loading. Open the network tab while you navigate. Notice that only the required components are do... |
src/components/Surrounder.js | knod/cliff-effects-1 | import React from 'react';
const Surrounder = function ({ Top, Left, Right, Bottom, children }) {
let contents = { top: null, left: null, right: null, bottom: null };
if (Top) {
contents.top = (<div className={ `top horizontal` }>{ Top }</div>);
}
if (Left) {
contents.left = (<div className={ `left ... |
molgenis-core-ui/src/test/javascript/ProgressBarTest.js | marieke-bijlsma/molgenis | import test from 'tape';
import React from 'react';
import sd from 'skin-deep'
import ProgressBar from 'react-components/ProgressBar';
test('Test if the ProgressBar component renders a running, failed and success progress bar correctly', assert => {
// Render the component to test
const result1 = sd.shallowRender(P... |
packages/mineral-ui-icons/src/IconGradient.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 IconGradient(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps... |
blueocean-material-icons/src/js/components/svg-icons/av/art-track.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvArtTrack = (props) => (
<SvgIcon {...props}>
<path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1.51L3.5 15h7z"/>
</SvgIcon>
);
... |
src/index.js | jktravis/wecansavedemocracy | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import {Router, browserHistory } from 'react-router';
import rootReducer from './reducers';
import routes from './routes';
import promise from 'redux-promise';
impo... |
client/src/components/Signup/CustomerSignup.js | wolnewitz/raptor-ads | import React, { Component } from 'react';
import { Button, Form, Grid, Header, Icon } from 'semantic-ui-react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import { changeSignupField, customerSignup, clearErrors } from '../../actions';
class CustomerSignup extends Component {
construc... |
src/docs/design/Typography.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Headline from 'grommet/components/Headline';
import Heading from 'grommet/components/Heading';
import Paragraph from 'grommet/components/Paragraph';
import Label from 'grommet/components/Label';
import... |
react/reactRedux/redux-master/examples/universal/common/components/Counter.js | huxinmin/PracticeMakesPerfect | import React from 'react'
import PropTypes from 'prop-types'
const Counter = ({increment, incrementIfOdd, incrementAsync, decrement, counter}) => (
<p>
Clicked: {counter} times
{' '}
<button onClick={increment}>+</button>
{' '}
<button onClick={decrement}>-</button>
{' '}
<button onClick=... |
app/components/wikidata-search-list.js | paulsonnentag/qwery-me | import _ from 'lodash';
import React from 'react';
import Deferred from '../containers/deferred';
import MatchList from './match-list';
import api from '../api';
import {TOKEN} from '../types';
export default class WikidataSearchList extends React.Component {
render () {
const {type, search, onSelect} = this.pro... |
src/screens/RecordingScreen.js | jjimenezlopez/ReactNativePOC | import React from 'react';
import { StyleSheet, Text, View, ActivityIndicator, TouchableWithoutFeedback } from 'react-native';
import { Icon } from 'react-native-elements';
import { connect } from 'react-redux';
import Sound from 'react-native-sound';
import AudioRecording from '../components/AudioRecording';
import *... |
app/javascript/mastodon/components/regeneration_indicator.js | h3zjp/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_working.svg';
const MissingIndicator = () => (
<div className='regeneration-indicator'>
<div className='regeneration-indicator__figure'>
<img src={illustration} alt='' />
<... |
client/modules/Index/Index.js | jde-maga/supermoube | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Index.js :+: :+: :+: ... |
src/Menu.js | marzolfb/rn-art-d3-examples | /*
Copyright 2016 Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... |
wail-ui/loadingScreens/firstTime/components/progress/progressMessage.js | N0taN3rd/wail | import PropTypes from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import { Step, Stepper, StepLabel } from 'material-ui/Stepper'
import { OsCheckContents } from '../osCheck'
import { JavaCheckContents } from '../javaCheck'
import ServiceContents from '../serviceCheck/serviceCheckMessage... |
app/javascript/mastodon/components/icon_button.js | pointlessone/mastodon | import React from 'react';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class IconButton extends React.PureComponent {
static propTypes = {
className: PropTypes.stri... |
frontend/test/app/containers/SharePage-test.js | mathjazz/testpilot | import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import SharePage from '../../../src/app/containers/SharePage';
describe('app/containers/SharePage', () => {
const linknames = ['facebook', 'twitter', 'email', 'copy'];
let props, subject;
bef... |
packages/example-universal-react-app/src/server.js | raymondsze/create-react-scripts | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import express from 'express';
import url from 'url';
import serveStatic from 'serve-static';
import path from 'path';
import fs from 'fs';
import App from './App';
// For development, the server path is specified in process.env.SERVICE_URL
cons... |
src/display/MetadataText.js | ndlib/beehive | import React from 'react'
import PropTypes from 'prop-types'
import createReactClass from 'create-react-class'
const MetadataText = createReactClass({
displayName: 'Metadata Text',
propTypes: {
metadataField: PropTypes.object.isRequired,
},
render: function () {
return (<div>{this.props.metadataField... |
force_dir/node_modules/react-bootstrap/es/Tooltip.js | wolfiex/VisACC | 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 ... |
website/src/index.js | dmorden/N-Web | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const AWS_API_Gateway =... |
app/pages/setPasswordPage.js | shiyunjie/scs | /**
* Created by shiyunjie on 16/12/27.
*/
/**
* Created by shiyunjie on 16/12/6.
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
ActivityIndicator,
ActivityIndicatorIOS,
ProgressBarAndroid,
NativeAppEventEmitter,
TouchableOpacity,
Pla... |
src/components/Tooltip/Tooltip.js | wundery/wundery-ui-react | import React from 'react';
const Tooltip = props => (
<span className="ui-tooltip">
<span className="ui-tooltip-content">
{props.content}
</span>
{props.children}
</span>
);
Tooltip.propTypes = {
children: React.PropTypes.any,
content: React.PropTypes.node,
};
Tooltip.defaultProps = {
pos... |
src/icons/MusicNoteIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class MusicNoteIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 6v21.11c-1.18-.69-2.54-1.11-4-1.11-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8V14h8V6H24z"/></svg>;}
}; |
src/components/layouts/main-layout.js | HuangXingBin/goldenEast | import React from 'react';
import { connect } from 'react-redux';
import styles from './main-layout.less';
import SidebarLayoutContainer from '../containers/sidebar-layout-container';
import NavbarLayoutContainer from '../containers/navbar-layout-container';
import { Breadcrumb } from 'antd';
const MainLayout = React... |
client/src/Fan.js | mshogren/pi-sandbox | import React, { Component } from 'react';
import './Fan.css';
class Fan extends Component {
render() {
const { on } = this.props;
const cond = (on === true);
const classNames = 'Fan' + (cond ? ' Animate': '');
const color = cond ? '#abe2fb' : '#e9e9e9'
return (
<svg className={classNames... |
app/App.js | peterfication/space-jumper | import PT from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { actions } from './actions'
import About from './components/About'
import Game from './components/Game'
import GameOver from './components/GameOver'
import GameVictory from './... |
client/src/components/helpers/SlimWidthRow.js | otavioarc/freeCodeCamp | import React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from '@freecodecamp/react-bootstrap';
function SlimWidthRow({ children, ...restProps }) {
return (
<Row {...restProps}>
<Col md={6} mdOffset={3} sm={12}>
{children}
</Col>
</Row>
);
}
SlimWidthRow.displa... |
src/components/post_index.js | aquinoWill/ReduxSimpleStarter | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
import { Link } from 'react-router-dom';
class PostsIndex extends Component {
componentDidMount() {
this.props.fetchPosts();
}
renderPosts() {
return _.map(this.props.posts, post =>... |
src/components/__tests__/InfoBar-test.js | Mikosko/loan-calculator | import React from 'react';
import ReactDOM from 'react-dom';
import {renderIntoDocument} from 'react-addons-test-utils';
import { expect} from 'chai';
import { InfoBar } from 'components';
import { Provider } from 'react-redux';
import { browserHistory } from 'react-router';
import createStore from 'redux/create';
impo... |
client/containers/users/reset-password.js | wuyang910217/meteor-react-redux-base | import React from 'react';
import {useDeps} from 'react-simple-di';
import {composeAll} from 'react-komposer-plus';
import ResetPassword from '../../components/users/reset-password';
const bindTokenToAction = C => props => {
const {token, resetPassword, ...other} = props;
return <C resetPassword={resetPassword.bi... |
src/svg-icons/device/signal-cellular-connected-no-internet-3-bar.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M17 22V7L2 22h15zm3-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/>
</SvgIcon>
);
Devic... |
src/svg-icons/content/weekend.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentWeekend = (props) => (
<SvgIcon {...props}>
<path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51... |
src/shared/containers/Operations/index.js | rvboris/financebutler | import React from 'react';
import classnames from 'classnames';
import { connect } from 'react-redux';
import { get } from 'lodash';
import { createSelector } from 'reselect';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import {
Alert,
Modal,
ModalHeader,
ModalBody,
ModalFooter,... |
packages/ringcentral-widgets/components/ActiveCallList/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import callDirections from 'ringcentral-integration/enums/callDirections';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ActiveCallItem from '../ActiveCallItem';
import styles from './styles.scss';
function isConferenceCall(normalizedCall) {
return normali... |
src/components/UIShell/__tests__/HeaderMenuButton-test.js | carbon-design-system/carbon-components-react | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import Fade32 from '@carbon/icons-react/lib/fade/32';
import React from 'react';
import { mount } from 'enzyme';
import { HeaderMenuButton } ... |
src/main/Root.js | piotr-gawron/pileup.js | /**
* Root of the React component tree.
* @flow
*/
'use strict';
import type {GenomeRange} from './types';
import type {TwoBitSource} from './sources/TwoBitDataSource';
import type {VisualizedTrack, VizWithOptions} from './types';
import type ContigInterval from './ContigInterval';
import utils from './utils';
impo... |
src/components/Loader/Loader.js | GJMcGowan/personal_site | import React from 'react';
import './Loader.css';
const Loader = (props) => (
<div className='loader'>Loader...</div>
);
export default Loader;
|
paraviewweb/src/React/Widgets/AnnotationEditorWidget/index.js | CordyChen/VisMechan | import React from 'react';
import style from 'PVWStyle/ReactWidgets/AnnotationEditorWidget.mcss';
import OneScore from './OneScore';
import ManyScore from './ManyScore';
import placeHolder from './placeholder-full.png';
import AnnotationBuilder from '../../../Common/Misc/AnnotationBuilder';
const placeholderContaine... |
src/Components/FilterBar.js | jefferydutra/TestableModularReactTalk | import React from 'react';
require('./FilterBar.css');
function FilterBar({ filterText, onFilterTextChange }) {
return (
<div className="filter-bar">
<input
placeholder="filter characters .."
className="filter-bar__input"
value={filterText}
... |
lib/containers/__tests__/report.js | conveyal/scenario-editor | // @flow
import nock from 'nock'
import React from 'react'
import {
mockRegion,
mockProject,
mockWithProvider
} from '../../utils/mock-data'
import Report from '../report'
const {describe, expect, it} = global
describe('Container > Report', () => {
it('renders correctly', () => {
// ensure that /api/regio... |
pages/vehicles.js | Digital-Sandwich/ghibli-api-next | import React from 'react';
import axios from 'axios';
import PageHead from '../components/head';
import Link from 'next/link';
import Nav from '../components/nav';
class InfoCard extends React.Component {
constructor() {
super();
}
render(){
const infoCardStyle = {
postiton: 'fixed',
top: '0',
width: ... |
packages/react-native-imask/example/App.js | uNmAnNeR/imaskjs | import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { IMaskTextInput } from 'react-native-imask';
import 'imask/esm';
export default
class App extends Component {
state = {
phone: '999'
};
render() {
return (
<View style={styles.container}>
... |
src/client/components/ViewState.js | djmill0326/node-random-stuff | import React from 'react';
class ViewState extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<pre>{this.props.state}</pre>
);
}
}
ViewState.propTypes = {
state: React.PropTypes.object
};
module.exports = ViewState;
|
src/components/products/products-by-operation.js | FranckCo/Operation-Explorer | import React from 'react';
import { sparqlConnect } from 'sparql-connect';
import ProductList from './product-list';
import Spinner from 'components/shared/spinner'
import D, { getLang } from 'i18n'
/**
* Builds the query that retrieves the products issued of a given operation or series.
*/
const queryBuilder = ope... |
client/views/omnichannel/directory/contacts/ContactTab.js | VoiSmart/Rocket.Chat | import React from 'react';
import NotAuthorizedPage from '../../../../components/NotAuthorizedPage';
import { usePermission } from '../../../../contexts/AuthorizationContext';
import ContactTable from './ContactTable';
function ContactTab(props) {
const hasAccess = usePermission('view-l-room');
if (hasAccess) {
... |
test/PageHeaderSpec.js | andrew-d/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import PageHeader from '../src/PageHeader';
describe('PageHeader', function () {
it('Should output a div with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<PageHeader>
<strong>Content</str... |
app/javascript/mastodon/features/community_timeline/index.js | glitch-soc/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
src/components/drawer/index.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import ReactIScroll from 'react-iscroll';
const isBrowser = typeof window !== 'undefined';
const iScroll = isBrowser ? require( 'iscroll') : undefined;
import Modal from '../Modal/Modal';
const Drawer = (props) => {
const {
... |
frontend/src/file-view.js | miurahr/seahub | import React from 'react';
import ReactDOM from 'react-dom';
import FileView from './components/file-view/file-view';
import FileViewTip from './components/file-view/file-view-tip';
import Image from './components/file-content-view/image';
import SVG from './components/file-content-view/svg';
import PDF from './compone... |
src/clincoded/static/components/mixins.js | ClinGen/clincoded | /*jshint scripturl:true */
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'underscore';
import url from 'url';
import serialize from 'form-serialize';
var origin = require('../libs/origin');
var $script = require('scriptjs');
var ga = require('google-analytics');
var parseE... |
client/src/components/Game/Table.js | patteri/slave-cardgame | import React from 'react';
import PropTypes from 'prop-types';
import Card from './Card';
import './style.css';
const Table = ({ table }) => (
<div className="Game-table-cards">
{table.map(item => (
<Card key={`${item.suit}-${item.value}`} card={item} />
))}
</div>
);
Table.propTypes = {
table: Pr... |
www/src/components/ValidatedText.js | savannidgerinel/health | import React from 'react';
import { maybe, isSomething } from '../common';
/* Required parameters:
*
* value: the data value to be rendered
* render: (value) => str
* parser: (str) => maybe value
*
* Optional parameter:
*
* onUpdate: (value) => action to take when a valid value is in the field
*/
export clas... |
components/Select.js | hellobrian/carbon-components-react | import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import Icon from './Icon';
const propTypes = {
children: PropTypes.node,
className: PropTypes.string,
id: PropTypes.string.isRequired,
inline: PropTypes.bool,
labelText: PropTypes.string,
onChange: PropTypes... |
src/routes/Character/components/CharacterNav/CharacterNav.js | warcraftlfg/warcrafthub-client | import React from 'react'
import './CharacterNav.scss'
import { LinkContainer, IndexLinkContainer } from 'react-router-bootstrap'
import { Nav, NavItem } from 'react-bootstrap'
export const CharacterNav = (props) => (
<div className='character-nav'>
<Nav bsStyle='pills' justified>
<IndexLinkContainer to={'... |
src/svg-icons/device/dvr.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceDvr = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 ... |
spec/javascripts/components/notifications/message_spec.js | Codeminer42/cm42-central | import React from 'react';
import { shallow } from 'enzyme';
import Message from 'components/Notifications/Message';
describe('<Message />', () => {
const defaultProps = () => ({
type: 'success',
className: 'Notifications__Message',
message: 'success',
onRemove: sinon.stub()
});
it('renders comp... |
src/svg-icons/av/library-music.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryMusic = (props) => (
<SvgIcon {...props}>
<path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57... |
src/js/components/Meter/stories/VerticalBar.js | HewlettPackard/grommet | import React from 'react';
import { Box, Meter } from 'grommet';
export const VerticalBar = () => {
const value = 30;
return (
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={grommet}>
<Box align="center" pad="large">
<Meter type="bar" value={value} direction="ve... |
src/components/tenants/TenantsPage.js | khosimorafo/reactmastende | import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import Tenants from '../../containers/VisibleTenants';
export default function CurrentStateIndicator({ state, style }: *) {
return (
<View style={[styles.page, style]}>
<Tenants style={styles.page} navigati... |
src/parser/deathknight/blood/modules/features/BloodPlagueUptime.js | FaideWW/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import Enemies from 'parser/shared/modules/Enemies';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/Sta... |
src/ActiveBets.js | Ethbet/ethbet | import React, { Component } from 'react';
class ActiveBets extends Component {
render() {
return (
<div className="col-lg-4">
<div className="well">
<legend>Active Bets</legend>
{/*<div className="bet">
... |
src/svg-icons/maps/local-hospital.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalHospital = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"/>
</SvgIcon>
);
MapsLocal... |
src/parser/shaman/enhancement/modules/talents/EarthenSpike.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS/index';
import SpellIcon from 'common/SpellIcon';
import { formatNumber, formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import StatisticBox from 'interface/others/StatisticBox';
import calculateEffectiveDamage from 'pa... |
src/routes.js | quran/quran.com-frontend | /* eslint-disable max-len, no-console */
import React from 'react';
import IndexRoute from 'react-router/lib/IndexRoute';
import Route from 'react-router/lib/Route';
import Redirect from 'react-router/lib/Redirect';
import {
isLoaded as isAuthLoaded,
load as loadAuth,
hasAccessToken
} from 'redux/actions/auth';
... |
src/main/react-front-end/src/views/Admin/HistoryComponent.js | didclab/onedatashare | /**
##**************************************************************
##
## Copyright (C) 2018-2020, OneDataShare Team,
## Department of Computer Science and Engineering,
## University at Buffalo, Buffalo, NY, 14260.
##
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this fi... |
pootle/static/js/admin/general/components/ContentPreview.js | pavels/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
const ContentPreview = React.... |
js/jqwidgets/demos/react/app/tabs/closebuttons/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTabs from '../../../jqwidgets-react/react_jqxtabs.js';
class App extends React.Component {
componentDidMount() {
let index = 0;
this.refs.myTabs.on('tabclick', (event) => {
let allLiTags = document.getElementById('... |
src/components/SideBarMenu/SideBarMenu.js | warcraftlfg/warcrafthub-client | import React from 'react'
import patreon from './assets/patreon.png'
class SideBarMenu extends React.Component {
static propTypes = {
isOpen: React.PropTypes.bool.isRequired,
toggleAction: React.PropTypes.func.isRequired
}
render () {
const isOpen = this.props.isOpen
let sideBarMenuClass = nul... |
app/containers/Normative/index.js | brainsandspace/ship | /**
*
* Normative
*
* To be able to reference the normatives from an external list, we add an id to the inline normative.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Chunk from 'components/Chunk';
import styled from 'styled-components';... |
src/svg-icons/action/explore.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionExplore = (props) => (
<SvgIcon {...props}>
<path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2... |
node_modules/react-svg-pan-zoom/build-es/ui-miniature/icon-arrow.js | SpatialMap/SpatialMapDev | import React from 'react';
import PropTypes from 'prop-types';
import { POSITION_RIGHT, POSITION_LEFT } from '../constants';
//credits https://materialdesignicons.com/icon/chevron-up
export default function IconArrow(_ref) {
var open = _ref.open,
position = _ref.position;
var transform = 0;
switch (pos... |
app/components/body/tabs/header_tab.js | Rorchackh/Sink | import React from 'react'
const classNames = require('classnames')
export default class HeaderTab extends React.Component {
constructor(props) {
super(props)
}
handleClick(event) {
switch(this.props.tab.key) {
case 'project':
return false
default:
... |
src/containers/read.js | everywherebible/app | // @flow
import React from 'react';
import {connect} from 'react-redux';
import type {ContextRouter} from 'react-router';
import {withRouter} from 'react-router-dom';
import debounce from 'lodash.debounce';
import {enableFocusMode, addToast, confirmFocusMode} from '../actions';
import type {Action, Translation} from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.