path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/Console.js
sgnh/react-console-wrapper
import React from 'react'; const { array, string, bool, shape } = React.PropTypes; const Console = (props) => { if (props.assert.assertion) { console.assert(props.assert.assertion, props.assert.message); } if (props.clear) { console.clear(); } if (props.count) { console.count(props.count); }...
test/FadeMixinSpec.js
thealjey/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import FadeMixin from '../src/FadeMixin'; let Component; describe('FadeMixin', function () { beforeEach(function() { Component = React.createClass({ mixins: [ FadeMixin ], render() { return ( <div {....
src/Parser/Priest/Holy/Modules/Items/Tier21_4set.js
hasseboulen/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import Analyzer from 'Parser/Core/Analyzer'; import calculateEffectiveHealing from 'Parser/Core/calculateEffectiveHealing'; import Combatants from 'Parser/Core/Modules/Comb...
circleci-demo-javascript-express-master/client/modules/App/components/Footer/Footer.js
RTHMaK/RPGOne
import React from 'react'; import { FormattedMessage } from 'react-intl'; // Import Style import styles from './Footer.css'; // Import Images import bg from '../../header-bk.png'; export function Footer() { return ( <div style={{ background: `#FFF url(${bg}) center` }} className={styles.footer}> <p>&copy...
docs/src/sections/NavSection.js
jesenko/react-bootstrap
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function NavSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <Ancho...
src/client/components/SortSelector/SortSelector.js
busyorg/busy
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Popover from '../Popover'; import PopoverMenu, { PopoverMenuItem } from '../PopoverMenu/PopoverMenu'; import './SortSelector.less'; export default class SortSelector extends React.Component { static I...
App/Components/SignUp.js
OUCHUNYU/Ralli
import usersApi from '../Utils/usersApi' import GoogleMap from './GoogleMap' import Firebase from 'firebase' import React, { Component } from 'react'; import { StyleSheet, PropTypes, View, TextInput, Text, Dimensions, TouchableHighlight, Image, AppRegistry } from 'react-native'; let styles = ...
client/src/components/LoginStatusMessage.js
wapjude/labify
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Button, StyleSheet, Text, View } from 'react-native'; import { NavigationActions } from 'react-navigation'; const styles = StyleSheet.create({ welcome: { fontSize: 20, textAlign: 'center', margi...
blueocean-material-icons/src/js/components/svg-icons/maps/directions-bike.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const MapsDirectionsBike = (props) => ( <SvgIcon {...props}> <path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5...
app/src/components/Tooltip/Tooltip.js
WoundedPixels/us-population
// @flow import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import * as d3 from 'd3'; import './Tooltip.css'; class Tooltip extends Component { static update(content: Object = <empty />) { const tooltip = d3.select('div#tooltip'); const mouse = { x: d3.event.pageX, y: d3.event.pag...
examples/sidebar/app.js
dyzhu12/react-router
import React from 'react'; import { history } from 'react-router/lib/HashHistory'; import { Router, Route, Link } from 'react-router'; import data from './data'; var Category = React.createClass({ render() { var category = data.lookupCategory(this.props.params.category); return ( <div> <h1>{cat...
packages/@vega/core/src/schema/previews/FootnotePreview/index.js
VegaPublish/vega-studio
import React from 'react' import styles from './FootnotePreview.css' export default function FootnotePreview() { return <span className={styles.footnoteInline}>*</span> }
client/scripts/routes.js
amitava82/radiole
/** * Created by amitava on 30/01/16. */ import React from 'react'; import {Route, IndexRoute, IndexRedirect} from 'react-router'; import get from 'lodash/get'; //import {ROUTE_MESSAGES} from './constants'; //import {setLoginMessage} from './redux/modules/session'; import { HomeContainer } from './routes/home';...
scripts/apps/authoring/authoring/directives/SendItem.js
jerome-poisson/superdesk-client-core
import _ from 'lodash'; import React from 'react'; import {PreviewModal} from '../previewModal'; SendItem.$inject = ['$q', 'api', 'desks', 'notify', 'authoringWorkspace', 'superdeskFlags', '$location', 'macros', '$rootScope', 'deployConfig', 'authoring', 'send', 'editorResolver', 'confirm', 'archiveService', ...
js/src/modals/FirstRun/Welcome/welcome.js
nipunn1313/parity
// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: 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 // (at your option) any lat...
fixtures/dom/src/components/fixtures/input-change-events/index.js
leexiaosi/react
import React from 'react'; import FixtureSet from '../../FixtureSet'; import TestCase from '../../TestCase'; import RangeKeyboardFixture from './RangeKeyboardFixture'; import RadioClickFixture from './RadioClickFixture'; import RadioGroupFixture from './RadioGroupFixture'; import InputPlaceholderFixture from './InputP...
src/routes.js
ivanflorentin/ProvideUI
import {Route} from 'react-router' import React from 'react' export default function (modelDef, models) { const mainPath = modelDef.modelName const modelProperName = modelDef.modelName[0].toUpperCase() + modelDef.modelName.substring(1) const edit = 'edit' + modelProperName const list = 'list' + modelProperNam...
app/desktop/ToolbarButtonPopover/index.js
christianalfoni/webpack-bin
import React from 'react'; import {Decorator as Cerebral} from 'cerebral-view-react'; import ToolbarButton from '../ToolbarButton'; import classNames from 'classnames'; import styles from './styles.css'; @Cerebral() class ToolbarButtonPopover extends React.Component { onArrowBoxClick(e) { e.stopPropagation(); ...
client/components/charts/balance-chart.js
ZeHiro/kresus
import React from 'react'; import Dygraph from 'dygraphs'; import { debug, round2, getChartsDefaultColors, translate as $t } from '../../helpers'; import ChartComponent from './chart-base'; import DiscoveryMessage from '../ui/discovery-message'; function createChartBalance(chartId, account, operations, theme) { ...
node_modules/react-bootstrap/es/MediaList.js
superKaigon/TheCave
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 ...
Tutorial/AwesomeProject/__tests__/index.ios.js
iyooooo/ReactNativeExpress
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 /> ); });
src/components/TableMortgage.js
nickgreengithub/mortgagecalc
import React from 'react'; import { connect } from 'react-redux'; import payments from '../selectors/payments'; import Table from './Table'; export const TableMortgage = (({payments, className})=> { let output=payments.slice(1) .filter(year=>year.balance>0 || year.interestYearly>0) .reduce((acc, year, i...
src/parser/shaman/elemental/modules/core/FlameShock.js
fyruna/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatNumber, formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import S...
node_modules/redbox-react/examples/react-transform-catch-errors/index.js
edsrupp/eds-mess
import React from 'react' import App from './components/App' const root = document.getElementById('root') React.render(<App />, root)
react-redux-tutorial/todo-reflux/src/components/todo.js
react-scott/react-learn
import React from 'react' import Reflux from 'reflux' import ReactMixin from 'react-mixin' import store from '../stores/store' import actions from '../actions/actions' export default class Todo extends React.Component{ //组件渲染完成后,通过action获取所有的数组,刷新绑定到this.state上 componentDidMount() { actions.getAll(); } a...
src/layouts/SidebarredLayout/SidebarredLayout.spec.js
KNMI/GeoWeb-FrontEnd
import React from 'react'; import SidebarredLayout from './SidebarredLayout'; import { shallow } from 'enzyme'; import { Col } from 'reactstrap'; describe('(Layout) SidebarredLayout', () => { it('Renders a Reactstrap Container', () => { const _component = shallow(<SidebarredLayout route={{}} />); expect(_com...
src/features/rekit-tools/TestCoveragePage.js
supnate/rekit-portal
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Alert, Button } from 'antd'; import history from '../../common/history'; export class TestCoveragePage extends Component { static propTypes = { home: PropTypes.object.isRequired, }; ...
src/utils/createContextWrapper.js
gianpaj/react-bootstrap
import React from 'react'; /** * Creates new trigger class that injects context into overlay. */ export default function createContextWrapper(Trigger, propName) { return function(contextTypes) { class ContextWrapper extends React.Component { getChildContext() { return this.props.context; } ...
NavigationReactNativeWeb/sample/twitter/createStateNavigator.js
grahammendick/navigation
import React from 'react'; import {Platform} from 'react-native'; import {StateNavigator} from 'navigation'; import {NavigationStack} from 'navigation-react-native'; export default () => { const stateNavigator = new StateNavigator([ {key: 'home', route: '{tab?}', defaults: {tab: 'home'}}, {key: 'notification...
classic/src/scenes/wbfa/generated/FASCheck.pro.js
wavebox/waveboxapp
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck } from '@fortawesome/pro-solid-svg-icons/faCheck' export default class FASCheck extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faCheck} />) } }
packages/wix-style-react/src/Page/test/examples/SomeContentComponent2.js
wix/wix-style-react
import React from 'react'; import PropTypes from 'prop-types'; import times from '../../../utils/operators/times'; export const LongTextContent = props => { const pages = times(props.numOfPages, (x, i) => ( <div key={i}> <div> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam facilisis...
app/scenes/Schedule/components/Talk/index.js
brentvatne/react-conf-app
// @flow import React, { Component } from 'react'; import { Animated, Easing, PixelRatio, StyleSheet, Text, TouchableHighlight, View, } from 'react-native'; import Icon from '@expo/vector-icons/Ionicons'; import Avatar from '../../../../components/Avatar'; import theme from '../../../../theme'; import { ...
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/InputGroupAddon.js
GoogleCloudPlatform/prometheus-engine
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { mapToCssModules, tagPropType } from './utils'; import InputGroupText from './InputGroupText'; const propTypes = { tag: tagPropType, addonType: PropTypes.oneOf(['prepend', 'append']).isRequired, children: ...
components/events/EventsList.js
BDE-ESIEE/mobile
import React, { Component } from 'react'; import { Text, View, ListView, ActivityIndicator, StatusBar, RefreshControl, Button, TouchableOpacity } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import moment from 'moment'; import Icon from 'react-native-vector-icons/Ionic...
tests/routes/Home/components/HomeView.spec.js
anitu/NextFlick
import React from 'react' import { HomeView } from 'routes/Home/components/HomeView' import { render } from 'enzyme' describe('(View) Home', () => { let _component beforeEach(() => { _component = render(<HomeView />) }) it('Renders a welcome message', () => { const welcome = _component.find('h4') ...
src/components/header/header.js
awaseem/Jam
import React from 'react'; function Header(props) { return ( <div style={{ height: props.height || '100vh', background: `no-repeat center url(${props.image})`, paddingTop: props.paddingTop || '250px', paddingBottom: props.paddingBottom || '0px', backgroundSize: 'cove...
ui/src/components/ColorPicker/index.js
LearningLocker/learninglocker
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { CirclePicker } from 'react-color'; import { compose, withProps } from 'recompose'; import { Map, List } from 'immutable'; import { MAX_CUSTOM_COLORS } from 'lib/constants/visualise'; import { activeOrgIdSelect...
frontend/webapp/js/Event.js
damorton/dropwizardheroku-webgateway
import React from 'react'; import axios from 'axios'; class ActionControl extends React.Component { constructor(props){ super(props); this.state = { id : props.id, url: props.url }; this.edit = this.edit.bind(this) this.remove = this.remove.bind(this) } edit(){ } remove(){ const requestUrl...
app/components/loader/index.js
ajaymathur/fun-community
import React from 'react'; import { View, ActivityIndicator } from 'react-native'; class Loader extends React.Component { constructor(props) { super( props ); } render() { return ( <View> {this.props.showLoader ? <ActivityIndicator animating={true} style=...
src/components/Map/index.js
opentraffic/analyst-ui
import React from 'react' import PropTypes from 'prop-types' import { Map as Leaflet, ScaleControl } from 'react-leaflet' import 'leaflet-editable' import 'leaflet.path.drag' import TangramLayer from './TangramLayer' import 'leaflet/dist/leaflet.css' import './Map.css' const ATTRIBUTION = '<a href="https://mapzen.com/...
annotate-gt/src/App.js
jkerfs/annotate-gt
import React, { Component } from 'react'; import './App.css'; import Opening from './Opening' import Canvas from './Canvas' import Finalize from './Finalize' class App extends Component { constructor() { super() this.state = { comp: "Opening", data: {} } } handleStart(state) { this.s...
src/parser/shaman/elemental/CHANGELOG.js
fyruna/WoWAnalyzer
import { niseko, HawkCorrigan } from 'CONTRIBUTORS'; import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; export default [ { date: new Date('2019-05-06'), changes: <>Added support for the damage part of <SpellLink id={SPELLS.IGNEOUS_POTENTIAL.id} />.</>, ...
packages/mineral-ui-icons/src/IconLocalHotel.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 IconLocalHotel(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconPro...
client/src/app/components/forms/inputs/NoUiSlider.js
zraees/sms-project
import React from 'react' import noUiSlider from 'nouislider' export default class NoUiSlider extends React.Component { componentDidMount() { const slider = this.refs.slider; const element = $(slider); const props = this.props; element.addClass('noUiSlider'); const options = { range: { ...
app/javascript/mastodon/features/ui/components/column_link.js
sylph-sin-tyaku/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import Icon from 'mastodon/components/icon'; const ColumnLink = ({ icon, text, to, href, method, badge }) => { const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span...
src/containers/search-bar/SearchBar.js
SalvaCarsi/SearchView
'use strict'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import SearchBarWrapper from '../../components/styled/SearchBarWrapper'; import { HeaderTextWrapper } from '../../components/styled/TextWrapper'; import Button from '../../compone...
src/components/todoForm.js
jonkemp/universal-react-todo-app
import React from 'react'; import TodoList from './todoList'; export default React.createClass({ getInitialState() { return {items: ['One', 'Two', 'Three'], text: ''}; }, onChange(e) { this.setState({text: e.target.value}); }, handleSubmit(e) { e.preventDefault(); const nextItems = this.sta...
consoles/my-joy-images/src/app.js
yldio/joyent-portal
import React from 'react'; import Helmet from 'react-helmet-async'; import { RootContainer } from 'joyent-ui-toolkit'; import Routes from '@root/routes'; export default () => ( <RootContainer> <Helmet> <title>Images</title> </Helmet> <Routes /> </RootContainer> );
internals/templates/containers/App/index.js
plasticanthony/coffee-dates
/** * * App.react.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If...
examples/kitchensink/app-color/components/Root.js
Travix-International/frint
import React from 'react'; import { observe } from 'frint-react'; import { Observable } from 'rxjs/Observable'; import { concatMap } from 'rxjs/operator/concatMap'; import { map } from 'rxjs/operator/map'; import { merge } from 'rxjs/operator/merge'; import { scan } from 'rxjs/operator/scan'; import PropTypes from 'pro...
src/types/bounds.js
uniphil/react-leaflet
import React from 'react'; import Leaflet from 'leaflet'; import latlngList from './latlngList'; export default React.PropTypes.oneOfType([ React.PropTypes.instanceOf(Leaflet.LatLngBounds), latlngList, ]);
src/pages/About.js
TomClarkson/hanzi-gold-web
import React from 'react'; import ReactDisqusThread from 'react-disqus-thread'; export default class About extends React.Component { render() { return ( <div id="about-page"> <h1 className='lead-header'>Why was Hanzi Gold built?</h1> <p className="lead">Hanzi Gold combines two of my passions; lanaguage l...
src/components/Preferences.js
chrisjohndigital/OpenLang
import React from 'react' export class Preferences extends React.Component { constructor(props) { super(); this.state = { value: false }; this.handleChange = this.handleChange.bind(this); } handleChange(event) { this.props.onPreferences(!this.state.va...
src/projects.js
kngroo/Kngr
import React, { Component } from 'react'; import { Link } from 'react-router'; import Gfycat from './gfycat'; require('./styles/projects.scss'); export default class Project extends Component { constructor(props) { super(props); this.state = { id: props.data.id, title: props.data.title, de...
src/bundles/Collaborate/CollaborateCodeWidget.js
AusDTO/dto-digitalmarketplace-frontend
import React from 'react' import { Provider } from 'react-redux' import RegisterComponent from '../../RegisterComponent' import createStore from './redux/create' import Code from './components/Code' export const CollaborateCodeWidget = (props) => { const store = createStore(props) return ( <Provider store={...
docs/src/app/components/pages/components/Dialog/Page.js
pancho111203/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 dialogReadmeText from './README'; import DialogExampleSimple from './Exam...
scene/AnimSpinScene.js
withwind318/RNAppDemos
import React, { Component } from 'react'; import { StyleSheet, View, Image, Dimensions, Text, Animated, Easing, } from 'react-native'; export default class AnimSpinScene extends Component { constructor(props) { super(props); this.spinValue = new Animated.Value(0); } componentDidMount() {...
app/src/components/TotalFundAvailable.js
open-austin/budgetparty
import React from 'react' import { FormattedNumber } from 'react-intl' import PropTypes from 'prop-types'; const TotalFundAvailable = (props) => { const { generalFund, generalFundsRemaining } = props.funds const remainingAmount = generalFundsRemaining === null ? generalFund : generalFundsRemaining return ( ...
src/components/core/StrikethroughDivider/index.js
ClaudiuCeia/mioritic
// @flow import React, { Component } from 'react'; import './StrikethroughDivider.css'; type Props = { title: string, subtitle: string, } class StrikethroughDivider extends Component { props: Props; render() { return ( <div className="strikethrough-divider"> <div className="strikethrough-di...
assets/js/routes/app-routes.react.js
Nosferatu-lib/nosferatu-reactjs-auth
import React from 'react'; import Router from 'react-router'; import Master from '../layouts/master.react'; import Home from '../layouts/home.react'; var {Route, DefaultRoute} = Router; var AppRoutes = ( <Route name="root" path="/" handler={Master}> <DefaultRoute handler={Home} /> </Route> ); export default ...
sandbox/graphqlVersion/client/components/ecTranslatorHeader.js
guigrpa/mady
// @flow /* eslint-env browser */ import timm from 'timm'; import React from 'react'; import Relay, { graphql } from 'react-relay'; import throttle from 'lodash/throttle'; import { getScrollbarWidth, flexItem, flexContainer, Icon, Select } from 'giu'; import type { Choice } from 'giu/lib/gral/types'; import type { Vie...
web/client/configdev/src/config/LogFile.js
project-owner/Peppy
/* Copyright 2021 Peppy Player peppy.player@gmail.com This file is part of Peppy Player. Peppy Player is free software: 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 (at your option) any la...
modules/TransitionHook.js
leeric92/react-router
import React from 'react'; import warning from 'warning'; var { object } = React.PropTypes; var TransitionHook = { contextTypes: { router: object.isRequired }, componentDidMount() { warning( typeof this.routerWillLeave === 'function', 'Components that mixin TransitionHook should have a rou...
examples/example-with-styleguidist/src/components/Button/Button.js
risetechnologies/fela
import React from 'react' import PropTypes from 'prop-types' import { createComponent } from 'react-fela' // declare fela styles const __buttonStyle = props => ({ padding: '.5em 1.5em', color: `${props.color || props.theme.colorGrey}`, 'background-color': props.theme.colorWhite, border: '1px solid currentColor...
actor-apps/app-web/src/app/components/activity/UserProfileContactInfo.react.js
tsdl2013/actor-platform
import _ from 'lodash'; import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; const {addons: { PureRenderMixin }} = addons; @ReactMixin.decorate(PureRenderMixin) class UserProfileContactInfo extends React.Component { static propTypes = { phones: React.PropTypes.arr...
src/entry-points/client.js
StevenLangbroek/react-redux-starter-kit
import React from 'react'; import App from 'containers/app'; import { history } from 'react-router/lib/BrowserHistory'; React.render(<App history={history} />, document.getElementById('mount'));
examples/huge-apps/routes/Calendar/components/Calendar.js
calebmichaelsanchez/react-router
import React from 'react'; class Calendar extends React.Component { render () { var events = [{ id: 0, title: 'essay due' }]; return ( <div> <h2>Calendar</h2> <ul> {events.map(event => ( <li key={event.id}>{event.title}</li> ))} </ul> ...
src/web/Line/Line.js
Krizzu/react-progressor
import React from 'react'; import propTypes from 'prop-types'; import { Container, Track, CompletedTrack } from './helpers/subComponents'; class LineProgressor extends React.Component { valueInterpolate = (val) => { const { width = 150 } = this.props; return ((val / 100) * width); } render() { cons...
app/jsx/bundles/terms_of_service_modal.js
djbender/canvas-lms
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
assets/javascripts/kitten/components/graphics/icons/burger-icon/index.js
KissKissBankBank/kitten
import React from 'react' import classNames from 'classnames' import PropTypes from 'prop-types' import styled from 'styled-components' import COLORS from '../../../../constants/colors-config' import deprecated from 'prop-types-extra/lib/deprecated' const StyledItem = styled.svg` overflow: visible; fill: var(--bu...
app/javascript/mastodon/features/compose/components/upload.js
masto-donte-com-br/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } fr...
src/pages/AnswerQuestion/AnswerQuestion.js
imcvampire/simple-online-form
import React from 'react' import { Container, } from 'react-grid-system' import { RaisedButton } from 'material-ui' import axios from 'axios' import isEqual from 'lodash.isequal' import Question from '../../components/Question' import { MultipleChoiceQuestion, MultipleSelectionQuestion, } from '../../utils/const...
ui/routes.js
danjac/random-movies
import React from 'react'; import { Router, Route, IndexRoute } from 'react-router'; import { App, Movie, MovieList, NotFound } from './components'; export default function (history) { return ( <Router history={history}> <Route path="/" component={App}> <IndexRoute component={MovieList} /> ...
packages/react/src/components/DataTable/__tests__/TableCell-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 React from 'react'; import { mount } from 'enzyme'; import { Table, TableBody, TableRow, TableCell } from '../'; describe('DataTable....
src/EventCell.js
intljusticemission/react-big-calendar
import PropTypes from 'prop-types' import React from 'react' import clsx from 'clsx' import * as dates from './utils/dates' class EventCell extends React.Component { render() { let { style, className, event, selected, isAllDay, onSelect, onDoubleClick, localizer, ...
src/main/script/Index.js
TomG713/willitconnect
/* eslint-env browser */ import React from 'react'; import ReactDOM from 'react-dom'; import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux' import thunk from 'redux-thunk'; import EntryBox from './EntryBox'; import reducers from './reducers'; require('bootstrap/dist/css/bootstra...
src/Avatar/Avatar.spec.js
hwo411/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import Avatar from './Avatar'; import getMuiTheme from '../styles/getMuiTheme'; describe('<Avatar />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (node) => shallow(node, {context: ...
frontend/src/Movie/Index/Posters/Options/MovieIndexPosterOptionsModalContent.js
Radarr/Radarr
import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Form from 'Components/Form/Form'; import FormGroup from 'Components/Form/FormGroup'; import FormInputGroup from 'Components/Form/FormInputGroup'; import FormLabel from 'Components/Form/FormLabel'; import Button ...
docs/app/Examples/modules/Dropdown/Usage/DropdownExampleMultipleCustomLabel.js
shengnian/shengnian-ui-react
import React from 'react' import { Dropdown } from 'shengnian-ui-react' const options = [ { key: 1, text: 'One', value: 1 }, { key: 2, text: 'Two', value: 2 }, { key: 3, text: 'Three', value: 3 }, ] const renderLabel = label => ({ color: 'blue', content: `Customized label - ${label.text}`, icon: 'check', ...
src/svg-icons/av/videocam-off.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvVideocamOff = (props) => ( <SvgIcon {...props}> <path d="M21 6.5l-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2L2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3...
src/Parser/Druid/Balance/Modules/Items/Tier20_2set.js
hasseboulen/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import Combatants from 'Parser/Core/Modules/Combatants'; import Analyzer from 'Parser/Core/Analyzer'; import HIT_TYPES from 'Parser/Core/HIT_TYPES'; import getDamageBonus f...
spec/components/app_bar.js
soyjavi/react-toolbox
import React from 'react'; import AppBar from '../../components/app_bar'; const AppBarTest = () => ( <section> <h5>AppBar</h5> <br/> <AppBar title='Title' /> <br/> <AppBar leftIcon='menu' title='Title' /> <br/> <AppBar leftIcon='arrow_back' title='Title' rightIcon='close' /> <br/> ...
app/javascript/mastodon/components/load_more.js
palon7/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class LoadMore extends React.PureComponent { static propTypes = { onClick: PropTypes.func, visible: PropTypes.bool, } static defaultProps = { visible: true, } render() {...
src/svg-icons/action/line-weight.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionLineWeight = (props) => ( <SvgIcon {...props}> <path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"/> </SvgIcon> ); ActionLineWeight = pure(ActionLineWeight); ActionLineWeight.displayN...
docs/src/app/components/pages/components/Checkbox/ExampleSimple.js
spiermar/material-ui
import React from 'react'; import Checkbox from 'material-ui/Checkbox'; import ActionFavorite from 'material-ui/svg-icons/action/favorite'; import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border'; const styles = { block: { maxWidth: 250, }, checkbox: { marginBottom: 16, }, }; c...
src/components/Form/FancySelect/Dropdown.js
ilxanlar/cathode
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import BaseDropdown from '../../Dropdown/Dropdown'; import { selectableHelper } from '../../../helpers/utils'; class DropdownRaw extends React.Component { state = { focusedKey: 0 }; __mounted = false; op...
packages/reactor-tests/src/tests/rel/RelUpdate.js
sencha/extjs-reactor
import React, { Component } from 'react'; import { Container, Button, Menu, MenuItem } from '@extjs/ext-react'; export default class RelUpdate extends Component { state = { showMenu: false } toggleMenu = () => { this.setState({ showMenu: !this.state.showMenu }) } render() { ...
app/components/devices.component.js
karlitos/Android-Adb-Tweaker
import React from 'react'; class DeviceListItem extends React.Component { render() { return ( <li className="list-group-item"> <div className="media-body device-list-element"> <span className="icon icon-mobile device-list-device-icon pull-left"></span> ...
frontend/app/js/components/service/index.js
serverboards/serverboards
import React from 'react' import ServiceCards from 'app/containers/service/cards' import ServiceTable from 'app/containers/service/table' import Loading from 'app/components/loading' import Empty from './empty' import Tip from '../tip' import {i18n} from 'app/utils/i18n' import ServiceDetails from 'app/containers/servi...
app/js/__tests__/app-container.js
jaydurant/GetCarrot
jest.unmock('../components/app-container'); import React from 'react'; import TestUtils from 'react-addons-test-utils'; import AppContainer from '../components/app-container'; describe('AppContainer',() => { const renderer = TestUtils.createRenderer(); renderer.render(<AppContainer />); let RenderedTree = renderer...
src/controls/ColorPicker/__test__/colorPickerTest.js
michalko/draft-wyswig
/* @flow */ import React from 'react'; import { EditorState, convertFromHTML, ContentState, } from 'draft-js'; import { expect, assert } from 'chai'; import { mount } from 'enzyme'; import ColorPicker from '..'; import defaultToolbar from '../../../config/defaultToolbar'; import ModalHandler from '../../../even...
actor-apps/app-web/src/app/components/ActivitySection.react.js
amezcua/actor-platform
import React from 'react'; import classNames from 'classnames'; import { ActivityTypes } from 'constants/ActorAppConstants'; import ActivityStore from 'stores/ActivityStore'; import UserProfile from 'components/activity/UserProfile.react'; import GroupProfile from 'components/activity/GroupProfile.react'; const getS...
src/controls/lookup2/lookup.js
thinktopography/reframe
import Format from '../../utils/format' import PropTypes from 'prop-types' import Search from './search' import React from 'react' import _ from 'lodash' class Lookup extends React.Component { static contextTypes = { form: PropTypes.object } static propTypes = { active: PropTypes.any, defaultValue:...
test/helpers/shallowRenderHelper.js
chickencyj/gallery-by-react
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
app/javascript/mastodon/features/account_timeline/index.js
ashfurrow/mastodon
import React from 'react'; import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { lookupAccount, fetchAccount } from '../../actions/accounts'; import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/time...
test/PaginationSpec.js
Firfi/meteor-react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Pagination from '../src/Pagination'; describe('Pagination', function () { it('Should have class', function () { let instance = ReactTestUtils.renderIntoDocument( <Pagination>Item content</Pagination> ); assert....
node_modules/react-bootstrap/es/Label.js
WatkinsSoftwareDevelopment/HowardsBarberShop
import _Object$values from 'babel-runtime/core-js/object/values'; 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-...
src/js/components/icons/base/DocumentThreat.js
odedre/grommet-final
/** * @description DocumentThreat SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor....
public/js/src/main.js
jiadams/wjf-portfolio
import React from 'react'; // eslint-disable-line no-unused-vars import ReactDOM from 'react-dom'; import WorksBox from './components/works-box'; // eslint-disable-line no-unused-vars (function( $ ) { // eslint-disable-line no-unused-vars 'use strict'; /** * All of the code for your public-facing Jav...
example/src/pages/MapProps.js
ethanselzer/react-touch-position
import React, { Component } from 'react'; import { Col, Grid, Jumbotron, Row } from 'react-bootstrap'; import Helmet from 'react-helmet'; import MapProps from '../components/MapProps'; import Header from '../components/Header'; import 'bootstrap/dist/css/bootstrap.css'; import '../../styles/app.css'; class ...