path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/svg-icons/hardware/laptop-windows.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopWindows = (props) => (
<SvgIcon {...props}>
<path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/>
</SvgIcon>
);
Hardwar... |
actor-apps/app-web/src/app/components/sidebar/ContactsSectionItem.react.js | voidException/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import DialogActionCreators from 'actions/DialogActionCreators';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ... |
src/cms/preview-templates/page-preview.js | wall3/wall3.github.io | // @flow strict
import React from 'react';
import type { Entry, WidgetFor } from '../../types';
type Props = {
entry: Entry,
widgetFor: WidgetFor
};
const PagePreview = ({ entry, widgetFor }: Props) => {
const body = widgetFor('body');
const title = entry.getIn(['data', 'title']);
return (
<div classNa... |
core/src/plugins/gui.ajax/res/js/ui/Workspaces/search/components/FileSizePanel.js | huzergackl/pydio-core | /*
* Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio 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, either version 3 of the License, o... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-11/complete/App.js | Brandon-J-Campbell/codemash | import React, { Component } from 'react';
import Exercise from './Exercise';
import styles from './App.css';
import classNames from 'classnames';
class App extends Component {
render() {
return (
<div className={styles.app}>
<header className={styles.appHeader}>
<h1 className={styles.app... |
examples/react-native/index.ios.js | natew/rxdb | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import {
AppRegistry,
} from 'react-native';
import React, { Component } from 'react';
import App from './src'
AppRegistry.registerComponent('reactNative', () => App);
|
app/components/ProgressBar.js | AngelGallegosE/Osiris | import React from 'react';
class ProgressBar extends React.Component {
render() {
return (
<div id="MainProgressBarContainer">
<progress id="progressBar" value={this.props.value} max="100" className={this.props.value===0?'hidden':''}></progress>
</div>
);
}
}
ProgressBar.propTypes = {
... |
src/server.js | brecht/react-redux-universal-hot-example | import Express from 'express';
import React from 'react';
import Location from 'react-router/lib/Location';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
im... |
test/integration/image-component/default/pages/style-inheritance.js | azukaru/next.js | import React from 'react'
import Image from 'next/image'
import style from '../style.module.css'
const Page = () => {
return (
<div id="main-container" className={style.mainContainer}>
<h1>Image Style Inheritance</h1>
<Image
id="img-fixed"
layout="fixed"
src="/test.jpg"
... |
frontend/src/components/dir-view-mode/dir-column-view.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import DirColumnNav from './dir-column-nav';
import DirColumnFile from './dir-column-file';
import DirListView from './dir-list-view';
const propTypes = {
path: PropTypes.string.isRequired,
repoID: PropTypes.string.isRequired,
// repoinfo
currentRe... |
app/javascript/mastodon/features/account_timeline/index.js | sylph-sin-tyaku/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import ... |
src/web/solutions/SolveError/SolutionForm.js | whybug/whybug-server | import React from 'react';
export var SolutionForm = React.createClass({
propTypes: {
solution: React.PropTypes.object,
onChange: React.PropTypes.func,
onSave: React.PropTypes.func
},
render() {
var solution = this.props.solution || {};
return form({},
... |
test/regressions/site/src/tests/Divider/InsetDivider.js | und3fined/material-ui | // @flow weak
import React from 'react';
import Divider from 'material-ui/Divider';
export default function InsetDivider() {
return (
<div style={{ padding: 2, width: 100 }}>
<Divider inset />
</div>
);
}
|
shared/components/Comment.js | AndrewGibson27/react-webpack-express-isomorphic-boilerplate | import React, { Component } from 'react';
const Comment = ({ body }) => (
<p>{body}</p>
);
export default Comment;
|
src/parser/warrior/arms/modules/core/Execute/MortalStrike.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Abilities from 'parser/core/modules/Abilities';
import calculateMaxCasts from 'parser/core/c... |
packages/icons/src/md/maps/Navigation.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdNavigation(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="24 5 9 41.59 10.41 43 24 37 37.59 43 39 41.59" />
</IconBase>
);
}
export default MdNavigation;
|
RNApp/node_modules/react-native/local-cli/generator/templates/index.android.js | abhaytalreja/react-native-telescope | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class <%= name %> extends Component {
render() {
return (
<View style={styles.container}>
<T... |
src/main.js | daveham/ilgmrdx | import React from 'react';
import ReactDOM from 'react-dom';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import { useRouterHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import createStore from 'store/createStore';
import Root from 'containers/Root';
... |
analysis/deathknightblood/src/CONFIG.js | anom0ly/WoWAnalyzer | import SPELLS from 'common/SPELLS';
import { Yajinni, joshinator } from 'CONTRIBUTORS';
import SPECS from 'game/SPECS';
import { SpellLink } from 'interface';
import React from 'react';
import CHANGELOG from './CHANGELOG';
export default {
// The people that have contributed to this spec recently. People don't have... |
packages/example-universal-react-app/src/index.js | raymondsze/create-react-scripts | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
source/patterns/01-molecules/messages/alert/__tests__/alert.spec.js | apparena/patterns | /* eslint-env mocha */
import React from 'react';
import {shallow, configure} from 'enzyme';
import Alert from '../index';
import Adapter from 'enzyme-adapter-react-16';
configure({adapter: new Adapter()});
test('DUMMY', () => {
const wrapper = shallow(
<Alert type="danger">
Hello world!
... |
packages/components/src/List/Toolbar/ItemsNumber/ItemsNumber.component.js | Talend/ui | import React from 'react';
import PropTypes from 'prop-types';
import getDefaultT from '../../../translate';
function ItemsNumber({ id, totalItems, selected, label, labelSelected, t }) {
return (
<div className="tc-items-number" id={id}>
{selected
? labelSelected ||
t('LIST_TOOLBAR_NUMBER_OF_SELECTED_I... |
src/components/relativeLink/index.js | LiskHQ/lisk-nano | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { withRouter } from 'react-router';
import buttonStyle from 'react-toolbox/lib/button/theme.css';
import offlineStyle from '../offlineWrapper/offlineWrapper.css';
import dialogs from '../dialog/dialogs';
c... |
client/src/components/StreamField/blocks/FieldBlock.js | torchbox/wagtail | /* global $ */
import { escapeHtml as h } from '../../../utils/text';
import ReactDOM from 'react-dom';
import React from 'react';
import Icon from '../../Icon/Icon';
export class FieldBlock {
constructor(
blockDef,
placeholder,
prefix,
initialState,
initialError,
parentCapabilities,
) {
... |
server/prerenderer.js | firegoby/react-ecosystem-aurora | import React from 'react'
import Router from 'react-router'
import Flux from '../app/flux.js'
import routes from '../app/routes.js'
import performRouteHandlerStaticMethod from '../app/shared/performRouteHandlerStaticMethod'
export default function (req, res) {
const flux = new Flux()
// let's just assume `n... |
modules/IndexLink.js | littlefoot32/react-router | import React from 'react'
import Link from './Link'
var IndexLink = React.createClass({
render() {
return <Link {...this.props} onlyActiveOnIndex={true} />
}
})
export default IndexLink
|
src/parser/monk/brewmaster/modules/core/MasteryValue.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import HIT_TYPES from 'game/HIT_TYPES';
import Analyzer from 'parser/core/Analyzer';
import StatTracker from 'parser/shared/modules/StatTracker';
import LazyLoadStatisticBox from 'interface/others/LazyLoadStatisticBox';
import SpellIcon from 'common/SpellIc... |
src/js/components/AccordionPanel.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Header from './Header';
import Button from './Button';
import ListItem from './ListItem';
import CaretNextIcon from './icons/bas... |
local-cli/templates/HelloNavigation/components/ListItem.js | makadaw/react-native | 'use strict';
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
TouchableHighlight,
TouchableNativeFeedback,
View,
} from 'react-native';
/**
* Renders the right type of Touchable for the list item, based on platform.
*/
const Touchable = ({onPress, children}) => {
const c... |
packages/starter-scripts/fixtures/kitchensink/src/features/webpack/ScssModulesInclusion.js | chungchiehlun/create-starter-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import styles from './assets/scss-styles.module.scss';
import indexStyles from './assets/index.module.scss';
... |
components/navbar/DropDownMenu.js | telemark/portalen | import React from 'react'
import { Icon } from '../styles'
export default class extends React.Component {
constructor (props) {
super(props)
this.state = {
isOpen: false
}
this.handleOutsideClick = this.handleOutsideClick.bind(this)
this.handleClick = this.handleClick.bind(this)
}
hand... |
src/files/explore-form/FilesExploreForm.stories.js | ipfs/webui | import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import { checkA11y } from '@storybook/addon-a11y'
import i18n from '../../i18n-decorator'
import FilesExploreForm from './FilesExploreForm'
storiesOf('Files', module)
.addDecorator(checkA11y)
.a... |
src/svg-icons/av/high-quality.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvHighQuality = (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 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.... |
client/components/ReactHotLoader.js | KCPSoftware/KCPS-React-Starterkit | /* eslint-disable global-require */
/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
// We create this wrapper so that we only import react-hot-loader for a
// development build. Small savings. :)
const ReactHotLoader = process.env.NODE_ENV === 'development'
? require('react-hot-lo... |
src/icons/IosListOutline.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosListOutline extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<g>
<path d="M432,80v352H80V80H432 M448,64H64v384h384V64L448,64z"></path>
<g>
<rect x="192" y="152" width="192"... |
src/elements/List/ListHeader.js | aabustamante/Semantic-UI-React | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
createShorthandFactory,
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
/**
* A list item can contain a header.
*/
function ListHeader(props) {
const { ch... |
src/routes.js | Rosita13/react-redux | /* eslint-disable */
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import { routerActions } from 'react-router-redux';
import { UserAuthWrapper } from 'redux-auth-wrapper';
import { App, Home, NotFound } from 'containers';
import getRoutesUtils from 'utils/routes';
// eslint-disable-next... |
app/javascript/components/FieldShape/FieldShape.js | SumOfUs/Champaign | import React, { Component } from 'react';
import { map, pick } from 'lodash';
import SweetInput from '../SweetInput/SweetInput';
import SelectCountry from '../SelectCountry/SelectCountry';
import SweetSelect from '../SweetSelect/SweetSelect';
import Checkbox from '../Checkbox/Checkbox';
export default class FieldShape... |
client/app/containers/LocaleToggle/index.js | KamillaKhabibrakhmanova/postcardsforchange-api | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
src/components/table/TableQuickInput.js | metasfresh/metasfresh-webui-frontend | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import cx from 'classnames';
import { getLayout, patchRequest } from '../../api';
import { addNotification } from '../../actions/AppActions';
import { completeRequest, createInstance } from '../../actio... |
client/modules/App/__tests__/Components/Header.spec.js | GTDev87/stylizer | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';
import { Header } from '../../components/Header/Header';
import { intl } from '../../../../util/react-intl-test-helper';
const intlProp = { ...intl, enabledLang... |
src/svg-icons/action/settings-overscan.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsOverscan = (props) => (
<SvgIcon {...props}>
<path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18... |
src/index.js | erdgabios/react-youtube-search | 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';
// Put here your youtube-... |
src/components/subjects/BookSubjectIndex.js | great-design-and-systems/cataloguing-app | import { BookSubjectList } from './BookSubjectList';
import PropTypes from 'prop-types';
import React from 'react';
export const BookSubjectIndex = ({ removeSubject, managedBook, subjects }) => {
return (<div className="subjects">
<BookSubjectList
removeSubject={removeSubject}
subjects={subjects}
... |
app/App.js | munir7/react | import React from 'react';
import Router from 'react-router';
import routes from './config/routes';
Router.run(routes, (Root, state) => {
React.render(<Root {...state} />, document.getElementById('app'));
});
|
packages/frontend/tests/components/common/Link/index.spec.js | ks888/LambStatus | import React from 'react'
import { Link as ReactRouterLink } from 'react-router'
import Link from 'components/common/Link'
import { shallow } from 'enzyme'
describe('Link', () => {
const generateProps = () => {
return {
link: 'https://github.com',
text: 'github'
}
}
it('should render the lin... |
src/Input.js | collinwu/react-bootstrap | import React from 'react';
import InputBase from './InputBase';
import * as FormControls from './FormControls';
import deprecationWarning from './utils/deprecationWarning';
class Input extends InputBase {
render() {
if (this.props.type === 'static') {
deprecationWarning('Input type=static', 'StaticText');
... |
benchmarks/src/index.js | rofrischmann/fela | import App from './app/App'
import impl from './impl'
import Tree from './cases/Tree'
import SierpinskiTriangle from './cases/SierpinskiTriangle'
import React from 'react'
import ReactDOM from 'react-dom'
const implementations = impl
const packageNames = Object.keys(implementations)
const createTestBlock = (fn) => {... |
src/ElevationCatalog.js | material-components/material-components-web-catalog | import React, { Component } from 'react';
import ComponentCatalogPanel from './ComponentCatalogPanel.js';
import './styles/ElevationCatalog.scss';
const MAX_ELEVATION_LEVELS = 24;
const ElevationCatalog = () => {
const description = 'Elevation is the relative depth, or distance, between two surfaces along the z-axi... |
assets/js/components/Item.js | scottocorp/react-todos | import React from 'react';
var createReactClass = require('create-react-class');
const Item = createReactClass({
handleOnChange(e) {
const content = e.target.value;
this.props.updateTodo(this.props.todo.id, content);
},
handleKeyUp(e) {
if (e.keyCode == 13) {
this.close(e.target.value);
}
... |
src/svg-icons/notification/confirmation-number.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationConfirmationNumber = (props) => (
<SvgIcon {...props}>
<path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2... |
js/components/Nav.react.js | Karaja-Naji/frontEndMusic | /**
*
* Nav.react.js
*
* This component renders the navigation bar
*
*/
import React, { Component } from 'react';
import { Link } from 'react-router';
import { logout } from '../actions/AppActions';
import LoadingButton from './LoadingButton.react';
class Nav extends Component {
render() {
// Render eithe... |
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-forms-slider.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import Environment from '../environment/environment.js';
import {BaseMixin, ElementaryMixin, ContentMixin, Tools} from './../common/common.js';
import {Glyphicon, Slider} from './../bricks/bricks.js';
import InputMixin from './input-mixin.js';
import Number from './number.js';
import './slid... |
packages/editor/src/components/Controls/FontFamily/FontFamilyLayout.js | boldr/boldr | /* eslint-disable react/no-array-index-key */
/* @flow */
import React from 'react';
import type { Node } from 'react';
import cn from 'classnames';
import { Dropdown, DropdownOption } from '../../Dropdown';
import type { FontFamilyConfig } from '../../../core/config';
export type Props = {
expanded: boolean,
onE... |
docs/app/Examples/modules/Accordion/Usage/AccordionExamplePanelsPropWithCustomTitleAndContent.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Accordion, Label, Message } from 'semantic-ui-react'
import faker from 'faker'
import _ from 'lodash'
const panels = _.times(3, i => ({
key: `panel-${i}`,
title: <Label color='blue' content={faker.lorem.sentence()} />,
content: (
<Message
info
header={faker.lore... |
node_modules/npm/docs/src/components/DocLinks.js | giovannic/giovannic.github.com | import React from 'react'
import styled from 'styled-components'
import {StaticQuery, graphql} from 'gatsby'
import {Flex} from 'rebass'
import {SidebarLink} from './links'
import Accordion from './Accordion'
const LinkDesc = styled.span`
font-size: 11px;
line-height: 1.5;
text-transform: lowercase;
display:... |
app/components/shared/filtersControl.js | nypl-registry/browse | import React from 'react'
import { Link } from 'react-router'
import { stringify } from 'qs'
const FiltersControl = React.createClass({
propTypes () {
return {
}
},
queryStringWithoutFilter (field, value) {
// copy query & filters:
var newQuery = Object.assign({}, this.props.query)
newQuery... |
app/components/__tests__/CodeBttns-test.js | andrewmoon1/moon.codes | /* eslint no-unused-vars: 0 */ // since fetch is needed but not used
import React from 'react';
import { polyfill } from 'es6-promise';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import ReactTestUtils from 'react-dom/test-utils';
import { shallow, mount } from 'enzyme';
import { Cod... |
admin/client/components/PopoutBody.js | nickhsine/keystone | import React from 'react';
import blacklist from 'blacklist';
import classnames from 'classnames';
var PopoutBody = React.createClass({
displayName: 'PopoutBody',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
scrollable: React.PropTypes.bool,
},
render () {
let ... |
examples/todomvc/containers/App.js | bloodyowl/redux-devtools | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import { Provider } from 'react-redux';
import *... |
hello_world/src/components/Geocities.react.js | rpearce/react-form-steps-example | import React, { Component } from 'react';
class Geocities extends Component {
render() {
return (
<div>
<div style={ { textAlign: 'center', marginTop: '50px' } }>
<img src="http://www.wonder-tonic.com/geocitiesizer/images/genie.gif" />
<img src="http://www.wonder-tonic.com/geoci... |
node_modules/react-bootstrap/es/utils/ValidComponentChildren.js | acalabano/get-committed | // TODO: This module should be ElementChildren, and should use named exports.
import React from 'react';
/**
* Iterates through children that are typically specified as `props.children`,
* but only maps over children that are "valid components".
*
* The mapFunction provided index will be normalised to the compone... |
src/routes/admin/index.js | zsu13579/whatsgoinontonight | /**
* 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 Layout from '../../co... |
app/static/src/diagnostic/TestTypeResultForm_modules/PolymerisationDegreeTestForm.js | vsilent/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import Button from 'react-bootstrap/lib/Button';
import Panel from 'react-bootstrap/lib/Panel';
import {findDOMNode} from 'react-dom';
import {hashHistory} from 'react-router';
im... |
examples/real-world/containers/DevTools.js | javascriptjedi/redux-select | import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w">
<LogMonitor />
... |
client/src/components/dataset/index.js | OpenChemistry/materialsdatabank | import React, { Component } from 'react';
import Button from '@material-ui/core/Button';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import IconButton from '@material-ui/core/IconButton';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-... |
docs/app/Examples/collections/Table/States/TableExampleWarningShorthand.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const tableData = [
{ name: undefined, status: undefined, notes: undefined },
{ name: 'Jimmy', status: 'Requires Action', notes: undefined },
{ name: 'Jamie', status: undefined, notes: 'Hostile' },
{ name: 'Jill', status: undefined, notes: und... |
classic/src/scenes/mailboxes/src/Scenes/BookmarkScene/BookmarkEditScene/BookmarkEditScene.js | wavebox/waveboxapp | import React from 'react'
import shallowCompare from 'react-addons-shallow-compare'
import { RouterDialog, RouterDialogStateProvider } from 'wbui/RouterDialog'
import BookmarkEditSceneContent from './BookmarkEditSceneContent'
class BookmarkEditScene extends React.Component {
/* **************************************... |
test/components/SlideListEditorComponentTest.js | C3-TKO/gaiyo | /*eslint-env node, mocha */
/*global expect */
/*eslint no-console: 0*/
'use strict';
import React from 'react';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import { mountWithIntl, shallowWithIntl } from 'helpers/intl-enzyme-test-helper.js';
import configureStore from 'redux-mock-store';
import { Provide... |
src/js/main.js | goadapp/goad-site | import React from 'react';
import ReactDOM from 'react-dom';
import Downloads from './components/downloads.jsx';
var smoothScroll = require('smoothscroll');
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
window.React = Re... |
openex-front/src/private/components/exercises/injects/InjectPopover.js | Luatix/OpenEx | import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as R from 'ramda';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogCont... |
tests/react/useLayoutEffect_hook.js | mroch/flow | // @flow
import React from 'react';
{
React.useLayoutEffect(); // Error: function requires another argument.
}
{
// Ok variants without cleanup functions
React.useLayoutEffect(() => {});
React.useLayoutEffect(() => {}, []);
React.useLayoutEffect(() => {}, [1, 2, 3]);
// Ok variants with cleanup function... |
components/Home/FeaturedOn/index.js | parkerproject/conceptionarts | import React from 'react';
export default() => (
<div className="featured_on">
<div className="container">
<div className="row-eq-height featured_on_resp">
<div className="featured_on_title col-xl-2 col-lg-3 col-md-4 col-sm-12">
<span>
As featured on:
</span>
... |
fiveRows/__tests__/index.android.js | chngws/User-Interface | 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 />
);
});
|
step7-flux/node_modules/react-router/modules/IndexRedirect.js | jintoppy/react-training | import React from 'react'
import warning from './routerWarning'
import invariant from 'invariant'
import Redirect from './Redirect'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* An <IndexRedirect> is used to redirect from an indexRoute.
*/
const IndexRedirect = React.createCla... |
app/components/Theme/Theme.js | zchen9/DonutTab | import React from 'react';
require('./Theme.scss');
const LIGHT_ICON = (
<span className="theme-icon theme-light">
<i className="fa fa-sun-o"></i>
</span>
);
const DARK_ICON = (
<span className="theme-icon theme-dark">
<i className="fa fa-moon-o"></i>
</spa... |
src/components/ImagePicker/ImagePicker.js | ahthamrin/kbri-admin2 | import React from 'react'
import { IndexLink, Link } from 'react-router'
console.log('ImagePicker')
var thisUpCanvas = document.createElement('canvas')
var thisUpImage = new Image()
class ImagePicker extends React.Component {
constructor(props) {
super(props);
console.log('ImagePicker:constructor');
}
... |
ui/src/components/PostImage.js | nateinaction/nateanddanielle.love | import React from 'react';
import PropTypes from 'prop-types';
import LinearProgress from '@material-ui/core/LinearProgress';
import CardMedia from '@material-ui/core/CardMedia';
import './PostImage.css';
const srcSize = (imageType, maxWidth, imageDetails) => {
// Apparently GIFs are no longer animated after WP scal... |
node_modules/rc-dialog/es/Modal.js | yhx0634/foodshopfront | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import { View, Mo... |
client/my-sites/invites/utils.js | mmmavis/mofo-calypso | /**
* Internal dependencies
*/
import React from 'react';
import get from 'lodash/object/get'
/**
* Internal dependencies
*/
import i18n from 'lib/mixins/i18n';
export default {
acceptedNotice( invite, displayOnNextPage = true ) {
let takeATour = (
<p className="invite-message__intro">
{
i18n.trans... |
app/javascript/mastodon/features/compose/components/poll_button.js | dunn/mastodon | import React from 'react';
import IconButton from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
add_poll: { id: 'poll_button.add_poll', defaultMessage: 'Add a poll' },
remove_poll: { id: 'poll_button... |
src/components/users/UserAvatar.js | secretin/secretin-app | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import User from 'models/User';
const COLORS = [
'emerland',
'nephritis',
'belize-hole',
'wisteria',
'midnight-blue',
'sun-flower',
'pumpkin',
'pomegranate',
'silver',
'asbestos',
];
function getIni... |
src/components/Forms/__tests__/TextFieldHint.spec.js | instacart/Snacks | import React from 'react'
import renderer from 'react-test-renderer'
import { StyleRoot } from '@instacart/radium'
import TextFieldHint from '../TextFieldHint'
it('renders TextFieldHint correctly', () => {
const tree = renderer
.create(
<StyleRoot>
<div>
<TextFieldHint text="Text field hi... |
src/browser/extension/popup/index.js | UrgBenri/UrgBenriWeb | import React from 'react';
import { render } from 'react-dom';
import Root from 'app/containers/Root';
chrome.runtime.getBackgroundPage(background => {
const { store, unsubscribe } = background.getStore();
render(
<Root store={store} />,
document.getElementById('root')
);
addEventListener('unload', uns... |
src/js/components/icons/base/Camera.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... |
docs/src/app/components/pages/components/Menu/ExampleSimple.js | manchesergit/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
const style = {
display: 'inline-block',
margin: '16px 32px 16px 0',
};
const MenuExampleSimple = () => (
<div>
<Paper style={style}>
<Menu>
<Menu... |
src/widgets/Anchor.js | xiaofan2406/react-starter-kit | import React from 'react';
import PropTypes from 'prop-types';
const Anchor = ({ href, children, ...rest }) => (
<a rel="noopener noreferrer" target="_blank" href={href} {...rest}>
{children}
</a>
);
Anchor.propTypes = {
href: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
};
export de... |
ui/components/loading.js | danjac/podbaby | import React from 'react';
import Icon from './icon';
export default function () {
return (
<div className="text-center" style={{ marginTop: 50 }}>
<h1 style={{ fontFamily: 'GoodDog' }}><Icon icon="spinner" spin /> loading...</h1>
</div>
);
}
|
test/tabInactive-test.js | OnsenUI/react-onsenui | /* global describe it assert */
import React from 'react';
import ReactDOM from 'react-dom';
import {TabInactive} from '../dist/react-onsenui.js';
import TestUtils from 'react/lib/ReactTestUtils';
import rendersToComponent from './testUtil.js';
describe('TabInactive', function() {
rendersToComponent(
<TabInact... |
src/js/pages/ResetPasswordPage.js | MichaelFKogan/project3 | import React from 'react';
import DocumentTitle from 'react-document-title';
import { ResetPasswordForm } from 'react-stormpath';
export default class ResetPasswordPage extends React.Component {
render() {
return (
<DocumentTitle title={`Login`}>
<div className="container">
<div classNam... |
app/javascript/mastodon/features/notifications/index.js | Toootim/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import { expandNotifications, scrollTopNotifications ... |
src/SvgIcon/SvgIcon.spec.js | rhaedes/material-ui | /* eslint-env mocha */
import React from 'react';
import sinon from 'sinon';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import SvgIcon from './SvgIcon';
import getMuiTheme from '../styles/getMuiTheme';
describe('<SvgIcon />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (nod... |
client/src/signup/Form.js | petertrotman/adventurelookup | import React from 'react';
import { connect } from 'react-redux';
import { signupEmail } from './actions';
@connect(
state => ({ signup: state.signup }),
dispatch => ({ submitEmail: (email, validity) => (
dispatch(signupEmail(email, validity))
) }),
)
class SignupForm extends React.Component {
constructor... |
client/src/containers/FileListPage.js | RiddleMan/giant-privacy-spy | import React, { Component } from 'react';
import Paper from 'material-ui/Paper';
import { GridList } from 'material-ui/GridList';
import { GridFilePreview } from '../components/layout';
import { connect } from 'react-redux';
import { routeActions } from 'react-router-redux';
import { clear, getNextUnboxed, setGeoHash }... |
test/Scrollbars/hideTracks.js | malte-wessel/react-custom-scrollbars | import { Scrollbars } from 'react-custom-scrollbars';
import { render, unmountComponentAtNode } from 'react-dom';
import React from 'react';
export default function createTests(scrollbarWidth) {
describe('hide tracks', () => {
let node;
beforeEach(() => {
node = document.createElement('... |
frontend/src/DiscoverMovie/DiscoverMovieFooterLabel.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React from 'react';
import SpinnerIcon from 'Components/SpinnerIcon';
import { icons } from 'Helpers/Props';
import styles from './DiscoverMovieFooterLabel.css';
function DiscoverMovieFooterLabel(props) {
const {
className,
label,
isSaving
} = props;
return... |
app/components/resources/resourcePage.js | nypl-registry/browse |
import React from 'react'
import ReactDOM from 'react-dom'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { resourceOverview, resourceByOwi } from '../../utils.js'
require('core-js/fn/object/entries')
import HeaderNav from '../shared/header_nav.js'
import Hero from '../shared/hero.js... |
browser/modules/layerTree/controls/SelectControl.js | mapcentia/vidi | /*
* @author Alexander Shumilov
* @copyright 2013-2019 MapCentia ApS
* @license http://www.gnu.org/licenses/#AGPL GNU AFFERO GENERAL PUBLIC LICENSE 3
*/
import React from 'react';
import PropTypes from 'prop-types';
/**
* Select control component
*/
class SelectControl extends React.Compone... |
src/js/Components/BackgroundPane/ImageBackgroundView.js | mattgordils/DropSplash | import React, { Component } from 'react';
import Button from 'Components/Common/Button';
import PlusIcon from 'assets/icons/plus-icon';
import InlineSVG from 'svg-inline-react/lib';
import ColorPicker from 'Components/Common/ColorPicker/ColorPicker';
import 'sass/components/common/inputs';
export default class App e... |
docs/app/Examples/elements/Image/Variations/ImageAvatarExample.js | jcarbo/stardust | import React from 'react'
import { Image } from 'stardust'
const src = 'http://semantic-ui.com/images/wireframe/square-image.png'
const ImageAvatarExample = () => (
<div>
<Image src={src} avatar />
<span>Username</span>
</div>
)
export default ImageAvatarExample
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.