path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/SubCheck.js | benuchadnezzar/subway-checker | // We're controlling all of our state here and using children
// components only to return lists and handle AJAX calls.
import React, { Component } from 'react';
import SubList from './SubList';
import StopList from './StopList';
import { DelayN, DelayS } from './IsDelay';
class SubCheck extends Component {
constr... |
src/pure-component.js | Monar/react-immutable-pure-component | import React from 'react';
import { check } from './check';
export class ImmutablePureComponent extends React.Component {
shouldComponentUpdate(nextProps, nextState = {}) {
return (
!check(this.updateOnProps, this.props, nextProps, 'updateOnProps') ||
!check(this.updateOnStates, this.state, nextState... |
app/components/Home.js | zanjs/newedenfaces-react | import React from 'react';
import {Link} from 'react-router';
import HomeStore from '../stores/HomeStore'
import HomeActions from '../actions/HomeActions';
import {first, without, findWhere} from 'underscore';
class Home extends React.Component {
constructor(props) {
super(props);
this.state = HomeStore.getS... |
sms_sponsorship/webapp/src/components/CenteredLoading.js | CompassionCH/compassion-modules | import React from 'react';
import Typography from '@material-ui/core/Typography';
import CircularProgress from '@material-ui/core/CircularProgress';
export default class extends React.Component {
render() {
let styles = {
loadingContainer: {
marginTop: '120px',
},
... |
src/server.js | fkenk/Majsternia | /**
* 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 path from 'path';
import Promise from 'bluebird'... |
src/components/Modal/__tests__/ConfirmModal.spec.js | dovydasvenckus/time-tracker-web | import React from 'react';
import { shallow } from 'enzyme';
import ConfirmModal from '../ConfirmModal';
describe('Confirm modal', () => {
let wrapper;
it('should be not active, when isOpen=false', () => {
wrapper = shallow(
<ConfirmModal
isOpen={false}
confirmAction={() => {}}
c... |
src/components/StoneQuest/July2012.js | mattschwartz/mattschwartz | import React from 'react'
import stonequest1 from '../../res/worldsbetween/stonequest_july_2012.png'
import ImagePreview from './ImagePreview';
import EntryHeading from './EntryHeading';
export default () => (
<>
<EntryHeading>July 2012</EntryHeading>
<p>
With my first semester at UT ... |
App.js | caesai/sushka-chat | import React from 'react';
import MainBox from './components/MainBox';
import UsersList from './components/UsersList';
import UserProfile from './components/UserProfile';
import * as actions from './actions/actions';
import { connect } from 'react-redux';
import store from './store/store';
import * as styles from './sc... |
app/javascript/pawoo/components/suggested_accounts_page.js | pixiv/mastodon | import PropTypes from 'prop-types';
import React from 'react';
import { defineMessages, injectIntl } from 'react-intl';
import Column from '../../mastodon/features/ui/components/column';
import SuggestedAccountsContainer from '../containers/suggested_accounts_container';
const messages = defineMessages({
title: { id... |
src/components/Header/Header.js | stinkyfingers/IsoTest | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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, { Component } from 'react';
import withStyle... |
08-create-a-sidebar/components/App/index.js | nodeyu/jason-react-router-demos-v4 | import React from 'react';
import { BrowserRouter, Link, Route } from 'react-router-dom';
import style from './style.css'
import routes from '../../routes/routes';
class App extends React.Component {
render() {
return(
<BrowserRouter>
<div className={style.main_wrapper}>
... |
examples/CustomPicker/index.ios.js | thegamenicorus/react-native-phone-input | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import App from './app'
AppRegistry.registerComponent('CustomPicker', () => App); |
src/routes/Auth/containers/ChangePassEditorContainer.js | wkozyra95/react-boilerplate | /* @flow */
import React from 'react';
import { connect } from 'react-redux';
import { FormInput } from 'components/Form';
import RaisedButton from 'material-ui/RaisedButton';
import { t } from 'i18n';
import Style from 'styles';
import selector from '../selector';
import { actionCreator } from '../reducer';
type Pro... |
pootle/static/js/auth/components/EmailConfirmation.js | claudep/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';
import { PureRenderMixin } from... |
examples/todomvc/index.js | BayanGroup/redux | import 'babel/polyfill';
import React from 'react';
import Root from './containers/Root';
import 'todomvc-app-css/index.css';
React.render(
<Root />,
document.getElementById('root')
);
|
docs/src/app/components/pages/components/Stepper/VerticalNonLinearStepper.js | manchesergit/material-ui | import React from 'react';
import {
Step,
Stepper,
StepButton,
StepContent,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* A basic vertical non-linear implementation
*/
class VerticalNonLinear extends React.Component {... |
src/interface/others/ReportSelecter.js | FaideWW/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import { Trans } from '@lingui/macro';
import ReactTooltip from 'react-tooltip';
import { t } from '@lingui/macro';
import REGION_CODES from 'common/REGION_CODES';
import { i... |
test/integration/stepper/verticalStepper.spec.js | tan-jerene/material-ui | /* eslint-env mocha */
import React from 'react';
import {mount} from 'enzyme';
import {assert} from 'chai';
import getMuiTheme from 'src/styles/getMuiTheme';
import VerticalLinearStepper from '../fixtures/VerticalLinearStepper';
describe('Vertical Stepper', () => {
const muiTheme = getMuiTheme();
const mountWithC... |
src/svg-icons/action/find-in-page.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFindInPage = (props) => (
<SvgIcon {...props}>
<path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5... |
app/components/ImageSlider.js | Byte-Code/lm-digital-store-private-test | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Slider from 'react-slick';
import Image from './Image';
const settings = {
infinite: false,
slidesToShow: 1,
slidesToScroll: 1,
speed: 100,
arrows: false,
dots: ... |
App/node_modules/react-navigation/src/views/withNavigation.js | Dagers/React-Native-Differential-Updater | /* @flow */
import React from 'react';
import propTypes from 'prop-types';
import hoistStatics from 'hoist-non-react-statics';
import type { NavigationState, NavigationAction } from '../TypeDefinition';
type Context = {
navigation: InjectedProps<NavigationState, NavigationAction>,
};
type InjectedProps = {
navi... |
actor-apps/app-web/src/app/components/modals/invite-user/ContactItem.react.js | sc4599/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import classnames from 'classnames';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ContactItem extends React.Com... |
src/public/components/list/index.js | Harrns/segta | import React from 'react'
import TorrentList from './torrent'
import FileList from './file'
export default class List extends React.Component {
constructor (props) {
super(props)
}
render () {
return (
<div className="lists" id={this.props.id}>
<TorrentList />
<FileList />
<... |
packages/react-instantsearch-dom/src/components/__tests__/Pagination.js | algolia/react-instantsearch | import React from 'react';
import renderer from 'react-test-renderer';
import Enzyme, { mount } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Link from '../Link';
import Pagination from '../Pagination';
Enzyme.configure({ adapter: new Adapter() });
const REQ_PROPS = {
createURL: ()... |
examples/react-hello/test/lib/index.js | chrisbuttery/tdd-es6-react | import test from 'tape';
import React from 'react';
import dom from 'cheerio';
import hello from '../../source/hello';
import createActions from '../fixtures/create-actions';
const renderText = React.renderToStaticMarkup;
test('Hello component', nest => {
nest.test('...with no props', assert => {
const Hello =... |
assets/javascripts/kitten/components/action/social-button-icon/index.js | KissKissBankBank/kitten | import React from 'react'
import { Button } from '../../action/button'
import { FacebookIcon } from '../../graphics/icons/facebook-icon'
import { TwitterIcon } from '../../graphics/icons/twitter-icon'
import { LinkedinIcon } from '../../graphics/icons/linkedin-icon'
import { InstagramIcon } from '../../graphics/icons/i... |
src/Parser/DeathKnight/Blood/Modules/Items/T20_2pc.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
class T20_2pc exte... |
frontend/src/Artist/Delete/DeleteArtistModalContent.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FormGroup from 'Components/Form/FormGroup';
import FormInputGroup from 'Components/Form/FormInputGroup';
import FormLabel from 'Components/Form/FormLabel';
import Icon from 'Components/Icon';
import Button from 'Components/Link/Button'... |
imports/ui/components/JournalFees/JournalFees.js | jamiebones/Journal_Publication | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Table, Alert, Button , Col , Label , Well , HelpBlock ,
Row , FormGroup , InputGroup , } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';
import { Bert } from 'meteor/themeteorchef:be... |
app/components/views/members/EditMemberDataR.js | AidanNichol/stedwards-booking-system | // require('sass/watermark.scss');
import 'sass/editMember.scss';
import * as i from 'icepick';
import React from 'react';
import {Field, reduxForm, formValueSelector, getFormValues, isDirty} from 'redux-form';
import {connect} from 'react-redux';
import classnames from 'classnames';
import TooltipButton from 'utili... |
src/platform/site-wide/header/components/App/index.unit.spec.js | department-of-veterans-affairs/vets-website | // Node modules.
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
// Relative imports.
import { App } from '.';
describe('Header <App>', () => {
it('renders legacy header when our width is more than 768px', () => {
// Set up.
window.innerWidth = 768;
const wrapp... |
app/client/src/scenes/ManageActionComposeMessage/ManageActionComposeMessage.js | uprisecampaigns/uprise-app | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { compose, graphql } from 'react-apollo';
import FontIcon from 'material-ui/FontIcon';
import ComposeMessage from 'components/ComposeMessage';
import Link from 'components/Link';
import s from ... |
tests/client/admin/containers/TestApp.js | squarewave/addons-frontend | import config from 'config';
import React from 'react';
import cookie from 'react-cookie';
import { AppBase, mapDispatchToProps, mapStateToProps } from 'admin/containers/App';
import { shallowRender } from 'tests/client/helpers';
describe('App', () => {
it('renders its children', () => {
class MyComponent exten... |
src/components/Slide.js | prjctrft/mantenuto | import React from 'react';
import PropTypes from 'prop-types';
import Transition from 'react-transition-group/Transition';
const defaultStyles = {
width: '100%',
height: '100%'
}
const transitionStyles = (duration) => ({
'entering': {
transform: 'translate(100vw)'
},
'entered': {
transform: 'transla... |
www/src/components/WeightForm.js | savannidgerinel/health | import React from 'react';
import math from 'mathjs';
import { isSomething, renderWeight, parseUnit } from '../common'
import { TextEditForm } from './ValidatedText'
export class WeightForm extends React.Component {
render () {
return (isSomething(this.props.value))
? <p> {renderWeight(this.pr... |
src/components/Question/List.js | maloun96/react-admin | import React from 'react';
import {render} from 'react-dom';
class List extends React.Component {
constructor(props){
super(props);
}
removeCompany(id){
axios.get('home/delete/' + id).then(res => {
this.props.removeCompany(id);
});
}
editCompany(id){
this.props.onEditCompany(id);
}
render(){
... |
node_modules/react-color/examples/Sketch.js | premcool/getmydeal | 'use strict'
import React from 'react'
import reactCSS from 'reactcss'
import { SketchPicker } from 'react-color'
class SketchExample extends React.Component {
state = {
displayColorPicker: false,
color: {
r: '241',
g: '112',
b: '19',
a: '1',
},
};
handleClick = () => {
... |
utils/typography.js | danheadforcode/fg-gatsby | import ReactDOM from 'react-dom/server'
import React from 'react'
import Typography from 'typography'
import CodePlugin from 'typography-plugin-code'
import { MOBILE_MEDIA_QUERY } from 'typography-breakpoint-constants'
const options = {
baseFontSize: '18px',
baseLineHeight: 1.45,
scaleRatio: 2.25,
plugins: [ne... |
src/svg-icons/av/closed-caption.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvClosedCaption = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.5... |
src/index.js | yyssc/sanhu | import React from 'react';
import ReactDOM from 'react-dom';
/**
* Import the stylesheet you want used! Here we just reference
* the main SCSS file we have in the styles directory.
*/
import './styles/main.scss';
/**
* Both configureStore and Root are required conditionally.
* See configureStore.js and Root.js f... |
app/components/Chatlog.js | nesfe/electron-LAN-chat | import React, { Component } from 'react';
import utils from '../utils/utils';
export default class Chatlog extends Component {
componentDidUpdate() {
this.refs.chatlog.scrollTop = this.refs.chatlog.scrollHeight;
}
render() {
let nowIp = this.props.nowIp;
let items = [];
let arr = JSON.parse(loc... |
src/App.js | gauriramesh/budgetbuddy | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './App.css';
import CategoryButton from './CategoryButton.js';
import Budget from './Budget.js';
import CategoryEntry from './Entry.js';
class App extends Component {
render() {
return (
<div className="App">
<Ove... |
templates/rubix/laravel/laravel-example/src/routes/AllTodos.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import { Link } from 'react-router';
import Todo from '../components/Todo';
import TodoForm from '../components/TodoForm';
import {
Row,
Col,
Grid,
Panel,
PanelBody,
PanelContainer,
} from '@sketchpixy/rubix';
import client from '@sketchpixy/rubix/lib/utils/HttpClient';
expor... |
Tutorial/js/basic/1.props.js | onezens/react-native-repo | import React, { Component } from 'react';
import { AppRegistry, Image, Text, View } from 'react-native';
class Tutorial extends Component {
render() {
return (
<LotsOfGreeting />
);
}
}
class Greeting extends Component {
render() {
return (
<Text>Hello ! {this.props.name}</Text>
);
... |
apps/app/src/components/SmoothCodeLogo.js | argos-ci/argos | import React from 'react'
function SmoothCodeLogoLight(props) {
return (
<svg width={1011} height={204} viewBox="0 0 1011 204" {...props}>
<title>Smooth Code</title>
<defs>
<path
d="M135.775 119.34c-.78-1.213-1.17-2.383-1.17-3.51 0-1.733.91-3.207 2.73-4.42.867-.607 1.863-.91 2.99-.9... |
src/components/Calendar/CalendarSetup.js | Angular-Toast/habitat | import React, { Component } from 'react';
import { View, Text, Image, Button, Linking, TouchableOpacity } from 'react-native';
import { AuthSession } from 'expo';
import axios from 'axios';
import Ecosystem from '../Frontend/EcoSystem';
import CalendarTasks from './CalendarTasks';
export default class CalendarSetup e... |
app/components/App.js | csreyes/TLCJournal | import React from 'react';
import {RouteHandler} from 'react-router';
import Navbar from './Navbar';
class App extends React.Component {
render() {
return (
<div>
<RouteHandler />
</div>
);
}
}
export default App; |
tests/react_native_tests/test_data/native_code/Image/app/components/Mobile/component.js | ibhubs/sketch-components | /**
* @flow
*/
import React from 'react'
import PropTypes from 'prop-types'
import { observer } from 'mobx-react/native'
import styles from './styles'
import placeholder_image from '../../../images/placeholder_image.png'
import styled from 'styled-components/native'
import { Image } from 'react-native'
import { Vie... |
react/DownRightArrowIcon/DownRightArrowIcon.iconSketch.js | seekinternational/seek-asia-style-guide | import React from 'react';
import DownRightArrowIcon from './DownRightArrowIcon';
export const symbols = {
'DownRightArrowIcon': <DownRightArrowIcon />
};
|
platform/viewer/src/googleCloud/DicomStorePickerModal.js | OHIF/Viewers | import React from 'react';
import PropTypes from 'prop-types';
import DatasetSelector from './DatasetSelector';
import './googleCloud.css';
import { withTranslation } from 'react-i18next';
import * as GoogleCloudUtilServers from './utils/getServers';
import { servicesManager } from './../App.js';
function DicomStoreP... |
node_modules/native-base/Components/Widgets/H3.js | mk007sg/threeSeaShells | /* @flow */
'use strict';
import React from 'react';
import Text from './Text';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
export default class H3NB extends NativeBaseComponent {
propTypes: {
style : React.PropTypes.object
}
... |
node_modules/react-bootstrap/es/ModalDialog.js | yeshdev1/Everydays-project | 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 ... |
source/components/Buttons/LoadMoreButton.js | mikey1384/twin-kle | import PropTypes from 'prop-types';
import React from 'react';
import Button from 'components/Button';
import Icon from 'components/Icon';
import ErrorBoundary from 'components/Wrappers/ErrorBoundary';
import { css } from 'emotion';
LoadMoreButton.propTypes = {
label: PropTypes.string,
style: PropTypes.object,
o... |
src/Parser/Core/Modules/Items/GnawedThumbRing.js | mwwscott0/WoWAnalyzer | import React from 'react';
import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS_OTHERS';
import Module from 'Parser/Core/Module';
import calculateEffectiveHealing from 'Parser/Core/calculateEffectiveHealing';
import Combatants from 'Parser/Core/Modules/Combatants';
const GNAWED_THUMB_RING_HEALING_INCR... |
MARVELous/client/src/js/components/characterSelect/characterList.js | nicksenger/StackAttack2017 | import React from 'react';
import CharacterScroller from '../characterScroller/index';
const CharacterList = (props) => (
<article>
<header>
<h2>Select a character:</h2>
</header>
<CharacterScroller characters={props.characters} />
</article>
);
export default CharacterList;
|
src/App/demo2/routes/app.js | zhouyi318/dva-multiple-entry-demo | import React from 'react';
import { connect } from 'dva';
import Count from '../components/Count';
// import styles from './app.less';
function App(props) {
return (
<div>
{ /* models 传给组件 */ }
<Count props={ props } />
</div>
)
}
// 将数据吐出给组件props
function mapStateToProps(state) {
... |
src/client/search/SearchResultEmptyMessage.js | busyorg/busy | import React from 'react';
import { FormattedMessage } from 'react-intl';
const SearchResultEmptyMessage = () => (
<div className="Search__message-container">
<FormattedMessage
id="no_search_results_found"
defaultMessage="No results were found for your search."
/>
</div>
);
export default Sear... |
packages/react-devtools-shell/src/app/InspectableElements/CustomObject.js | flarnie/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 React from 'react';
class Custom {
_number = 42;
get number() {
return this._number;
}
}
export def... |
app/components/Editor.js | christianalfoni/TeachKidsCode | import React from 'react';
import {Mixin} from 'cerebral-react-immutable-store';
import MTRC from 'markdown-to-react-components';
import {
Row,
Col,
Input,
Button
} from 'react-bootstrap';
MTRC.configure({});
const TextareaStyle = {
outline: 'none',
width: '100%',
height: 'calc(100% - 49px)',
resize: ... |
Mr.Mining/MikeTheMiner/Santas_helpers/Sia_wallet/resources/app/plugins/Files/js/components/searchfield.js | patel344/Mr.Miner | import PropTypes from 'prop-types'
import React from 'react'
const SearchField = ({searchText, path, actions}) => {
const onSearchChange = (e) => actions.setSearchText(e.target.value, path)
return (
<div className="search-field">
<input value={searchText} autoFocus onChange={onSearchChange} />
<i className="... |
test/test_helper.js | auldsyababua/react-tube | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
js/src/views/Home/News/news.spec.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... |
stories/Combobox/AutoCompleteComboboxDemo.js | propertybase/react-lds | import React, { Component } from 'react';
import { without } from 'lodash-es';
import { BASE_ITEMS } from './constants';
import { AutoCompleteCombobox } from '../../src';
const mockItems = BASE_ITEMS.map((item, i) => ({
...item,
isDisabled: i === 2,
}));
export class AutoCompleteComboboxDemo extends Component {
... |
js/barber/ScheduleBuilder.js | BarberHour/barber-hour | import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
StatusBar,
TextInput,
Switch,
TimePickerAndroid,
ScrollView,
ActivityIndicator,
Platform,
Modal,
DatePickerIOS
} from 'react-native';
import dismissKeyboard from 'dismissKeyboard';
import { connect } from 'react-redux';
... |
src/svg-icons/action/invert-colors.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionInvertColors = (props) => (
<SvgIcon {...props}>
<path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 1... |
docs/src/app/components/pages/components/CircularProgress/ExampleSimple.js | verdan/material-ui | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
const CircularProgressExampleSimple = () => (
<div>
<CircularProgress />
<CircularProgress size={60} thickness={7} />
<CircularProgress size={80} thickness={5} />
</div>
);
export default CircularProgressExampleSim... |
src/svg-icons/social/sentiment-satisfied.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentSatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S1... |
EventEmitter.Client/tests/layouts/CoreLayout.spec.js | Stelmashenko-A/EventEmitter | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
react/features/device-selection/components/DeviceSelectionDialog.js | KalinduDN/kalindudn.github.io | import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
setAudioInputDevice,
setAudioOutputDevice,
setVideoInputDevice
} from '../../base/devices';
import { hideDialog } from '../../base/dialog';
import DeviceSelectionDialogBase from './DeviceSelectionDialogBase';
/**
*... |
client/extensions/woocommerce/woocommerce-services/views/label-settings/label-payment-method.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import { localize } from 'i18n-calypso';
/**
* Internal dependencies
*/
import FormCheckbox from 'components/forms/form-checkbox';
import CompactCard from 'components/card/compact';
import PaymentLogo fro... |
benchmarks/src/implementations/radium/Dot.js | rofrischmann/fela | /* eslint-disable react/prop-types */
import Radium from 'radium';
import React from 'react';
const Dot = ({ size, x, y, children, color }) => (
<div
style={[
styles.root,
{
borderBottomColor: color,
borderRightWidth: `${size / 2}px`,
borderBottomWidth: `${size / 2}px`,
... |
src/main.js | mikearnaldi/react-starter | import 'rxjs/add/operator/filter'
import 'rxjs/add/operator/map'
import 'rxjs/add/operator/debounce'
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { AppContainer } from 'react-hot-loader'
import store from './redux/store'
import App from './App'
import Wrapper... |
__tests__/components/Button-test.js | codeswan/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import renderer from 'react/lib/ReactTestRenderer';
import Button from '../../src/js/components/Button';
import FakeIcon from '../mocks/FakeIcon';
describe('Button', () => {
it('has correct default options', () => {
... |
frontend/modules/recipe/components/Directions.js | rustymyers/OpenEats | import React from 'react'
import PropTypes from 'prop-types'
const Directions = ({ data }) => {
let directions = [];
data.split("\n").map((direction, i) => {
if (direction.length > 0) {
directions.push(
<li className="direction" key={ i }>
{ direction }
</li>
);
}
})... |
src/svg-icons/alert/add-alert.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AlertAddAlert = (props) => (
<SvgIcon {...props}>
<path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v... |
src/layouts/PageLayout/index.js | ligangwolai/blog | import React from 'react'
import PropTypes from 'prop-types'
export default class PageLayout extends React.Component {
render () {
return (
<div>
{this.props.children}
</div>
)
}
}
PageLayout.propTypes = {
children: PropTypes.any
}
|
test/ColSpec.js | HorizonXP/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Col from '../src/Col';
describe('Col', function () {
it('Should set Offset of zero', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Col xsOffset={0} smOffset={0} mdOffset={0} lgOffset={0} />
);
... |
test/CollapsibleNavSpec.js | westonplatter/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Navbar from '../src/Navbar';
import CollapsibleNav from '../src/CollapsibleNav';
import Nav from '../src/Nav';
import NavItem from '../src/NavItem';
describe('CollapsibleNav', () => {
it('Should create div and add collapse class... |
src/react/AdminPanel.js | laundree/laundree | // @flow
import React from 'react'
import { Link } from 'react-router-dom'
import sdk from '../client/sdk'
import { FormattedMessage } from 'react-intl'
import Switch from './Switch'
import Debug from 'debug'
import type { Stats, Laundry, User, State } from 'laundree-sdk/lib/redux'
import type { ListOptions } from 'lau... |
src/js/redux/components/TodoApp.js | daigof/react-redux | import React from 'react'
import Footer from './Footer'
import AddTodo from '../containers/AddTodo'
import VisibleTodoList from '../containers/VisibleTodoList'
const TodoApp = () => (
<div className='panel panel-default'>
<div className='panel-heading'>Todo App</div>
<div className='panel-body'>
<AddTo... |
mine-data/src/LoginForm/LoginForm.js | BerlingskeMedia/nyhedsbreveprofil | import React from 'react';
import {connect} from 'react-redux';
import {login, resetLogin, setPassword, setUsername} from './login.actions';
import SubmitButton from '../SubmitButton/SubmitButton';
import {Link} from 'react-router-dom';
import {FormInput} from '../Form/FormInput';
import {LogoutLink} from '../logout/Lo... |
client/components/MapGeometryEditor/index.js | DarkHorseJP/RPGScenarist | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
class MapGeometryEditor extends React.PureComponent {
render() {
return (
<div className={this.props.className}>
MapGeometryEditor
</div>
)
}
}
MapGeometryEditor.propTypes = {
classNam... |
docs/src/HomePage.js | pivotal-cf/react-bootstrap | import React from 'react';
import NavMain from './NavMain';
import PageFooter from './PageFooter';
import Grid from '../../src/Grid';
import Alert from '../../src/Alert';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
export default class HomePage extends React.Component{
render()... |
app/containers/WelcomePage.js | soosgit/vessel | // @flow
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Welcome from '../components/Welcome';
import * as KeyActions from '../actions/keys';
import * as PreferencesActions from '../actions/preferences';
class WelcomePage extends Comp... |
src/modules/page1/index.js | mtrabelsi/universal-javascript-boilerplate | import React from 'react'
if(typeof window === "object") {
require('./page.css')
}
const imgUrl = './image1.jpg';
export default React.createClass({
render() {
return <div className="page page1">Page 1 content {(typeof window === "object") && <img src={require(`${imgUrl}`)} />} </div>
}
})
|
app/addons/fauxton/navigation/components/Brand.js | michellephung/couchdb-fauxton | // 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, software
// distributed un... |
src/SystemMessage/__tests__/SystemMessage.js | abdurrahmanekr/react-chat-elements | import React, { Component } from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import SystemMessage from '../SystemMessage';
describe('SystemMessage component', () => {
it('should render without issues', () => {
const component = shallow(<SystemMessage />);
expect(component... |
packages/xo-web/src/common/xo/snapshot-vm-modal/index.js | vatesfr/xo-web | import _ from 'intl'
import React from 'react'
import BaseComponent from 'base-component'
import { compileTemplate } from '@xen-orchestra/template'
import { connectStore } from 'utils'
import { Container, Col, Row } from 'grid'
import { createGetObjectsOfType } from 'selectors'
import { forEach } from 'lodash'
const R... |
src/components/page-elements/header.js | sunpietro/LeagueManager | import React, { Component } from 'react';
import '../../css/components/page-elements/header.css';
class Header extends Component {
render() {
return (
<header className="component--header">
<h2 className="component--header__subtitle">{this.props.subtitle}</h2>
</hea... |
src/components/baeder/BaederInfo.js | cismet/wupp-geoportal3-powerboats | import React from 'react';
import PropTypes from 'prop-types';
import InfoBox from '../commons/InfoBox';
import { getColorForProperties } from '../../utils/baederHelper';
import { triggerLightBoxForPOI } from '../../utils/stadtplanHelper';
import { Well } from 'react-bootstrap';
import { Icon } from 'react-fa';
import ... |
react-router-tutorial/lessons/11-productionish-server/modules/About.js | zerotung/practices-and-notes | import React from 'react'
export default React.createClass({
render() {
return <div>About</div>
}
})
|
src/index.js | lizzyphy/gallery-by-react | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
//alert('11111111111111');
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
//alert('aaaaaaaaaa');
|
es/components/style/cancel-button.js | vovance/3d-demo | 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; };
function _objectWithoutProperties(obj, keys) { var target = {... |
test/integration/prerender/pages/blocking-fallback-once/[slug].js | JeromeFitz/next.js | import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
export async function getStaticPaths() {
return {
paths: [],
fallback: 'blocking',
}
}
export async function getStaticProps({ params }) {
await new Promise((resolve) => setTimeout(resolve, 1000))
return {
... |
src/app/js/components/Weather.react.js | fcurella/redux-boilerplate | import React from 'react'
import { Address } from '../resources/common'
const Weather = React.createClass({
render() {
const locations = this.props.addresses.map((address, idx) => {
return (
<li key={idx}>
<span>{address.city}, {address.state}</span>
<a href="#" onClick={() => ... |
src/App.js | guzmonne/conapps-charts | import React, { Component } from 'react';
import logo from './_images/logo.svg';
import './_styles/App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to Rea... |
src/rsg-components/Pathline/PathlineRenderer.js | bluetidepro/react-styleguidist | import React from 'react';
import PropTypes from 'prop-types';
import copy from 'clipboard-copy';
import MdContentCopy from 'react-icons/lib/md/content-copy';
import ToolbarButton from 'rsg-components/ToolbarButton';
import Styled from 'rsg-components/Styled';
export const styles = ({ space, fontFamily, fontSize, colo... |
src/client/components/Content.js | hara-io/realtime-react-client | import React from 'react';
import DeviceList from './DeviceList';
import Device from './Device';
class Content extends React.Component {
constructor(props) {
super(props);
}
componentWillMount() {
}
componentWillUnmount() {
}
render() {
return (
<div id="pageContent">
<div id=... |
example/src/client.js | wyze/redux-debounce | import { Provider } from 'react-redux'
import { render } from 'react-dom'
import AppContainer from './containers/AppContainer'
import React from 'react'
import createStore from './redux'
const store = createStore()
render((
<Provider store={store}>
<AppContainer />
</Provider>
), document.getElementById('root... |
src/components/posts_show.js | hollymhofer/ReduxForms | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPost, deletePost } from '../actions';
import { Link } from 'react-router-dom';
class PostsShow extends Component {
componentDidMount() {
const { id } = this.props.match.params; // provided by react router
this.props.fe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.