path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
demos/redux-demo/app/myComponent.js | Snger/fullstack-training-cn | import React from 'react';
import ReactDOM from 'react-dom';
class MyComponent extends React.Component {
render() {
return (
<div className="index">
<p>{this.props.text}</p>
<input defaultValue={this.props.name} onChange={this.props.onChange} />
</div>
);
}
}
export default MyC... |
public/js/components/admin/path.react.js | MadushikaPerera/Coupley | /**
* Created by Isuru 1 on 21/01/2016.
*/
import React from 'react';
import { Link } from 'react-router';
import PathStore from './../../stores/admin/PathStore';
const Path = React.createClass({
getInitialState: function () {
return PathStore.getpath();
},
componentDidMount: function () {
PathStore.a... |
src/index.js | GJMcGowan/personal_site | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import Routes from './routes';
import './index.css';
ReactDOM.render(
<Routes history={browserHistory} />,
document.getElementById('root')
);
|
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.android.js | kesha-antonov/react-native | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default class WelcomeText extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<... |
src/svg-icons/maps/local-offer.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalOffer = (props) => (
<SvgIcon {...props}>
<path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86... |
node_modules/react-select/examples/src/app.js | rblin081/drafting-client | /* eslint react/prop-types: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
import Select from 'react-select';
import Creatable from './components/Creatable';
import Contributors from './components/Contributors';
import GithubUsers from './components/GithubUsers';
import CustomComponents from './com... |
source/component/listview/offlineList.js | togayther/react-native-cnblogs | import React, { Component } from 'react';
import {
View,
ListView
} from 'react-native';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import OfflineRow from './offlineRow';
import ViewPage from '../view';
class Offli... |
examples/shopping-cart/src/components/ProductItem.js | lifeiscontent/redux | import React from 'react'
import PropTypes from 'prop-types'
import Product from './Product'
const ProductItem = ({ product, onAddToCartClicked }) => (
<div style={{ marginBottom: 20 }}>
<Product
title={product.title}
price={product.price} />
<button
onClick={onAddToCartClicked}
disab... |
packages/material-ui-icons/src/LeakRemove.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let LeakRemove = props =>
<SvgIcon {...props}>
<path d="M10 3H8c0 .37-.04.72-.12 1.06l1.59 1.59C9.81 4.84 10 3.94 10 3zM3 4.27l2.84 2.84C5.03 7.67 4.06 8 3 8v2c1.61 0 3.09-.55 4.27-1.46L8.7 9.97C7.14 11.24 5.... |
docs/app/Examples/elements/Container/index.js | vageeshb/Semantic-UI-React | import React from 'react'
import Types from './Types'
import Variations from './Variations'
const ContainerExamples = () => (
<div>
<Types />
<Variations />
</div>
)
export default ContainerExamples
|
examples/infinite-scrolling/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... |
src/components/RightController/index.js | Plop3D/sandbox | import React from 'react'
import { Entity } from 'aframe-react'
const RightController = (props) => {
return (
<Entity
id="rightController"
hand-controls="right"
sphere-collider={{ objects: '.interactive', radius: 0.05 }}
if-no-vr-headset={{ visible: false }}
super-hands
static... |
client/components/basic/avatar/RoomAvatar.js | subesokun/Rocket.Chat | import React from 'react';
import { Avatar } from '@rocket.chat/fuselage';
import { roomTypes } from '../../../../app/utils/client';
function RoomAvatar({ room: { type, ...room }, ...props }) {
const avatarUrl = roomTypes.getConfig(type).getAvatarPath({ type, ...room });
return <Avatar url={avatarUrl} title={avata... |
src/components/Feedback/Feedback.js | lolilukia/smda | /**
* 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... |
js/jqwidgets/demos/react/app/notification/events/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxNotification from '../../../jqwidgets-react/react_jqxnotification.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';
class App extends React.Component {
... |
src/IconImage/index.js | christianalfoni/ducky-components | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
function IconImage(props) {
return (
<img
className={classNames(styles.wrapper, {
[styles[props.size]]: props.size,
[props.class... |
springboot/GReact/src/main/resources/static/app/components/ui/UiAjaxAutocomplete.js | ezsimple/java | import React from 'react'
export default class UiAjaxAutocomplete extends React.Component {
componentDidMount() {
let self = this;
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
function extractFirst(term) {
re... |
src/views/containers/pages/about_page/about_page.js | michaelBenin/react-ssr-spa | import get from 'lodash/get';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import withRouter from 'react-router/withRouter';
import Link from 'react-router-dom/Link';
import loadData from './about_page_data_fetch';
import Footer from './../../../... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/LifecycleMethodsPropsAndState.js | gabelevi/flow | // @flow
import React from 'react';
class MyComponent1 extends React.Component {
componentWillReceiveProps(nextProps: Props) {}
}
class MyComponent2 extends React.Component {
shouldComponentUpdate(prevProps: Props, prevState: State) {}
}
class MyComponent3 extends React.Component {
componentWillUpdate(prevPro... |
docs/server.js | xiaoking/react-bootstrap | /* eslint no-console: 0 */
import 'colors';
import React from 'react';
import express from 'express';
import path from 'path';
import Router from 'react-router';
import routes from './src/Routes';
import httpProxy from 'http-proxy';
import metadata from './generate-metadata';
import ip from 'ip';
const development =... |
tests/react/key.js | samwgoldman/flow | // @flow
import React from 'react';
class Foo extends React.Component<{}, void> {}
<Foo />; // OK
<Foo key="42" />; // OK
<Foo key={42} />; // OK
<Foo key={null} />; // OK
<Foo key={undefined} />; // OK
<Foo key={true} />; // Error
class FooExact extends React.Component<{||}, void> {}
<FooExact />; // OK
<FooExact... |
src/components/layout/Header/LoginSection.js | DominicTremblay/gramventures | import React from 'react';
import {Link} from 'react-router';
import Auth from '../../api/Auth.js';
import LoginType from './LoginType.js';
class LoginSection extends React.Component {
render() {
return (
<div className="login-section">
<ul>
<li><LoginType currentUser={Auth.retrieveU... |
src/components/__mocks__/Biggo.js | swashcap/LookieHere | import React, { Component } from 'react';
import { View } from 'react-native';
jest.genMockFromModule('../Biggo');
export default class MockMiniList extends Component {
render() {
return <View />;
}
}
|
public/src/jest/LinkButton.js | codelegant/react-action | /**
* Author: CodeLai
* Email: codelai@dotdotbuy.com
* DateTime: 2016/7/15 17:17
*/
import React, { Component } from 'react';
export default class LinkButton extends Component {
constructor() {
super();
this.state = {liked: false};
this.handleClick = this.handleClick.bind(this);
}
handleClick() ... |
src/svg-icons/maps/person-pin.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPin = (props) => (
<SvgIcon {...props}>
<path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2... |
src/components/ChatApp/ChatApp.react.js | RMCoder198/chat.susi.ai | import MessageSection from './MessageSection/MessageSection.react';
import React, { Component } from 'react';
import './ChatApp.css';
import history from '../../history';
export default class ChatApp extends Component {
componentDidMount() {
document.title = 'SUSI.AI Chat - Open Source Artificial Intelligence';
... |
docs/src/app/components/pages/components/DropDownMenu/ExampleLongMenu.js | andrejunges/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const items = [];
for (let i = 0; i < 100; i++ ) {
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`} />);
}
export default class DropDownMenuLongMenuExample extends React.Compo... |
src/routes/contact/Contact.js | DaveyEdwards/myiworlds | /**
* 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 PropTypes from 'prop-... |
src/js/components/Search.js | nicholasodonnell/moonshine | import React from 'react';
class Search extends React.Component {
constructor() {
super();
}
componentWillMount() {
}
render() {
return (
<form class="c-search">
<input class="c-search__input" type="text" name="q" id="q" />
<label class... |
src/svg-icons/image/wb-cloudy.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbCloudy = (props) => (
<SvgIcon {...props}>
<path d="M19.36 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.64-4.96... |
node_modules/react-bootstrap/es/ModalDialog.js | cmccandless/SolRFrontEnd | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/svg-icons/action/chrome-reader-mode.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionChromeReaderMode = (props) => (
<SvgIcon {...props}>
<path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"/>
... |
example/src/index.js | xuezhma/react-bpg | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
app/pages/CategoryPage.js | EleTeam/Shop-React-Native | /**
* ShopReactNative
*
* @author Tony Wong
* @date 2016-08-13
* @email 908601756@qq.com
* @copyright Copyright © 2016 EleTeam
* @license The MIT License (MIT)
*/
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
View,
ListView,
Text,
Image,
InteractionManage... |
blueocean-material-icons/src/js/components/svg-icons/image/filter-drama.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageFilterDrama = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1... |
app/javascript/mastodon/features/compose/components/upload_progress.js | kirakiratter/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import Icon from 'mastodon/components/icon';
export default class UploadProgress extends React.PureComponent {
static propTypes = {
active: PropTypes.b... |
app/javascript/mastodon/features/ui/components/confirmation_modal.js | anon5r/mastonon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
@injectIntl
export default class ConfirmationModal extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
... |
src/components/Intro.js | neontribe/spool | import React, { Component } from 'react';
import headings from '../css/Headings.module.css';
class Intro extends Component {
render () {
return (
<div>
<h2 className={headings.large}>Welcome!</h2>
<p>We would really like to know about the things you do.</p>
... |
src/files/modals/new-folder-modal/NewFolderModal.js | ipfs/webui | import React from 'react'
import PropTypes from 'prop-types'
import { withTranslation } from 'react-i18next'
import FolderIcon from '../../../icons/StrokeFolder'
import TextInputModal from '../../../components/text-input-modal/TextInputModal'
function NewFolderModal ({ t, tReady, onCancel, onSubmit, className, ...prop... |
modules/Lifecycle.js | BerkeleyTrue/react-router | import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method to a
* component that may be used to cancel a transition or prompt the user
* for confirmation.
*
* On standard transitions, routerWillLeave receives ... |
src/containers/LoginSection.js | giladgreen/pokerStats | import React, { Component } from 'react';
import { Connect,PreConnect } from '../actions/index';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {cloneDeep} from 'lodash';
class LoginSection extends Component {
constructor(props){
super(props);
// console.log('Lo... |
src/routes/GasHybridElectric/components/Results3.js | psound/jm-liberty | import React from 'react'
import { IndexLink, Link } from 'react-router'
import './HomeView.scss'
const styles = {};
let data = require('../assets/data.json');
class Results3 extends React.Component {
constructor (props) {
super(props);
this.state = {
heroImage: require(`../../../img... |
src/Breadcrumb.js | react-materialize/react-materialize | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Col from './Col';
const Breadcrumb = ({ cols, children, className }) => (
<nav className={cx('row', className)}>
<div className="nav-wrapper">
<Col s={cols}>
{React.Children.map(children, item =>
... |
react/components/Container/Main/Overlay.js | GeorgeGkas/web-class.gr | import React from 'react';
import sidebarStore from '../Sidebar/SidebarStore.js';
export default class Header extends React.Component {
constructor() {
super();
this.state = {
SidebarIsCollapse: sidebarStore.getCurrentState()
}
this.OverlayClass = 'hidden';
}
componentWillMount() {
si... |
client/components/signup/SignupForm.js | brucelane/react-redux | import React from 'react';
import classnames from 'classnames';
import validateInput from '../../../server/shared/validations/signup';
import TextFieldGroup from '../common/TextFieldGroup';
class SignupForm extends React.Component {
constructor(props) {
super(props);
this.state = {
username: '',
... |
envkey-react/src/components/env_manager/entry_form.js | envkey/envkey-app | import React from 'react'
import R from 'ramda'
import h from "lib/ui/hyperscript_with_helpers"
import LabelRow from './label_row'
import EntryFormRow from './entry_form_row'
import SmallLoader from 'components/shared/small_loader'
export default class EntryForm extends React.Component {
_onSubmit(){
const form... |
tests/react_modules/es6class-proptypes-module.js | ylu1317/flow | /* @flow */
import React from 'react';
import type {Node} from 'react';
class Hello extends React.Component<{name: string}> {
defaultProps = {};
propTypes = {
name: React.PropTypes.string.isRequired,
};
render(): Node {
return <div>{this.props.name}</div>;
}
}
module.exports = Hello;
|
src/components/datetime-picker/picker.js | jl-/bronote | /**
* <DatePicker
* date
* onChange // trigge on selected date change
* />
*
*
*
*/
import React, { Component } from 'react';
import cx from 'classnames';
import './style.scss';
const LEVEL_YEARS = 1;
const LEVEL_MONTHS = 2;
const LEVEL_DATES = 3;
const LEVEL_TIME = 4;
const YEAR_OFFSET = 4;
const MONTH_... |
client/src/components/pages/account/ChangePasswordPage.js | 15thnight/15thnight | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { InputField, FormErrors } from 'form';
import { changePassword, clearFormStatus } from 'actions';
const { stringify, parse } = JSON;
class ChangePassowrdPage extends React.Component {
constructor... |
docs/src/pages/premium-themes/paperbase/Content.js | lgollut/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import Paper from '@material-ui/core/Paper';
import Grid from '@material-ui/core/Grid';
import Button from... |
src/utils/ValidComponentChildren.js | mengmenglv/react-bootstrap | import React from 'react';
/**
* Maps children that are typically specified as `props.children`,
* but only iterates over children that are "valid components".
*
* The mapFunction provided index will be normalised to the components mapped,
* so an invalid component would not increase the index.
*
* @param {?*} ... |
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js | changjiashuai/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ActivityHeader extends React.Component {
static propTypes = {
close: React.PropTypes.func,
title: React.PropTypes.stri... |
src/framework/client/root-component.js | foobarhq/reworkjs | // @flow
import React from 'react';
import { CookiesProvider } from 'react-cookie';
import { HelmetProvider } from 'react-helmet-async';
import { BrowserRouter } from 'react-router-dom';
import { getDefault } from '../../shared/util/ModuleUtil';
import ReworkRootComponent from '../app/ReworkRootComponent';
import { ro... |
webpack/components/Table/components/TranslatedPlural.js | Katello/katello | import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
// a defaultMessage like
// "{count, plural, =0 {No errata} one {# erratum} other {# errata}}"
// will give us properly translated pluralized strings!
// see https://formatjs.io/docs/react-intl/components/#mes... |
admin/client/components/Forms/FormHeading.js | pswoodworth/keystone | import React from 'react';
import evalDependsOn from '../../../../fields/utils/evalDependsOn';
module.exports = React.createClass({
displayName: 'FormHeading',
propTypes: {
options: React.PropTypes.object,
},
render () {
if (!evalDependsOn(this.props.options.dependsOn, this.props.options.values)) {
return n... |
packages/mcs-lite-ui/src/MobileDeviceCard/MobileDeviceCard.js | MCS-Lite/mcs-lite | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import TextTruncate from 'react-text-truncate';
import Card from '../Card';
import Img from '../Img';
import Heading from '../Heading';
export const StyledCard = Card.extend`
height: 120px;
display: flex;
`;
exp... |
pages/Skills.js | amni/alanmni-portfolio | import React from 'react'
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import Helmet from "react-helmet"
import { config } from 'config'
import Profile from 'components/Profile'
import SkillsView from 'components/SkillsView'
export default class Skills extends React.Component {
ren... |
examples/huge-apps/routes/Messages/components/Messages.js | meraki/react-router | import React from 'react'
class Messages extends React.Component {
render() {
return (
<div>
<h2>Messages</h2>
</div>
)
}
}
module.exports = Messages
|
src/svg-icons/editor/pie-chart-outlined.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorPieChartOutlined = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm1 2.07c3.61.45 6.48 3.33 6.93 6.93H13V4.07zM4 12c0-4.06 3.07-7.44 7-7.93v15.87c-... |
plugins/react/frontend/components/controls/base/FunctionControl/index.js | carteb/carte-blanche | /**
* FunctionControl
*/
import React from 'react';
import Row from '../../../form/Grid/Row';
import LeftColumn from '../../../form/Grid/LeftColumn';
import RightColumn from '../../../form/Grid/RightColumn';
import Label from '../../../form/Label';
import styles from './styles.css';
const FunctionControl = ({ label... |
Rate.UI/app/components/AddReviewContainer.js | jcnavarro/rateflicks | import React from 'react';
import SearchFlick from './SearchFlick';
import FlickStore from "../stores/FlickStore";
import Movie from './Movie';
import ReviewActions from "../actions/ReviewActions";
import AddReview from "./AddReview";
export default class AddReviewContainer extends React.Component {
constructor (... |
src/components/common/form/AutoCompleteTextInput.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import Autocomplete from 'react-autocomplete';
import styles from './TextInput/TextInput.module.css';
const renderItem = (item, isHighlighted) => (
<div
key={item.value}
style={{
background: isHighlighted ? 'lightgray' : 'white',
pad... |
src/client/pages/notfound.react.js | terakilobyte/socketreact | import Component from '../components/component.react';
import DocumentTitle from 'react-document-title';
import React from 'react';
import {Link} from 'react-router';
import {msg} from '../intl/store';
class NotFound extends Component {
render() {
return (
<DocumentTitle title={msg('notFound.title')}>
... |
actor-apps/app-web/src/app/components/sidebar/RecentSection.react.js | wangkang0627/actor-platform | import _ from 'lodash';
import React from 'react';
import { Styles, RaisedButton } from 'material-ui';
import ActorTheme from 'constants/ActorTheme';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import CreateGroupActionCreators from 'actions/CreateGro... |
app/components/QuickControl.js | mkawauchi/react-rpm | import React from 'react';
import styles from './QuickControl.css';
const propTypes = {
children: React.PropTypes.node
};
export default function QuickControl({ children }) {
return (
<div className={styles.quickControl}>
{children}
</div>
);
}
QuickControl.propTypes = propTypes;
|
src/AddButton.js | PSilling/StudentHubUIDevelopment | import React, { Component } from 'react';
import Button from 'react-toolbox/lib/button/Button.js';
/**
* Renders the add Button.
* @param selectedUniversity the university that is selected
* @param toggleUniversityHandler() defines the function to call onClick when universities are browsed
* @par... |
src/collections/Form/FormTextArea.js | koenvg/Semantic-UI-React | import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import TextArea from '../../addons/TextArea'
import FormField from './FormField'
/**
* Sugar for <Form.Field control={TextArea} />.
* @see Form
* @see TextArea
*/
function FormTextArea(props) {
... |
MobileApp/node_modules/react-native/local-cli/templates/HelloWorld/index.ios.js | VowelWeb/CoinTradePros.com | /**
* 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 HelloWorld extends Component {
render() {
return (
<View style={styles.containe... |
docs/app/Examples/modules/Dropdown/Content/DropdownExampleImage.js | koenvg/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
import { friendOptions } from '../common'
const DropdownExampleImage = () => (
<Dropdown text='Add user' icon='add user' floating labeled button className='icon'>
<Dropdown.Menu>
<Dropdown.Header content='People You Might Know' />
... |
src/components/page/StartPage.js | mrbjoern/SpringFitnessMobile | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
AsyncStorage,
ActivityIndicator,
} from 'react-native';
import {
COLOR,
PRIMARY_COLORS
} from 'react-native-material-design';
import { connect } from 'react-redux';
import {
saveCredentials,
} from '../../actions';
import {
... |
src/App.js | cedjud/nst-prototype | import React, { Component } from 'react';
import {
BrowserRouter as Router,
Link,
Route
} from 'react-router-dom';
import { Button } from 'semantic-ui-react';
import fire from './fire.js';
import Login from './components/Login';
import Register from './components/Register';
import Dashboard from './components/Da... |
app/javascript/mastodon/features/ui/components/audio_modal.js | kazh98/social.arnip.org | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Audio from 'mastodon/features/audio';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import { previewState } from './vide... |
node_modules/react-scripts/template/src/index.js | dippnerd/home-control-panel | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
app/javascript/mastodon/features/ui/components/image_loader.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { LoadingBar } from 'react-redux-loading-bar';
import ZoomableImage from './zoomable_image';
export default class ImageLoader extends React.PureComponent {
static propTypes = {
alt: PropTypes.string,
s... |
src/organisms/cards/StackedCard/index.js | policygenius/athenaeum | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from './stacked_card.module.scss';
const stackChild = (child) => {
if (child) {
return <li className={styles['stacked-li']}>{ child }</li>;
}
return null;
};
const stackChildren = (children) => ... |
src/client/lib/validation.js | obimod/este | /*
Simple serial sync/async chriso/validator.js validation wrapper with promises.
*/
import Promise from 'bluebird';
import React from 'react';
import validator from 'validator';
export class ValidationError extends Error {
constructor(message, prop) {
super();
this.message = message;
this.prop = prop;... |
src/components/UI/loader/Loader.js | radekzz/netlify-cms-test | import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './Loader.css';
export default class Loader extends React.Component {
state = {
currentItem: 0,
};
componentWillUnmount() {
if (this.interval) {
clearInterval(this.interval);
... |
src/components/Header.js | ajaycheenath/abs | import React, { Component } from 'react';
import Menu from "./Menu";
import headerStyle from "../css/app.css";
class Header extends Component {
render() {
return (
<div className={headerStyle.header}>
<div className={headerStyle.productName}>product name</div>
<Menu search={this.prop... |
src/components/Background/Background.js | Zoomdata/nhtsa-dashboard-2.2 | import styles from './Background.css';
import React from 'react';
const Background = ({data}) => {
return (
<div
className={styles.root}
>
{data}
</div>
)
};
export default Background; |
dist/lib/carbon-fields/assets/js/fields/components/oembed/search-input.js | ArtFever911/statrer-kit | /**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import { compose, withHandlers, defaultProps } from 'recompose';
import { debounce } from 'lodash';
/**
* The internal dependencies.
*/
import { KEY_ENTER } from 'lib/constants';
/**
* Render the field used to filt... |
src/components/book.js | mailofjordi/librarySJ | import React, { Component } from 'react';
import {showBookDetails} from "../actions/index";
import {connect} from "react-redux";
class Book extends Component {
render() {
return (
<div>
<div>Título: {this.props.book.title}</div>
<div>Autor: {this.props.book.autho... |
src/OverlayRenderer.js | aksonov/react-native-router-flux | /* @flow */
import React from 'react';
import { View } from 'react-native';
export default ({ navigationConfig, descriptors }) => {
const { initialRouteName, order, contentComponent } = navigationConfig;
const ContentComponent = contentComponent || View;
const descriptor = descriptors[initialRouteName];
const... |
app/addons/permissions/routes.js | apache/couchdb-fauxton | // 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 agreed to in writing, software
// distributed un... |
src/Tab/index.js | szchenghuang/react-mdui | 'use strict';
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import ClassNames from 'classnames';
import mdui from '../index';
import Item from './Item';
class Tab extends React.Component {
componentDidMount() {
const { trigger, loop } = this.props;
const options = {... |
src/ButtonToolbar.js | Cellule/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const ButtonToolbar = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'button-toolbar'
};
},
render() {
let classes = this.getBsClassSet();
... |
docs/app/Examples/elements/Button/Types/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ButtonTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Button'
description='A st... |
app/config/routes.js | DiegoCardoso/github-battle | import React from 'react'
import {Router, Route, IndexRoute, hashHistory} from 'react-router'
import Main from '../components/Main'
import Home from '../components/Home'
import PromptContainer from '../containers/PromptContainer'
import ConfirmBattleContainer from '../containers/ConfirmBattleContainer'
import ResultsC... |
examples/client.js | MrCheater/text-resize-and-word-wrap-provider | import React from 'react';
import ReactDOM from 'react-dom';
import { DemoAlignScaleColorDebug } from './DemoAlignScaleColorDebug';
import DemoAlignScaleColorDebugCode from '!raw-loader!./DemoAlignScaleColorDebug';
import { DemoChartBar } from './DemoChartBar';
import DemoChartBarCode from '!raw-loader!./DemoChartBar';... |
src/index.js | ctrlplusb/react-redux | import React from 'react';
import createAll from './components/createAll';
export const { Provider, connect } = createAll(React);
|
app/containers/SearchBar.js | arixse/ReactNeteaseCloudMusic | import React, { Component } from 'react';
import { connect } from 'react-redux';
import AutoComplete from 'material-ui/AutoComplete';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
// import Play from './Play';
import List from '../components/List';
import { show, load, search } from '../actions';
... |
ReactApp/src/Pages/Artisans.js | hoh/FolkMarsinne | import React, { Component } from 'react';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card';
import {List, ListItem} from 'material-ui/List';
import Paper from 'material-ui/Paper';
import RaisedButton from 'material-ui/RaisedButton';
import {red500, brown500} from 'material... |
node_modules/react-bootstrap/es/Image.js | yeshdev1/Everydays-project | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/svg-icons/action/print.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPrint = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/>
</... |
packages/material-ui-icons/src/Apps.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Apps = props =>
<SvgIcon {...props}>
<path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z" />
</SvgIcon>;
Apps ... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/StateInferred.js | facebook/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: Props;
state = {};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: Props;
state = {};
defaul... |
src-example/components/pages/NotFoundPage/index.js | SIB-Colombia/biodiversity_catalogue_v2_frontend | import React from 'react'
import { PageTemplate, Header, Footer, Heading } from 'components'
const NotFoundPage = () => {
return (
<PageTemplate header={<Header />} footer={<Footer />}>
<Heading>404 Not Found</Heading>
</PageTemplate>
)
}
export default NotFoundPage
|
client/scripts/components/Glossary.js | ahoarfrost/metaseek | import React from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import ColorPalette from './ColorPalette';
import Paper from 'material-ui/Paper';
import {List, ListItem} from 'material-ui/List';
import { Link } from 'react-router';... |
accounts-ui/app/components/appReActivate.js | CloudBoost/cloudboost | import React from 'react';
import {Link, browserHistory} from 'react-router'
import axios from 'axios'
import CircularProgress from 'material-ui/CircularProgress'
class Reset extends React.Component {
constructor() {
super()
this.state = {
appActivated: false,
error: false
... |
src/containers/NotFound/NotFound.js | kiyonish/kiyonishimura | import React from 'react'
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
)
}
|
src/components/App.js | OSDLabs/swd | /**
* 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 PropTypes from 'prop-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.