path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/app.js | richgurney/ReactTemperatureApp | import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
import WeatherList from '../containers/weather_list';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
|
src/components/stop.js | saiteja/SvgWithReact | import React from 'react';
export default class Stop extends React.Component {
prepareCords() {
let coords = {
cx: this.props.cx,
cy: this.props.cy,
r: this.props.r,
fill: this.props.fill
}
return coords;
}
render() {
let coord... |
src/screens/settings/settings.js | kevingatera/Eseness | import React, { Component } from 'react';
import {
StyleSheet, Picker, ListView,
View, TouchableOpacity, TouchableHighlight,
Image, Text, StatusBar
} from 'react-native';
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
export default class Settings extends Component {
... |
examples/create-react-app/src/index.js | dsslimshaddy/material-ui | // @flow
import React from 'react';
import { render } from 'react-dom';
import Index from './pages/index';
render(<Index />, document.querySelector('#root'));
|
js/jqwidgets/demos/react/app/grid/togglesubrows/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
import JqxInput from '../../../jqwidgets-react/react_jqxinput.js';
class App extends React.Component {
componentDidMou... |
src/parser/rogue/assassination/modules/spells/GarroteUptime.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import Enemies from 'parser/shared/modules/Enemies';
import StatisticBox fro... |
docs/src/modules/components/AppTheme.js | lgollut/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import Head from 'docs/src/modules/components/Head';
export default function AppTheme(props) {
const { children } = props;
return (
<React.Fragment>
<Head>
<meta name="robots" content="noindex,nofollow" />
</Head>
{childr... |
app/components/BpmRangeSlider.js | jackokerman/react-discogs-dj | import React from 'react';
import 'rc-slider/assets/index.css';
import Slider from 'rc-slider';
const BpmRangeSlider = (props) => {
const { value, min, max, onChange } = props;
const display = `${value[0]} - ${value[1]}`;
return (
<div className="bpm-range-slider">
<div className="bpm-label">BPM</div>
... |
src/svg-icons/image/nature.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageNature = (props) => (
<SvgIcon {...props}>
<path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"/>
</SvgIcon>
);
ImageNature = p... |
webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js | Katello/katello | import React from 'react';
import PropTypes from 'prop-types';
import { MessageDialog } from 'patternfly-react';
import { sprintf, translate as __ } from 'foremanReact/common/I18n';
const DeleteDialog = ({
show, selectedRows, onDeleteSubscriptions, onSubscriptionDeleteModalClose,
}) => (
<MessageDialog
show={s... |
src/components/SearchBox/SearchBox.js | InsideSalesOfficial/insidesales-components | import styled, { ThemeProvider } from 'styled-components';
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import _ from 'lodash';
import Icons from '../icons';
import {
colors,
renderThemeKeyOrDefaultValue,
} from '../styles';
const SearchBarContainer = styled.div... |
src/components/Footer.js | shp54/cliff-effects | import React from 'react';
import {
Grid,
Header,
Icon,
Segment,
} from 'semantic-ui-react';
import { interpolateSnippets } from '../utils/interpolation';
const inlineComponents = {
__heartIcon__: <Icon
name='heart'
size='small' />,
};
const Footer = ({ snippets }) => {
snippets = interpolateSni... |
docs/src/app/components/pages/components/List/ExampleChat.js | igorbt/material-ui | import React from 'react';
import MobileTearSheet from '../../../MobileTearSheet';
import Avatar from 'material-ui/Avatar';
import {List, ListItem} from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
import Divider from 'material-ui/Divider';
import CommunicationChatBubble from 'material-ui/svg-icon... |
src/index.js | hugo-cardenas/jazzroutine-frontend | import App from './render/App';
import pify from 'pify';
import _ from 'lodash';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { connect } from 'react-redux';
import createStore from './state/store';
import jsonStorage from 'electron-json-storage';
import { ... |
src/packages/@ncigdc/routes/ImageViewerRoute/index.js | NCI-GDC/portal-ui | /* @flow */
import React from 'react';
import { Route } from 'react-router-dom';
import LoadableWithLoading from '@ncigdc/components/LoadableWithLoading';
const ImageViewerRoute = (
<Route
path="/image-viewer"
component={LoadableWithLoading({
loader: () => import('./ImageViewerRoute'),
})}
/>
);
... |
js/src/components/UserZones.js | scottdonaldson/voxcel | import CONFIG from '../config';
import React from 'react';
import Firebase from 'firebase';
import swal from 'sweetalert';
import { Route, Link } from 'react-router';
class UserZones extends React.Component {
constructor() {
super();
this.state = {
loggedIn: false,
userId: null,
zones: []
};
}
com... |
test/ImageSpec.js | albertojacini/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Image from '../src/Image';
describe('Image', () => {
it('should be an image', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Image />
);
let image = React.findDOMNode(instance);
image.nodeName... |
app/client/components/battle/HealthBar.js | breakfast-mimes/cyber-mimes | import React from 'react';
const HealthBar = React.createClass({
render() {
let {health, color, max, style} = this.props
return (
<div style={style} className="healthBar noSelect">
<span className="healthPercent">{health}</span>
<div style = {
{
width: 100 * health... |
turismo_client/src/containers/requestTable.js | leiverandres/turismo-risaralda | import React, { Component } from 'react';
import { Card, Message } from 'semantic-ui-react';
import requests from '../utils/requests';
import ListItemsWithPagination from '../components/listItemsWithPagination';
import RequestCard from '../components/root/requestCard';
const itemsPerPage = 16;
class RequestTable ext... |
app/screens/Stadiums/Stadiums.js | mbernardeau/Road-to-Russia-2018 | import React from 'react'
import PropTypes from 'prop-types'
import { map } from 'lodash'
import Stadium from './Stadium'
const Stadiums = ({ stadiums }) => (
<div style={styles.container}>
{map(stadiums, (stadium, key) => <Stadium stadium={stadium} key={key} />)}
</div>
)
const styles = {
container: {
... |
src/SuggestionList.js | bbokorney/hold-my-beer | import React from 'react';
import './SuggestionList.css'
class SuggestionList extends React.Component {
render() {
const listItems = this.props.suggestions.map((suggestion) => {
return (
<li
className="SuggestionList-item"
key={suggestion.id}
onClick={() => this.props.... |
src/SvgIcon/SvgIcon.js | skarnecki/material-ui | import React from 'react';
import transitions from '../styles/transitions';
class SvgIcon extends React.Component {
static muiName = 'SvgIcon';
static propTypes = {
/**
* Elements passed into the SVG Icon.
*/
children: React.PropTypes.node,
/**
* This is the fill color of the svg icon.... |
es/components/PlaylistManager/Panel/DeletePlaylistButton.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import _inheritsLoose from "@babel/runtime/helpers/builtin/inheritsLoose";
import _assertThisInitialized from "@babel/runtime/helpers/builtin/assertThisInitialized";
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18... |
src/component/Button.js | ssohjiro/react_inline_with_webpack_starter | import React from 'react';
import StyleSheet from 'react-inline';
import cx from 'classnames';
const { oneOf, bool } = React.PropTypes;
class Button extends React.Component {
render() {
const { size, busy, block, className } = this.props;
const classes = cx( styles.default ,styles[ size ], block && styles.bloc... |
packages/react-ui-core/src/Carousel/__tests__/PhotoCarousel-test.js | rentpath/react-ui | import React from 'react'
import { shallow, mount } from 'enzyme'
import LazyLoad from 'react-lazyload'
import renderer from 'react-test-renderer'
import theme from './mocks/theme'
import ThemedPhotoCarousel from '../PhotoCarousel'
import ThemedCarousel from '../Carousel'
const PhotoCarousel = ThemedPhotoCarousel.Wrap... |
src/index.js | meta-meta/aztec-pong | import React from 'react';
import { render } from 'react-dom';
import { App } from './js/App';
render(<App />, document.getElementById('root')); |
docs/src/app/components/pages/components/Stepper/HorizontalTransition.js | kasra-co/material-ui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
import ExpandTransition from 'material-ui/internal/ExpandTransition';
import TextField from 'material-ui/TextField';
/*... |
assets/jqwidgets/demos/react/app/popover/righttoleftlayout/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxPopover from '../../../jqwidgets-react/react_jqxpopover.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
let data = new Array();
let firstNames... |
src/components/video_detail.js | louisdalligos/React-Video-Stream | 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;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col... |
stories/Common/ExampleHeadersTypography.js | nirhart/wix-style-react | import React from 'react';
import classNames from 'classnames';
import typography from '../../src/Typography';
export default () =>
<ul className="ltr style-list">
<li className={typography.h0}>H0 - Helvetica_25 /48px</li>
<li className={typography.h1}>H1 - Helvetica_35 /36px</li>
<li className={typogra... |
app/client/components/navbar.react.js | kkworden/node-iso | import React from 'react';
import Router from 'react-router';
var Link = Router.Link;
var RouteHandler = Router.RouteHandler;
export class NavBar extends React.Component
{
render() {
return (
<nav className="navbar navbar-default">
<div className="collapse navbar-collapse">
<ul className="nav navbar-na... |
src/layouts/layout.story.js | francisl/baer | import React from 'react';
import { storiesOf, action, linkTo } from '@storybook/react';
import { containerSizeStyles } from '../../stories/config';
import Layout from './layout';
import Button from '../widgets/button';
const buttonList = [0,1,2,3,4,5,6,7,8,9,10].map(() => {
return (<Button>
😀 😎 👍 💯
... |
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js | arasmussen/react-router | import React from 'react'
class Assignments extends React.Component {
render() {
return (
<div>
<h3>Assignments</h3>
{this.props.children || <p>Choose an assignment from the sidebar.</p>}
</div>
)
}
}
export default Assignments
|
src/svg-icons/av/subtitles.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSubtitles = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/>
</SvgIcon... |
basic/node_modules/react-router/es6/Router.js | jintoppy/react-training | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) {... |
src/index.js | SwamiRama/rl-hosting_node | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.jsx';
import './index.css';
ReactDOM.render( < App / > , document.getElementById('root')); |
docs/src/modules/components/MarkdownElement.js | AndriusBil/material-ui | // @flow
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { withStyles } from 'material-ui/styles';
import marked from 'marked';
import prism from 'docs/src/modules/utils/prism';
const renderer = new marked.Renderer();
renderer.heading = (text, level) => {
... |
node_modules/react-router/es6/Link.js | PanJ/SimplerCityGlide | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
src/components/presentational/Shared/Header.js | AurimasSk/DemoStore | import React from 'react';
import PropTypes from 'prop-types';
import { Link, IndexLink } from 'react-router';
//import LoadingDots from './LoadingDots';
const Header = () => {
return (
// <nav>
// <IndexLink to="/" activeClassName="active">Home</IndexLink>
// {" | "}
// ... |
src/svg-icons/content/weekend.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentWeekend = (props) => (
<SvgIcon {...props}>
<path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51... |
examples/forms-material-ui/src/components/dialogs/EmptyView.js | lore/lore-forms | import React from 'react';
import createReactClass from 'create-react-class';
export default createReactClass({
displayName: 'EmptyView',
render: function() {
return (
<div>
<h3>Please select a tweet</h3>
</div>
);
}
});
|
benchmarks/source-agilitycms/src/pageTemplates/MainTemplate.js | gatsbyjs/gatsby | import React from 'react';
import ContentZone from '../agility/components/ContentZone'
const OneColumnTemplate = (props) => {
return (
<div className="one-column-template">
<ContentZone name="Main" {...props} />
</div>
);
}
export default OneColumnTemplate;
|
src/router.js | geekydatamonkey/hjs-gittagger | 'use strict';
import app from 'ampersand-app';
import React from 'react';
import Router from 'ampersand-router';
import PublicPage from './pages/public.js';
import ReposPage from './pages/repos.js';
import Layout from './layout';
export default Router.extend({
renderPage(page, opts = {layout: true}) {
if (opts.... |
src/scenes/home/codeSchools/stateSortedSchools/stateSortedSchools.js | sethbergman/operationcode_frontend | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Section from 'shared/components/section/section';
import Select from 'react-select';
import SchoolCard from 'shared/components/schoolCard/schoolCard';
import styles from './stateSortedSchools.css';
import stateOptions from './stateOpti... |
Realization/frontend/czechidm-acc/src/content/wizard/connectorType/CsvSystemWizard.js | bcvsolutions/CzechIdMng | import { Basic, Services, Utils, Domain } from 'czechidm-core';
import React from 'react';
import _ from 'lodash';
import { SchemaAttributeManager } from '../../../redux';
import DefaultSystemWizard from './DefaultSystemWizard';
import AbstractWizardStep from '../AbstractWizardStep';
const schemaAttributeManager = new... |
src/client/modules/user/forms/login.js | inProgress-team/react-native-mantra-boilerplate | import React, { Component } from 'react';
import t from 'tcomb-form-native';
const Form = t.form.Form;
const Email = t.refinement(t.String, function (email) {
var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$... |
docs/src/app/components/pages/components/DatePicker/Page.js | nathanmarks/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 datePickerReadmeText from './README';
import DatePickerExampleSimple from... |
app/views/Homepage/components/ColorShiftTitle.js | herereadthis/redwall | import React from 'react';
// The Color Shifter
// takes a string of characters and gives it a color range as you define them.
export default class ColorShiftTitle extends React.Component {
static propTypes = {
title: React.PropTypes.string.isRequired,
colorShift: React.PropTypes.shape({
... |
modules/IndexRoute.js | okcoker/react-router | import React from 'react'
import invariant from 'invariant'
import warning from 'warning'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components, falsy } from './PropTypes'
const { bool, func } = React.PropTypes
/**
* An <IndexRoute> is used to specify its parent's <Route indexRout... |
styleguide/components/Nav.js | chrisspang/loggins | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import styles from './Nav.css';
export default class extends Component {
constructor(props) {
super(props);
this.onScroll = this.onScroll.bind(this);
this.state = {
fixed: false,
... |
src/svg-icons/hardware/phonelink.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhonelink = (props) => (
<SvgIcon {...props}>
<path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/>
... |
src/interface/news/index.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import { Trans } from '@lingui/macro';
import DocumentTitle from 'interface/DocumentTitle';
import TwitterIcon from 'interface/icons/Twitter';
import NewsList from './List';
const News = () => (
<>
<DocumentTitle /> {/* prettiest is if the Home page has no title at all */}
<div ... |
src/views/pages/profile-page/index.js | zerubeus/future-layout | import React from 'react';
import { connect } from 'react-redux';
import { PropTypes } from 'prop-types';
import { ButtonGroup, Button } from 'react-bootstrap';
import { profileActions } from '../../../core/profile';
import { browserHistory } from 'react-router';
import './profile.css';
// this is just to fast style t... |
pages/less.js | huchenme/jiweiwei_me | import React from 'react'
import './example.less'
import Helmet from 'react-helmet'
import { config } from 'config'
export default class Less extends React.Component {
render () {
return (
<div>
<Helmet
title={`${config.siteTitle} | Hi lessy friends`}
/>
<h1
cla... |
examples/polling/src/components/ShowLoadingScreen.js | lore/lore | /**
* This component shows the loading screen. It does so by removing any classes it
* has, which will revert it back to it's default state, which is visible.
**/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
export default createReactClass({
di... |
packages/material-ui/src/Portal/Portal.js | cherniavskii/material-ui | import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import ownerDocument from 'dom-helpers/ownerDocument';
import exactProp from '../utils/exactProp';
function getContainer(container, defaultContainer) {
container = typeof container === 'function' ? container() : containe... |
src/svg-icons/maps/local-play.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPlay = (props) => (
<SvgIcon {...props}>
<path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-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-2zm-4.... |
src/components/loading.js | chaoming56/react-blog | import React from 'react';
import './loading.less';
const Loading = ({isloading}) => (
<div className="bouncing-loader" style={{display: isloading ? 'flex' : 'none'}}>
<div>🐤</div>
<div>🐤</div>
<div>🐤</div>
</div>
);
export default Loading;
|
react-demos/demo13/src/app.js | guilsa/javascript-stuff | import React from 'react';
export default class App extends React.Component{
constructor(props) {
super(props);
this.render = this.render.bind(this);
this.state = {
items: this.props.items,
disabled: true
};
}
componentDidMount() {
this.setState({
disabled: false
})
... |
src/App.js | karim88/karim88.github.io | import React, { Component } from 'react';
import './App.css';
import Intro from "./components/Intro/Intro";
import WOW from "wow.js";
import WhoAmI from "./components/WhoAmI/WhoAmI";
import Timeline from "./components/Timeline/Timeline";
import Skill from "./components/Skill/Skill";
import Footer from "./components/Foo... |
src/components/partials/CategorizedValue.js | v8187/regex-generator | import React, { Component } from 'react';
import { OverlayTrigger } from 'react-bootstrap/lib';
import { updateRegEx } from '../../services/regex.service';
import { helpEdit } from '../../utils/help_tips';
export class CategorizedValue extends Component {
constructor(props) {
super(props);
this... |
src/js/components/layout/statistics-link.js | daniel-madera/pijs | import React from 'react'
import { observer, inject } from 'mobx-react'
import StatisticsModal from './statistics-modal'
@inject('userStore')
@observer
export default class StatisticsLink extends React.Component {
constructor(props) {
super(props)
this.state = {
show: false
}
}
open = e => {... |
Components/App.js | GTXPRO/Reactnative | import React, { Component } from 'react';
import { View, Text, TouchableOpacity, TextInput } from 'react-native';
import io from 'socket.io-client';
export default class App extends Component {
constructor(props) {
super(props);
this.socket = io('http://192.168.1.104:3000', { jsonp: false });
this.state = {
... |
ReactJS/07.Async-Redux/chiper-spa/src/components/elements/login.js | Martotko/JS-Web | import React, { Component } from 'react';
class Login extends Component {
render() {
return (
<div>
<form id="formLogin" class="form">
<label>Username</label>
<input onChange={(e) => { this.props.dataFunc(e) }} name="username" type="text" ... |
__tests__/mini-test.js | stoeffel/react-mini | jest.dontMock('../');
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { equal } from 'assert';
const mini = require('../');
describe('React-Mini', () => {
it('should render the props', () => {
const Hello = mini(({greeting = 'Hi', name}) => (
<h1>{greeting} {name}</h1>));
... |
src/app/auth/Signup/index.js | omrilitov/react-universal | import React from 'react';
import {reduxForm} from 'redux-form';
import {connect} from 'react-redux';
import * as auth from '../redux';
import Signup from './Signup';
@reduxForm({form: 'signup', fields: ['name.first', 'name.last', 'email', 'password']})
@connect(state => state.auth, auth)
export default class SignupCo... |
src/components/search_bar.js | stewarea/React-Youtube | import React, { Component } from 'react';
//pullling Component from React const Componenet = React.component
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: ''};
}
render() {
return (
<div className="search-bar" >
<input
placeholder=... |
test/ListGroupSpec.js | BespokeInsights/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ListGroup from '../src/ListGroup';
import ListGroupItem from '../src/ListGroupItem';
describe('ListGroup', function () {
it('Should output a "div" with the class "list-group"', function () {
let instance = ReactTestUtils.re... |
src/Contact.js | Giovanna8/React-Contact-List | /* eslint max-len: ["error", 1000]*/
import React, { Component } from 'react';
export default class Contact extends Component {
render() {
return (
<li className="contact">
<div className="image-cropper">
<img src={this.props.avatar} alt="avatar" />
</div>
<div className="... |
index.android.js | cyqresig/ReactNativeComponentDemos | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Navigator,
Text,
TouchableOpacity,
} from 'react-native';
import ReactNativeComponentList from './examples/android/react-native-compon... |
app/containers/ToolTypeSelectedPartial/index.js | BeautifulTrouble/beautifulrising-client | /**
*
* ToolTypeSelectedPartial
*
*/
import React from 'react';
import styled from 'styled-components';
import {Link} from 'react-router';
import { injectIntl } from 'react-intl';
import TranslatableStaticText from 'containers/TranslatableStaticText';
import staticText from '../ToolTypeArea/staticText';
import Isvg ... |
client/src/screens/signin.screen.js | srtucker22/chatty | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
ActivityIndicator,
Alert,
KeyboardAvoidingView,
Button,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
} from 'react-native';
import { graphql, compose } from 'react-apollo';
import { connect } from 'react-red... |
test/demo/ssr/ssr.js | picidaejs/picidaejs | import React from 'react'
import ReactDOMServer from 'react-dom/server';
import {match, RouterContext} from 'react-router'
import routes from './raw-routes'
import createElement from './createElement'
export default function ssr(url, callback) {
match({ routes: routes, location: url }, function (error, redirectL... |
src/js/components/input/dateRangePicker.js | kukua/dashboard | import React from 'react'
import moment from 'moment-timezone'
import { DateRangePicker } from 'react-dates'
// Modified copy of 'react-dates/lib/css/_datepicker.css'
import '../../../css/datepicker.css'
class DateRangePickerInput extends React.Component {
constructor () {
super()
this.state = {
focusedInput:... |
src/svg-icons/image/panorama-horizontal.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaHorizontal = (props) => (
<SvgIcon {...props}>
<path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C... |
src/static/routes.js | KarimJedda/django-react-setup | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './app';
import { HomeView, LoginView, ProtectedView, NotFoundView } from './containers';
import requireAuthentication from './utils/requireAuthentication';
export default(
<Route path="/" component={App}>
<IndexRo... |
src/server/server.js | eveld/isomorphic-js | 'use strict';
import React from 'react';
import restify from 'restify';
import path from 'path';
import Logger from 'bunyan';
import App from '../app/components/App';
const log = new Logger({
src: true,
name: 'server',
streams: [
{
level: Logger.DEBUG,
stream: process.stdout
}
],
serial... |
react/features/keyboard-shortcuts/components/KeyboardShortcutsDialog.web.js | gpolitis/jitsi-meet | /* @flow */
import Lozenge from '@atlaskit/lozenge';
import { withStyles } from '@material-ui/core/styles';
import clsx from 'clsx';
import React, { Component } from 'react';
import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
/**
* The type of the React {@code Component} props ... |
_pages/cities/src/_client/client.js | verekia/verekia.github.io | // @flow
import React from 'react'
import { hydrate } from 'react-dom'
import App from 'app/App'
// flow-disable-next-line
hydrate(<App data={window.__DATA__} />, document.getElementById('app'))
|
test/bigtest/tests/about-test.js | folio-org/stripes-core | import { describe, beforeEach, it } from '@bigtest/mocha';
import { expect } from 'chai';
import React, { Component } from 'react';
import setupApplication from '../helpers/setup-core-application';
import AboutInteractor from '../interactors/about';
describe('About', () => {
const about = new AboutInteractor();
... |
client/src/HeaderConfig/HeaderConfig.js | Nichsiciul/User-Friendly-CMS | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { FormControl, Col, Form, FormGroup, ControlLabel, Glyphicon, Button, Panel } from 'react-bootstrap';
import axios from 'axios';
import { SliderPicker } from 'react-color';
import ColorBullet from './../ColorBullet/ColorBullet.js';
impor... |
test/GlyphiconSpec.js | mmarcant/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import Glyphicon from '../src/Glyphicon';
describe('<Glyphicon>', () => {
it('Should have correct class', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Glyphicon glyph="star" />... |
client/share_trader/js/components/share_trader.js | enzovici/PoC-TruthChain | import React from 'react';
import { Navbar, Row, Col, Button } from 'react-bootstrap/lib';
import AccountList from '../../../lib/js/react/components/account_list';
import AccountDetail from '../../../lib/js/react/components/account_detail';
import Assets from './assets';
import AssetMatrix from './asset_matrix';
imp... |
src/page/PanelPage.js | jerryshew/react-uikits | import React, { Component } from 'react';
import {Panel} from '../component';
import {CN, TitleBlock} from '../util/tools';
import CodeView from './CodeView';
export class PanelPage extends Component {
render() {
return (
<section>
{TitleBlock('面板')}
<h4>面板</h4>... |
docs/app/Examples/elements/List/Types/ListExampleIconShorthand.js | koenvg/Semantic-UI-React | import React from 'react'
import { List } from 'semantic-ui-react'
const ListExampleIconShorthand = () => (
<List>
<List.Item icon='users' content='Semantic UI' />
<List.Item icon='marker' content='New York, NY' />
<List.Item icon='mail' content={<a href='mailto:jack@semantic-ui.com'>jack@semantic-ui.com... |
__tests__/index.android.js | cgav/BondoraClient | 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 />
);
});
|
src/routes.js | ekatzenstein/three.js-live | import React from 'react';
import {Router, Route} from 'react-router';
import App from './containers/App';
const Routes = (props) => (
<Router {...props}>
<Route path="/" component={App}/>
<Route path="/:id" component={App}/>
</Router>
);
export default Routes;
|
fields/types/location/LocationField.js | sendyhalim/keystone | import _ from 'lodash';
import React from 'react';
import Field from '../Field';
import CollapsedFieldLabel from '../../components/CollapsedFieldLabel';
import NestedFormField from '../../components/NestedFormField';
import {
FormField,
FormInput,
FormNote,
Grid,
LabelledControl,
} from '../../../admin/client/App... |
src/Broadcast.js | Samuron/VideoHustle | import React, { Component } from 'react';
import firebase from 'firebase';
import VideoContent from './VideoContent';
import YouTube from 'react-youtube';
import FlatButton from 'material-ui/FlatButton';
const Broadcast = React.createClass({
getInitialState() {
var broadcastId = firebase.auth().currentUser.uid;
... |
client/mobile/app/components/PRTabs.js | mgwidmann/slack_coder | import React from 'react';
import { View, Text } from 'react-native';
import ScrollableTabView from 'react-native-scrollable-tab-view';
import { PRIMARY_COLOR, SECONDARY_COLOR, FOREGROUND_COLOR } from '../styles/constants';
import mainStyles from '../styles/main';
import prStyles from '../styles/pullRequests';
import ... |
js/components/attendance/data.js | ChiragHindocha/stay_fit | import React from 'react';
import {Image} from 'react-native';
var btnsDefault = [ { text: 'Button' } ];
var btnsTypes = [
{ text: 'Primary', type: 'primary', },
{ text: 'Secondary', type: 'secondary', },
{ text: 'Delete', type: 'delete', }
];
var rows = [
{
text: "Basic Example",
right:... |
mobile/js/features/loading/index.js | lovelypig5/wms | import React from 'react';
import { AsyncStorage, Text, View, TouchableOpacity } from 'react-native';
import Login from '../login';
import Welcome from '../welcome';
import DICT from '../../config/dict';
import styles from '../../styles';
var Loading = React.createClass({
getInitialState() {
return {
... |
src/screens/Shared/IllustComments.js | alphasp/pxview | import React, { Component } from 'react';
import {
View,
SafeAreaView,
StyleSheet,
InteractionManager,
} from 'react-native';
import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/FontAwesome';
import ActionButton from 'react-native-action-button';
import OverlaySpinner from 'react-... |
test/utils-test.js | peterssonjesper/react-motion | import expect from 'expect';
import * as u from '../src/utils';
import React from 'react';
describe('mapTree', () => {
it('should map numbers leaves correctly', () => {
const add1 = (_, a) => a + 1;
expect(u.mapTree(add1, 1)).toEqual(2);
expect(u.mapTree(add1, [])).toEqual([]);
expect(u.mapTree(add1,... |
app/components/Nav/index.js | dijahmac/JobWeasel-FrontEnd | /**
*
* Nav
*
*/
import React from 'react';
import {Link} from 'react-router-dom'
import './style.css';
import './styleM.css';
import Bars from 'react-icons/lib/fa/bars';
export default class Nav extends React.PureComponent {
constructor () {
super();
this.state = {
menuOpen:false
}
}
hand... |
modules/__tests__/serverRendering-test.js | Dodelkin/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createLocation from 'history/lib/createLocation'
import RoutingContext from '../RoutingContext'
import match from '../match'
import Link from '../Link'
describe('server rendering', function () {
let App... |
client/scenes/MainScene.js | SLIBIO/SLib-Doc | import React, { Component } from 'react';
import 'react-mdl/extra/css/material.deep_orange-orange.min.css';
import 'react-mdl-extra/dist/react-mdl-extra.min.css';
import 'normalize.css/normalize.css';
import { NavigationBar, Footer, ImageGallery } from '../components';
import Background from '../assets/main_background.... |
analysis/warlockdestruction/src/modules/talents/ChannelDemonfire.js | yajinni/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import Enemies from 'parser/shared/modules/Enemies';
import SPELLS from 'common/SPELLS';
import { formatThousands, formatNumber, formatPercentage } from 'common/format';
import Statis... |
packages/xo-web/src/xo-app/host/license-warning.js | vatesfr/xo-web | import _ from 'intl'
import React from 'react'
import Icon from 'icon'
import Tooltip from 'tooltip'
import { alert } from 'modal'
const showInfo = () =>
alert(
_('licenseRestrictionsModalTitle'),
<span>
<a href='https://xcp-ng.com/pricing.html#xcpngvsxenserver' rel='noopener noreferrer' target='_blank... |
suspans/src/Suspans.js | Muzietto/react-playground | import React from 'react';
import { setItem } from '@src/lib/storage';
class Suspans extends React.Component {
constructor(props) {
super(props);
this.state = {
promise: null,
};
}
/* in order to use this method, it is necessary to comment out
node_modules/react-dom/cjs/react-dom.developm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.