path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
12-delayed-result/src/Overlay.js | dtanzer/react-basic-examples | import React from 'react';
import { connect } from 'react-redux';
export class Overlay extends React.Component {
render() {
const display = this.props.overlay? "block" : "none";
const style = {
background: "rgba(0, 0, 0, 0.5)",
display: display,
position: "absolute",
top: 0, b... |
src/components/LoginForm.js | cernanb/personal-chef-react-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button, Form, Segment } from 'semantic-ui-react';
class LoginForm extends Component {
state = {
email: '',
password: '',
};
onChange = e => {
this.setState({ [e.target.name]: e.target.value });
};
render() {
... |
app/components/AddRemoveButton.js | carl-hand/scoreboard | /**
* Created by carl.hand on 31/03/2017.
*/
import React from 'react';
export default class AddRemoveButton extends React.Component {
constructor() {
super();
this.state = {
name: ''
};
}
handleChange(e) {
this.setState({
name: e.target.value
});
}
add() {
this.props... |
scripts/components/__tests__/QuestionImage-test.js | TenetPartners/tenet-holiday-card-2015 | import React from 'react'
// import expect, { createSpy, spyOn, isSpy } from 'expect'
import expect from 'expect'
// import {createRenderer, Simulate, renderIntoDocument} from 'react-addons-test-utils'
import {createRenderer, renderIntoDocument} from 'react-addons-test-utils'
import sinon from 'sinon'
import expectJSX ... |
src/lib/plugins/ip.js | Hyperline/hyperline | import React from 'react'
import Component from 'hyper/component'
import publicIp from 'public-ip'
import SvgIcon from '../utils/svg-icon'
function getIp() {
return new Promise(resolve => {
publicIp.v4().then(ip => resolve(ip)).catch(() => resolve('?.?.?.?'))
})
}
class PluginIcon extends Component {
render... |
Libraries/Modal/Modal.js | christopherdro/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/routes/UIElement/iconfont/index.js | 102010cncger/antd-admin | import React from 'react'
import { Iconfont } from 'components'
import { Table, Row, Col, Icon } from 'antd'
import styles from './index.less'
import './emoji'
const colorfulIcons = ['boluo', 'baixiangguo', 'chengzi', 'boluomei', 'caomei', 'dayouzi', 'chelizi', 'fanqie', 'hamigua', 'ganlan',
'juzi', 'heimei', 'huolo... |
components/animals/leskoptevTribarva.child.js | marxsk/zobro | import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../images/animals/leskoptevTribarva/... |
antd-demo/src/index.js | mozhengFly/test | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
import MusicRouter from './router/MusicRouter';
ReactDOM.render(<MusicRouter />, document.getElementById('root'));
registerServiceWorker();
|
src/js/jobs/components/skills/graph/Grid.js | tpucci/jobads-webapp | import React from 'react';
import ReactDOM from 'react-dom';
import * as d3 from 'd3';
export default class Grid extends React.Component {
componentDidUpdate () { this.renderGrid(); }
componentDidMount () { this.renderGrid(); }
renderGrid = () => {
var node = ReactDOM.findDOMNode(this);
... |
fields/types/cloudinaryimage/CloudinaryImageFilter.js | creynders/keystone | import React from 'react';
import { SegmentedControl } from 'elemental';
const OPTIONS = [
{ label: 'Is Set', value: true },
{ label: 'Is NOT Set', value: false },
];
function getDefaultValue () {
return {
exists: true,
};
}
var CloudinaryImageFilter = React.createClass({
propTypes: {
filter: React.PropTyp... |
src/svg-icons/action/redeem.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRedeem = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.1... |
app/javascript/mastodon/features/ui/components/confirmation_modal.js | theoria24/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
export default @injectIntl
class ConfirmationModal extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
... |
client/components/SignUp/SignUpPage.js | Danielbook/liftinglog | import React from 'react';
import PropTypes from 'prop-types';
import SignUpForm from './SignUpForm';
class SignUpPage extends React.Component {
/**
* Class constructor.
*/
constructor(props, context) {
super(props, context);
// set the initial components state
this.state = {
errors: {},
... |
app/javascript/flavours/glitch/features/list_editor/components/account.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from 'flavours/glitch/components/avatar';
import DisplayName from 'flavours/glitch/components/display_name';
impor... |
src/routes.js | juniorconsulting/internarena | import React from 'react';
import {Route, IndexRoute} from 'react-router';
// Components
import App from './components/App';
import Home from './components/Home';
import LoginPage from './components/auth/LoginPage';
import RegisterPage from './components/auth/RegisterPage.js';
import ConfirmEmailPage from './component... |
src/components/Footer/Footer.js | xitman78/reactpro | /**
* 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, { Component } from 'react';
import withStyle... |
jenkins-design-language/src/js/components/material-ui/svg-icons/communication/portable-wifi-off.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationPortableWifiOff = (props) => (
<SvgIcon {...props}>
<path d="M17.56 14.24c.28-.69.44-1.45.44-2.24 0-3.31-2.69-6-6-6-.79 0-1.55.16-2.24.44l1.62 1.62c.2-.03.41-.06.62-.06 2.21 0 4 1.79 4 4 0 .21-.02.42-.05.63l1.61 1.61zM12 4c4.42 0 ... |
src/svg-icons/av/library-music.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryMusic = (props) => (
<SvgIcon {...props}>
<path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57... |
src/svg-icons/maps/pin-drop.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPinDrop = (props) => (
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/>
</SvgIcon>
);
... |
src/app.js | howardjing/chess-calculator | // @flow
import React, { Component } from 'react';
import Chess from 'chess.js';
import styled from 'styled-components';
import URLSearchParams from 'url-search-params';
import Game from './game';
import GameLoader, { loadGame } from './game-loader';
// http://www.mark-weeks.com/aboutcom/aa02j12.htm
const GAME_OF_CENT... |
frontend/app_v2/src/components/Slider/SliderPresentationExpandedContent.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
import { getMediaUrl } from 'common/urlHelpers'
import useIcon from 'common/useIcon'
const SliderPresentationExpandedContent = ({ item, onCloseExpandedContent }) => {
const hasCoverImage = item.photos?.length > 0 ? true : false
const conditionalClass = ... |
src/pages/404.js | computer-lab/salon94design.com | import React from 'react'
import Link from 'gatsby-link'
import styled from 'emotion/react'
import { sansFontFamily } from '../layouts/emotion-base'
const Container = styled.div`
max-width: 500px;
margin: 0 auto;
padding: 12px;
background-color: #f9f9f9;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px ... |
test/integration/image-component/default/pages/invalid-unsized.js | JeromeFitz/next.js | import React from 'react'
import Image from 'next/image'
const Page = () => {
return (
<div>
<p>Invalid Unsized</p>
<Image id="unsized-image" src="/test.png" unsized />
</div>
)
}
export default Page
|
docs/src/app/components/pages/components/IconButton/Page.js | barakmitz/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 iconButtonCode from '!raw!material-ui/IconButton/IconButton';
import icon... |
components/app-container.js | pho3nixf1re/followupboss-example | import React from 'react';
import forEach from 'lodash/forEach';
import State, {actions as stateActions} from 'lib/state';
import App from 'components/app';
// TODO: implement the listener on and off as a higher order component using @ decorators
const AppContainer = React.createClass({
getInitialState() {
... |
docs/src/sections/ValidateInputPropsSection.js | yyssc/ssc-grid | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
export default function ValidateInputPropsSection() {
return (
<div className="bs-docs-section">
<h3><Anchor id="validate-input-props">属性</Anchor></h3>
<PropTable component="ValidateInput"/>
</div>
... |
assets/jqwidgets/demos/react/app/bulletchart/multipleranges/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxBulletChart from '../../../jqwidgets-react/react_jqxbulletchart.js';
class App extends React.Component {
pointsToGrade(points) {
let grade;
if (points < 60) {
grade = 'E';
}
else if (points < 70) {
... |
tp-3/marisol/src/components/pages/notFound/NotFoundPage.js | solp/sovos-reactivo-2017 | import React from 'react';
import { Link } from 'react-router-dom';
const NotFoundPage = () => {
return (
<div>
<h4>
La estas <b>SECANDO</b>!!
</h4>
<Link to="/"> uhh si, quiero volver! </Link>
</div>
);
};
export default NotFoundPage;
|
test/Player.js | CookPete/react-player | import React from 'react'
import test from 'ava'
import sinon from 'sinon'
import { configure, shallow } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import Player from '../src/Player'
configure({ adapter: new Adapter() })
Player.prototype.componentWillMount = function () {
this.handlePlayerMount({ l... |
tests/layouts/CoreLayout.spec.js | philbot9/youtube-comment-scraper-2.0 | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
node_modules/eslint-config-airbnb/test/test-react-order.js | pavlosvos/krifominima | import test from 'tape';
import { CLIEngine } from 'eslint';
import eslintrc from '../';
import reactRules from '../rules/react';
import reactA11yRules from '../rules/react-a11y';
const cli = new CLIEngine({
useEslintrc: false,
baseConfig: eslintrc,
rules: {
// It is okay to import devDependencies in tests.... |
src/svg-icons/action/settings-ethernet.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsEthernet = (props) => (
<SvgIcon {...props}>
<path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12... |
client/components/Dashboard.js | horiaradu/twitter-challenge | import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {hashHistory} from 'react-router';
import logo from '../assets/images/twitter-logo.png';
class Dashboard extends React.Component {
constructor(props) {
super(props);
this.shouldComponentUpdate = PureRenderMixin.sh... |
src/containers/TutorialsPage/NewTutorialPage/index.js | ReactPoland/react-community | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import _isEmpty from 'lodash/isEmpty';
import { slate } from 'utils';
// STORE
import { addTutorial } from 'redux/modules/tutorialsModule';
// COMPONENTS
import... |
lib/editor/components/question_editors/TextQuestionEditor.js | jirokun/survey-designer-js | import React from 'react';
import BaseQuestionEditor from './BaseQuestionEditor';
export default function TextQuestionEditor(props) {
const { page, question } = props;
return (
<BaseQuestionEditor
page={page}
question={question}
editorTitle="複数行テキスト"
title
description
optio... |
src/components/__tests__/Home.js | jigsawye/redux-hot-boilerplate | import test from 'ava';
import React from 'react';
import { shallow } from 'enzyme';
import Home from '../Home';
test('should render correctly', t => {
const home = shallow(<Home />);
t.is(home.type(), 'h1');
t.is(home.text(), 'Home');
});
|
app/javascript/mastodon/features/domain_blocks/index.js | kazh98/social.arnip.org | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debou... |
src/Components/TotalBalance.js | dylanbathurst/bacon-mobile | import React, { Component } from 'react';
import { AppRegistry, View, StyleSheet, Text, Image } from 'react-native';
import { FormattedCurrency, FormattedNumber } from 'react-native-globalize';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
class TotalBalance extends Component {
construct... |
app/containers/NotFoundPage/index.js | shaggyshelar/CLA | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import messages from './messages';
export default function NotFound() {
return (
<article>
... |
pkg/ui/src/components/configuration-pane/GenericExpanderButton.js | matt-deboer/kuill | import React from 'react'
import IconButton from 'material-ui/IconButton'
import IconMore from 'material-ui/svg-icons/navigation/more-horiz'
import GenericExpander from './GenericExpander'
const styles = {
button: {
// position: 'absolute',
// right: 0,
// top: 0,
padding: 0,
height: 24,
widt... |
examples/js/keyboard-nav/demo.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import SimpleNavTable from './simple-nav-table';
import PaginationNavTable from './pagination-nav-table';
import NavWithSelectionTable from './nav-with-select-table';
import CustomNavStyleTable from './custom-style-nav-table';
import DisableClickToNavTable from './disa... |
MuSprint/client/src/components/MuSaveStoryModal.js | oracle/json-in-db | import React, { Component } from 'react';
import Modal from 'react-bootstrap/Modal';
import Nav from 'react-bootstrap/Nav';
import Form from 'react-bootstrap/Form';
import Button from 'react-bootstrap/Button';
import Col from 'react-bootstrap/Col'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import ... |
ui/src/main/js/components/RoleList.js | rdelval/aurora | import React from 'react';
import { Link } from 'react-router-dom';
import Icon from 'components/Icon';
import Pagination from 'components/Pagination';
export default class RoleList extends React.Component {
constructor(props) {
super(props);
this.state = {
filter: props.filter,
reverseSort: pro... |
test/client/scripts/components/admin/detail-view/additional-reviewer-test.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
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, or (at your ... |
app-reflux/components/editor.js | Orientsoft/borgnix-cloud-ide | import AceEditor from 'react-ace'
import React from 'react'
import projectActions from '../actions/project-actions'
import 'brace/mode/c_cpp'
import 'brace/theme/tomorrow'
class Editor extends React.Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
this.refs... |
js/components/ThreadListItem.js | transedward/relay-chat | /**
* This file is provided by Facebook for testing and evaluation purposes
* only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICUL... |
src/components/form/controls/combobox/PokeCombobox.js | TechyFatih/Nuzlog | import React from 'react';
import icons from 'img/icons';
//HAS TO BE JSON, NOT JS
const pokedex = require('data/pokedex.json').map((pokemon, index) => {
const name = pokemon[1].name;
return (
<span value={name} key={index} style={{whiteSpace: 'nowrap'}} >
<img src={icons[pokemon[0]]} /> {name}
</sp... |
app/javascript/flavours/glitch/components/column_back_button.js | glitch-soc/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import Icon from 'flavours/glitch/components/icon';
import { createPortal } from 'react-dom';
export default class ColumnBackButton extends React.PureComponent {
static contextTypes = {
router: PropType... |
src/views/routes.js | MickCoelho/rehab-league | import Home from 'views/screens/home/Home';
import About from 'views/screens/about/About';
import React from 'react';
import {Router, Route} from 'react-router';
/**
* The React Router 1.0 routes for both the server and the client.
*/
export default (
<Router>
<Route path="/" component={Home} />
<Route path="/a... |
blueocean-material-icons/src/js/components/svg-icons/hardware/cast.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const HardwareCast = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.9... |
src/jsx/components/headerCell.js | CBIConsulting/ProperTable | import React from 'react';
import {Cell} from 'fixed-data-table';
import _ from 'underscore';
import Portal from './portal';
import TWEEN from 'tween.js';
//Const
const SELECTOR_COL_NAME = 'selector-multiple-column'; // Name of the selector column
const DEFAULT_SORT_DIRECTION = 'DEF';
const ASCENDING_SORT_DIRECTION = ... |
src/scripts/main.js | Ribeiro/yoda | 'use strict';
import ipc from 'ipc';
import remote from 'remote';
import React from 'react';
import Join from 'react/lib/joinClasses';
import Router from 'react-router';
import RouterContainer from './Router';
import Utils from './Utils';
import routes from './AppRoutes';
let Menu = remote.require('menu');
let MenuT... |
fields/types/markdown/MarkdownColumn.js | Yaska/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var MarkdownColumn = React.createClass({
displayName: 'MarkdownColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue... |
ui/src/components/Tasks/DataCollection.js | mxcube/mxcube3 | import React from 'react';
import { connect } from 'react-redux';
import { reduxForm, formValueSelector } from 'redux-form';
import {
Modal, Button, Form, Row, Col, ButtonToolbar
} from 'react-bootstrap';
import { DraggableModal } from '../DraggableModal';
import validate from './validate';
import warn from './warnin... |
submissions/masiulis/src/components/components/sith-list.js | staltz/flux-challenge | import React from 'react';
import classnames from 'classnames';
import request from 'superagent';
import { __, range, update, isNil, drop, dropLast, concat, pipe, filter, reject, find, findLast, findLastIndex, findIndex, not, compose} from 'ramda';
import Sith from './components/sith-list-item.js';
let currentRequest... |
src/components/Report/Notice.spec.js | chrisvogt/teacher-salaries | import React from 'react'
import { shallow } from 'enzyme'
import Notice from './Notice'
import * as CONTENT from '../../content/text'
it('renders without crashing', () => {
shallow(<Notice />)
})
it('renders the default notice message', () => {
const wrapper = shallow(<Notice />)
const notice = <p>{CONTENT.no... |
src/client/client.js | janicduplessis/imessage-client | import React from 'react';
import Router from 'react-router';
import routes from './routes';
import injectTapEventPlugin from 'react-tap-event-plugin';
import 'babel/polyfill';
//Needed for onTouchTap
//Can go away when react 1.0 release
//Check this repo:
//https://github.com/zilverline/react-tap-event-plugin
injectT... |
frontend/src/components/select.js | 1905410/Misago | import React from 'react';
export default class extends React.Component {
getChoice() {
let choice = null;
this.props.choices.map((item) => {
if (item.value === this.props.value) {
choice = item;
}
});
return choice;
}
getIcon() {
return this.getChoice().icon;
}
getL... |
examples/browser/drag-and-drop-redux/src/components/App.js | jbeard4/SCION | import React from 'react'
import DraggableRect from '../containers/DnD'
import InteractiveSCHVIZ from '../containers/SCHVIZ'
const App = () => (
<div style={{width:'100%', height:'100%'}}>
<div style={{width:'100%', height:'100%'}}>
<svg width="100%" height="100%">
<DraggableRect/>
</svg>
... |
serverRender.js | jahin07/Course-Description | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import App from './src/components/App';
import config from './config';
import axios from 'axios';
const getApiUrl = contestId => {
if (contestId) {
return `${config.serverUrl}/api/contests/${contestId}`;
}
return `${config.serverUrl}... |
src/library/validations/components/FileUpload.js | zdizzle6717/universal-react-movie-app | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import accepts from 'attr-accept';
import classNames from 'classnames';
import FormActions from '../actions/FormActions';
import FormStore from '../stores/FormStore';
import { addErrorMessage, removeErrorMessage } from '../utils/updateErrorMess... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/StateNotDefinedButUsed.js | gabelevi/flow | // @flow
import React from 'react';
class MyComponent1 extends React.Component {
render() {
return this.state.children;
}
}
class MyComponent2 extends React.Component {
render() {
const state = {};
return state;
}
}
const expression1 = () =>
class extends React.Component {
render() {
... |
src/routes/codes/values/CodesEditPannel.js | yunqiangwu/kmadmin | import React from 'react'
import PropTypes from 'prop-types'
import { Form, Input, Row, Col, InputNumber, Radio, Modal, Button, Cascader } from 'antd'
import Container from "../../chart/Container"
const FormItem = Form.Item
const formItemLayout = {
labelCol: {
span: 4,
},
wrapperCol: {
span: 14,
},
}
... |
src/svg-icons/toggle/radio-button-unchecked.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonUnchecked = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</SvgIco... |
browser/react/components/Login/Signup.js | TranscendVR/transcend | import React from 'react';
export default (props) => {
return (
<div style={props.styles.signUpContainer}>
<form onSubmit={props.signup}>
<div>
<input
key="name"
name="name"
placeholder="name"
style={props.styles.formControl}
req... |
src/svg-icons/image/wb-sunny.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbSunny = (props) => (
<SvgIcon {...props}>
<path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7... |
fixtures/fiber-debugger/src/index.js | AlmeroSteyn/react | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
internals/templates/containers/App/index.js | ESTEBANMURUZABAL/bananaCatReact | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
src/widgets/selector-view/components/selector-view.spec.js | InseeFr/Pogues | import React from 'react';
import renderer from 'react-test-renderer';
import { decoreFormField } from 'utils/test/test-utils.jsx';
import SelectorView from './selector-view';
describe('Tab', () => {
test('Should exists with the corresponding template with select', () => {
const props = {
activeViewValue:... |
docs/app/Examples/collections/Table/Variations/TableExampleInverted.js | ben174/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleInverted = () => {
return (
<Table inverted>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</... |
app/pages/reservation/PaymentSuccess.js | fastmonkeys/respa-ui | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import flow from 'lodash/flow';
import get from 'lodash/get';
import isPlainObject from 'lodash/isPlainObject';
import { currentUserSelector } from '../../state/selectors/authS... |
lib/cli/generators/REACT_SCRIPTS/template/src/stories/index.js | enjoylife/storybook | /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import Button from './Button';
import Welcome fr... |
src/class/options/OptionsListItem.js | tegon/traktflix | import PropTypes from 'prop-types';
import React from 'react';
import OptionsActionCreators from './OptionsActionCreators';
class OptionsListItem extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.props.componentHandler.upgradeDom();
}
_onChange(event) {
O... |
src/layouts/layout-1-1.js | nuruddeensalihu/binary-next-gen | import React from 'react';
export default (components, className, onClick) => (
<div className={className + ' vertical'} onClick={onClick}>
{components[0]}
</div>
);
|
react/judo-heroes-2/src/components/NotFoundPage.js | greganswer/devnotes | import React from 'react';
import { Link } from 'react-router-dom';
export default class NotFoundPage extends React.Component {
render() {
return (
<div className="not-found">
<h1>404</h1>
<h2>Page not found!</h2>
<p>
<Link to="/">Go back to the main page</Link>
</... |
src/components/Header/Header.js | undancer/ohmyladygaga | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.less';
import withStyles from '../../decorators/withStyles';
import Navigation from '../Navigation';
import AppActions from '../../actions/AppActions';
@withStyles(styles)
class Header {
o... |
docs/src/examples/collections/Form/Shorthand/FormExampleFieldControlId.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Form, Input, TextArea, Button, Select } from 'semantic-ui-react'
const genderOptions = [
{ key: 'm', text: 'Male', value: 'male' },
{ key: 'f', text: 'Female', value: 'female' },
{ key: 'o', text: 'Other', value: 'other' },
]
const FormExampleFieldControlId = () => (
<Form>
... |
packages/wix-style-react/src/PreviewWidget/PreviewWidget.js | wix/wix-style-react | import React from 'react';
import PropTypes from 'prop-types';
import { skins, dataHooks } from './constants';
import { stVars as colors } from '../Foundation/stylable/colors.st.css';
import Box from '../Box';
import { st, classes } from './PreviewWidget.st.css';
/** Preview content widget*/
class PreviewWidget extend... |
src/containers/Contact/FormSection.js | d-amit/in-di-go | import React from 'react';
import { Section, Card, TextField, Dialog, DialogContent, DialogActions } from '../../components';
import ThankYouSection from './ThankYouSection';
import MDL from 'material-design-lite/material.min.js';
import $ from 'jquery';
import dialogPolyfill from 'dialog-polyfill';
// TODO: update t... |
docs/app/Examples/views/Item/Content/ItemExampleHeaders.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Item } from 'semantic-ui-react'
const ItemExampleHeaders = () => (
<Item.Group>
<Item>
<Item.Image size='tiny' src='http://semantic-ui.com/images/wireframe/image.png' />
<Item.Content verticalAlign='middle'>
<Item.Header as='a'>12 Years a Slave</Item.Header>... |
src/components/toolbar/toolbar.js | nishanbajracharya/leapicons-ui | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { sizes } from '../../constants/icons';
import { getPNGIcon } from '../../utils/searchUtil';
import * as iconActions from '../../actions/iconActions';
import * as toolbarActions from '../../actions/toolbarActio... |
src/svg-icons/notification/sms-failed.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSmsFailed = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</SvgIcon>
);
NotificationSmsFail... |
components/register.js | volodalexey/spachat | import React from 'react'
import Location_Wrapper from './location_wrapper'
import DialogError from './dialogError'
import DialogSuccess from './dialogSuccess'
import Description from '../components/description'
import ajax_core from '../js/ajax_core.js'
import extend_core from '../js/extend_core.js'
import id_core f... |
js/components/ingredient.js | codeocelot/soylent-industries | import React from 'react'
import Slider from 'material-ui/lib/slider'
import Paper from 'material-ui/lib/paper'
import {Cell} from 'react-pure'
import NutrientActions from '../actions/nutrientActions'
import NutrientStore from '../stores/nutrientStore'
export default class Ingredient extends React.Component{
constru... |
client/components/GridElement/GridElement.js | djaracz/useless-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from './grid-element.scss';
export default class Home extends Component {
constructor(props) {
super(props);
}
render() {
const { elementClassName } = this.props;
return (
<spa... |
frontend/components/markdown/PositiveText.js | datoszs/czech-lawyers | import React from 'react';
import PropTypes from 'prop-types';
import styles from './PositiveText.less';
const PositiveText = ({text}) => <span className={styles.main}>{text}</span>;
PositiveText.propTypes = {
text: PropTypes.string.isRequired,
};
export default PositiveText;
|
client/src/components/LoginForm.js | elliotjz/book-trading-club | import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom';
import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextField';
import Divider from 'material-ui/Divider'
const LoginForm = ({
onSubmit,
onChange,
errors,
successMessage,
... |
app/components/EventForm/index.js | lucascgomes/church-website | import React from 'react'
import { Form, Input, DatePicker, Select } from 'antd'
import PicturesWall from 'components/PicturesWall'
import moment from 'moment'
const FormItem = Form.Item
const Option = Select.Option
class EventForm extends React.Component {
requiredField(message) {
return {
rules: [{
... |
components/layout/Panel.js | jasonleibowitz/react-toolbox | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LAYOUT } from '../identifiers.js';
const Panel = ({ children, className, onScroll, scrollY, theme }) => {
const _className = classnames(theme.panel, {
[theme.scrol... |
__tests__/index.ios.js | hoffmannmatheus/ppg-spot-ui | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/components/MiniProjects.js | thejapanexperience/newWebsiteShell | import React, { Component } from 'react';
class MiniProjects extends Component {
render() {
return (
<div className="section4BoxHidden" id="section4Box">
<div className="section4" id="section4">
<div className="section4Title">MINI-PROJECTS</div>
<div className="section4Text">
... |
react-ui/src/components/Footer/Footer.js | hokustalkshow/find-popular | import React, { Component } from 'react';
import {Link} from 'react-router-dom';
import styles from './Footer.scss';
import SocialTwitterOutline from 'react-icons/io/social-twitter-outline';
import SocialFacebookOutline from 'react-icons/io/social-facebook-outline';
class Footer extends Component {
render() {
r... |
src/prop-types/__tests__/childrenOfType-test.js | carbon-design-system/carbon-components-react | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import childrenOfType from '../childrenOfType';
const Element = <span />;
const StatelessComponent = () => <div /... |
ajax/libs/react-instantsearch/4.1.0/Dom.js | joeyparrish/cdnjs | /*! ReactInstantSearch 4.1.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define ===... |
src/components/CommunityCards.js | Hylozoic/hylo-redux | import React from 'react'
import A from '../components/A'
import Masonry from 'react-masonry-component'
const CommunityCards = ({ communities }) => {
return <div className='community-cards masonry-container'>
<Masonry options={{transitionDuration: 0}}>
{communities.map(community => <div key={community.id} ... |
webpack/components/LoadingSpinner/index.js | daviddavis/katello | import React from 'react';
const LoadingSpinner = ({ children, isLoading }) => {
let response = children;
if (isLoading) {
response = (<div className="spinner spinner-lg" />);
}
return response;
};
export default LoadingSpinner;
|
src/views/scheduler/header/index.js | Bernardstanislas/luz-ui | import React from 'react';
import Clock from './clock';
import Switch from './switch';
const Header = props => (
<div data-role='header'>
<div data-role='header-background'></div>
<Clock/>
<div data-role='relays'>
<Switch relayId='relay1' {...props}/>
<Switch relayId... |
pootle/static/js/admin/components/Project/ProjectAdd.js | ta2-1/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 React from 'react';
import ProjectForm from './Pro... |
src/pages/LayoutPage.js | carlosvillu/youtubeseq.com | import React from 'react'
const LayoutPage = ({children}) => {
return (
<div className='LayoutPage'>
<h1>Página de secuencia de videos !!!!!</h1>
<div className='LayoutPage-container'>{children}</div>
</div>
)
}
LayoutPage.displayName = 'LayoutPage'
export default LayoutPage
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.