path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
examples/react-native/storybook/stories/DelayedComponent/index.js | oblador/loki | /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Text } from 'react-native';
export default class DelayedComponent extends Component {
static propTypes = {
delay: PropTypes.numbe... |
client/App.js | wapjude/labify | import React from 'react';
import { AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import configureStore from './src/store/configureStore';
import AppReducer from './src/reducers';
import checkAuth from './src/utils/checkAuth';
import AppWithNavigationSta... |
src/icons/Drag.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Drag extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<rect y="144" width="512" height="32"></rect>
<rect y="240" width="512" height="32"></rect>
<rect y="336" width="512" height="... |
src/app/js/SocialButtons.js | skratchdot/colorify | /*
* using a slightly modified version of code found here:
* https://github.com/dr-dimitru/SHB-js
*
*/
import React, { Component } from 'react';
import getSocialButtonLib from '../../lib/shb';
const id = 'social-button-container';
const title = 'Colorify: a collection of color tools';
const SHB = getSocialButtonLi... |
imports/client/ui/components/AppNavigation.js | mgscreativa/base | import { Meteor } from 'meteor/meteor';
import React from 'react';
import { Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import { PropTypes } from 'prop-types';
import PublicNavigation from './PublicNavigation.js';
import AuthenticatedNavigation from './AuthenticatedNavigation.js';
import c... |
routes/routes.js | romanmatiasko/reti-chess | import express from 'express';
import path from 'path';
import fs from 'fs';
import React from 'react';
import Index from '../src/js/components/Index';
import GameInterface from '../src/js/components/GameInterface';
const router = express.Router();
router.get('/', (req, res) => {
res.render('index', {
content: ... |
packages/television/src/components/AmpScript.js | accosine/poltergeist | import React from 'react';
export default ({ name }) => (
<script
async
custom-element={`amp-${name}`}
src={`https://cdn.ampproject.org/v0/amp-${name}-0.1.js`}
/>
);
|
scripts/index.js | nrobin24/react-sidescroller | import React from 'react';
import App from './App';
import tree from './tree';
import images from './images';
images.load().then(() => {
React.render(<App tree={tree}/>, document.getElementById('root'));
});
|
src/components/overview/handouts.js | abbr/ShowPreper | import React from 'react'
import './handouts.less'
import _ from 'lodash'
import { langs } from 'i18n/lang'
var DisplayableComponent = require('components/widgets/displayableComponent')
module.exports = class extends React.Component {
updateNotes = (index, markUndoDesc, e) => {
this.props.onSelectedWidgetUpdated... |
src/routes.js | moo-dal/spoon-web | /* External dependencies */
import React from 'react'
import { Router, Route, IndexRedirect } from 'react-router'
/* Internal dependencies */
import reduxService from './services/reduxService'
import App from './containers/App'
import SignIn from './containers/SignIn'
import SignUp from './containers/SignUp'
import Sc... |
public/js/cat_source/es6/components/modals/ModalWindowComponent.js | Ostico/MateCat | import React from 'react'
import ModalContainerComponent from './ModalContainerComponent'
import ModalOverlayComponent from './ModalOverlayComponent'
class ModalWindowComponent extends React.Component {
constructor(props) {
super(props)
this.state = {
isShowingModal: false,
component: '',
... |
components/ui/Button.js | resource-watch/resource-watch | import React from 'react';
import PropTypes from 'prop-types';
class Button extends React.Component {
static defaultProps = { properties: {} };
static propTypes = {
children: PropTypes.any,
properties: PropTypes.object,
onClick: PropTypes.func,
onMouseOver: PropTypes.func,
onMouseOut: PropTyp... |
src/components/Repo/Code/User.js | 879479119/Github-Mobile | import React from 'react'
import { Link } from 'react-router-dom'
import { Icon } from 'antd'
import './User.scss'
export default function User({ owner, style = {} }) {
if (owner === undefined) {
owner = { //eslint-disable-line
login: 'login',
avatar_url: '',
id: '',
type: 'User',
}
... |
fields/components/Checkbox.js | trentmillar/keystone | import React from 'react';
import blacklist from 'blacklist';
import classnames from 'classnames';
import { darken, fade } from '../../admin/client/utils/color';
import E from '../../admin/client/constants';
var Checkbox = React.createClass({
displayName: 'Checkbox',
propTypes: {
checked: React.PropTypes.bool,
c... |
client/app/components/ConnectWindow/index.js | bryanph/Geist | /**
*
* ConnectWindow
*
*/
import React from 'react';
import styles from './styles.css';
import { Dialog } from 'material-ui'
import { FlatButton } from '../button'
import NodeSearch from '../../containers/NodeSearch'
import { Entity, RichUtils } from 'draft-js';
const ENTITY_TYPE = 'CONTENT_LINK'
// TODO: thi... |
docs/src/components/ToggleButton/index.js | jasonbahl/wp-graphql | import React from 'react'
import classNames from 'classnames'
import './style.css'
export default ({ onClick, label, state }) => {
const className = classNames(
'toggle-button',
{ green: state === true || state === 'on' || state === 'green' },
{ red: state === false || state === 'off' || state === 'red' ... |
assets/javascripts/components/category_list/Task.js | walshyb/DoTab | import React, { Component } from 'react';
export default class Task extends Component {
constructor(props){
super(props);
};
handleChange = () => {
this.props.archiveTask(this.props.categoryName, this.props.taskId);
};
render() {
return (
<li className='task'>
<label>
<i... |
springboot/GReact/src/main/resources/static/app/components/calendar/components/FullCalendarWidget.js | ezsimple/java | import React from 'react'
import {DropdownButton, MenuItem} from 'react-bootstrap'
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux'
import * as EventActions from '../EventActions'
import JarvisWidget from '../../../components/widgets/JarvisWidget'
import 'script-loader!smartadmin-plugi... |
src/Connected/inner/Text.js | dht/lpm | import React from 'react';
const sanitizer = require('sanitizer');
import Base from './Base';
const Text = (props) => {
let {params = {}, data, content} = props,
{dataField} = data || {};
if (dataField && params[dataField]) {
content = params[dataField];
}
const text = sanitizer.sanit... |
examples/huge-apps/routes/Grades/components/Grades.js | yongxu/react-router | import React from 'react';
class Grades extends React.Component {
render () {
return (
<div>
<h2>Grades</h2>
</div>
);
}
}
export default Grades;
|
src/js/components/icons/base/Grid.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/index.js | Okazari/react-rest-hoc | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
es/components/FooterBar/NextMedia.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { translate, Interpolate } from 'react-i18next';
import compose from 'recompose/compose';
import pure from 'recompose/pure';
import SongTitle from '../SongTitle';
imp... |
src/data.org.js | kfnxu/fantastic-waffle | import React from 'react';
import Assessment from 'material-ui/svg-icons/action/assessment';
import GridOn from 'material-ui/svg-icons/image/grid-on';
import PermIdentity from 'material-ui/svg-icons/action/perm-identity';
import Web from 'material-ui/svg-icons/av/web';
import {cyan600, pink600, purple600} from 'materia... |
src/components/App.js | AamuLumi/EschVG | import React from 'react';
import Paper from './Paper';
import fs from 'fs';
import {connect} from 'react-redux';
import {nativeImage, ipcRenderer} from 'electron';
const {dialog} = require('electron').remote;
import {SketchPicker} from 'react-color';
import Immutable from 'immutable';
import {setActiveColor, setNotif... |
src/app/components/Programs.js | omarglz/rgvelite | import React from 'react';
export class Programs extends React.Component {
// componentDidMount() {
// componentHandler.upgradeDom();
// }
/*
* Used so mdl lite components can do their thing
*/
componentDidUpdate() {
componentHandler.upgradeDom();
}
render() {
return (
<div className="progr... |
admin/commands/index.js | romainquellec/cuistot | import React from 'react';
import {
AutocompleteInput,
BooleanField,
BooleanInput,
Datagrid,
DateField,
DateInput,
Edit,
EditButton,
Filter,
List,
NullableBooleanInput,
NumberField,
ReferenceInput,
SelectInput,
SimpleForm,
TextField,
TextInput,
} from ... |
fluxible-router/app.js | src-code/flux-examples | /**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
import React from 'react';
import Fluxible from 'fluxible';
import Application from './components/Application';
import RouteStore from './stores/RouteStore';
import ApplicationStore from... |
src/routes/content/media/index.js | muidea/magicSite | import React from 'react'
import PropTypes from 'prop-types'
import { routerRedux } from 'dva/router'
import { connect } from 'dva'
import qs from 'qs'
import { config } from 'utils'
import List from './List'
import Filter from './Filter'
import Modal from './Modal'
const { api } = config
const { uploadFileUrl } = api... |
src/ModalFooter.js | gianpaj/react-bootstrap | import React from 'react';
import classNames from 'classnames';
class ModalFooter extends React.Component {
render() {
return (
<div
{...this.props}
className={classNames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalFooter.... |
src/components/Lane/LaneFooter.js | rcdexta/react-trello | import React from 'react'
import {LaneFooter} from 'rt/styles/Base'
import {
CollapseBtn,
ExpandBtn,
} from 'rt/styles/Elements'
export default ({onClick, collapsed}) => <LaneFooter onClick={onClick}>{collapsed ? <ExpandBtn /> : <CollapseBtn />}</LaneFooter>
|
webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js | cfouant/katello | import React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from 'patternfly-react';
import { translate as __ } from 'foremanReact/common/I18n';
const SubscriptionDetailProduct = ({ content }) => (
<Row key={content.id}>
<Col sm={12}>
<Row>
<u>{content.name}</u>
</Row>
... |
client/components/navbar.js | yaatra/PointBreak | import React from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import {withRouter, Link, NavLink} from 'react-router-dom'
import {logout} from '../store'
const Navbar = (props) => {
const {handleClick, isLoggedIn, email, cssClass} = props
return (<div className={cssClass}>
... |
packages/material-ui-icons/src/MonetizationOn.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-... |
stories/DayPicker.js | acp31/react-dates | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import DayPicker from '../src/components/DayPicker';
import {
VERTICAL_ORIENTATION,
VERTICAL_SCROLLABLE,
} from '../constants';
const TestPrevIcon = () => (
<span
style={{
border: '1px solid #dce0e0',
backgroundColor: '#ff... |
components/Header/Header.js | owennicol/yaiza | // React
import React from 'react'
import SVGLogo from '../SVG/SVGLogo'
import NavIcon from './NavIcon'
import NavLink from '../NavLink'
import classNames from 'classnames'
const Header = (props) => {
const headerClasses = classNames({
header: true,
active: props.headerIsActive || props.menuIsOpen
});
re... |
src/components/PodcastResult/PodcastResult.js | franferdez/fuga-challenge | import React from 'react'
import moment from 'moment'
type Props = {
data: Object.isRequired
};
export class PodcastResult extends React.Component {
props: Props;
showCategories(categories){
categories.map((category)=>{
category.name
})
}
render () {
const {
title,
descrip... |
src/js/components/ArtistListItem.js | rmhowe/search-ui | import React from 'react';
export default class Artist extends React.Component {
static propTypes = {
gender: React.PropTypes.string.isRequired,
age: React.PropTypes.number.isRequired,
rate: React.PropTypes.number.isRequired,
longitude: React.PropTypes.string.isRequired,
latitude: React.PropTypes... |
jenkins-design-language/src/js/components/material-ui/svg-icons/social/group.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const SocialGroup = (props) => (
<SvgIcon {...props}>
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.3... |
app/main.js | hillscottc/trivnode-react | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory, IndexRoute } from 'react-router'
import ReactGA from 'react-ga';
import App from './App.js';
import CatsContainer from './components/cats/CatsContainer';
import CluesContainer from './components/clues/CluesContainer';
i... |
stories/TPA/Label/index.js | skyiea/wix-style-react | import React from 'react';
import {storiesOf} from '@storybook/react';
import LabelExample, {CustomStyleLabelExample} from './LabelExample';
import LabelExampleRaw from '!raw-loader!./LabelExample';
import CodeExample from '../../utils/Components/CodeExample';
import WixStyleDecorator from '../decorators/WixStyleDecora... |
src/svg-icons/image/control-point-duplicate.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPointDuplicate = (props) => (
<SvgIcon {...props}>
<path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 ... |
app/packs/src/components/qc/components/helper/icon.js | ComPlat/chemotion_ELN | import React from 'react';
import { Label, Tooltip, OverlayTrigger } from 'react-bootstrap';
const iconTp = margin => (
<Tooltip id="ans-tp">
max { margin } failure allowed.
</Tooltip>
);
const iconByBool = result => (
result
? <Label bsStyle="success" className="label-qc">Pass</Label>
: <Label bsSt... |
src/TabbedArea.js | AlexKVal/react-bootstrap | import React from 'react';
import Tabs from './Tabs';
import TabPane from './TabPane';
import ValidComponentChildren from './utils/ValidComponentChildren';
import deprecationWarning from './utils/deprecationWarning';
const TabbedArea = React.createClass({
componentWillMount() {
deprecationWarning(
'TabbedA... |
docs/app/Examples/elements/Icon/IconSet/IconExampleComputerAndFileSystem.js | ben174/Semantic-UI-React | import React from 'react'
import { Grid, Icon } from 'semantic-ui-react'
const IconExampleComputerAndFileSystem = () => (
<Grid columns='5' doubling>
<Grid.Column>
<Icon name='file archive outline' />
<p>file archive outline</p>
</Grid.Column>
<Grid.Column>
<Icon name='file audio outlin... |
webpack/ForemanTasks/Components/TaskDetails/Components/TaskSkeleton.js | theforeman/foreman-tasks | import React from 'react';
import Skeleton from 'react-loading-skeleton';
import { Grid, Row, Col } from 'patternfly-react';
export const TaskSkeleton = () => {
const details = [1, 2, 3, 4, 5, 6];
return (
<Grid>
<br />
<Row>
<Col>
<Skeleton />
</Col>
</Row>
{d... |
ui/src/main/js/pages/Update.js | thinker0/aurora | import React from 'react';
import Breadcrumb from 'components/Breadcrumb';
import Loading from 'components/Loading';
import UpdateConfig from 'components/UpdateConfig';
import UpdateDetails from 'components/UpdateDetails';
import { isInProgressUpdate } from 'utils/Update';
export default class Update extends React.C... |
public/javascripts/components/group-pane.js | JetChat/JetChat | import React from 'react';
import Reflux from 'reflux';
import ChatStore from '../events/chat-store';
import ChatActions from '../events/chat-actions';
import classNames from 'classnames';
import NewGroupButton from './new-group-button';
var GroupPane = React.createClass({
mixins: [Reflux.connect(ChatStore, 'store... |
docs/app/Examples/modules/Popup/Types/PopupExample.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Button, Popup } from 'semantic-ui-react'
const PopupExample = () => (
<Popup
trigger={<Button icon='add' />}
content='Add users to your feed'
/>
)
export default PopupExample
|
src/encoded/static/components/item-pages/DefaultItemView.js | hms-dbmi/fourfront | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import memoize from 'memoize-one';
import url from 'url';
import _ from 'underscore';
import { ItemDetailList } from '@hms-dbmi-bgm/shared-portal-components/es/components/ui/ItemDetailList';
import { Alerts } from '@hms-dbmi-bgm/shared-porta... |
frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModal.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React from 'react';
import Modal from 'Components/Modal/Modal';
import MovieIndexOverviewOptionsModalContentConnector from './MovieIndexOverviewOptionsModalContentConnector';
function MovieIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps }) {
return (
<Mo... |
packages/component/src/Avatar/ImageAvatar.js | billba/botchat | import { hooks } from 'botframework-webchat-api';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import CroppedImage from '../Utils/CroppedImage';
import useStyleSet from '../hooks/useStyleSet';
import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotio... |
src/components/BrowserList.js | IUnknown68/karma-live-reporter | //==============================================================================
import React, { Component } from 'react';
import dispatcher from 'Dispatcher';
import attachListener from 'attachListener';
import {map} from 'lodash';
import classNames from 'classnames';
import favIcon from 'favicon';
import { BROWSERLIS... |
src/App.js | evanchiu/tele-js | import React, { Component } from 'react';
import ShowList from './ShowList';
import Notice from './Notice';
import UsageBar from './UsageBar';
import 'whatwg-fetch';
class App extends Component {
constructor(props) {
super(props);
this.state = {
info: '',
error: '',
shows: []
};
}
... |
packages/core/upload/admin/src/components/AssetCard/AudioPreview.js | wistityhq/strapi | /* eslint-disable jsx-a11y/media-has-caption */
import React from 'react';
import PropTypes from 'prop-types';
import { Box } from '@strapi/design-system/Box';
export const AudioPreview = ({ url, alt }) => {
return (
<Box>
<audio controls src={url}>
{alt}
</audio>
</Box>
);
};
AudioPre... |
src/js/components/SVGIcon.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../utils/CSSClassnames';
import Intl from '../utils/Intl';
const COLOR_INDEX = CSSClassnames.COLOR_INDEX;
... |
bench/pages/stateless-big.js | nahue/next.js | import React from 'react'
export default () => {
return (
<ul>
{items()}
</ul>
)
}
const items = () => {
var out = new Array(10000)
for (let i = 0; i < out.length; i++) {
out[i] = <li key={i}>This is row {i + 1}</li>
}
return out
}
|
screens/ScheduleScreen.js | Helena-High/school-app | import React from 'react';
import {
Image,
Linking,
Platform,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import {
Ionicons,
Entypo,
FontAwesome,
} from '@exponent/vector-icons';
import Router from '../navigation/Router';
import {Components} from 'exponent';
const... |
imports/ui/layouts/App.js | hirdbluebird/recipe-app-react | import React from 'react';
import PropTypes from 'prop-types';
import { Grid } from 'react-bootstrap';
import AppNavigation from '../components/AppNavigation';
const App = ({ children }) => (
<div>
<AppNavigation />
<Grid>
{ children }
</Grid>
</div>
);
App.propTypes = {
children: PropTypes.no... |
ajax/libs/react-instantsearch/5.2.0-beta.1/Connectors.js | extend1994/cdnjs | /*! React InstantSearch 5.2.0-beta.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['ex... |
actor-sdk/sdk-web/src/components/modals/InviteByLink.react.js | ljshj/actor-platform | /*
* Copyright (C) 2015-2016 Actor LLC. <https://actor.im>
*/
import React, { Component } from 'react';
import Modal from 'react-modal';
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import { Container } from 'flux/utils';
import InviteUserByLinkActions from '../../actions/InviteUserByLinkAct... |
src/containers/DevToolsWindow.js | zzhero/tomatoTime | import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
export default createDevTools(
<LogMonitor />
)
|
src/components/home/HomePage.js | vitaliykrushinsky/react-redux-demo | import React from 'react';
import {Link} from 'react-router';
class HomePage extends React.Component {
render() {
return (
<div className="jumbotron">
<h1>Pluralsight Administration</h1>
<p>React, Redux and React Router in ES6 for ultra-responsive web apps.</p>
<Link to="about" clas... |
packages/material-ui-icons/src/SettingsEthernet.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><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 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z" /></g>
, 'S... |
src/svg-icons/maps/hotel.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsHotel = (props) => (
<SvgIcon {...props}>
<path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/>
</SvgIcon>
);
MapsHotel = pure(MapsHot... |
client/src/components/hero/index.js | fmoliveira/scalable-stack | import React from 'react'
export const Hero = ({ title, children }) => (
<section className='hero is-primary'>
<div className='hero-body'>
<div className='container'>
{title && <h1 className='title'>{title}</h1>}
{children}
</div>
</div>
</section>
)
|
src/svg-icons/image/transform.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTransform = (props) => (
<SvgIcon {...props}>
<path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/>
</SvgIcon>
);
ImageTransform = pure(I... |
src/docs/examples/RegistrationForm/ExampleRegistrationForm.js | vonZ/rc-vvz | import React from 'react';
import RegistrationForm from 'ps-react/RegistrationForm';
export default class ExampleRegistrationForm extends React.Component {
onSubmit = (user) => {
console.log(user);
}
render() {
return <RegistrationForm onSubmit={this.onSubmit} />
}
}
|
examples/huge-apps/routes/Course/components/Dashboard.js | dmitrigrabov/react-router | import React from 'react'
class Dashboard extends React.Component {
render() {
return (
<div>
<h3>Course Dashboard</h3>
</div>
)
}
}
export default Dashboard
|
charts/react-chartjs-3/example1/src/components/LoadingComponent.js | rob-blackbourn/scratch-js | import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
const styles = theme => ({
root: {
width: '100%',
maxWidth: 500,
},
})
class LoadingComponent extends React.Component {
render() {
... |
fields/types/datearray/DateArrayFilter.js | wmertens/keystone | import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
import DayPicker from 'react-day-picker';
import { FormField, FormInput, FormRow, FormSelect } from 'elemental';
const PRESENCE_OPTIONS = [
{ label: 'At least one element', value: 'some' },
{ label: 'No element', value: 'none'... |
project/react-ant/src/containers/FunderProdMgmt/Item/index.js | FFF-team/generator-earth | import React from 'react'
import moment from 'moment'
import { DatePicker, Button, Form, Input, Col } from 'antd'
import BaseContainer from 'ROOT_SOURCE/base/BaseContainer'
import request from 'ROOT_SOURCE/utils/request'
import { mapMoment } from 'ROOT_SOURCE/utils/fieldFormatter'
import Rules from 'ROOT_SOURCE/utils... |
jenkins-design-language/src/js/components/material-ui/svg-icons/communication/invert-colors-off.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationInvertColorsOff = (props) => (
<SvgIcon {...props}>
<path d="M20.65 20.87l-2.35-2.35-6.3-6.29-3.56-3.57-1.42-1.41L4.27 4.5 3 5.77l2.78 2.78c-2.55 3.14-2.36 7.76.56 10.69C7.9 20.8 9.95 21.58 12 21.58c1.79 0 3.57-.59 5.03-1.78l2.7 2... |
packages/docs/components/Examples/text-alignment/gettingStarted.js | draft-js-plugins/draft-js-plugins | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createTextAlignmentPlugin from '@draft-js-plugins/text-alignment';
import createStaticToolbarPlugin from '@draft-js-plugins/static-toolbar';
import {
ItalicButton,
BoldButton,
UnderlineButton,
} fr... |
classic/src/scenes/mailboxes/src/Scenes/SettingsScene/Accounts/Sections/MailboxSettingsSection/MailboxCredentialSettings/MailboxCredentialSettings.js | wavebox/waveboxapp | import PropTypes from 'prop-types'
import React from 'react'
import { accountStore } from 'stores/account'
import SettingsListSection from 'wbui/SettingsListSection'
import FingerprintIcon from '@material-ui/icons/Fingerprint'
import shallowCompare from 'react-addons-shallow-compare'
import SettingsListItemText from 'w... |
packages/ui/stories/components/streamInfo.stories.js | nukeop/nuclear | /* eslint-disable no-console */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { StreamInfo } from '../..';
const commonProps = {
selectedStream: {
thumbnail: 'https://i.imgur.com/4euOws2.jpg',
source: 'Youtube',
title: 'What a song',
id: '666'
},
handleRerollTra... |
src/client/components/kiosk/WorkPage/KioskWorkPage.component.js | DBCDK/content-first | import React from 'react';
import './KioskWorkPage.css';
import {get} from 'lodash';
import Tabs from '../../base/Tabs';
import Title from '../../base/Title';
import SkeletonText from '../../base/Skeleton/Text';
import Icon from '../../base/Icon';
import T from '../../base/T';
import {withWork} from '../../hoc/Work'... |
actor-apps/app-web/src/app/components/Login.react.js | darioajr/actor-platform | import _ from 'lodash';
import React from 'react';
import classNames from 'classnames';
import { Styles, RaisedButton, TextField } from 'material-ui';
import { AuthSteps } from 'constants/ActorAppConstants';
import Banner from 'components/common/Banner.react';
import LoginActionCreators from 'actions/LoginActionCre... |
src/views/components/comment-item/comment-item.js | Metaburn/doocrate | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './comment-item.css';
import Moment from 'react-moment';
import 'moment/locale/he';
import 'moment-timezone';
import Linkify from 'react-linkify';
import { I18n } from 'react-i18next';
import Icon from '../../atoms/icon';
import ToolT... |
docs/src/app/components/pages/components/Divider/ExampleList.js | pradel/material-ui | import React from 'react';
import Divider from 'material-ui/Divider';
import {List, ListItem} from 'material-ui/List';
import MobileTearSheet from '../../../MobileTearSheet';
const DividerExampleList = () => (
<MobileTearSheet height={250}>
<List>
<ListItem insetChildren={true} primaryText="Janet Perkins B... |
js/jqwidgets/demos/react/app/tree/fluidsize/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTree from '../../../jqwidgets-react/react_jqxtree.js';
class App extends React.Component {
render () {
let treeHtml = `
<ul>
<li id='home'>Home</li>
<li item-expanded='true'>Solutions
... |
src/Input/Unit/testkit/Unit.js | nirhart/wix-style-react | import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import Unit from '../Unit';
const unitDriverFactory = ({element}) => {
return {
isEmpty: () => element.children.length === 0,
hasChild: style => !!element.querySelector(style)
};
};
const componentFactory = (props = {})... |
packages/material-ui-icons/src/Sms.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Sms = 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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z" />
</SvgIcon>;
Sms = pure(Sms);
Sms.mui... |
src/components/Common/List/Components/Magazines4/tpl.js | LifeSourceUA/lifesource.ua | /**
* [IL]
* Library Import
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
/**
* [IV]
* View Import
*/
import Desktop from './Views/Desktop/tpl';
/**
* [IBP]
* Pixel Perfect and Breakpoints
*/
import BP from 'lib/breakpoints';
/**
* [... |
desktop-site/components/mypage/MyPageLeftbar.js | goominc/goommerce-react | // Copyright (C) 2016 Goom Inc. All rights reserved.
import React from 'react';
export default React.createClass({
render() {
return (
<div className="mypage-leftbar-box">
<div className="mypage-leftbar-title">
Manage Orders
</div>
<div className="mypage-leftbar-item"><sp... |
webapp-src/src/Modal/ModalEditPlaylist.js | babelouest/taliesin | import React, { Component } from 'react';
import { Button, Modal, FormControl, FormGroup, Row, Col, Label } from 'react-bootstrap';
import StateStore from '../lib/StateStore';
import i18n from '../lib/i18n';
class ModalEditPlaylist extends Component {
constructor(props) {
super(props);
this.state = {
show:... |
app/card.js | pltod/ttt-game | import React from 'react';
import DOM from 'react-dom';
import FlipCard from 'react-flipcard';
import X from 'material-ui/lib/svg-icons/content/clear';
import O from 'material-ui/lib/svg-icons/image/panorama-fish-eye';
import Colors from 'material-ui/lib/styles/colors';
import Paper from 'material-ui/lib/paper';
const... |
src/Touchable.js | jkomyno/React-Native-FAB | import React from 'react';
import PropTypes from 'prop-types';
import {
View,
TouchableOpacity,
TouchableNativeFeedback,
ViewPropTypes,
} from 'react-native';
import {
IS_ANDROID,
IS_LT_LOLLIPOP,
noop,
} from './utils';
const Touchable = ({ onPress, style, buttonColor, children }) => {
if (IS_ANDROID &... |
project/vip/frontend/src/components/downloadDialog/index.js | webLeeSun/webleesun.github.io | import React, { Component } from 'react';
import { Modal } from 'antd-mobile';
import './index.less';
import ev from '../../ev';
const _UA = navigator.userAgent.toLowerCase();
var iswx = (_UA.indexOf('micromessenger') !== -1)
var isqq = (_UA.indexOf('qq') !== -1)
var iswb = (_UA.indexOf('weibo') !== -1)
class downl... |
index.android.js | kuzzmi/rmndrz | import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
} from 'react-native';
import { App } from './src/app';
export default class rmndrz extends Component {
render() {
return (
<View style={styles.container}>
<App />
</View>... |
wail-ui/components/collections/addToCollection/fromFs/selectSeed.js | N0taN3rd/wail | import React from 'react'
import PropTypes from 'prop-types'
import SeedList from './seedList'
import DisplayInvalidMessage from './displayInvalidMessage'
const SelectSeed = ({onSubmit, checkingDone, warcSeeds, hadErrors}) => {
let errorsLen = hadErrors.length
let renderComponent
if (errorsLen > 0) {
renderC... |
src/Main/SpecListing.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPECS from 'common/SPECS';
import AVAILABLE_CONFIGS from 'Parser/AVAILABLE_CONFIGS';
import { getCompletenessColor, getCompletenessExplanation, getCompletenessLabel } from 'common/SPEC_ANALYSIS_COMPLETENESS';
import Wrapper from 'common/Wrapper';
import Maintainer from 'Main/Maintaine... |
src/App.js | charlyraffellini/redux-workshop | import React from 'react';
import TaskList from './TaskList';
import AddTaskForm from "./AddTaskForm";
import TaskStats from "./TaskStats";
import { Statuses } from "./constants";
import { createTask, removeTask, setTaskStatus } from "./actions";
import { connect } from 'react-redux';
class App extends React.Component... |
src/screens/loginScreen.js | SwimmyApp/project-swimmy-mockup | import React from 'react';
import {observer} from 'mobx-react';
import views from '../config/views';
import * as styles from './styles/loginScreen.scss';
import AppWrapper from '../components/appWrapper'
const css = {
facebook: {
backgroundColor: '#388CF3',
fontSize: '18px',
fontWeight: '500'
},
subm... |
server/sonar-web/src/main/js/apps/organizations/components/OrganizationFavoriteProjects.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
src/ctl/ui/src/pages/Namespace.js | m3db/m3db | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
client/src/RecentChats.js | chi-bumblebees-2017/gnomad | import React, { Component } from 'react';
import UserListItemContainer from './UserListItemContainer'
class RecentChats extends Component {
constructor(props) {
super(props);
this.truncatedMessage = this.truncatedMessage.bind(this);
}
truncatedMessage(message){
if(message.length>100) {
return ... |
auth/src/components/common/Button.js | diegopoli/sample-react-native-projects | import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
const Button = ({ onPress, children }) => {
const { textStyle, buttonStyle } = styles;
return (
<TouchableOpacity style={buttonStyle} onPress={onPress}>
<Text style={textStyle}>
{children}
</Text>
</Touch... |
app/addons/fauxton/navigation/components/NavBar.js | popojargo/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... |
ui/src/main/frontend/src/components/EmployeeModal.js | Dokuro-YH/alice-projects | import React, { Component } from 'react';
import {
Modal,
Form,
FormGroup,
Col,
FormControl,
ControlLabel,
Button
} from 'react-bootstrap';
class EmployeeModal extends Component {
constructor(props) {
super(props);
this.state = {
data: props.data || {}
}
}
componentWillReceivePro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.