path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
fields/types/text/TextColumn.js | andrewlinfoot/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var TextColumn = React.createClass({
displayName: 'TextColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
linkTo: React.PropType... |
app/javascript/mastodon/features/getting_started/index.js | danhunsaker/mastodon | import React from 'react';
import Column from '../ui/components/column';
import ColumnLink from '../ui/components/column_link';
import ColumnSubheading from '../ui/components/column_subheading';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import Prop... |
packages/material-ui-icons/legacy/SignalCellular1BarRounded.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M4.41 22H20c1.1 0 2-.9 2-2V4.41c0-.89-1.08-1.34-1.71-.71L3.71 20.29c-.63.63-.19 1.71.7 1.71z" /><path d="M12 12l-8.29 8.29c-.63.63-.19 1.71.7 1.71H12V12z" /></React.Fr... |
js/AppNavigator.js | mrcflorian/classbook |
import React, { Component } from 'react';
import { BackAndroid, StatusBar, NavigationExperimental, Platform } from 'react-native';
import { connect } from 'react-redux';
import { StyleProvider, variables, Drawer } from 'native-base';
import { actions } from 'react-native-navigation-redux-helpers';
import { Router, Sce... |
6.6.0/examples/remoteSubmit/dist/bundle.js | erikras/redux-form-docs | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__e... |
node_modules/react-navigation/src/routers/__tests__/StackRouter-test.js | RahulDesai92/PHR | /* @flow */
/* eslint no-shadow:0, react/no-multi-comp:0, react/display-name:0 */
import React from 'react';
import StackRouter from '../StackRouter';
import TabRouter from '../TabRouter';
import NavigationActions from '../../NavigationActions';
const ListScreen = () => <div />;
const ProfileNavigator = () => <div... |
src/js/components/list/index.js | Arlefreak/web_client.afk | import PropTypes from 'prop-types';
import React from 'react';
import Page from '../page';
import Row from '../row';
const List = ({ items, route, className }) => {
let classes = className + ' vertical-list';
return (
<ul className={classes}>
{items.map(item => <Row key={item.id} route={route} {...item} ... |
src/components/SessionInfo/__tests__/SessionInfo-test.js | retaxJS/retax-seed | import chai, { expect } from 'chai';
import mockery from 'mockery';
import dirtyChai from 'dirty-chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
chai.use(dirtyChai);
chai.use(sinonChai);
import { shallow, mount } from 'enzyme';
import React from 'react';
describe('SessionInfo', () => {
descri... |
src/Editor.js | opensourcegeek/react-bootstrap-table | import React from 'react';
var Editor=function(editable, attr, format, editorClass, defaultValue){
if(editable===true||typeof editable==="string"){//simple declare
var type=editable===true?'text':editable;
return (
<input {...attr} type={type} defaultValue={defaultValue}
... |
adminclient/src/index.js | typesettin/periodicjs.ext.reactapp | import React from 'react';
import ReactDOM from 'react-dom';
import 'whatwg-fetch';
import 'babel-polyfill';
import './util/local-storage-polyfill';
import App from './components/App/index';
import 'font-awesome/css/font-awesome.css';
import 'animate.css/animate.css';
import 'react-responsive-carousel/lib/styles/carous... |
app/javascript/mastodon/components/column_collapsable.js | ebihara99999/mastodon | import React from 'react';
import PropTypes from 'prop-types';
class ColumnCollapsable extends React.PureComponent {
static propTypes = {
icon: PropTypes.string.isRequired,
title: PropTypes.string,
fullHeight: PropTypes.number.isRequired,
children: PropTypes.node,
onCollapse: PropTypes.func,
}... |
src/components/Footer/Footer.js | max-gram/react-saga-universal | import React from 'react'
import PropTypes from 'prop-types'
import css from './Footer.css'
const Footer = (props) => {
return (
<footer className={css.mainFooter}>
<div>
Fork me on <a href="https://github.com/max-gram/react-saga-universal">Github</a>
</div>
</footer>
)
}
Footer.propT... |
client/components/SongDetail.js | andrewdacenko/try-graphql-relay | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { graphql } from 'react-apollo';
import fetchSong from '../queries/fetchSong';
import LyricCreate from './LyricCreate';
import LyricList from './LyricList';
class SongDetail extends Component {
renderNoSongFound() {
return ... |
tests/react_custom_funs/create_element.js | ylu1317/flow | // @flow
import React from 'react';
declare var any: any;
React.createElement(); // Error: Needs a minimum of two arguments.
React.createElement('div'); // OK
React.createElement(42); // Error: Number is not a valid component type.
React.createElement('div', {}); // OK
React.createElement(42, {}); // Error: Number i... |
src/components/EventListElement.js | frankmarineau/partyboard-front | import React from 'react';
import PhotoUpload from './PhotoUpload'
import SuccessPrompt from './SuccessPrompt'
import Gallery from './Gallery'
class EventListElement extends React.Component {
render() {
return (
<a href={`/#/events/${this.props.event.slug}/slideshow`} className="event">
<p classNa... |
src/svg-icons/notification/event-available.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationEventAvailable = (props) => (
<SvgIcon {...props}>
<path d="M16.53 11.06L15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17l5.94-5.94zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 ... |
src/components/oscillator.js | sk222sw/odin-react | // @flow
import React from 'react'
import {Waveforms} from './waveforms/Waveforms'
const Oscillator = ({
waveforms,
oscillator,
changeOscillator,
semi,
changeSemitoneOffset,
cent,
changeCentOffset,
}) => <div>
<Waveforms
waveforms={waveforms}
currentWaveform={oscillator.waveform}
onWaveform... |
client/src/modules/schedule/schedule.view.js | vitalyorlov/spreadsheet-core | 'use strict';
import React from 'react';
import ErrorCollector from './../../components/error-collector';
import WeekSchedule from './components/week-schedule.view';
import store from './schedule.store';
import bind from './../../infrastructure/store-connector';
import dispatcher from './../../infrastructure/dispatche... |
packages/material-ui-icons/src/TabUnselected.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let TabUnselected = props =>
<SvgIcon {...props}>
<path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-... |
packages/react-router-native/examples/Ambiguous.js | d-oliveros/react-router | import React from 'react'
import { StyleSheet, Text, AppRegistry, View } from 'react-native'
import { NativeRouter, Route, Link, Switch } from 'react-router-native'
const About = () => <Text style={styles.header}>About</Text>
const Company = () => <Text style={styles.header}>Company</Text>
const User = ({ match }) => ... |
test/PagerSpec.js | jamon/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Pager from '../src/Pager';
import PageItem from '../src/PageItem';
describe('Pager', function () {
it('Should output a unordered list as root element with class "pager"', function () {
let instance = ReactTestUtils.renderInt... |
docs/src/examples/modules/Popup/Variations/PopupExampleSize.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Icon, Popup } from 'semantic-ui-react'
const PopupExampleSize = () => (
<>
<Popup
trigger={<Icon circular name='heart' />}
content='Hello. This is a mini popup'
size='mini'
/>
<Popup
trigger={<Icon circular name='heart' />}
content='Hello. ... |
src/components/TinymceEditor.js | GeorgioWan/Oi | import React, { Component } from 'react';
import TinyMCE from '@realgeeks/react-tinymce';
export default class TinymceEditor extends Component {
constructor(props){
super(props);
}
handleEditorChange(e) {
if (this.props.onChange)
this.props.onChange(e.target.getContent());
}
render() {
c... |
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-forms-v3-text-glyphicon.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin} from './../common/common.js';
import InputWrapper from './internal/input-wrapper.js';
import TextInput from './internal/text-input.js';
import TextInputMixin from './mixins/text-input-mixin.js'
import ItemList from './internal/item-list.js';
import Backd... |
examples/real-world/containers/Root.js | aheuermann/redux | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from '../store/configureStore';
import App from './App';
import UserPage from './UserPage';
import RepoPage from './RepoPage';
const store = configureStore();
export de... |
src/index.js | ghrecommender/ghrecommender-frontend | // @flow strict
import 'raf/polyfill'
import 'whatwg-fetch'
import { isNil } from 'ramda'
import React from 'react'
import { render } from 'react-snapshot'
import Raven from 'raven-js'
import ReactGA from 'react-ga'
import App from './App'
ReactGA.initialize(process.env.REACT_APP_GA, {
debug: process.env.NODE_ENV... |
src/js/components/common/info-hint.js | michaelatmender/gui | import React from 'react';
import { InfoOutlined as InfoOutlinedIcon } from '@mui/icons-material';
const iconStyle = { verticalAlign: 'middle', margin: '0 6px 4px 0' };
export const InfoHint = ({ className = '', content, style = {} }) => (
<p className={`info icon ${className}`} style={style}>
<InfoOutlinedIco... |
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/expected.js | rekyyang/ArtificalLiverCloud | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
app/components/search/index.js | izonder/weather | // imports Style
import Style from './style.pcss';
// imports Base
import React from 'react';
export default class Search extends React.Component {
clickFetchButton() {
let {clickHandler} = this.props,
value = this.refs.search.value;
clickHandler(value);
}
render() {
... |
src/svg-icons/toggle/radio-button-checked.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonChecked = (props) => (
<SvgIcon {...props}>
<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3... |
src/svg-icons/action/lightbulb-outline.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLightbulbOutline = (props) => (
<SvgIcon {...props}>
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1... |
src/frontend/components/LeftColumn.js | gbgtech/gbgtechWeb | import React from 'react';
import EventsList from './EventsList';
const LeftColumn = React.createClass({
render() {
return (
<div className="left-column">
Coming up:<br />
<EventsList />
</div>
);
}
});
export default LeftColumn;
|
example/examples/DisplayLatLng.js | phantomlds/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import MapView, { MAP_TYPES } from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122... |
src/TreeContainer.js | chenthillrulz/react-tree-view | 'use strict';
import React from 'react';
import TreeNode from './TreeNode';
class TreeContainer extends React.Component {
constructor(props) {
super(props);
this.state = {selectedNodeId: undefined};
this.hasInitializedIds = false;
}
onSelectionChanged (node) {
//console.l... |
test/unit/components/UI/Bar.spec.js | LN-Zap/zap-desktop | import React from 'react'
import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
import { Bar } from 'components/UI'
describe('component.UI.Bar', () => {
it('should render correctly', () => {
const tree = renderWithTheme(<Bar />).toJSON()
expect(tree).toMatchSnapshot()
})
})
|
examples/js/custom/pagination/custom-size-per-page.js | prajapati-parth/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-console: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn, SizePerPageDropDown } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = ... |
react-native/PropertyFinder/__tests__/index.ios.js | vanyaland/react-demos | 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/lang.js | flywingdevelopers/rn-naive | /**
* Simple Language Translation
* Kevin Lee 5 Sept 2017
*
* Usage:
* this.lang = new Lang()
* // Load Resource,
* this.lang.loadObject(obj) where obj is an Javascript Object
* this.lang.loadString(str) where str is text literal
* this.lang.loadURI(uri, uponComplete) where uri is external resource
* ... |
src/js/components/icons/base/Host.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/svg-icons/av/replay.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/>
</SvgIcon>
);
AvReplay = pure(AvReplay);
AvReplay... |
src/routes/register/Register.js | veskoy/ridiko | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
app/javascript/mastodon/features/ui/components/column_subheading.js | SerCom-KC/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
|
app/jsx/external_apps/components/ConfigurationFormUrl.js | venturehive/canvas-lms | /*
* Copyright (C) 2014 - 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... |
client/modules/core/components/header.js | Entropy03/jianwei | import React from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import RaisedButton from 'material-ui/RaisedButton';
import IconButton from 'material-ui/IconButton';
import NavigationClose from 'material-ui/svg-icons/navigation/close';
import Divider from 'material-ui/Di... |
packages/react-scripts/fixtures/kitchensink/src/index.js | powerreviews/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
src/components/AppHeader.js | W01fw00d/w01fw00d_portfolio | import React, { Component } from 'react';
import { Button, Row, Col } from 'reactstrap';
import { Link } from 'react-router-dom';
import '../stylesheets/AppHeader.css';
import avatar from '../assets/avatar_square.png';
import github_logo from '../assets/logos/github.png';
import linkedin_logo from '../assets/logos/lin... |
frontend/js/utils/restricted.js | antoniovj1/infraestructura_virtual_ugr | import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import * as AuthService from './AuthService';
function checkAuthentication(params) {
const { history } = params;
if (!AuthService.loggedIn()) {
history.replace({ pathname: '/login' });
}
}
/**
* Higher-order component ... |
src/pages/vicio.js | vitorbarbosa19/ziro-online | import React from 'react'
import BrandGallery from '../components/BrandGallery'
export default () => (
<BrandGallery brand='Vicio' />
)
|
__tests__/index.android.js | boogie666/turbo-eureka | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
app/components/Charts/BarChart/index.js | theterra/newsb | import React from 'react';
import { Bar } from 'react-chartjs-2';
const data = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'My First dataset',
backgroundColor: 'rgba(255,99,132,0.2)',
borderColor: 'rgba(255,99,132,1)',
borderWidth: 1,... |
docs/app/Examples/modules/Dropdown/Content/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ContributionPrompt from 'docs/app/Components/ComponentDoc/ContributionPrompt'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const DropdownContentExamples = () => (
<Example... |
App.js | jstrimpel/redux-react-router | import React, { Component } from 'react';
import { connect } from 'react-redux';
class App extends Component {
static willTransitionTo() {
console.log('willTransitionTo in App component');
}
render() {
let { fname, lname } = this.props;
return (
<div>Hello {fname} {lname}!</div>
);
}
... |
src/app/containers/StreamShuffler.js | smitch88/multi-stream-twitch | import React from 'react';
import { connect } from 'react-redux';
import * as _ from 'lodash';
import theme from '../theme';
import { Closer, StreamWidget } from '../components';
import { setCurrentStream } from '../../common/home/actions';
import { deleteWidget, updateWidget } from '../../common/streams/actions';
impo... |
app/javascript/mastodon/features/compose/components/autosuggest_account.js | mstdn-jp/mastodon | import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class AutosuggestAccount extends Immuta... |
src/LoaderImagePlaceHolder/index.js | DuckyTeam/ducky-components | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
import Icon from '../Icon';
function LoaderImagePlaceHolder(props) {
return (
<div className={classNames(styles.wrapper, {
[props.className]: props.className,
[styles... |
src/parser/paladin/protection/modules/features/AlwaysBeCasting.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import CoreAlwaysBeCasting from 'parser/shared/modules/AlwaysBeCasting';
import { STATISTIC_ORDER } from 'interface/others/StatisticBox';
class AlwaysBeCasting ext... |
tfmsaview/static/js/utils/Api.js | TensorMSA/TensorMSAView | require('es6-promise').polyfill();
require('isomorphic-fetch');
import EnvConstants from './../constants/EnvConstants';
import SpinnerComponent from './../NNLayout/common/SpinnerComponent'
import React from 'react'
import { render } from 'react-dom';
export default class Api {
setLoading(flag){//this method fo... |
src/components/chatrooms/ChatroomsPage.js | AleksandrRogachev94/chat-vote-go-frontend | import React from 'react'
import ChatroomElementsContainer from './ChatroomElementsContainer'
import ChatroomsListContainer from './chatroomsList/ChatroomsListContainer'
const ChatroomsPage = (props) => {
return (
<div className="container-fluid">
<div className="row">
<div className="col-sm-3 side... |
admin/client/components/Forms/InvalidFieldType.js | wmertens/keystone | import React from 'react';
module.exports = React.createClass({
displayName: 'InvalidFieldType',
propTypes: {
path: React.PropTypes.string,
type: React.PropTypes.string,
},
render () {
return <div className="alert alert-danger">Invalid field type <strong>{this.props.type}</strong> at path <strong>{this.props... |
src/index.js | qialex/React-Redux-Sokoban | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/App'
import './styles/app.css'
import configureStore from './store/configureStore'
const store = configureStore()
render(
<Provider store={store}>
<App />
... |
frontend/src/InteractiveImport/Movie/SelectMovieModalContent.js | Radarr/Radarr | import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import TextInput from 'Components/Form/TextInput';
import Button from 'Components/Link/Button';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import ModalBody from 'Components/Modal/ModalBody';
im... |
src/components/common/HomePage.js | barillas/react-book-store | // ./src/components/common/HomePage.js
import React from 'react';
const Home = () => {
return (
<div>
<h1>Home Page</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aliquam architecto at exercitationem ipsa iste molestiae nobis odit! Error quo reprehenderit velit! Aperiam eius non... |
tests/js/containers/Home.spec.js | Seedstars/django-react-redux-base | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint import/no-named-default: 0 */
import React from 'react';
import { expect } from 'chai';
import { mount, shallow } from 'enzyme';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { defa... |
code/sandbox/hoc/src/index.js | st-he/react-workshop | import React from 'react';
import ReactDOM from 'react-dom';
import HelloMessage from './HelloMessage';
const mountNode = document.getElementById('mount');
ReactDOM.render(<HelloMessage greeting="Hello"/>, mountNode); |
components/Deck/ContentModulesPanel/QualityPanel/QualityPanel.js | slidewiki/slidewiki-platform | import PropTypes from 'prop-types';
import React from 'react';
import { connectToStores } from 'fluxible-addons-react';
import DataSourceStore from '../../../../stores/DataSourceStore';
import PermissionsStore from '../../../../stores/PermissionsStore';
/*import DataSourceList from './DataSourceList';
import EditDataSo... |
src/client/components/repository.js | cheminfo/grm | 'use strict';
import React from 'react';
import agent from 'superagent';
export default React.createClass({
getInitialState() {
return {
};
},
getDetails() {
agent
.get(`repo/${this.props.repo.owner}/${this.props.repo.name}?action=status&details=true`)
.end(... |
src/react/LogMonitorEntryAction.js | gouegd/redux-devtools | import React from 'react';
import JSONTree from 'react-json-tree';
const styles = {
actionBar: {
paddingTop: 8,
paddingBottom: 7,
paddingLeft: 16
},
payload: {
margin: 0,
overflow: 'auto'
}
};
export default class LogMonitorAction extends React.Component {
renderPayload(payload) {
r... |
src/Drawer/Drawer.js | rscnt/material-ui | import React from 'react';
import ReactDOM from 'react-dom';
import EventListener from 'react-event-listener';
import keycode from 'keycode';
import autoPrefix from '../utils/autoPrefix';
import transitions from '../styles/transitions';
import Overlay from '../internal/Overlay';
import Paper from '../Paper';
import pro... |
demo/components/form/FormDemo.js | ctco/rosemary-ui | import React from 'react';
import DemoWithSnippet from '../../../demo/layout/DemoWithSnippet';
import Example2 from './Example2';
import {Form, formHelper} from '../../../src';
class FormDemo extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<... |
src/index.js | sezarmbar/My-redux-01 | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render(
<Provi... |
src/main.js | conundrumer/parallel-sand | 'use strict'
// var injectTapEventPlugin = require("react-tap-event-plugin");
// injectTapEventPlugin();
import 'normalize.css'
// require('assets/fonts.css');
// require('./styles/main.less');
import React from 'react'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { Provider, connect }... |
src/client/components/Affinity.js | mearns/image-affinity | import React from 'react';
import {ImageItem} from './ImageItem';
import * as reducer from '../reducer';
import {StateStore} from '../../services/state-store';
export class Affinity extends React.Component {
constructor(props) {
super(props);
this.state = props;
this._stateStore = new Stat... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/node_modules/rc-slider/es/Handle.js | bhathiya/test | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runt... |
demo/src/components/App/components/Examples/components/CustomRender/CustomRender.js | JacksonKearl/react-autosuggest-ie11-compatible | import styles from './CustomRender.less';
import theme from './theme.less';
import React, { Component } from 'react';
import isMobile from 'ismobilejs';
import match from 'autosuggest-highlight/match';
import parse from 'autosuggest-highlight/parse';
import Link from 'Link/Link';
import Autosuggest from 'Autosuggest';... |
docs/src/app/components/pages/components/DatePicker/ExampleToggle.js | xmityaz/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
import Toggle from 'material-ui/Toggle';
const optionsStyle = {
maxWidth: 255,
marginRight: 'auto',
};
/**
* This example allows you to set a date range, and to toggle `autoOk`, and `disableYearSelection`.
*/
export default class DatePi... |
docs/app/Examples/views/Card/Content/CardExampleImageCard.js | ben174/Semantic-UI-React | import React from 'react'
import { Card, Icon, Image } from 'semantic-ui-react'
const CardExampleImageCard = () => (
<Card>
<Image src='http://semantic-ui.com/images/avatar/large/daniel.jpg' />
<Card.Content>
<Card.Header>Daniel</Card.Header>
<Card.Meta>Joined in 2016</Card.Meta>
<Card.Desc... |
frontend/src/components/customStepper/StepPositionIcon.js | unicef/un-partner-portal | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { withStyles } from 'material-ui/styles';
import SvgIcon from 'material-ui/SvgIcon';
export const styleSheet = theme => ({
root: {
fill: theme.palette.action.disabled,
display: 'block',
},
text: {
... |
src/FormFeedback.js | reactstrap/reactstrap | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
children: PropTypes.node,
tag: tagPropType,
className: PropTypes.string,
cssModule: PropTypes.object,
valid: PropTypes.bool,
toolti... |
app/components/Sidebar.js | hlynn93/basic_ims | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Menu } from 'semantic-ui-react';
import { menu } from '../utils';
import styles from './Sidebar.css';
class Sidebar extends Component {
state = {
activeItem: menu[0].name,
}
handl... |
src/renderer/file-manager.js | buttercup-pw/buttercup | import React from 'react';
import { ipcRenderer as ipc } from 'electron';
import { I18nextProvider } from 'react-i18next';
import i18n from '../shared/i18n';
import { render } from 'react-dom';
import FileManager from './components/file-manager';
import configureStore from '../shared/store/configure-store';
import { se... |
src/containers/ErrorBoundary.js | migueliriano/react-anime-project | import React from 'react';
class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = {
error: null,
errorInfo: null,
};
}
componentDidCatch(error, errorInfo) {
// Catch errors in any child components and re-renders with an error message
this.se... |
node_modules/react-bootstrap/es/DropdownMenu.js | newphew92/newphew92.github.io | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _Array$from from 'babel-runtime/core-js/array/from';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtim... |
app/javascript/mastodon/features/ui/components/video_modal.js | PlantsNetwork/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from '../../video';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class VideoModal extends ImmutablePureComponent {
static propTypes = {
m... |
src/components/Scene.js | cannc4/Siren | import _ from 'lodash';
import React from 'react';
import { inject, observer } from 'mobx-react';
import { executionCssByEvent } from '../keyFunctions';
@inject('sceneStore')
@observer
export default class Scene extends React.Component {
handleControlEnter = (event) => {
if(event.ctrlKey && ... |
src/svg-icons/editor/format-clear.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatClear = (props) => (
<SvgIcon {...props}>
<path d="M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"/>
</SvgIcon... |
source/containers/Home/Stories/InputPanel/SubjectInput/AttachContentModal/StartScreen.js | mikey1384/twin-kle | import React from 'react';
import PropTypes from 'prop-types';
import Button from 'components/Button';
StartScreen.propTypes = {
navigateTo: PropTypes.func.isRequired
};
export default function StartScreen({ navigateTo }) {
return (
<div
style={{
justifyContent: 'center',
display: 'flex'... |
src/index.js | jeffgietz/ReduxReact | import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY = 'AIzaSyDt... |
style-guide/src/components/handover-process/PhaseBox.js | opentable/design-tokens | import React from 'react';
import styles from '../../styles/handover.module.scss';
export default ({illustration, description, title, addHashRoute}) => (
<div className={styles.box} onClick={addHashRoute}>
<img src={illustration} alt="Phase illustration" />
<div className={styles.boxTitle}>{title}</div>
... |
packages/containers/src/ConfirmDialog/ConfirmDialog.stories.js | Talend/ui | import React from 'react';
import { Map } from 'immutable';
import ConfirmDialog from '.';
const initialState = new Map({
size: 'small',
header: 'DO SOMETHING',
show: true,
children: 'Confirm this !',
validateAction: 'confirm-dialog:validate',
cancelAction: 'confirm-dialog:cancel',
});
export default {
title:... |
src/components/video_list_item.js | Shohin93/ReactRedux | import React from 'react';
const VideoListItem = ({video, onVideoSelect}) => {
const imageUrl = video.snippet.thumbnails.default.url;
return (
<li className='list-group-item' onClick={() => onVideoSelect(video)}>
<div className='video-list media'>
<div className='media-left... |
imports/ui/components/AppNavigation.js | LukeJFernandez/bigreads | import React from 'react';
import { Navbar } from 'react-bootstrap';
import { Link } from 'react-router';
import PublicNavigation from './PublicNavigation.js';
import AuthenticatedNavigation from './AuthenticatedNavigation.js';
const renderNavigation = hasUser => (hasUser ? <AuthenticatedNavigation /> : <PublicNavigat... |
src/components/Form.js | micahh2/means | import React from 'react';
import { Accounts } from './Accounts';
import { Cashflows } from './Cashflows';
import { Taxes } from './Taxes';
import { Schedule } from './Schedule';
import '../styles/form.scss';
export function Form() {
return (<div className="form-main">
<h2 className="form-accounts-title">Accou... |
src/common/components/WhiteboardContainer/WhiteboardWrapper.js | FranciscoHerrera/floggit-whiteboard-client | import React from 'react';
import WhiteboardInput from './components/WhiteboardInput';
import WhiteboardList from './components/WhiteboardList';
import whiteboardWrapperProps from './WhiteboardWrapper.props';
import './WhiteboardContainer.css';
const WhiteboardWrapper = props => (
<div className="WhiteboardContaine... |
js/jqwidgets/demos/react/app/chart/columnlocaldata/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
class App extends React.Component {
render() {
let sampleData = [
{ Day: 'Monday', Keith: 30, Erica: 15, George: 25 },
{ Day: 'Tuesday', Keith: 25, Erica:... |
node_modules/@material-ui/styles/es/useTheme/ThemeContext.js | jerednel/jerednel.github.io | import React from 'react';
const ThemeContext = React.createContext(null);
if (process.env.NODE_ENV !== 'production') {
ThemeContext.displayName = 'ThemeContext';
}
export default ThemeContext; |
client/trello/src/app/routes/home/routes/boardView/components/Card/Card.spec.js | Madmous/Trello-Clone | import { shallow } from 'enzyme';
import { expect } from 'chai';
import React from 'react';
import Card from './Card';
function setup() {
const props = {
createCardFormIndexToOpen: 0,
isCreateCardItemFormOpen: false,
cardHeader: '',
cardItems: [],
x: 0,
cardActions: {}
};
return shal... |
.storybook/config.js | zsherman/react-limitless | import React from 'react'
import { configure, storiesOf } from '@kadira/storybook'
import './reset.css'
import './fonts.css'
import './layout.css'
import '../stories/utils/prism.css'
import 'github-markdown-css/github-markdown.css'
//
import Readme from '../README.md'
//
import Basic from '../stories/Basic.js'
//
conf... |
src/js/Containers/ChapelContainer.js | RoyalSix/Eagle-Connect | /**
* @file This is the container for the actual component
* This file should handle the business logic of the component
* There should be no styling/css properties in this file
* In this way we can have a separation of concerns handle
* will allow for easier testing
* {@link https://medium.com/@dan_abramov... |
tests/routes/Projects/routes/Project/components/Tabs.spec.js | KyperTech/devshare-site | import React from 'react'
import Tabs from 'routes/Projects/routes/Project/components/Tabs/Tabs'
import { shallow } from 'enzyme'
describe('(Project:Component) Tabs', () => {
let _component
beforeEach(() => {
_component = shallow(
<Tabs
open={false}
onSelect={(i) => console.log('request ... |
src/components/Layout/SearchDrawer/SearchBox/presenter.js | ndlib/usurper |
import React from 'react'
import PropTypes from 'prop-types'
import SearchOptionList from '../SearchOptionList'
import 'static/css/global.css'
import 'static/css/search.css'
const SearchBox = (props) => {
return (
<span
className='uSearchBox'
style={{ display: props.visible ? 'grid' : 'none' }}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.