path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
public/7.blog.js | christianalfoni/EmptyBox | webpackJsonp([7],{341:function(e,t){e.exports="# Handling complex state with Baobab\n\nSo Baobab is here in version 1.0. Let us quickly recap why Baobab is such a great tool for your application and then we will see what version 1.0 addresses in regards of complex state handling. I encourage you to read the [initial ar... |
src/svg-icons/maps/map.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsMap = (props) => (
<SvgIcon {...props}>
<path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 ... |
__tests__/components/NumberInput-test.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import renderer from 'react-test-renderer';
import NumberInput from '../../src/js/components/NumberInput';
// needed because this:
// https://github.com/facebook/jest/issues/1353
jest.mock('react-dom');
describe('NumberI... |
test/js/AR/release_test/ARPlaneTest.js | viromedia/viro | /**
* Copyright (c) 2017-present, Viro Media, 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 Re... |
frontend/src/components/post-changelog/toolbar.js | 1905410/Misago | // jshint ignore:start
import React from 'react';
import Button from 'misago/components/button';
import escapeHtml from 'misago/utils/escape-html';
const DATE_ABBR = '<abbr title="%(absolute)s">%(relative)s</abbr>';
const USER_SPAN = '<span class="item-title">%(user)s</span>';
const USER_URL = '<a href="%(url)s" class... |
src/components/WikipediaUI/WikipediaUI.js | Vargentum/react-redux-apps | import React from 'react'
import SearchBar from '../common/SearchBar'
import SearchResults from "../common/SearchResults"
import WikiArticlePreview from './WikiArticlePreview'
import ErrorArea from '../common/ErrorArea'
import {WIKI_RANDOM_ARTICLE_URL} from '../../redux/modules/Wikipedia'
type Props = {
results: Pro... |
node_modules/@material-ui/styles/es/ServerStyleSheets/ServerStyleSheets.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { SheetsRegistry } from 'jss';
import StylesProvider from '../StylesProvider';
import createGenerateClassName from '../createGenerateClassName';
class ServerStyleSheets {
constructor(options = {}) {
this.options = options;
... |
src/components/Feedback/Feedback.js | mcfa77y/isla_de_pescua | /**
* 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 from 'react';
import withStyles from 'isomorp... |
client2/src/components/react-burger-menu/test/stack.spec.js | frolicking-ampersand/Board | 'use strict';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { expect } from 'chai';
import createShallowComponent from './utils/createShallowComponent';
import BurgerMenu from '../lib/BurgerMenu';
const Menu = BurgerMenu.stack;
describe('stack', () => {
let component, menuWrap,... |
components/Footer/Footer.js | BelwoodBakeryCafe/belwoodbakerycafe | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
docs/build.js | nickuraltsev/react-bootstrap | /* eslint no-console: 0 */
import React from 'react';
import path from 'path';
import Router from 'react-router';
import routes from './src/Routes';
import Root from './src/Root';
import fsp from 'fs-promise';
import { copy } from '../tools/fs-utils';
import { exec } from '../tools/exec';
import metadata from './gener... |
test/mochaTestHelper.js | mirimCZ/fifth | import Bluebird from 'bluebird';
import chai, {assert, expect} from 'chai';
import React from 'react';
import sinon from 'sinon';
import sinonAsPromised from 'sinon-as-promised';
import sinonChai from 'sinon-chai';
import TestUtils from 'react-addons-test-utils';
chai.should();
chai.use(sinonChai);
// Use Bluebird Pr... |
src/client.js | konstantin24121/replat | /* eslint react/jsx-filename-extension: "off" */
import 'babel-polyfill';
import 'config/logger';
import React from 'react';
import ReactDOM from 'react-dom';
import createStore from 'config/store';
import { AppContainer } from 'react-hot-loader';
import { browserHistory } from 'react-router';
import Root from './... |
__tests__/common/util.spec.js | romagny13/react-form-validation | import React from 'react';
import { jsdom } from 'jsdom';
import { hasClassName, addClassName, removeClassName } from '../../src/common/util';
describe('util', () => {
it('check has class name', () => {
expect(hasClassName('', 'form-group')).toBeFalsy();
expect(hasClassName('form-group', 'form-gr... |
src/index.js | ssorallen/react-reddit-client | /* @flow */
import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';
const root = document.getElementById('root');
if (root == null) throw new Error('Missing #root element in the DOM');
ReactDOM.render(<App />, root);
|
public/src/containers/selectArea/selectArea.js | white87332/react-redux-sample |
import React from 'react';
import { findDOMNode } from 'react-dom';
import { forIn } from 'lodash';
import PropTypes from 'prop-types';
import { addEventListener, removeEventListener } from '../../utils/event';
// import Drag from '../drag/drag';
import createSelectable from './createSelectable';
class SelectArea ext... |
examples/1_router_route/index.js | losogudok/losogudok.github.io | import React from 'react'
import ReactDOM from 'react-dom'
import {Router, Route} from 'react-router'
import createHistory from 'history/createHashHistory'
const history = createHistory()
const App = () => (
<Router history={history}>
<div>
<Route path='/recipes' component={RecipesList} />
... |
src/frontend/components/CreateNewRoom.js | sauvala/chatterbox | import React, { Component } from 'react';
import { FormGroup, FormControl, InputGroup, Button } from 'react-bootstrap';
import '../styles/CreateNewRoom.css';
class CreateNewRoom extends Component {
constructor(props) {
super(props);
this.state = { newChannelName: '' };
this.onUpdateNewChannelName = this.... |
src/components/Layout/index.js | redux-saga/redux-saga-devtools | import React from 'react'
import styled from 'styled-components'
export const Row = styled.div`
margin: 0;
padding: 0;
white-space: nowrap;
width: 100%;
height: 100%;
`
export const Cell = styled.div`
display: inline-block;
vertical-align: top;
white-space: nowrap;
overflow: hidden;
text-overflow:... |
examples/todomvc/src/components/TodoTextInput.spec.js | lifeiscontent/redux | import React from 'react'
import { createRenderer } from 'react-test-renderer/shallow';
import TodoTextInput from './TodoTextInput'
const setup = propOverrides => {
const props = Object.assign({
onSave: jest.fn(),
text: 'Use Redux',
placeholder: 'What needs to be done?',
editing: false,
newTodo: ... |
.storybook/Video.stories.js | constelation/monorepo | import React from 'react'
import { storiesOf, action } from '@kadira/storybook'
import Video from '../packages/Video/index.js'
// import Text from '../packages/Text/dist/Text.native.js'
storiesOf('Video', module)
.addWithInfo('plays a video', () => (
<Video src='http://www.html5rocks.com/en/tutorials/video/basic... |
ui/components/Loading.js | nlhuykhang/apollo-react-quotes-client | import React from 'react';
export default () => (
<div>Loading...</div>
);
|
src/index.js | vsmode/pixels | import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { injectGlobal } from 'styled-components';
import fastclick from 'react-fastclick';
import reducer from './reducers';
import initKeyboard from './keyboard';
import createInitialState from './store/state';
import A... |
src/dumb/common/Floated.js | jeckhummer/wf-constructor | import React from 'react';
export const Floated = ({right, children, style}) => {
const direction = right !== undefined ? 'right' : 'left';
return (
<div style={{float: direction, ...style}}>
{children}
</div>
);
}; |
src/client/routes/Home/components/HomeView.js | jaimerosales/visual-reports-bim360dc | import { IndexLink, Link } from 'react-router'
import React from 'react'
import './HomeView.scss'
class HomeView extends React.Component {
/////////////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////////////
constructor() {
super()
... |
src/js/Papers/__tests__/Paper.js | lwhitlock/grow-tracker | /* eslint-env jest */
jest.unmock('../Paper');
import React from 'react';
import { findDOMNode } from 'react-dom';
import {
renderIntoDocument,
} from 'react-dom/test-utils';
import Paper from '../Paper';
describe('Paper', () => {
it('merges className and style', () => {
const props = {
style: { backgr... |
app/sidebar/components/Controls.js | Raymond-Zhu/music-video-app | import React, { Component } from 'react';
export default class Controls extends Component {
constructor(props) {
super(props);
this.state = {paused: true};
this.handleTouch = this.handleTouch.bind(this);
}
handleTouch() {
if(this.state.paused) {
this.setState({paused: false});
} else {... |
public/ind.js | viktorkh/elastickit_express | import React from 'react';
import ReactDOM from 'react-dom';
import App from './search_react';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
blueocean-material-icons/src/js/components/svg-icons/av/repeat-one.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvRepeatOne = (props) => (
<SvgIcon {...props}>
<path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4zm-4-2V9h-1l-2 1v1h1.5v4H13z"/>
</SvgIcon>
);
AvRepeatOne.displayName = 'AvRepeatOne';
AvRepeatOne.muiName = 'SvgIcon';
e... |
src/components/AdminProxy/index.js | u-wave/web | import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from '@mui/material/CircularProgress';
import Overlay from '../Overlay';
import OverlayHeader from '../Overlay/Header';
const { lazy, Suspense } = React;
const AdminComponent = lazy(() => (
import('../../admin/containers/AdminApp... |
docs/src/app/components/pages/components/AppBar/ExampleIcon.js | ArcanisCz/material-ui | import React from 'react';
import AppBar from 'material-ui/AppBar';
/**
* A simple example of `AppBar` with an icon on the right.
* By default, the left icon is a navigation-menu.
*/
const AppBarExampleIcon = () => (
<AppBar
title="Title"
iconClassNameRight="muidocs-icon-navigation-expand-more"
/>
);
e... |
imports/ui/components/categories/timeline-categories-list-items.js | irvinlim/free4all | import React from 'react';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import ArrowDropRight from 'material-ui/svg-icons/navigation-arrow-drop-right';
import * as IconsHelper from '../../../util/icons';
import * as CategoriesHelper from '../../../util/categories';
const ListItem ... |
client/src/components/Toolbar/Toolbar.js | silverstripe/silverstripe-admin | import React from 'react';
import PropTypes from 'prop-types';
import BackButton from 'components/Button/BackButton';
/**
* Display a toolbar with some children, usually a breadcrumb or some actions.
*/
const Toolbar = ({ showBackButton, children, onBackButtonClick }) => {
const onClick = (e) => {
e.preventDef... |
examples/forms-bootstrap/src/components/Layout.js | lore/lore-forms | /**
* This component is intended to reflect the high level structure of your application,
* and render any components that are common across all views, such as the header or
* top-level navigation. All other components should be rendered by route handlers.
**/
import React from 'react';
import createReactClass fro... |
examples/src/components/ValuesAsNumbersField.js | webcoding/react-select | import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var ValuesAsNumbersField = React.createClass({
displayName: 'ValuesAsNumbersField',
propTypes: {
label: React.PropTypes.... |
src/helpers/react-widgets/DropdownList/component_renderers.js | dannyrdalton/example_signup_flow | import React from 'react'
export const imageAndText = (props) => (
<span>
<span>{props.item.value}</span><img src={props.item.imgSrc} style={{ height: '100px', paddingLeft: '20px' }}/>
</span>
)
export const REACT_WIDGETS_DROPDOWN_LIST_COMPONENT_RENDERERS = {
imageAndText
}
export default REACT_WIDGETS_DRO... |
examples/universal/server/server.js | joaomilho/redux | /* eslint-disable no-console, no-use-before-define */
import path from 'path'
import Express from 'express'
import qs from 'qs'
import webpack from 'webpack'
import webpackDevMiddleware from 'webpack-dev-middleware'
import webpackHotMiddleware from 'webpack-hot-middleware'
import webpackConfig from '../webpack.config... |
app/components/dashboardproject/manageKeys.js | ritishgumber/dashboard-ui | 'use strict';
import React from 'react';
import {connect} from 'react-redux';
import OptionsModal from './optionsModal';
import PersonAdd from 'material-ui/svg-icons/social/person-add';
import {Modal, Button} from 'react-bootstrap';
class DeleteApp extends React.Component {
constructor(props) {
super(prop... |
Client/src/components/App.js | MarcosBessega/vootodo | import React from 'react'
import {Provider} from 'react-redux'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import ToolBar from './toolbar'
const Root = ({store}) => (
<Provider store={store}>
<MuiThemeProvider>
<ToolBar />
</MuiThemeProvider>
</Provider>
)
export default Root
|
app/components/Footer/index.js | rajeshbhatt/shopping-cart-redux | import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from 'components/A';
import LocaleToggle from 'containers/LocaleToggle';
import Wrapper from './Wrapper';
import messages from './messages';
function Footer() {
return (
<Wrapper>
<section>
<FormattedMessage {...mes... |
src/svg-icons/maps/directions-run.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsRun = (props) => (
<SvgIcon {...props}>
<path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l... |
src/Root.js | Syncano/syncano-dashboard | import React from 'react';
import { Router, useRouterHistory } from 'react-router';
import createHistory from 'history/lib/createHashHistory';
import routes from './routes';
import useNamedRoutes from 'use-named-routes';
const history = useNamedRoutes(useRouterHistory(createHistory))({ routes });
const Root = () => (... |
app/containers/Minna/layout/footer.js | oliverox/react99 | import React from 'react';
import { Link } from 'react-router';
import moment from 'moment';
/**
* Layout: Footer
*
* Display a the site's footer
*/
export default class Footer extends React.Component { // eslint-disable-line
render() {
return (
<footer id="main-footer">
© {moment().format... |
src/components/Success.js | ericyd/gdrive-copy | /**
* Success message container
*/
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import Alert from './Alert';
import Checkmark from './icons/Checkmark';
import Star from './icons/Star';
export default function Success(props) {
return (
<Alert
label={'Success! ' + props.msg... |
src/components/FabButton/index.js | RodolfoSilva/DeVryCalc | import React from 'react'
import IconButton from '../IconButton'
import styles from './styles'
let FabButton = ({ name, style, ...props }) => (
<IconButton name={name} style={[styles.container, style]} {...props} />
)
FabButton.propTypes = {
...IconButton.propTypes
}
export default FabButton
|
src/components/MainPage/AboutPattern.js | cindyqian/BoardGames | import React from 'react';
import {connect} from 'react-redux'
import cs from '../../services/CommunicationService'
import RemoteService from '../../services/RemoteService'
import Footer from './Footer';
/**
*
*/
class _AboutPattern extends React.Component{
componentDidMount(tabId) {
let self = this;
RemoteServic... |
test/utils/CustomPropTypesSpec.js | bvasko/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import CustomPropTypes from '../../src/utils/CustomPropTypes';
import {shouldWarn} from '../helpers';
function isChainableAndUndefinedOK(validatorUnderTest) {
it('Should validate OK with undefined or null values', () => {
assert.is... |
packages/es-components/src/components/containers/notification/Notification.js | jrios/es-components | import React from 'react';
import PropTypes from 'prop-types';
import { noop } from 'lodash';
import { useNotification } from './useNotification';
const DefaultNotification = useNotification();
function Notification(props) {
return <DefaultNotification {...props} />;
}
Notification.propTypes = {
/* The type of ... |
src/index.js | zfanta/react-sequence-diagram | import React, { Component } from 'react';
import Diagram from './sequence-diagram-2.0.1';
class SequenceDiagram extends Component {
componentDidUpdate() {
if (!this.div) return;
const { input, options } = this.props;
if (this.div.children[0]){
this.div.removeChild(this.div.children[0]);
}
... |
src/routes.js | justboris/isomorphic-react-redux-app | /* eslint react/jsx-filename-extension: 0 */
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import {
App,
Home,
About,
Testing,
NotFound,
} from './containers';
export default (store) => { // eslint-disable-line
return (
<Route path="/" component={App}>
{ /* Home (... |
packages/react/src/components/FormatJson.js | wq/wq.app | import React from 'react';
import PropTypes from 'prop-types';
export default function FormatJson({ json }) {
return (
<pre>
<code>{JSON.stringify(json, null, 4)}</code>
</pre>
);
}
FormatJson.propTypes = {
json: PropTypes.object
};
|
src/components/ProfessionalPage.js | W01fw00d/w01fw00d_portfolio | import React, { Component } from 'react';
import '../stylesheets/ProfessionalPage.css';
import Gallery from './Gallery';
import edreams_gif1 from '../assets/gallery/edreams1.gif';
import edreams_gif2 from '../assets/gallery/edreams2.gif';
import esbaluard_gif1 from '../assets/gallery/esbaluard1.gif';
import esbaluard... |
definitions/npm/react-css-modules_v3.x.x/flow_v0.53.x-/test_react-css-modules-v3.js | echenley/flow-typed | // @flow
import React, { Component } from 'react';
import CSSModules from 'react-css-modules';
const styles = { test: '123' };
class ExampleModule extends Component<{
foo: string,
styles: typeof styles,
}> {
render() {
return <div className={this.props.styles}>{this.props.foo}</div>;
}
}
const ExampleCS... |
system/src/routes/Document/containers/EditDocumentViewContainer/index.js | axmatthew/react | import React, { Component } from 'react';
import { connect } from 'react-redux';
import documentModule from '../../../../modules/documents';
import EditDocumentView from '../../components/EditDocumentView';
import { baseMapStateToProps } from '../../../../common/container-helpers';
class EditDocumentViewContainer exte... |
docs/src/app/components/pages/components/Toggle/Page.js | pradel/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import toggleReadmeText from './README';
import ToggleExampleSimple from './Exam... |
blueprints/view/files/__test__/views/__name__View.spec.js | pawelniewie/zen | import React from 'react'
describe('(View) <%= pascalEntityName %>', () => {
it('should exist', () => {
})
})
|
src/docs/examples/TextInputCSSModules/ExampleError.js | abhiisheek/ps-react-abhiisheek | import React from 'react';
import TextInputCSSModules from 'ps-react-abhiisheek/TextInputCSSModules';
/** Required TextBox with error */
export default class ExampleError extends React.Component {
render() {
return (
<TextInputCSSModules
htmlId="example-optional"
label="First Name"
... |
js/App.js | giladl82/complete-intro-to-react | import React from 'react'
import { Route } from 'react-router-dom'
import { Provider } from 'react-redux'
import store from './store'
// import Landing from './Landing'
// import Search from './Search'
// import Details from './Details'
import AsycRoute from './AsyncRoute'
import preload from '../public/data.json'
// i... |
rojak-ui-web/src/Routes.js | reinarduswindy/rojak | import { Route, IndexRoute } from 'react-router';
import React from 'react';
import Container from './app/utils/Container';
import HomePage from './app/home/HomePage';
export default (
<Route component={Container}>
<Route path="/(search/:keyword)" component={HomePage} />
</Route>
)
|
webserver/src/components/AppRoutes.js | lukedoolittle/moviematch | 'use strict';
import React from 'react';
import { Router, browserHistory } from 'react-router';
import routes from '../routes';
export default class AppRoutes extends React.Component {
render() {
return (
<Router history={browserHistory} routes={routes} onUpdate={() => window.scrollTo(0, 0)}/>
);
}
... |
src/containers/Root.prod.js | vojtechsoban/mortgage-calc | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import App from 'src/App';
export default class Root extends Component {
static propTypes = {store: PropTypes.object.isRequired};
render() {
const { store } = this.props;
return (
<... |
frontend/component/Footer.js | wangmuming/node-forum | import React from 'react';
const footerStyle = {
marginTop: 50,
padding: 20
};
export default class Footer extends React.Component{
render(){
return(
<div className="text-center" style={footerStyle}>
© CopyRight Node.js实战
</div>
);
}
}
|
components/app_bar/AppBar.js | react-toolbox/react-toolbox | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import { themr } from 'react-css-themr';
import { APP_BAR } from '../identifiers';
import InjectIconButton from '../button/IconButton';
const factory = (IconButton) => {
class AppBar extends React.Component {
static propT... |
src/routes/Projects/components/NewProjectDialog/NewProjectDialog.js | ronihcohen/magic-vote | import React from 'react'
import PropTypes from 'prop-types'
import Dialog from 'material-ui/Dialog'
import FlatButton from 'material-ui/FlatButton'
import { Field, reduxForm } from 'redux-form'
import { TextField } from 'redux-form-material-ui'
import { required } from 'utils/form'
import { NEW_PROJECT_FORM_NAME } fro... |
test/pullHook-test.js | OnsenUI/react-onsenui | /* global describe it assert */
import React from 'react';
import ReactDOM from 'react-dom';
import {PullHook} from '../dist/react-onsenui.js';
import TestUtils from 'react/lib/ReactTestUtils';
import rendersToComponent from './testUtil.js';
describe('PullHook', function() {
rendersToComponent(
<PullHook />,
... |
node_modules/react-router/es6/Redirect.js | sauceSquatch/we_are_razorfish_experience | 'use strict';
import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './PatternUtils';
import { falsy } from './PropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropT... |
fields/explorer/components/FieldType.js | trentmillar/keystone | import React from 'react';
import Markdown from 'react-markdown';
import Col from './Col';
import Row from './Row';
import FieldSpec from './FieldSpec';
const ExplorerFieldType = React.createClass({
getInitialState () {
return {
readmeIsVisible: !!this.props.readme,
filter: this.props.FilterComponent.getDefa... |
src/icons/IosReverseCameraOutline.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosReverseCameraOutline extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M301.815,318.608c-13.114,11.029-28.956,17.356-45.815,17.356c-36.36,0-66.286-28.965-70.89-61.965h30.6... |
app/controllers/routine.js | crodriguez1a/react-my-pace | // TODO Deprecate this controller pattern
import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
import Timer from 'timer.js';
import Session from './../session/routine';
import { PieChart } from 'react-d3-basic';
import ProgressClock from './../components/progress-clock';
import Pro... |
src/client/router.js | gustavoisensee/twittercounter | import React from 'react';
import Provider from 'react-redux';
import { history } from './store';
import { Router, Route, IndexRoute } from 'react-router';
import MainLayout from './layouts/main';
import GroupContainer from './modules/group/container';
export default (
<Router history={history}>
<Route componen... |
src/components/LibraryItem.js | jenca-cloud/jenca-gui | import React from 'react'
import { Grid, Cell } from 'react-mdl'
import RunButton from "./RunButton";
const buttonTitles = {
run:"Add to Project",
link:"Open App"
}
export default function LibraryItem(props) {
var title = buttonTitles[props.app.type] || "click me"
return (
<div id="library-item">
<div clas... |
presentation/examples/future-advisor-lite/client/components/About.js | iansinnott/react-static-presentation | import React from 'react';
import s from './About.styl';
export const WhoWeAre = React.createClass({
render() {
return (
<div>
<div className={s.banner}>
<div className={s.container}>
<h1>Get advice from our industry-leading experts</h1>
<p>
We are a... |
ui/src/playlist/PlaylistList.js | cloudsonic/sonic-server | import React from 'react'
import {
Datagrid,
DateField,
EditButton,
Filter,
NumberField,
SearchInput,
TextField,
useUpdate,
useNotify,
} from 'react-admin'
import Switch from '@material-ui/core/Switch'
import { DurationField, List, Writable, isWritable } from '../common'
const PlaylistFilter = (props... |
app/components/button.js | garth/material-components | import React from 'react';
import Example from './example';
import { Button } from '../../lib';
export default () => (
<div>
<Example
code={`
import { Button } from 'material-components';
`}
/>
<Example
code={`
// enabled buttons
<Button onClick={onClick}>Normal</Button>
<Button onCli... |
src/components/videoDetail.js | gabriellisboa/reduxStudies | import React from 'react';
const VideoDetail = ({ video }) => {
if(!video) {
return <div>Loading...</div>
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail">
<div className="embed-responsi... |
packages/wix-style-react/src/Notification/TextLabel/TextLabel.spec.js | wix/wix-style-react | import React from 'react';
import TextLabel from '.';
describe('TextLabel', () => {
it('should have correct displayName', () => {
expect(TextLabel.displayName).toBe('Notification.TextLabel');
});
});
|
src/components/ColourPreview.js | colouroscope/colouroscope | import React from 'react'
let ColourPreview = ({ colour }) => {
const preview = {
height: 300,
width: '100%',
backgroundColor: colour,
border: '2px solid grey',
}
return (
<div className="mb-4" style={preview}></div>
)
}
export default ColourPreview
|
stories/SingleDatePicker_calendar.js | intwarehq/react-dates | import React from 'react';
import moment from 'moment';
import { storiesOf } from '@kadira/storybook';
import SingleDatePickerWrapper from '../examples/SingleDatePickerWrapper';
import { VERTICAL_ORIENTATION, ANCHOR_RIGHT } from '../constants';
const TestPrevIcon = () => (
<span
style={{
border: '1px sol... |
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavSearch.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
js/src/views/Home/Dapps/dapp.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... |
app/javascript/mastodon/features/home_timeline/components/column_settings.js | codl/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
import SettingText from '../../../components/se... |
examples/with-supertokens/pages/_app.js | JeromeFitz/next.js | import '../styles/globals.css'
import React from 'react'
import { useEffect } from 'react'
import SuperTokensReact from 'supertokens-auth-react'
import * as SuperTokensConfig from '../config/frontendConfig'
import Session from 'supertokens-auth-react/recipe/session'
import { redirectToAuth } from 'supertokens-auth-reac... |
tests/components/Counter/Counter.spec.js | sqdron/sqdron.UI | // import React from 'react'
// import { bindActionCreators } from 'redux'
// import { Counter } from 'components/Counter/Counter'
// import { shallow } from 'enzyme'
//
// describe('(Component) Counter', () => {
// let _props, _spies, _wrapper
//
// beforeEach(() => {
// _spies = {}
// _props = {
// ... |
static/src/js/components/executions/ConsoleOutput.js | enginyoyen/blackcrystal | import React from 'react';
import { Label } from 'react-bootstrap';
import $ from 'jquery';
import { jobExecutionLogURI } from '../../utils/Config'
const ConsoleOutput = React.createClass({
loadData() {
return $.ajax({
type: "GET",
url: jobExecutionLogURI(this.props.jobName, this... |
src/svg-icons/av/high-quality.js | kittyjumbalaya/material-components-web | 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.... |
src/templates/category-template.js | faizhasim/faizhasim.github.io | // @flow strict
import React from 'react';
import { graphql } from 'gatsby';
import Layout from '../components/Layout';
import Sidebar from '../components/Sidebar';
import Feed from '../components/Feed';
import Page from '../components/Page';
import Pagination from '../components/Pagination';
import { useSiteMetadata }... |
admin/client/App/screens/Item/index.js | ONode/keystone | /**
* Item View
*
* This is the item view, it is rendered when users visit a page of a specific
* item. This mainly renders the form to edit the item content in.
*/
import React from 'react';
import { Center, Container, Spinner } from '../../elemental';
import { connect } from 'react-redux';
import { Link } from ... |
app/containers/Orders/index.js | RichAbrahams/electron-project | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import * as actions from './actions';
import * as selectors from './selectors';
import SectionHeader from '../../components/SectionHeader';
class Orders extends Component {
component... |
react_native_frontend/index.android.js | CUNYTech/BudgetApp | import React, { Component } from 'react';
import {
AppRegistry,
StatusBar
} from 'react-native';
import App from './src/app';
StatusBar.setHidden(true);
AppRegistry.registerComponent('BudgetApp', () => App);
|
project/src/scenes/Admin/Navigation/components/NavigationEditor/NavigationEditor.js | boldr/boldr | /* @flow */
import React from 'react';
import styled from 'styled-components';
import NavigationForm from '../NavigationForm';
export type Props = {
onFormSubmit?: Function,
initialValues?: {
position?: number,
link?: string,
name?: string,
},
};
const FormInner = styled.div`padding: 1em;`;
const Nav... |
src/components/NotFoundPage/NotFoundPage.js | ShaneDrury/clicker | /*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
//require('./NotFoundPage.less');
import React from 'react';
var NotFoun... |
packages/material-ui-icons/src/TabletAndroid.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let TabletAndroid = props =>
<SvgIcon {...props}>
<path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z" />
</SvgIcon>;
T... |
src/Select.js | prometheusresearch/react-ui | /**
* @copyright 2016-present, Prometheus Research, LLC
* @flow
*/
import React from 'react';
export const NOVALUE = '__NOVALUE__';
const NOVALUE_OPTION = {label: '', value: NOVALUE};
type Option = {
value: string,
label?: string,
hint?: string,
};
type Props = {
options: Array<Option>,
value: string,... |
src/utils/createContextWrapper.js | insionng/react-bootstrap | import React from 'react';
/**
* Creates new trigger class that injects context into overlay.
*/
export default function createContextWrapper(Trigger, propName) {
return function (contextTypes) {
class ContextWrapper extends React.Component {
getChildContext() {
return this.props.context;
}... |
src/views/Statistic/StatisticLabel.js | Semantic-Org/Semantic-UI-React | import cx from 'clsx'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
createShorthandFactory,
customPropTypes,
getElementType,
getUnhandledProps,
} from '../../lib'
/**
* A statistic can contain a label to help provide context for the presented value.
*/
function Stati... |
React Fundamentals/Exam_prep_2/exam-prep-2/src/App.js | NikiStanchev/SoftUni | import React, { Component } from 'react';
import { Route, Switch, withRouter } from 'react-router-dom';
import Header from './components/common/Header';
import RegisterPage from './components/Auth/RegisterPage';
import LoginPage from './components/Auth/LoginPage';
import HomePage from './components/HomePage/HomePage';
... |
src/DatePicker.js | yyssc/ssc-grid | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { default as ReactBootstrapDatePicker } from 'react-bootstrap-date-picker';
/**
* DatePicker控件
*/
export default class DatePicker extends Component {
static displayName = 'DatePicker'
static defaultProps = {
dateFormat: 'YYY... |
src/main.js | rickyduck/pp-frontend | import React from 'react'
import ReactDOM from 'react-dom'
import createStore from './store/createStore'
import AppContainer from './containers/AppContainer'
// ========================================================
// Store Instantiation
// ========================================================
const initialState... |
project-the-best/src/component/dialog/Dialog.js | renhongl/Summary |
import React, { Component } from 'react';
import { Draggable } from '../../share/mr/mr';
import { Icon } from 'antd';
import { lang } from '../../share/config/lang';
import './style.less';
export default class Dialog extends Component{
constructor(props) {
super(props);
}
componentDidMount() {
... |
packages/slate-react/test/rendering/fixtures/custom-decorator.js | ashutoshrishi/slate | /** @jsx h */
import React from 'react'
import h from '../../helpers/h'
function decorateNode(block) {
const text = block.getFirstText()
return [
{
anchorKey: text.key,
anchorOffset: 1,
focusKey: text.key,
focusOffset: 2,
marks: [{ type: 'bold' }],
},
]
}
function Bold(pro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.