path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/demos/customView.js | asantebuil/room-reservation | import React from 'react';
import BigCalendar from '../../src/index';
import events from '../events';
import { navigate } from 'react-big-calendar/utils/constants';
import Week from 'react-big-calendar/Week';
import dates from 'react-big-calendar/utils/dates';
import localizer from 'react-big-calendar/localizer';
impor... |
docs/src/sections/FormInputGroupSection.js | dozoisch/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function FormInputGroupSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
... |
app/index.js | pratyk/react-signup-zxcvbn | import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
render(
<Router routes={routes} history={browserHistory}/>,
document.getElementById('app')
);
|
src/native/components/Header.js | TeodorKolev/Help | import React from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import { Text, H1 } from 'native-base';
import Spacer from './Spacer';
const Header = ({ title, content }) => (
<View>
<Spacer size={25} />
<H1>{title}</H1>
{!!content &&
<View>
<Spacer size=... |
lib/editor/components/question_editors/parts/ValueEditorPart.js | jirokun/survey-designer-js | import React, { Component } from 'react';
import { connect } from 'react-redux';
import cuid from 'cuid';
import S from 'string';
import { List } from 'immutable';
import NumericInput from 'react-numeric-input';
import ExSelect from './ExSelect';
/**
* 直接値を入力するか、再掲値を選択するかを選ぶことのできるエディタ
*/
class ValueEditorPart extend... |
app/components/ToggleOption/index.js | MaleSharker/Qingyan | /**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{message ? intl.formatMessage(message) : value}
</option>
);
ToggleOption.propTypes = {
value: React.PropTypes.string.isRequir... |
techCurriculum/ui/solutions/4.2/src/components/CardForm.js | tadas412/EngineeringEssentials | /**
* Copyright 2017 Goldman Sachs.
* 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... |
lib/Navigation/Tabs/tabOne/views/TabOneNavigation.js | Ezeebube5/Nairasense | // React
import React from 'react';
// Redux
import { connect } from 'react-redux';
// Icon
import Icon from 'react-native-vector-icons/FontAwesome';
// Navigation
import { addNavigationHelpers } from 'react-navigation';
import { NavigatorTabOne } from '../navigationConfiguration';
class TabOneNavigation extends Reac... |
demos/badges/index.js | isogon/styled-mdl-website | import React from 'react'
import DemoPage from '../../components/DemoPage'
import numberOnIcon from './demos/numberOnIcon'
import iconOnIcon from './demos/iconOnIcon'
import number from './demos/number'
import icon from './demos/icon'
import button from './demos/button'
const title = 'Badges'
const subtitle = 'Small... |
jenkins-design-language/src/js/components/material-ui/svg-icons/device/battery-charging-90.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const DeviceBatteryCharging90 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h5.47L13 7v1h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L12.47 8H7v12.67C7 21.4 7.6 22 8.33 ... |
src/routes/chart/Container.js | zhouchao0924/SLCOPY | import React from 'react'
import PropTypes from 'prop-types'
import styles from './Container.less'
import { ResponsiveContainer } from 'recharts'
const Container = ({ children, ratio = 5 / 2, minHeight = 250, maxHeight = 350 }) => <div className={styles.container} style={{ minHeight, maxHeight }}>
<div style={{ marg... |
app/components/ProgressBar/index.js | wenpengfei/react-boilerplate | import React from 'react'
import ProgressBar from './ProgressBar'
function withProgressBar(WrappedComponent) {
class AppWithProgressBar extends React.Component {
constructor(props) {
super(props)
this.state = {
progress: -1,
loadedRoutes: props.location && [props.location.pathname],
... |
docs/app/Examples/elements/Image/Usage/index.js | clemensw/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ImageUsageExamples = () => (
<ExampleSection title='Usage'>
<ComponentExample
title='Children'
description='An ... |
examples/with-mobx/pages/other.js | nikvm/next.js | import React from 'react'
import { Provider } from 'mobx-react'
import { initStore } from '../store'
import Page from '../components/Page'
export default class Counter extends React.Component {
static getInitialProps ({ req }) {
const isServer = !!req
const store = initStore(isServer)
return { lastUpdate... |
frontend/src/idPortal/users/newUser/newUserForm.js | unicef/un-partner-portal | import R from 'ramda';
import React from 'react';
import { connect } from 'react-redux';
import { reduxForm } from 'redux-form';
import PropTypes from 'prop-types';
import TextFieldForm from '../../../components/forms/textFieldForm';
import GridColumn from '../../../components/common/grid/gridColumn';
import { email } ... |
src/svg-icons/image/gradient.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageGradient = (props) => (
<SvgIcon {...props}>
<path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2z... |
Realization/frontend/czechidm-core/src/components/advanced/IdentityContractInfo/IdentityContractInfo.js | bcvsolutions/CzechIdMng | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
//
import * as Utils from '../../../utils';
import * as Basic from '../../basic';
import { IdentityContractManager } from '../../../redux';
import AbstractEntityInfo from '../EntityInfo/AbstractEntityInfo';
import Date... |
app/containers/FooterContainer/index.js | josueorozco/parlay | import React from 'react';
import { connect } from 'react-redux';
import Footer from '../../components/Footer';
/*
|--------------------------------------------------------------------------
| FooterContainer
|--------------------------------------------------------------------------
|
| Container index.js
|
*/
expor... |
packages/mineral-ui-icons/src/IconCallMade.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconCallMade(props: IconProps) {
const iconProps = {
rtl: true,
...props
};
return (
<Icon {...iconProps}... |
tests/lib/schema.spec.js | LucasBassetti/react-simple-chatbot | import React from 'react';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import schema from '../../lib/schemas/schema';
import { stringify } from 'flatted';
describe('schema', () => {
it('should throw a invalid step error', () => {
const step = { test: 'test' };
expect(() => {
sc... |
node_modules/react-bootstrap/es/BreadcrumbItem.js | Crisa221/Lista-Giocatori | 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 ... |
test/ListGroupItemSpec.js | rapilabs/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ListGroupItem from '../src/ListGroupItem';
describe('ListGroupItem', function () {
it('Should output a "span" with the class "list-group-item"', function () {
let instance = ReactTestUtils.renderIntoDocument(
<ListGro... |
test/test_helper.js | renamos/traderjoes-db | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
packages/reactReduxFormBase/DEV/AppFormState.js | daniloster/react-experiments | import React, { Component } from 'react';
import Input from './Input';
import schemaData from './simpleSchemaData';
import { FormState, FormStateItem } from '../src';
export default class AppFormState extends Component {
state = {
person: {},
shouldValidate: false,
};
onValidate = (e) => {
e.prevent... |
client/extensions/woocommerce/app/settings/payments/payment-method-cheque.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { localize } from 'i18n-calypso';
/**
* Internal dependencies
*/
import Dialog from 'components/dialog';
import FormFieldset from 'components/forms/form-fieldset';
import FormLabel f... |
src/components/buttons/FloatingActionButton.js | tuckerconnelly/carbon-ui | import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Animated, TouchableOpacity, Platform } from 'react-native'
import { animate } from 'uranium'
import { Animations, TouchableRipple, Elevation, gu, connectTheme } from '../../index'
/**
* A floating action button represents the primar... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | chrisirhc/react-router | import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
render () {
var announcements = COURSES[this.props.params.courseId].announcements;
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{announcemen... |
src/components/chatbot/oldslick.js | gordongordon/hom | import React from 'react';
import { Carousel, WhiteSpace, WingBlank, Button } from 'antd-mobile';
import { Generic } from 'react-simple-chatbot';
import PropTypes from 'prop-types';
export default class Slick extends React.Component {
constructor( props ) {
super( props )
this.state = {
data: ['', '', ... |
js/components/common/single-row-list-item/singleRowListItem.js | justarrived/p2p-client | import React, { Component } from 'react';
import { Text } from 'react-native';
import { CardItem, Left, Right, Icon } from 'native-base';
export default class SingleRowListItem extends Component {
static propTypes = {
text: React.PropTypes.string.isRequired,
icon: React.PropTypes.string,
};
static defa... |
src/icons/SignalWifi0BarIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class SignalWifi0BarIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fillOpacity=".3" d="M24.02 42.98L47.28 14c-.9-.68-9.85-8-23.28-8C10.57 6 1.62 13.32.72 14l23.26 28.98.... |
client/screens/Guia/index.js | francixcoag/trace_packages |
import React from 'react';
import { Link } from 'react-router';
import AppNavBar from '../App/components/AppNavBar';
import AppSideBar from '../App/components/AppSideBar';
import GuiaContainer from './GuiaContainer.js';
import HeaderContainer from './HeaderContainer.js';
export default (props) => (
<div classNam... |
src/DateHeader.js | TeaBough/react-big-calendar | import PropTypes from 'prop-types'
import React from 'react'
const DateHeader = ({ label, drilldownView, onDrillDown }) => {
if (!drilldownView) {
return <span>{label}</span>
}
return (
<a href="#" onClick={onDrillDown}>
{label}
</a>
)
}
DateHeader.propTypes = {
label: PropTypes.node,
d... |
src/containers/ActivityContainer.js | zzelune/neam | /*
* @Author: zhaozheng1.zh
* @Date: 2017-09-09 22:10:22
* @Last Modified by: fishci
* @Last Modified time: 2017-10-27 16:39:14
*/
import React, { Component } from 'react';
import Activity from '../pages/activity'
import Icon from 'react-native-vector-icons/Ionicons';
export default class ActivityContainer exte... |
examples/huge-apps/routes/Course/components/Nav.js | cold-brew-coding/react-router | import React from 'react';
import { Link } from 'react-router';
import AnnouncementsRoute from '../routes/Announcements';
import AssignmentsRoute from '../routes/Assignments';
import GradesRoute from '../routes/Grades';
const styles = {};
styles.nav = {
borderBottom: '1px solid #aaa'
};
styles.link = {
display: ... |
src/components/__tests__/EmailListView_test.js | varenya/email-client | import React from 'react';
import {shallow} from 'enzyme';
import {EmailList, getEmails} from '../EmailListView';
import {fromJS, is} from 'immutable';
import {MetaEmail} from '../MetaEmail';
describe("EmailListView", () => {
let emailList = null;
beforeEach(() => {
const sampleProps = {
in... |
frontend/src/components/pages/video.js | wilsonwen/kanmeiju | import React, { Component } from 'react';
import Config from '../../config'
import { browserHistory } from 'react-router';
import Spin from '../spin'
import { VelocityTransitionGroup } from 'velocity-react';
import './video.css'
class Video extends Component {
constructor(props) {
super(props);
this.state = {
... |
packages/babel-plugin-jsx-pragmatic/__tests__/__fixtures__/existing-imports.js | emotion-js/emotion | // inserted import has to go AFTER polyfills
import 'react-app-polyfill/ie11'
import 'react-app-polyfill/stable'
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(<App />, document.getElementById('root'))
|
definitions/npm/react-transition-group_v2.x.x/test_react-transition-group.js | orlandoc01/flow-typed | // @flow
import { describe, it } from 'flow-typed-test';
import React from 'react';
import {
CSSTransition,
ReplaceTransition,
Transition,
TransitionGroup,
} from 'react-transition-group';
describe('CSS/Transition', () => {
const handleEnter = (node: HTMLElement, isAppearing: boolean) => {};
const handleEx... |
node_modules/react-router/es6/Router.js | ottomajik/react-demo | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) {... |
docs/src/app/components/pages/components/FlatButton/Page.js | rscnt/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 flatButtonReadmeText from './README';
import flatButtonExampleSimpleCode ... |
src/containers/NotFound/NotFound.js | Trippstan/elephonky | 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>
);
}
|
frontend/src/containers/AppContainer.js | SeaItRise/SeaItRise-webportal | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { browserHistory, Router } from 'react-router';
import { Provider } from 'react-redux';
class AppContainer extends Component {
static propTypes = {
routes: PropTypes.object.isRequired,
store: PropTypes.object.isRequired,
}... |
react/features/old-client-notification/components/OldElectronAPPNotificationDescription.js | bgrozev/jitsi-meet | // @flow
import React, { Component } from 'react';
import { translate } from '../../base/i18n';
/**
* The type of the React {@code Component} props of {@link OldElectronAPPNotificationDescription}.
*/
type Props = {
/**
* Invoked to obtain translated strings.
*/
t: Function
};
/**
* A component... |
client/src/components/Header/index.js | pahosler/freecodecamp | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
import FCCSearch from 'react-freecodecamp-search';
import NavLogo from './components/NavLogo';
import UserState from './components/UserState';
import './header.css';
function Header({ disableSettings }) {
return (
<he... |
examples/IconSimple.js | mattBlackDesign/react-materialize | import React from 'react';
import Icon from '../src/Icon';
export default
<Icon>insert_chart</Icon>;
|
examples/passing-props-to-children/app.js | ryardley/react-router | import React from 'react';
import { Router, Route, Link, History } from 'react-router';
var App = React.createClass({
mixins: [ History ],
getInitialState() {
return {
tacos: [
{ name: 'duck confit' },
{ name: 'carne asada' },
{ name: 'shrimp' }
]
};
},
addTaco() {... |
node_modules/react-bootstrap/es/ButtonGroup.js | Technaesthetic/ua-tools | 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/components/TabBarIOS.js | RealOrangeOne/react-native-mock | import React from 'react';
import createMockComponent from './createMockComponent';
const TabBarIOS = React.createClass({
propTypes: {
children: React.PropTypes.node
},
statics: {
Item: createMockComponent('TabBarIOS.Item')
},
render() {
return null;
}
});
module.exports = TabBarIOS;
|
app/assets/javascripts/components/stories/StoryLink.js | Codeminer42/cm42-central | import React from 'react';
import hoverTemplate from 'templates/story_hover.ejs';
import noteTemplate from 'templates/note.ejs';
const STORY_STATE_ICONS = {
unstarted: 'access_time',
started: 'check_box_outline_blank',
finished: 'check_box',
delivered: 'hourglass_empty',
rejected: 'close',
accepted: '... |
src/icons/IosInfinite.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosInfinite extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M456.821,182.377C436.782,162.788,410.062,152,381.585,152c-28.477,0-55.195,10.788-75.21,30.354l-39.106,37.885
l25.06,... |
examples/src/components/CustomComponents.js | Craga89/react-select | import React from 'react';
import Select from 'react-select';
import Gravatar from 'react-gravatar';
const USERS = require('../data/users');
const GRAVATAR_SIZE = 15;
const GravatarOption = React.createClass({
propTypes: {
children: React.PropTypes.node,
className: React.PropTypes.string,
isDisabled: React.Pro... |
docs/lib/examples/PlayerWithCaptions.js | video-react/video-react | import React from 'react';
import { Player, ControlBar, ClosedCaptionButton } from 'video-react';
export default function PlayerWithCaptions() {
return (
<Player videoId="video-1" autoPlay>
<source
src="//d2zihajmogu5jn.cloudfront.net/elephantsdream/ed_hd.mp4"
type="video/mp4"
/>
... |
src/js/components/CalculatorResult/CalculatorResultContainer.react.js | ali404/calculator-on-steroids | import React from 'react'
import Base from '../_helpers/BaseComponent'
import CalculatorResult from './CalculatorResult.react'
import CalculatorStore from '../../stores/CalculatorStore'
export default class CalculatorResultContainer extends Base {
constructor() {
super()
this._bind(
'... |
node_modules/react-bootstrap/es/Table.js | vitorgomateus/NotifyMe | 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/basic/Fab.js | sampsasaarela/NativeBase | /* @flow */
import React, { Component } from 'react';
import { Button } from './Button';
import { Platform, Animated, TouchableOpacity } from 'react-native';
// import View from './View';
import { Icon } from './Icon';
// import Badge from './Badge';
import { IconNB } from './IconNB';
// import Text from './Text';
im... |
admin/client/Signin/index.js | joerter/keystone | /**
* The signin page, it renders a page with a username and password input form.
*
* This is decoupled from the main app (in the "App/" folder) because we inject
* lots of data into the other screens (like the lists that exist) that we don't
* want to have injected here, so this is a completely separate route and... |
app/components/ViewerComponent.js | openexp/OpenEXP | // @flow
import React, { Component } from 'react';
import { Subscription, Observable } from 'rxjs';
import { isNil } from 'lodash';
import {
MUSE_CHANNELS,
EMOTIV_CHANNELS,
DEVICES,
VIEWER_DEFAULTS
} from '../constants/constants';
const Mousetrap = require('mousetrap');
interface Props {
signalQualityObserv... |
src/static/containers/Login/index.js | KarimJedda/django-react-setup | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import classNames from 'classnames';
import { push } from 'react-router-redux';
import t from 'tcomb-form';
import * as actionCreators from '../../actions/auth';
const Form = t.form.Form;
const Login = t.str... |
app/components/listItem.js | SunsetFrost/ReactMusicPlayer | import React from 'react';
import './listitem.less'
let PubSub = require('pubsub-js');
let ListItem = React.createClass({
deleteHandler(item, event) {
event.stopPropagation();
PubSub.publish('DEL_MUSIC', item);
},
playMusic(item, e) {
PubSub.publish('PLAY_MUSIC', item);
},
render() {
let item = this... |
source/containers/VideoPage/QuestionsBuilder/ChoiceListItem.js | mikey1384/twin-kle | import React from 'react';
import PropTypes from 'prop-types';
import { DragSource, DropTarget } from 'react-dnd';
import ItemTypes from 'constants/itemTypes';
import Icon from 'components/Icon';
import { Color } from 'constants/css';
const ListItemSource = {
beginDrag(props) {
return {
id: props.id,
... |
packages/mineral-ui-icons/src/IconQueueMusic.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconQueueMusic(props: IconProps) {
const iconProps = {
rtl: true,
...props
};
return (
<Icon {...iconProp... |
test/fixtures/webpack-message-formatting/src/AppAliasUnknownExport.js | ConnectedHomes/create-react-web-app | import React, { Component } from 'react';
import { bar as bar2 } from './AppUnknownExport';
class App extends Component {
componentDidMount() {
bar2();
}
render() {
return <div />;
}
}
export default App;
|
app/containers/App/index.js | IntAlert/chatplayer | /**
*
* 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/js/components/common.js | otchy210/feedly-hatebu | import React from 'react';
import styled from 'styled-components';
import { hatenaBlue, feedlyGreen, alertRed, lineGrey } from './colors';
export const Section = styled.section`
`;
const H2 = styled.h2`
margin: 12px 0 0 0;
padding: 0 4px;
border-bottom: 2px solid;
border-image: linear-gradient(to righ... |
kamanni/src/SchoolIntroduction.js | jam-world/kanmanni | import React, { Component } from 'react';
import image from './image/frontPage.jpg';
import {slideStyle, slideTxtStyle} from './slideStyle';
class SchoolIntroduction extends Component {
render() {
return (
<div style={slideStyle}>
<img src={image} style={{height: "100%", wi... |
src/components/ProgressBar/ProgressBar.js | eliaslopezgt/ps-react-eli | import React from 'react';
import PropTypes from 'prop-types';
class ProgressBar extends React.Component {
getColor = () => {
if (this.props.percent === 100) return 'green';
return this.props.percent > 50 ? 'lightgreen' : 'red';
}
getWidthAsPercentOfTotalWidth = () => {
return parseInt(this.props.wi... |
lib/components/Contracts/index.js | gmtcreators/atom-solidity | 'use babel'
// Copyright 2018 Etheratom Authors
// This file is part of Etheratom.
// Etheratom is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any la... |
src/NavItem.js | lo1tuma/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const NavItem = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
linkId: React.PropTypes.string,
onSelect: React.PropTypes.func,
active: React.PropTypes.bool,
disabled: React.Pr... |
src/client/components/message/customerSuccess.js | uuchat/uuchat | import React, { Component } from 'react';
import { Row, Col, Modal, notification } from 'antd';
import io from 'socket.io-client';
import Header from '../user/header';
import ChatMenu from '../menu/chatMenu';
import ChatSend from './chatSend';
import ChatMessage from './chatMessage';
import ChatEmpty from './chatEmpty'... |
src/components/ContentWrapper/ContentWrapper.js | falmar/react-adm-lte | import React from 'react'
import PropTypes from 'prop-types'
const ContentWrapper = ({children}) => {
return (
<div className='content-wrapper'>
{children}
</div>
)
}
ContentWrapper.propTypes = {
children: PropTypes.node
}
export default ContentWrapper
|
ide/static/js/content.js | Cloud-CV/IDE | import React from 'react';
import Canvas from './canvas';
import Pane from './pane';
import SetParams from './setParams';
import Tooltip from './tooltip'
import TopBar from './topBar';
import Tabs from './tabs';
import data from './data';
import netLayout from './netLayout_vertical';
import Modal from 'react-modal';
im... |
index.js | anthonator/react-contentable | import React from 'react';
/**
* This component provides contenteditable DIV functionality. This component
* encapsulates logic for managing a contenteditable value while taking changes
* within the property model into account.
*/
class Contentable extends React.Component {
constructor() {
super();
}
sh... |
client/App.js | trantuthien/React-Test | /**
* Root Component
*/
import React from 'react';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import IntlWrapper from './modules/Intl/IntlWrapper';
// Import Routes
import routes from './routes';
// Base stylesheet
require('./main.css');
export default function A... |
src/client/components/component.react.js | youprofit/este | import React from 'react';
import shallowEqual from 'react-pure-render/shallowEqual';
/**
* Purified React.Component. Goodness.
* http://facebook.github.io/react/docs/advanced-performance.html
*/
export default class Component extends React.Component {
static contextTypes = {
router: React.PropTypes.func
}... |
src/svg-icons/action/language.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLanguage = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 ... |
webapp/src/components/subsection.js | nathandunn/agr | import React, { Component } from 'react';
import style from './style.css';
class Subsection extends Component {
render() {
return (
<div className={style.subsection}>
{this.props.hardcoded && <span className='tag tag-danger'>Hardcoded Example Data</span>}
{this.props.title && <h3>{this.pro... |
ReactJS_Seed_Project/app/components/layouts/Main.js | huang6349/inspinia | import React from 'react';
import Progress from '../common/Progress';
import Navigation from '../common/Navigation';
import Footer from '../common/Footer';
import TopHeader from '../common/TopHeader';
import { correctHeight, detectBody } from './Helpers';
class Main extends React.Component {
render() {
le... |
src/components/stateless/HiddenField.js | thomas-p-wilson/react-form | import React from 'react'; // eslint-disable-line no-unused-vars
import BasicField from '../BasicField';
/**
* Produces an HTML input field with the type set to `hidden` and which performs
* just like its pure HTML counterpart in all respects.
*/
export default class HiddenField extends BasicField {
static disp... |
src/components/Field.js | jozaru/my-bank-app | import React from 'react';
import { FormGroup, ControlLabel, FormControl, HelpBlock } from 'react-bootstrap';
export class Field extends React.Component {
constructor() {
super();
this.handleChange = this.handleChange.bind(this);
this.input = null;
}
componentDidMount() {
this.props.setFieldVali... |
caseStudy/ui/src/components/Company.js | jennybkim/engineeringessentials | import React from 'react';
|
src/icons/Bonfire.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Bonfire extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M270.93,350.601C270.219,342.42,263.364,336,255,336c-7.635,0-14.01,5.352-15.605,12.506l-0.007-0.002l-15.612,92.502
... |
blueocean-material-icons/src/js/components/svg-icons/communication/call-missed-outgoing.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationCallMissedOutgoing = (props) => (
<SvgIcon {...props}>
<path d="M3 8.41l9 9 7-7V15h2V7h-8v2h4.59L12 14.59 4.41 7 3 8.41z"/>
</SvgIcon>
);
CommunicationCallMissedOutgoing.displayName = 'CommunicationCallMissedOutgoing';
Communica... |
src/components/posts_index.js | nicolasmsg/react-blog | import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { fetchPosts } from '../actions';
class PostsIndex extends Component {
componentDidMount(){
this.props.fetchPosts();
}
renderPosts(){
console.log('cal... |
client/app/components/Home/Home.js | ejingfx/ews-mern-boiler | import React from 'react';
const Home = () => (
<div className="l-container">
<h1>Home</h1>
</div>
);
export default Home;
|
src/layouts/Frame.js | recharts/recharts.org | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import Helmet from 'react-helmet';
import { getLocaleType, localeGet } from '../utils/LocaleUtils';
import Affix from '../components/Affix';
import '../styles/app.scs... |
client/App.js | Pennsy/todolist | /**
* Root Component
*/
import React from 'react';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import IntlWrapper from './modules/Intl/IntlWrapper';
// Import Routes
import routes from './routes';
// Base stylesheet
import 'todomvc-app-css/index.css'
//require('./m... |
app/containers/BreadCrumbs/index.js | surzhik/coreola5 | /**
* Created by home on 19.09.2016.
*/
import React from 'react';
import {connect} from 'react-redux';
import {Link} from 'react-router';
import {push} from 'react-router-redux';
import {createStructuredSelector} from 'reselect';
import {selectCrumbs} from '../App/selectors';
import {Breadcrumb, Icon} from 'antd'... |
src/pages/About/index.js | jcarva/select_title | import React from 'react'
import { Layout, Row, Col } from 'antd';
const { Content } = Layout;
// Require About component style
require('./style.sass');
export default () => {
return(
<div id="about">
<Content style={{ padding: '0 50px' }}>
<Row>
<Col span={12} offset={6}>
<R... |
src/svg-icons/action/date-range.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionDateRange = (props) => (
<SvgIcon {...props}>
<path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0... |
examples/CarouselBasic.js | chris-gooley/react-materialize | import React from 'react';
import Carousel from '../src/Carousel';
export default
<Carousel images={[
'https://lorempixel.com/250/250/nature/1',
'https://lorempixel.com/250/250/nature/2',
'https://lorempixel.com/250/250/nature/3',
'https://lorempixel.com/250/250/nature/4',
'https://lorempixel.com/250/250/na... |
src/client/story_box.js | uptownhr/hacker-menu | import React from 'react'
import _ from 'lodash'
import Client from 'electron-rpc/client'
import StoryList from './story_list.js'
import Spinner from './spinner.js'
import Menu from './menu.js'
import StoryType from '../model/story_type'
export default class StoryBox extends React.Component {
constructor (props) {
... |
src/pages/404.js | thibmaek/thibmaek.github.io | /* eslint-disable react/prop-types */
import React from 'react';
import { Preview as PostPreview } from '../components/post/';
import random from '../lib/pickRandom';
const NotFoundPage = ({ data }) => {
const { node: post } = random(data.allContentfulPost.edges);
return (
<div>
<header>
<h1>
... |
test/ButtonGroupSpec.js | cgvarela/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ButtonGroup from '../src/ButtonGroup';
import Button from '../src/Button';
import { shouldWarn } from './helpers';
describe('ButtonGroup', () => {
it('Should output a button group', () => {
let instance = ReactTestUtils.rend... |
bayty/src/components/common/Spinner.js | Asmaklf/bayty | import React from 'react';
import { View, ActivityIndicator } from 'react-native';
const Spinner = ({ size }) => {
return (
<View style={styles.spinnerStyle}>
<ActivityIndicator size={size || 'large'} />
</View>
);
};
const styles = {
spinnerStyle: {
flex: 1,
justifyContent: 'center',
... |
app/javascript/mastodon/features/ui/components/actions_modal.js | abcang/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import StatusContent from '../../../components/status_content';
import Avatar from '../../../components/avatar';
import Relative... |
src/Row.js | Cellule/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Row = React.createClass({
propTypes: {
componentClass: React.PropTypes.node.isRequired
},
getDefaultProps() {
return {
componentClass: 'div'
};
},
render() {
let ComponentClass = this.props.componentClass;
retu... |
react-flux-mui/js/material-ui/src/Dialog/Dialog.spec.js | pbogdan/react-flux-mui | /* eslint-env mocha */
import React from 'react';
import Dialog from './Dialog';
import {spy} from 'sinon';
import {mount} from 'enzyme';
import {assert} from 'chai';
import TestUtils from 'react-addons-test-utils';
import getMuiTheme from '../styles/getMuiTheme';
describe('<Dialog />', () => {
const muiTheme = getM... |
modules/Query/index.js | mjoslyn/react-prismic-hocs | //@flow
import React from 'react'
import { query } from '../queries'
import type { APIOptions } from 'prismic.io'
type Props = {
url: string,
apiOptions: APIOptions,
query: any,
queryKey: string,
predicates: Predicates,
predicateOptions: Options,
children: any
};
export default class Query extends R... |
app/classifier/tasks/survey/summary.spec.js | zooniverse/Panoptes-Front-End | import { mount } from 'enzyme';
import assert from 'assert';
import counterpart from 'counterpart';
import React from 'react';
import Summary from './summary';
import { workflow } from '../../../pages/dev-classifier/mock-data';
import enLocale from '../../../locales/en';
counterpart.registerTranslations('en', enLocale... |
src/Parser/Paladin/Retribution/Modules/HolyPower/HolyPowerDetails.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Tab from 'Main/Tab';
import { formatPercentage, formatNumber } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import ResourceBreakdown from 'Parser/Core/Modules/ResourceTracker/ResourceBreakdown';
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.