path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/initialize.js | fleidloff/react-vanilla | import ReactDOM from 'react-dom';
import React from 'react';
import App from 'components/App';
document.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(<App />, document.querySelector('#app'));
});
|
third_party/blink/perf_tests/speedometer/resources/todomvc/architecture-examples/react-redux/src/index.js | chromium/chromium | import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './containers/App'
import reducer from './reducers'
import 'todomvc-app-css/index.css'
const store = createStore(reducer)
render(
<Provider store={store}>
<App ... |
server/pages/test/index.js | Kimsangcheon/wp-calypso | /**
* External dependencies
*/
import { assert } from 'chai';
import React from 'react';
import ReactDomServer from 'react-dom/server';
import mockery from 'mockery';
import noop from 'lodash/noop';
/**
* Internal dependencies
*/
import { createReduxStore } from 'state';
describe( 'Server pages:', function() {
c... |
components/Layout/Navigation.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';
... |
example/src/views/lists_detail.js | fengshanjian/react-native-komect-uikit | import Expo from 'expo';
import React, { Component } from 'react';
import { View, ScrollView, StyleSheet, Platform } from 'react-native';
import { Text, Button, Icon, Card } from 'react-native-elements';
import colors from 'HSColors';
import socialColors from 'HSSocialColors';
import fonts from 'HSFonts';
class Icon... |
src/components/FileUploader/FileUploader-test.js | jzhang300/carbon-components-react | import React from 'react';
import FileUploader, { FileUploaderButton, Filename } from '../FileUploader';
import { mount } from 'enzyme';
describe('Filename', () => {
const mountWrapper = mount(<Filename name={'trees.jpg'} />);
describe('click on edit icon (close--glyph)', () => {
it('should have a click event... |
src/components/Containers.react.js | francisar/kitematic_forWin10 | import $ from 'jquery';
import _ from 'underscore';
import React from 'react';
import Router from 'react-router';
import containerStore from '../stores/ContainerStore';
import ContainerList from './ContainerList.react';
import Header from './Header.react';
import metrics from '../utils/MetricsUtil';
import shell from '... |
app/javascript/mastodon/features/generic_not_found/index.js | corzntin/mastodon | import React from 'react';
import Column from '../ui/components/column';
import MissingIndicator from '../../components/missing_indicator';
const GenericNotFound = () => (
<Column>
<MissingIndicator />
</Column>
);
export default GenericNotFound;
|
client/components/usage/index.js | danshankspark/go-react | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { IndexLink } from 'react-router';
import { usage, todo } from './styles';
import { example, p, link } from '../homepage/styles';
import { setConfig } from '../../actions';
class Usage extends Com... |
src/js/containers/MenubarWindow.js | rscarvalho/build-status | import {app} from 'remote';
import React from 'react';
import WindowManager from '../WindowManager';
export default React.createClass({
handleProjectWindowOpenClick() {
WindowManager.openProjectsWindow();
},
handleQuitClick() {
app.quit();
},
render() {
return (
<div>
<h3>build-st... |
examples/auth-with-shared-root/components/Login.js | stshort/react-router | import React from 'react'
import { withRouter } from 'react-router'
import auth from '../utils/auth.js'
const Login = React.createClass({
getInitialState() {
return {
error: false
}
},
handleSubmit(event) {
event.preventDefault()
const email = this.refs.email.value
const pass = this.r... |
frontend/Lab1/node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | jn199/ci346-assignment | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/friends/Friends.entry.js | Brandon-J-Campbell/codemash | import React from 'react';
import getFriendsFromApi from './get-friends-from-api';
import Friends from './Friends';
export default class FriendsEntry extends React.Component {
state = {
friends: []
}
async componentDidMount() {
const friends = await getFriendsFromApi();
this.setState({
frien... |
src/svg-icons/hardware/toys.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareToys = (props) => (
<SvgIcon {...props}>
<path d="M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 2... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/NoExtInclusion.js | Exocortex/create-react-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 aFileWithoutExt from './assets/aFileWithoutExt';
const text = aFileWithoutExt.includes('base64')
? ... |
modules/Router.js | whouses/react-router | import React from 'react'
import warning from 'warning'
import createHashHistory from 'history/lib/createHashHistory'
import { createRoutes } from './RouteUtils'
import RoutingContext from './RoutingContext'
import useRoutes from './useRoutes'
import { routes } from './PropTypes'
const { func, object } = React.PropTyp... |
app/components/ReOrder/RePickupAddress.js | prudhvisays/newsb | import React from 'react';
import Input from './ReInput';
import Flatpickr from 'react-flatpickr';
import PickupLocation from './PickupLocation';
import moment from 'moment';
export default class RePickupAddress extends React.Component { //eslint-disable-line
constructor(props) {
super(props);
this... |
src/svg-icons/maps/tram.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTram = (props) => (
<SvgIcon {...props}>
<path d="M19 16.94V8.5c0-2.79-2.61-3.4-6.01-3.49l.76-1.51H17V2H7v1.5h4.75l-.76 1.52C7.86 5.11 5 5.73 5 8.5v8.44c0 1.45 1.19 2.66 2.59 2.97L6 21.5v.5h2.23l2-2H14l2 2h... |
src/containers/context_menu.js | joker1007/blackalbum | /* @flow */
import React, { Component } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { regenerateThumbnail, copyFullpath } from '../actions';
let remote = global.require('electron').remote;
let Menu = remote.Menu;
class ContextMenu extends Co... |
app/components/Console.js | Ribeiro/fil | import _ from 'underscore';
import React from 'react';
import OutputLine from 'components/OutputLine';
import ConsoleToolbar from 'components/ConsoleToolbar';
import ErrorLine from 'components/ErrorLine';
export default class Console extends React.Component {
renderLine(line, i) {
return <OutputLine
... |
src/pages/tag.js | voidxnull/libertysoil-site | /*
This file is a part of libertysoil.org website
Copyright (C) 2015 Loki Education (Social Enterprise)
This program 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... |
src/routes/home/Home.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 withStyles from 'isom... |
src/renderer/components/Articles.js | uetchy/cabret | import React from 'react'
import Article from './Article'
export default class Articles extends React.Component {
constructor(...args) {
super(...args);
this.appStore = this.props.context.appStore;
this.fileStore = this.props.context.fileStore;
this.state = {
files: this.fileStore.getFiles(),
... |
app/components/MessageForm/MessageForm.js | Jacob-Elder/react-socket.io-messaging-v2 | import React from 'react'
import './MessageForm.css'
class MessageForm extends React.Component {
constructor (props) {
super(props)
this.state = {
text: ''
}
this.handleSubmit = this.handleSubmit.bind(this)
this.updateInput = this.updateInput.bind(this)
}
handleSubmit (e) {
e.preventDefault()
var... |
src/Card/CardTitle.js | react-mdl/react-mdl | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const propTypes = {
className: PropTypes.string,
expand: PropTypes.bool
};
const CardTitle = props => {
const { className, children, expand, ...otherProps } = props;
const classes = classNames('mdl-car... |
src/components/Button/demo/wanshi1/index.js | lebra/lebra-components | import React, { Component } from 'react';
import { render } from 'react-dom';
import Button from '../../index';
import './index.less';
export default class BaseDemo extends Component {
render() {
return (
<div className="button-con">
<div className="left">
<Button>确定</Button>
<Button ... |
src/client.js | mrblueblue/react-collider | import React from 'react'
import Router from 'react-router'
import collider from './reactCollider'
import {merge} from 'ramda'
const defaultOptions = {
fetch: null
}
// Client side rendering
var renderPage = function reanderPage(Handler, data) {
React.render(React.createElement(Handler, {data: data}), documen... |
client/modules/App/pages/HomePage.js | Bonchouuur/kimanjou | import React from 'react';
import Helmet from 'react-helmet';
import { Image } from 'semantic-ui-react';
import styled from 'styled-components';
// Import Layout
import LayoutPage from './LayoutPage';
const HomePage = () => {
return (
<LayoutPage titleToTranslate="home">
<Helmet title="Home" />
<Tex... |
packages/icons/src/md/image/Iso.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdIso(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M38 6c2.21 0 4 1.79 4 4v28c0 2.21-1.79 4-4 4H10c-2.21 0-4-1.79-4-4V10c0-2.21 1.79-4 4-4h28zm-27 9v3h4v4h3v-4h4v-3h-4v-4h-3v4h-4zm27 23V10L10 38h28zm-4-4v... |
src/components/Resume.js | thejapanexperience/newWebsiteShell | import React from 'react';
class Resume extends React.Component {
constructor() {
super();
this.state = {
showResume: false,
buttonText1: 'Show résumé?',
buttonText2: 'Hide résumé?',
buttonText: 'Show résumé?'
};
// this.resumeClick = this.resumeClick.bind(this);
}
// re... |
ajax/libs/react-instantsearch/5.4.0/Connectors.js | sufuf3/cdnjs | /*! React InstantSearch 5.4.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) ... |
packages/cf-component-card/test/CardDrawers.js | koddsson/cf-ui | import React from 'react';
import renderer from 'react-test-renderer';
import {
CardDrawers,
CardToolbar,
CardToolbarLink
} from '../../cf-component-card/src/index';
test('should render when given all the props', () => {
const component = renderer.create(
<CardDrawers
onClick={() => {}}
active=... |
app/containers/HomePage.js | zhangmhao/memo | // @flow
import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home />
);
}
}
|
src/svg-icons/notification/more.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationMore = (props) => (
<SvgIcon {...props}>
<path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5... |
src/admin/components/letters/letter_header.js | foundersandcoders/sail-back | import React from 'react'
export default () => (
<div className='header'>
<h1>Friends of Chichester Harbour</h1>
<h3>Registered Charity No: 1051162</h3>
<img src='/images/logo.png' className='letter-logo'></img>
</div>
)
|
client/index.js | acguanacaste/liomysSalvini | /**
* Client entry point
*/
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import { configureStore } from './store';
// Initialize store
const store = configureStore(window.__INITIAL_STATE__);
const mountApp = document.getEleme... |
examples/preact/src/components/CounterButton/CounterButton.js | bluetidepro/react-styleguidist | import React, { Component } from 'react';
/**
* Button that counts how many times it was pressed and exposes a `@public` method to reset itself.
*/
export default class CounterButton extends Component {
constructor() {
super();
this.state = {
value: 0,
};
}
/**
* Sets the counter to a particular value... |
src/universalRouter.js | DLMR/react-redux-universal-hot-example | import React from 'react';
import Router from 'react-router';
import routes from './views/routes';
import { Provider } from 'react-redux';
const getFetchData = (component) => {
return component.fetchData || (component.DecoratedComponent && component.DecoratedComponent.fetchData);
};
export function createTransition... |
packages/react-ui-components/src/Badge/index.story.js | grebaldi/PackageFactory.Guevara | import React from 'react';
import {storiesOf} from '@storybook/react';
import {withKnobs, text} from '@storybook/addon-knobs';
import {StoryWrapper} from './../_lib/storyUtils';
import Badge from '.';
storiesOf('Badge', module)
.addDecorator(withKnobs)
.addWithInfo(
'default',
`The Badge compon... |
examples/Modal.js | adamschroder/react-overlays | import React from 'react';
import Button from 'react-bootstrap/lib/Button';
import Modal from 'react-overlays/Modal';
let rand = ()=> (Math.floor(Math.random() * 20) - 10);
const modalStyle = {
position: 'fixed',
zIndex: 1040,
top: 0, bottom: 0, left: 0, right: 0
};
const backdropStyle = {
...modalStyle,
z... |
src/components/general/ProfileStats.js | katima-g33k/blu-react-desktop | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Col, Row } from 'react-bootstrap';
import { calculateStats } from '../../lib/helpers/profileStats';
import i18n from '../../lib/i18n';
import { Copy } from '../../lib/models';
import Spinner from './Spinner';
const styles = {
pr... |
src/default-config.js | zapier/formatic | // # default-config
/*
This is the default configuration plugin for formatic. To change formatic's
behavior, just create your own plugin function that returns an object with
methods you want to add or override.
*/
'use strict';
import React from 'react';
import _ from '@/src/undash';
import utils, { argumentsToArray... |
app/components/events/event.js | robhogfeldt-fron15/rdogs | import React from 'react';
class Event extends React.Component {
constructor(props) {
super(props);
this.state = {
choosenEvent: ''
};
}
handleEventClick(i){
this.props.changeNumber(this.props.events[i]);
// this.setState({choosenEvent: this.state.events[i]
}
r... |
packages/reactor-kitchensink/src/examples/PivotGrid/RowStyling/RowStyling.js | markbrocato/extjs-reactor | import React, { Component } from 'react';
import { PivotGrid } from '@extjs/reactor/modern';
import SaleModel from '../SaleModel';
import { generateData } from '../generateSaleData'; |
src/components/NewPlayerForm.js | TylerBriskie/client-portal-blackjack-UI | import React, { Component } from 'react';
import '../App.css';
class NewPlayerForm extends Component {
constructor(props) {
super(props);
this.state= {};
this.handlePlayerNameChange = this.handlePlayerNameChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
idIndex = 1;
tem... |
react/Radio/Radio.sketch.js | seekinternational/seek-asia-style-guide | import React from 'react';
import PropTypes from 'prop-types';
import Radio from './Radio';
const Container = ({ children }) => <div>{children}</div>;
Container.propTypes = {
children: PropTypes.node.isRequired
};
const noop = () => {};
export const symbols = {
'Radio/Checked': (
<Container>
<Radio id=... |
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/es/CustomInput.js | GoogleCloudPlatform/prometheus-engine | import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["className", "label", "inline", "valid", "invalid", "cssModule", "children", "bsSize", "innerRef", "htmlFor"],
_excluded2 = ["type"],
_... |
src/svg-icons/action/https.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-... |
docs/src/app/components/pages/components/Chip/Page.js | ArcanisCz/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 chipReadmeText from './README';
import ChipExampleSimple from './ExampleS... |
src/index.js | toffee7/ReactStarterComponents | import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';
import App from './components/app';
import DataFlowContainer from './components/linkageComponents/dataFlowContainer';
import SampleChart from './components/userComponents/sampleChart';
import SampleTab... |
src/components/Button/Button.js | Landish/react-spectre-css | import React from 'react';
import { string, bool, oneOf, func } from 'prop-types';
import classNames from 'classnames';
const Button = ({
text,
children,
type,
tooltip,
tooltipPosition,
size,
circle,
className,
full,
loading,
disabled,
onClick,
...rest
}) => {
return (
<button
onC... |
src/app/components/bootstrapModalLink.js | benigeri/soapee-ui | import React from 'react';
import Portal from 'react-portal';
import BootstrapModal from 'components/bootstrapModal';
export default React.createClass({
render() {
let Modal = this.props.modal;
return (
<Portal
openByClickOn={this.props.elementToClick}
... |
app/components/Footer.js | yaolei/Node-Clound | import React from 'react';
import ReactDOM from 'react-dom';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
var style = {
backgroundColor: "#00BCD4",
color: "#FFF",
b... |
1-add-react/src/client.js | chemoish/react-universal-tutorial | // This will emulate a full ES6 environment.
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import Layout from './layout';
render(<Layout />, document.getElementById('root'));
|
src/svg-icons/navigation/chevron-right.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronRight = (props) => (
<SvgIcon {...props}>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</SvgIcon>
);
NavigationChevronRight = pure(NavigationChevronRight);
NavigationChevronRigh... |
src/components/pages/ContactPage/ContactPage.js | mdapper/marcelodapper | import React from 'react';
import MainTemplate from 'components/templates/MainTemplate';
const ContactPage = () => (
<MainTemplate title="Contact">
<div>ContactPage</div>
</MainTemplate>
);
export default ContactPage;
|
docs/src/app/components/pages/components/Paper/Page.js | w01fgang/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 paperReadmeText from './README';
import PaperExampleSimple from './Exampl... |
docs/app/Examples/elements/Reveal/Types/index.js | ben174/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Fade'
description='An el... |
src/pages/chart/ECharts/ChartAPIComponent.js | zuiidea/antd-admin | import React from 'react'
import ReactEcharts from 'echarts-for-react'
class ChartAPIComponent extends React.Component {
render() {
const option = {
title: {
text: '漏斗图',
subtext: '纯属虚构',
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}%',
},
... |
src/pages/admin/AdminCustomersPage.js | belaczek/BeerCheese-client | import React from 'react';
import { Container, Button, Table, Jumbotron } from 'reactstrap';
import localizedTexts from '../../text_localization/LocalizedStrings';
import { connect } from 'react-redux';
import { openModal } from '../../actions/openModal';
import api from '../../api';
class AdminCustomersPage extends R... |
docs/app/src/Routes.js | tercenya/compendium | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import Root from './Root';
import Home from './pages/Home';
import Introduction from './pages/Introduction';
import Prerequisites from './pages/Prerequisites';
import Guides from './pages/Guides';
import Faq from './pages/Faq';
import Resour... |
lib/index.js | noahpeden/weathrly | import ajax from './ajax.js';
import style from './style.scss';
import Main from './Main';
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<Main />, document.getElementById('application'));
|
src/components/navigation/LeftMenu/LeftMenu.js | CtrHellenicStudies/Commentary | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Divider from 'material-ui/Divider';
import Drawer from 'material-ui/Drawer';
// components
import { toggleLeftMenu } from '../../../actions/leftMenu';
import MenuItem from '../MenuItem';
import LeftMenuHead fro... |
app/containers/ConfirmBattleContainer.js | DiegoCardoso/github-battle | import React from 'react'
import ConfirmBattle from '../components/ConfirmBattle'
import githubHelpers from '../utils/githubHelpers'
export default React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
getInitialState() {
return {
isLoading: true,
... |
src/icons/SmokingRoomsIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class SmokingRoomsIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M4 32h30v6H4zm37 0h3v6h-3zm-5 0h3v6h-3zm1.7-16.54c1.23-1.21 2-2.9 2-4.76C39.7 7 36.69 4 33 4v3c2.04 0... |
static/scripts/app.js | minhuaF/bcb-koa2 | import '../css/reset.css';
import '../css/common.css';
import '../css/main.css';
import '../css/project.css';
import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import AsyncProps from 'async-props';
const rootRoute = {
component: 'div',
childR... |
packages/expo-status-bar/build/ExpoStatusBar.ios.js | exponentjs/exponent | import React from 'react';
import { StatusBar } from 'react-native';
import styleToBarStyle from './styleToBarStyle';
import useColorScheme from './useColorScheme';
export default function ExpoStatusBar(props) {
const { style, animated, hidden, hideTransitionAnimation, networkActivityIndicatorVisible } = props;
... |
components/Footer.js | uclaacm/website | import Link from 'next/link';
import React from 'react';
import committees from '../data/committees';
import styles from '../styles/components/Footer.module.scss';
import SocialMedia from './SocialMedia';
const footerACMLinks = [
{ title: 'About', path: '/about' },
{ title: 'Committees', path: '/committees' },
{ ti... |
index.ios.js | tom-sanftenberg/reactNativeTodoList | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class TodoList extends Component {
render() {
return (
<View style={styles.container}... |
wrappers/md.js | InnoD-WebTier/bsjas | import React from 'react'
import 'css/markdown-styles.css'
import Helmet from "react-helmet"
import { config } from 'config'
import { prefixLink } from 'gatsby-helpers'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const post = th... |
src/App.js | lishengzxc/ReactReduxTodo | import React from 'react';
import ReactDOM from 'react-dom';
import AddTodo from './AddTodo';
import TodoList from './TodoList';
import Footer from './Footer';
import { connect } from 'react-redux';
import { addTodo, completeTodo, setVisibilityFilter, VisibilityFilters } from './actions';
export default class App exte... |
packages/bonde-admin/src/mobilizations/components/form-share.js | ourcities/rebu-client | import PropTypes from 'prop-types'
import React from 'react'
import { FormattedMessage, intlShape, injectIntl } from 'react-intl'
import { reduxForm } from 'redux-form'
import { FormGroup, ControlLabel, FormControl, UploadImageField } from '@/components/forms'
const FormShare = ({
FormComponent,
fields: {
fac... |
client/src/javascript/components/icons/Inactive.js | jfurrow/flood | import React from 'react';
import BaseIcon from './BaseIcon';
export default class Inactive extends BaseIcon {
render() {
return (
<svg className={`icon icon--inactive ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M56,52H42l-9.7-12.5l-11,4.8L13,20.7l-7,4l-2-9.9L17.2,8l9.5,24.4l9.... |
client/node_modules/uu5g03/doc/main/client/src/bricks/color-schema.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import UU5 from 'uu5';
import './color-schema.css';
export default React.createClass({
mixins: [
UU5.Common.BaseMixin,
UU5.Layout.ContainerMixin,
UU5.Common.ColorSchemaMixin,
UU5.Common.SectionMixin
],
statics: {
tagName: 'UU5.Doc.ColorSchema',
... |
app/components/search/Search.spec.js | ilonade/OpenCookbook | import React from 'react'
import { shallow } from 'enzyme'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { Search } from './Search'
import { actions } from './actions'
import { actions as formActions } from '../forms/actions'
import { se... |
src/components/AthletesMenu.js | DavidGuben/overwatchcharacterdatabase | import React from 'react';
import { Route, Link } from 'react-router-dom';
const AhtleteMenuLink = ({ id, to, label }) => (
<Route path={`/athlete/${id}`}>
{({ match }) => (
<Link to={to} className={match ? 'active' : ''}>{label}</Link>
)}
</Route>
);
export const AthletesMenu = ({ athletes }) => (
... |
node_modules/rc-notification/es/Notice.js | prodigalyijun/demo-by-antd | import _defineProperty from 'babel-runtime/helpers/defineProperty';
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-run... |
test/ButtonSpec.js | laran/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Button from '../src/Button';
describe('Button', () => {
it('Should output a button', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Button>
Title
</Button>
);
assert.equal(React.findDO... |
src/containers/MainContainer.js | kimochg/react-native-githubnote-app | /*
* @Author: LIU CHENG
* @Date: 2017-02-22 00:10:31
* @Last Modified by: LIU CHENG
* @Last Modified time: 2017-02-24 15:09:47
*/
import React from 'react';
import Main from '../components/Main';
import DashboardContainer from '../containers/DashboardContainer';
import { connect } from 'react-redux';
import * a... |
app/pages/basePage.js | kettuniko/card-game | import React from 'react'
export default (page, applicationState, checksums) =>
<html>
<head>
<link rel='stylesheet' href={`/styles.css?checksum=${checksums.cssChecksum}`}/>
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
<title>{page.pageTitle}</... |
src/components/ContactDetail.js | jfairbank/example-react-contact-manager | import findWhere from 'lodash/collection/findWhere';
import React from 'react';
import { connect } from 'react-redux';
function renderNoContact() {
return (
<div>Contact Not Found</div>
);
}
function ContactDetail({ contactProps: { contacts }, params }) {
const contact = findWhere(contacts, {
_id: parse... |
examples/todos/index.js | Aweary/redux | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import todoApp from './reducers'
import App from './components/App'
let store = createStore(todoApp)
render(
<Provider store={store}>
<App />
</Provid... |
js/views/ConceptSuggest.js | ucscXena/ucsc-xena-client |
import PureComponent from '../PureComponent';
import React from 'react';
import XAutosuggest from './XAutosuggest';
import Input from 'react-toolbox/lib/input';
var RETURN = 13;
var returnPressed = ev => ev.keyCode === RETURN;
var renderInputComponent = ({ref, onChange, label, error, ...props}) => (
<Input
spellC... |
js/jqwidgets/demos/react/app/grid/everpresentrowwithcustomwidgets/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
import JqxDateTimeInput from '../../../jqwidgets-react/react_jqxdatetimeinput.js';
import JqxDropDownList from '../../../jqwidgets-react/react_jqxdropdownlist.js';
import JqxInput from '../../.... |
app/javascript/src/pages/campaigns/icons.js | michelson/chaskiq | import React from 'react'
// INLINE TOOLTIP
function image () {
return (
<svg
className="icon-photo"
width="20px"
height="20px"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill="#494B56"
fillRule="nonzero"
d="M17.0705329,6.170974... |
src/routes/admin/index.js | medevelopment/updatemeadmin | /**
* 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... |
docs/src/PageHeader.js | thealjey/react-bootstrap | import React from 'react';
const PageHeader = React.createClass({
render() {
return (
<div className="bs-docs-header" id="content">
<div className="container">
<h1>{this.props.title}</h1>
<p>{this.props.subTitle}</p>
</div>
</div>
);
}
});
export default Pag... |
pootle/static/js/shared/components/AutosizeTextarea.js | claudep/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import autosize from 'autosize';
import React from 'react'... |
docs/components/home/HomeFeature.js | JunisphereSystemsAG/react-color | 'use strict'
import React from 'react'
import ReactCSS from 'reactcss'
import { ChromePicker, CompactPicker, MaterialPicker, PhotoshopPicker,
SketchPicker, SliderPicker, SwatchesPicker } from 'react-color'
import { Container, Grid } from 'react-basic-layout'
import { Raised } from 'react-material-design'
im... |
admin/client/App/shared/Portal.js | frontyard/keystone | /**
* Used by the Popout component and the Lightbox component of the fields for
* popouts. Renders a non-react DOM node.
*/
import React from 'react';
import ReactDOM from 'react-dom';
module.exports = React.createClass({
displayName: 'Portal',
portalElement: null, // eslint-disable-line react/sort-comp
compone... |
src/components/SecondaryButton/SecondaryButton-test.js | jzhang300/carbon-components-react | import React from 'react';
import SecondaryButton from '../SecondaryButton';
import { shallow, mount } from 'enzyme';
describe('SecondaryButton', () => {
describe('Renders as expected', () => {
const wrapper = shallow(
<SecondaryButton small className="extra-class">
<div className="child">Test</div... |
src/svg-icons/maps/edit-location.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsEditLocation = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm-1.56 10H9v-1.44l3.35-3.34 1.43 1.43L10.44 12zm4.45-4.45l-.7.7-1.44-1.44.7-.... |
src/js/components/icons/base/UserSettings.js | odedre/grommet-final | /**
* @description UserSettings SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
... |
src/web/components/Stats/CsvExporter.js | asha-nepal/AshaFusionCross | /**
* Copyright 2017 Yuichiro Tsuchiya
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
src/components/post.js | marcusdarmstrong/cloth-io | import React from 'react';
import uriParser from '../util/uri-parser';
import Avatar from './avatar';
import TimeAgo from './time-ago';
const Post = ({ post }) => {
const link = (post.url) ? uriParser(post.url).host : null;
const title = (link) ? (
<a href={post.url} target="_new" className="headline-link">
... |
tests/routes/Home/components/HomeView.spec.js | miyanokomiya/b-net | import React from 'react'
import { HomeView } from 'routes/Home/components/HomeView'
import { render } from 'enzyme'
describe('(View) Home', () => {
let _component
beforeEach(() => {
_component = render(<HomeView />)
})
it('Renders a welcome message', () => {
const welcome = _component.find('h4')
... |
src/components/PlaylistManager/Menu/NewPlaylist.js | welovekpop/uwave-web-welovekpop.club | import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import MenuItem from '@material-ui/core/MenuItem';
import CreatePlaylistIcon from '@material-ui/icons/Add';
import PromptDialog from '../../Dialogs/PromptDialog';
const enhance = tran... |
internals/templates/containers/HomePage/index.js | kdprojects/nichesportapp | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... |
app/javascript/mastodon/features/ui/components/column.js | glitch-soc/mastodon | import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from '../../../scroll';
import { isMobile } from '../../../is_mobile';
export default class Column extends React.PureComponent {
static propTypes = {
... |
src/components/About.js | KDCinfo/track-your-cash | import React from 'react'
import { Well } from 'react-bootstrap'
class About extends React.Component {
render() {
return (
<Well bsSize="large">
<p>This little web app thoughtfully brought to you by... <a href="https://kdcinfo.com/resume" target="kdcNewWin">me</a> :) <s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.