path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/app.js | prajapati-parth/glitchy | import React from 'react'
import ReactDOM from 'react-dom'
//import application main component
import AppComponent from '../app/components/app_component'
class App extends React.Component {
render() {
return (
<AppComponent />
)
}
}
//render back to mark-up file
ReactDOM.render(
... |
client/src/app/routes.js | jhuntoo/starhackit | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import Login from 'views/login';
import Signup from 'views/signup';
import Forgot from 'views/forgot';
import Application from 'views/application';
import Logout from 'views/logout';
import MainLanding from 'views/mainLanding';
import Registra... |
examples/ModalWithBottomSheet.js | chris-gooley/react-materialize | import React from 'react';
import Modal from '../src/Modal';
import Button from '../src/Button';
export default
<Modal
header='Modal Header'
bottomSheet
trigger={<Button>MODAL BUTTOM SHEET STYLE</Button>}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et do... |
app/javascript/mastodon/features/compose/components/poll_form.js | salvadorpla/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import IconButton from 'mastodon/components/icon_butt... |
docs/src/components/nav.js | optimizely/nuclear-js | import React from 'react'
import { BASE_URL } from '../globals'
function urlize(uri) {
return BASE_URL + uri
}
export default React.createClass({
render() {
const logo = this.props.includeLogo
? <a href={BASE_URL} className="brand-logo">NuclearJS</a>
: null
const homeLink = this.props.includeL... |
src/routes/About/components/Resume.js | mjchamoures/personalPortfolio | import React from 'react';
import { Panel } from 'react-bootstrap';
import ResumeImg from '../assets/Michael_Chamoures_Resume.png';
import ResumeImg2 from '../assets/Michael_Chamoures_Resume_2.png';
import './About.scss';
export const Resume = (props) => (
<Panel header="Resume">
<img
alt=''
class... |
node_modules/react-router/es6/Link.js | FrancoCotter/ReactWeatherApp | '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) {... |
Console/app/node_modules/rc-trigger/es/index.js | RisenEsports/RisenEsports.github.io | import _extends from 'babel-runtime/helpers/extends';
import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import createReactClass from 'create-react-class';
import contains from 'rc-util/es/Dom/contains';
import addEventListener from 'rc-util/lib/Dom/addEventListener'... |
client/src/components/FormWiget/KeywordSelect.js | Nonsoft/crdweb | import React from 'react';
import PropTypes from 'prop-types';
import { Form, Select} from 'antd';
const FormItem = Form.Item;
const Option = Select.Option;
const KeywordSelect = (props) => (
<FormItem label="关键字">
{props.getFieldDecorator('keyword')(
<Select style={{width: '100%'}} size="default" allowCle... |
internals/templates/containers/NotFoundPage/index.js | projectcashmere/web-server | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it... |
lib/shared/components/link/index.js | relax/relax | import Component from 'components/component';
import React from 'react';
import PropTypes from 'prop-types';
import {dataConnect} from 'relate-js';
import Link from './link';
@dataConnect(
(state) => ({
editing: state.pageBuilder && state.pageBuilder.editing
}),
(props) => {
const {link} = props;
le... |
app/routes/index.js | rclai/redux-blog-example | import React from 'react';
import { Route } from 'react-router';
import App from './App';
import SignupRoute from './SignupRoute';
import LoginRoute from './LoginRoute';
import ProfileRoute from './ProfileRoute';
import NotFound from '../components/NotFound';
import redirectBackAfter from '../utils/redirectBackAfter';
... |
projects/twitch-ui/src/components/GridCell.js | unindented/twitch-x | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import ImageWithPlaceholder from './ImageWithPlaceholder'
import {truncate} from '../utils/css'
const GridCellRoot = styled.a`
display: block;
overflow: hidden;
flex: 1;
padding: ${props => props.theme.layout.ga... |
src/icons/AndroidPeople.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class AndroidPeople extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M337.454,232c33.599,0,61.092-27.002,61.092-60c0-32.997-27.493-60-61.092-60s-61.09,27.003-61.09,60
C276.364,204.998... |
src/components/login.js | lizarraldeignacio/personal-website | import React, { Component } from 'react';
import { reduxForm } from 'redux-form';
import { compose } from 'redux';
import { connect } from 'react-redux';
import FieldGroup from './fieldgroup';
import Recaptcha from 'react-recaptcha';
import { verifyReCaptcha } from '../actions/index';
import _ from 'lodash';
import {
... |
src/plugins/position/components/SpacerRow.js | GriddleGriddle/Griddle | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from '../../../utils/griddleConnect';
import compose from 'recompose/compose';
import mapProps from 'recompose/mapProps';
import getContext from 'recompose/getContext';
import withHandlers from 'recompose/withHandlers';
co... |
app/javascript/mastodon/features/account_gallery/index.js | dunn/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from 'mastodon/actions/accounts';
import { expandAccountMediaTimeline } from '../../actions/timelines';
import LoadingIndicator from '... |
src/components/PlayerControls.js | jeremyfry/init-tracker | import React from 'react';
import PropTypes from 'prop-types';
const setColor = (color, led) => () => fetch(`/led/${led}/${color}`);
const PlayerControls = (props) =>{
return (
<div className="player-card__controls">
<button onClick={setColor('255/0/0', props.player.ledPosition)} className="pla... |
src/index.js | zacfukuda/universal-app-react-router | import React from 'react'
import { render } from 'react-dom'
import { BrowserRouter } from 'react-router-dom'
import App from './App'
import './index.css'
render((
<BrowserRouter>
<App />
</BrowserRouter>
), document.getElementById('root')) |
codes/chapter05/react-router-v4/basic/demo04/app/components/About.js | atlantis1024/react-step-by-step | import React from 'react';
class About extends React.PureComponent {
render() {
return <h2>关于</h2>
}
}
export default About;
|
src/charts/Scatterplot.js | rsamec/react-pathjs-chart | import React from 'react';
import _ from 'lodash';
import Options from '../component/Options.js';
import fontAdapt from '../fontAdapter.js';
import styleSvg from '../styleSvg';
var Stock = require('paths-js/stock');
var Axis = require('../component/Axis');
var Path = require('paths-js/path');
export default class Sc... |
src/server.js | ThatCheck/AutoLib | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
import ApiC... |
src/components/common/svg-icons/notification/sim-card-alert.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSimCardAlert = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"/>
</SvgIcon>
);
NotificationSimCard... |
plugins/react/frontend/components/form/RandomButton/index.js | pure-ui/styleguide | import React from 'react';
import Button from '../Button';
import styles from './styles.css';
const RandomButton = ({ groupType = 'right', ...otherProps }) => (
<Button {...otherProps} groupType={groupType}>
<svg
className={styles.svg}
width="16px"
height="13px"
viewBox="0 0 16 13"
... |
client/js/components/profile.js | D3VBAS3/DevBase | import React, { Component } from 'react';
import { connect } from 'react-redux';
import logout from './../actions/logout';
import { browserHistory } from 'react-router';
import DbTable from './db-table';
import StepBox from './stepBox';
import fetch from 'isomorphic-fetch';
class Profile extends Component {
constru... |
server/sonar-web/src/main/js/apps/account/projects/propTypes.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... |
packages/icons/src/md/action/HourglassEmpty.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdHourglassEmpty(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M12 5h24v10l-9 9 9 9v10H12V33l9-9-9-9V5zm20 29l-8-8-8 8v5h16v-5zm-8-12l8-8V9H16v5l8 8z" />
</IconBase>
);
}
export default MdHourglassE... |
node_modules/@material-ui/core/esm/DialogActions/DialogActions.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any... |
packages/reactor-modern-boilerplate/src/index.js | dbuhrman/extjs-reactor | import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { launch } from '@extjs/reactor';
import App from './App'
let viewport;
const render = (Component, target) => {
ReactDOM.render(
<AppContainer>
<Component/>
</AppContainer>... |
react/mortgage/src/components/TableMortgage.js | webmaster444/webmaster444.github.io | import React from 'react';
import { connect } from 'react-redux';
import payments from '../selectors/payments';
import Table from './Table';
export const TableMortgage = (({payments, className})=> {
let output=payments.slice(1)
.filter(year=>year.balance>0 || year.interestYearly>0)
.reduce((acc, year, i... |
src/components/Menu/MenuList.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import keycode from 'keycode';
import contains from 'dom-helpers/query/contains';
import activeElement from 'dom-helpers/activeElement';
import ownerDocument from 'dom-helpers/ownerDocument';
import List from '../Lis... |
ext/lib/admin/admin-topics-form/view.js | RosarioCiudad/democracyos | import React from 'react'
import { render as ReactRender } from 'react-dom'
import closest from 'component-closest'
import confirm from 'democracyos-confirmation'
import Datepicker from 'democracyos-datepicker'
import debug from 'debug'
import o from 'component-dom'
import t from 't-component'
import page from 'page'
i... |
src/js/Main/components/UseCases.js | fr3nchN/proactive | import React from 'react'
import links from "./../links"
import ContentUseCases from "./../../../content/community/ContentUseCases"
const UseCaseCard = ({ useCaseItem }) => {
return (
<div className="card">
<img className="card-img-top" src={useCaseItem.image} alt={useCaseItem.name} />
... |
src/components/Box/Header.js | falmar/react-adm-lte | import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
const Header = ({title, border, children}) => {
const className = {
'with-border': border
}
return (
<div className={classnames('box-header', className)}>
{title && <h3 className='box-title'>{title}</h... |
components/Index.js | migutw42/base16-viewer | import React from 'react';
import ThemeItem from './ThemeItem';
import Head from './Head'
const style = {
container: {
display: "flex",
flex: 1
},
main: {
width: "750px"
},
side: {
flex: 1
}
};
export default class Index extends React.Component {
constructo... |
Sources/ewsnodejs-server/node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js | nihospr01/OpenSpeechPlatform-UCSD | import _extends from "@babel/runtime/helpers/esm/extends";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import React from 'react';
import { SheetsRegistry } from 'jss';
import StylesProvider from '../StylesProvider';
import c... |
src/App/views/Home/index.js | ryanswapp/react-starter-template | import React from 'react';
import CSSModules from 'react-css-modules';
import style from './style';
class Home extends React.Component {
constructor(props) {
super(props);
this.state = {
features: [
'React, Redux',
'React Router',
'Redux Simple Router',
'Node Sass, Boots... |
src/MorphTransitionNative.js | gorangajic/react-svg-morph | import React from 'react';
import MorphTransition from './MorphTransition';
import {
Surface,
Transform,
Shape,
} from 'ReactNativeART';
export default
class MorphTransitionNative extends MorphTransition {
render() {
var width = this.props.width;
var height = this.props.height;
... |
src/SparklinesNormalBand.js | samsface/react-sparklines | import React from 'react';
import DataProcessor from './DataProcessor';
export default class SparklinesNormalBand extends React.Component {
static propTypes = {
style: React.PropTypes.object
};
static defaultProps = {
style: { fill: 'red', fillOpacity: .1 }
};
render() {
... |
src/components/icon/components/collapse.js | fmsouza/wcode | import React from 'react';
// Icon taken from: https://github.com/spiffcode/ghedit
export const Collapse = (props) => (
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='-1 0 16 16' {...props}>
<path fill='#C5C5C5' d='M14 1v9h-1V2H5V1h9zM3 3v1h8v8h1V3H3zm7 2v9H1V5h9zM8 7H3v5h5V7z'/>
... |
src/index.js | hieudt/redux-tic-tac-toe | import React from 'react';
import App from './containers/App';
import '../bower_components/bootstrap/dist/css/bootstrap.css';
import '../bower_components/font-awesome/css/font-awesome.css'
import '../css/main.css';
React.render(<App />, document.getElementById('root'));
|
src/resources/EditorResources.js | DelvarWorld/some-game | import React from 'react';
import THREE from 'three';
const gameWidth = 600;
const gameHeight = 600;
export default [
<meshBasicMaterial
key={ 84940 }
resourceId="selectionWireframe"
color={0x66ff00}
wireframe
/>,
<shape
resourceId="row"
key={ 84941 }
>
... |
ui/src/views/deviceprofiles/ListDeviceProfiles.js | jcampanell-cablelabs/lora-app-server | import React, { Component } from 'react';
import { Link } from 'react-router';
import Pagination from "../../components/Pagination";
import DeviceProfileStore from "../../stores/DeviceProfileStore";
import SessionStore from "../../stores/SessionStore";
class DeviceProfileRow extends Component {
render() {
retu... |
src/decorators/withViewport.js | deslee/deslee-react-flux | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from '../../node_modules/react/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height:... |
docs/src/pages/layout/grid/CenteredGrid.js | dsslimshaddy/material-ui | // @flow weak
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Paper from 'material-ui/Paper';
import Grid from 'material-ui/Grid';
const styles = theme => ({
root: {
flexGrow: 1,
marginTop: 30,
},
paper: {
padding: 16,
textAl... |
app/routes.js | dolfelt/markdeck | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './editor/containers/App';
import MainPanel from './editor/containers/MainPanel';
export default (
<Route path="/" component={App}>
<IndexRoute component={MainPanel} />
</Route>
);
|
src/client/assets/javascripts/app/DevTools.js | Sevas727/ReactTest3 | import React from 'react';
import { createDevTools } from 'redux-devtools';
// Monitors are separate packages, and you can make a custom one
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import SliderMonitor from 'redux-slider-monitor';
// createDevTools t... |
liferay-gsearch-workspace/modules/gsearch-react-web/src/main/resources/META-INF/resources/lib/containers/Filters/Filter/ScopeFilter.js | peerkar/liferay-gsearch | import React from 'react'
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Dropdown } from 'semantic-ui-react'
import { RequestParameterNames } from '../../../constants/requestparameters';
import { scopeOptions, defaultScope } from '../../../constants/scope';
import { search ... |
app/containers/LanguageProvider/index.js | romanvieito/ball-simpler | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createSelector } from 'reselect'... |
src/components/topic/TopicsApp.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { injectIntl } from 'react-intl';
import AppContainer from '../AppContainer';
import messages from '../../resources/messages';
import PageTitle from '../common/PageTitle';
const TopicsApp = (props) => {
const { formatMessage } = props.intl;
retu... |
src/index.js | mimccio/komi | import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
import registerServiceWorker from './registerServiceWorker'
ReactDOM.render(<App name='hello' />, document.getElementById('root'))
registerServiceWorker()
|
examples/counter/index.js | Lucifier129/redux | import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
src/app/js/colors/Rect.js | skratchdot/colorify | import React, { Component } from 'react';
import onecolor from 'onecolor';
// 0: color space, 1: property name, 2: number of gradients
const values = {
h: ['hsl', '_hue', 360],
s: ['hsl', '_saturation', 3],
l: ['hsl', '_lightness', 3],
r: ['rgb', '_red', 2],
g: ['rgb', '_green', 2],
b: ['rgb', '_blue', 2],... |
src/components/Button/demo/icon/index.js | lebra/lebra-components | import React, { Component } from 'react';
import { render } from 'react-dom';
import Button from '../../index';
import './index.less';
export default class BaseDemo extends Component {
render() {
return (
<div>
<Button iconType="iconfont icon-add" shape="squared"></Button>
<Button iconType="ic... |
react/src/components/dashboard/coinTile/coinTile.js | pbca26/EasyDEX-GUI | import React from 'react';
import { connect } from 'react-redux';
import {
getCoinTitle,
getModeInfo,
isKomodoCoin,
} from '../../../util/coinHelper';
import CoinTileItem from './coinTileItem';
import translate from '../../../translate/translate';
import CoinTileRender from './coinTile.render';
class CoinTile e... |
example/google.js | jukra/react-leaflet-google-sunenergia | import React from 'react';
import { Map, TileLayer, LayersControl } from 'react-leaflet'
import {GoogleLayer} from '../src'
const { BaseLayer} = LayersControl;
const key = 'AIzaSyDEG4lyorD61vnJoAHG0FkQERZ-McElZyg';
const terrain = 'TERRAIN';
const road = 'ROADMAP';
const satellite = 'SATELLITE';
const hydrid = 'HYBRID'... |
src/main.js | sheridp2/triviapp | import React from 'react';
import ReactDOM from 'react-dom';
import './style.scss';
import App from './component/app';
ReactDOM.render(<App />, document.getElementById('root'));
|
examples/huge-apps/components/App.js | kelsadita/react-router | import React from 'react';
import Dashboard from './Dashboard';
import GlobalNav from './GlobalNav';
class App extends React.Component {
render() {
var courses = COURSES;
return (
<div>
<GlobalNav />
<div style={{ padding: 20 }}>
{this.props.children || <Dashboard courses={co... |
examples/universal/client/index.js | wescravens/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import App from '../common/containers/App';
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
const rootElement = do... |
examples/huge-apps/components/App.js | clloyd/react-router | /*globals COURSES:true */
import React from 'react'
import Dashboard from './Dashboard'
import GlobalNav from './GlobalNav'
class App extends React.Component {
render() {
return (
<div>
<GlobalNav />
<div style={{ padding: 20 }}>
{this.props.children || <Dashboard courses={COURSES... |
src/routes/home/Home.js | 0xcdc/rfb-client-app | import useStyles from 'isomorphic-style-loader/useStyles';
import React from 'react';
import PropTypes from 'prop-types';
import s from './Home.css';
import SearchBar from '../../components/SearchBar';
export default function Home({ clients }) {
useStyles(s);
return <SearchBar clients={clients} />;
}
Home.propTyp... |
src/index.js | guilherme-toti/react-highlight-overlay | import React from 'react'
class HighlightOverlay extends React.Component {
constructor(props) {
super(props)
this.state = {
width: 0,
height: 0
}
}
componentDidMount() {
this.updateWindowSize()
window.onresize = () => this.updateWindowSize()... |
src/ListComposite/index.js | DuckyTeam/ducky-components | import Icon from '../Icon';
import React from 'react';
import PropTypes from 'prop-types';
import Typography from '../Typography';
import classNames from 'classnames';
import styles from './styles.css';
function ListComposite(props) {
const title = (
props.challenge ? props.challengeName : 'Hashtag'
)... |
modules/pages/client/components/Foundation.component.js | Trustroots/trustroots | // External dependencies
import { Trans, useTranslation } from 'react-i18next';
import React from 'react';
// Internal dependencies`
import { userType } from '@/modules/users/client/users.prop-types';
import Board from '@/modules/core/client/components/Board.js';
import ManifestoText from './ManifestoText.component.js... |
packages/material-ui-icons/src/Lock.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.... |
components/Layout/Navigation.js | gadflying/profileSite | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
docs/src/HomePage.js | blue68/react-bootstrap | import React from 'react';
import NavMain from './NavMain';
import PageFooter from './PageFooter';
import Grid from '../../src/Grid';
import Alert from '../../src/Alert';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
export default class HomePage extends React.Component {
render(... |
src/Label.js | rapilabs/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
client/components/Flass/Upload/QuestionInsertion/Quiz/QuizWrapper/QuizWrapperComponent.js | Nexters/flass | import React from 'react';
import PropTypes from 'prop-types';
import './QuizWrapperComponentStyles.scss';
const propTypes = {
children: PropTypes.element.isRequired
};
const defaultProps = {};
const QuizWrapperComponent = ({ children }) => (
<div className="quiz-wrapper">
{ children }
</div>
);
QuizWrapp... |
examples-native/crna-kitchen-sink/storybook/stories/Button/index.ios.js | storybooks/react-storybook | import React from 'react';
import PropTypes from 'prop-types';
import { TouchableHighlight } from 'react-native';
export default function Button({ onPress, children }) {
return <TouchableHighlight onPress={onPress}>{children}</TouchableHighlight>;
}
Button.defaultProps = {
children: null,
onPress: () => {},
};
... |
src/svg-icons/maps/local-phone.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPhone = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-... |
test/templates/Check.snap.js | sullenor/teatime-test-utils | import Check from 'teatime-components/component/Check';
import React from 'react';
export default () => (
<Check
id='checks-id'
label='checks label'
name='check-control'/>
);
|
fields/types/Field.js | dryna/keystone-twoje-urodziny | import classnames from 'classnames';
import evalDependsOn from '../utils/evalDependsOn.js';
import React from 'react';
import { findDOMNode } from 'react-dom';
import { FormField, FormInput, FormNote } from '../../admin/client/App/elemental';
import blacklist from 'blacklist';
import CollapsedFieldLabel from '../compon... |
node_modules/react-bootstrap/es/Radio.js | FoxMessenger/nyt-react | 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 ... |
blog/src/Menu/SubMenu.js | Robert2333/kilakila-react | import React from 'react'
const PropTypes=require('prop-types');
class SubMenu extends React.Component{
getItem(){
const {children} = this.props;
const item = React.Children.map(children, (child,id) => {
if (!child) {
alert('没有子元素')
return;
... |
examples/src/app.js | javier-garcia-anfix/react-select | /* eslint react/prop-types: 0 */
import React from 'react';
import Select from 'react-select';
import CustomRenderField from './components/CustomRenderField';
import MultiSelectField from './components/MultiSelectField';
import RemoteSelectField from './components/RemoteSelectField';
import SelectedValuesField from '... |
src/resources/assets/react-app/components/AuthHome.js | darrenmerrett/ruf | import React, { Component } from 'react';
class AuthHome extends Component {
render() {
return (
<div>
You are logged in!
</div>
)
}
}
export default AuthHome;
|
stories/NumberInput.js | felixgirault/rea11y | import React from 'react';
import {storiesOf, action} from '@kadira/storybook';
import {StatefulNumberInput, NumberInputControls} from '../src';
/**
*
*/
storiesOf('NumberInput', module)
.addWithInfo(
'default',
`
Keyboard interactions when the focus is inside the input:
* \`↑\` increments the value
* \`↓\` ... |
client/components/nota/SocialShare.js | EstebanFuentealba/biobiochile-mobile-spa | import React from 'react';
export default class SocialShare extends React.Component{
render() {
return (<div>
<ul className="barra-social">
<li className="s-fb">
<a href={`https://www.facebook.com/sharer.php?u=${this.props.nota.post_URL}`} className="fa fa-facebook"></a>
</li>
... |
src/components/bookmark-slider.js | bokuweb/tomato_pasta | import React, { Component } from 'react';
import Slider from 'material-ui/lib/slider';
export default class BookmarkSlider extends Component {
constructor(props) {
super(props);
}
onSliderChange(e, value) {
this.props.changeBookmarkThreshold(~~value, e.clientX);
}
render() {
let x = this.props.... |
src/popup/components/Logo/index.js | fluany/fluany | /**
* @fileOverview The logo component
* @name index.js<Logo>
* @license GNU General Public License v3.0
*/
import React from 'react'
const Logo = () => (
<div className='logo-content'>
<svg className='octopus-logo'>
<use xlinkHref='#octopus' />
</svg>
<h1 className='logo-title'>
<span c... |
app/components/CentralStatement.js | freele/glossary | import React from 'react';
import classNames from 'classnames';
import {Decorator as Cerebral} from 'cerebral-react';
@Cerebral({
statement: ['centralStatementRef']
}, {})
class CentralStatement extends React.Component {
componentDidMount() {
this.props.signals.centralStatementUpdated();
this.props.signal... |
frontend/src/components/Crud.js | purocean/yii2-template | import React from 'react';
import { Table } from 'antd';
import CrudActions from '../actions/CrudActions';
import CrudStore from '../stores/CrudStore';
class Component extends React.Component {
constructor(props){
super(props);
this.onChange = this.onChange.bind(this);
this.state = CrudStore.getState()... |
examples/test/components.js | steos/reactcards | import React from 'react'
import { assert } from 'chai'
import { shallow } from 'enzyme'
import { Foo, Bar } from '../components'
export function testBarComponent() {
const wrapper = shallow(<Bar/>)
assert.equal(wrapper.text(), 'a bar. drink up!')
}
export function testFooComponent() {
const wrapper = shallow(<... |
examples/src/components/CustomOption.js | RassaLibre/react-select | import React from 'react';
import Gravatar from 'react-gravatar';
var Option = React.createClass({
propTypes: {
addLabelText: React.PropTypes.string,
className: React.PropTypes.string,
mouseDown: React.PropTypes.func,
mouseEnter: React.PropTypes.func,
mouseLeave: React.PropTypes.func,
option: React.PropTy... |
src/containers/App.js | SuperCoac/basic-redux-boilerplate | import React from 'react';
import CounterContainer from './CounterContainer';
function App() {
return (
<div>
<h1>Counter</h1>
<CounterContainer />
</div>
);
}
export default App;
|
web-ui/src/login/about/welcome.js | pixelated/pixelated-user-agent | /*
* Copyright (c) 2017 ThoughtWorks, Inc.
*
* Pixelated is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pixelated i... |
src/routes/index.js | pl12133/pl12133.github.io | /* eslint-disable no-unused-vars*/
import React from 'react';
/* eslint-enable no-unused-vars*/
import { Router, Route, IndexRoute } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import App from './App/';
import Home from './Home/';
const Routes = () => (
<Router history=... |
src/main.js | QuVideo/viva-react-template | import React from 'react'
import ReactDOM from 'react-dom'
import { Button } from 'antd'
import app from './app.less'
import title from './title.less'
import antShowcase from './ant-showcase.less'
const Title = ({ content }) => {
return <h1 className={ title.normal }>{ content }</h1>
}
const AntShowcase = () => {... |
tests/react_children/tuple.js | jamesgpearce/flow | // @flow
import React from 'react';
class Tuple
extends React.Component<{children: [boolean, string, number]}, void> {}
class TupleOne extends React.Component<{children: [boolean]}, void> {}
<Tuple />; // Error: `children` is required.
<Tuple>{true}{'foo'}{42}</Tuple>; // OK: All the tuple items.
<Tuple>{true}foo{... |
app/react/demo/src/App.js | enjoylife/storybook | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
src/components/Button.react.js | Acehaidrey/addrbook | 'use strict';
require('./css/Button.less');
import React from 'react';
import {Link} from 'react-router';
/**
* Styled button component.
*/
export default class Button extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h5> This is my button co... |
actor-apps/app-web/src/app/components/modals/Preferences.react.js | liruqi/actor-platform-v0.9 | import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import { Styles, FlatButton, RadioButtonGroup, RadioButton, DropDownMenu } from 'material-ui';
import { KeyCodes } from 'constants/ActorAp... |
src/containers/Root.js | dont-fear-the-repo/fear-the-repo | import React from 'react';
import { Provider } from 'react-redux';
import routes from '../routes';
import { ReduxRouter } from 'redux-router';
import DevTools from './DevTools';
import { createDevToolsWindow } from '../utils';
import HTML5Backend from 'react-dnd-html5-backend';
import { DragDropContext } from 'react-dn... |
src/components/Embedded/intellijoe.js | pritchardtw/ReactPersonalSite | import React, { Component } from 'react';
import Project from '../project';
export default class IntelliJoe extends Component {
render() {
const images = [
"../../static/images/embedded/intellijoe/blockdiagram.png"
];
return(
<Project
title="Intelli Joe!"
description="I part... |
src/svg-icons/device/signal-wifi-0-bar.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi0Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/>
</SvgIcon>
);
DeviceSignalWifi... |
app/components/Component1/StaticMap.js | joaquinPega/ReactTutorial | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
ScrollView,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LATITUDE_... |
stories/base/switch.story.js | WellerQu/rongcapital-ui | import React from 'react';
import { storiesOf } from '@storybook/react';
import { Switch } from '../../src/base';
storiesOf('base.Switch', module)
.add('initialize by default', () => (
<Switch />
))
.add('initialize switch defaults isOpen true', () => (
<Switch width={80} height={20} isOpe... |
app/javascript/mastodon/features/report/components/status_check_box.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
import noop from 'lodash/noop';
import StatusContent from '../../../components/status_content';
import { MediaGallery, Video } from '../../ui/util/async-component... |
src/svg-icons/navigation/menu.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationMenu = (props) => (
<SvgIcon {...props}>
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
</SvgIcon>
);
NavigationMenu = pure(NavigationMenu);
NavigationMenu.displayName = 'NavigationMenu';... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.