path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/parser/shared/modules/features/Checklist/Rule.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import DropdownIcon from 'interface/icons/Dropdown';
import InformationIcon from 'interface/icons/Information';
import Expandable from 'interface/common/Expandable';
import colorForPerformance from 'common/colorForPerformance';
import calculateMedian from... |
examples/todomvc/containers/App.js | srph/redux | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createRedux } from 'redux';
import { Provider } from 'redux/react';
import * as stores from '../stores';
const redux = createRedux(stores);
export default class App extends Component {
render() {
return (
<Provider redux={... |
app/client.js | Yamikamisama/ReactReduxDemo | /* eslint-env browser */
/* global process */
import 'babel/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import HashHistory from 'react-router/lib/HashHistory';
import Root from './Root';
const history = (process.env.NODE_ENV === 'production')
? new BrowserHisto... |
src/router.js | juliocanares/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/http';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactPage';
... |
fields/types/color/ColorField.js | udp/keystone | import ColorPicker from '@jedwatson/react-color';
import Field from '../Field';
import React from 'react';
import { FormInput, InputGroup } from 'elemental';
const PICKER_TYPES = ['chrome', 'compact', 'material', 'photoshop', 'sketch', 'slider', 'swatches'];
const TRANSPARENT_BG =
`<svg width="24" height="24" viewBox=... |
examples/router/src/index.js | ctrlplusb/react-injectables | import React from 'react';
import ReactDOM from 'react-dom';
import { InjectablesProvider } from '../../../src/index.js';
import { browserHistory, Router, Route, IndexRoute } from 'react-router';
import App from './App';
import Home from './Home';
import PageOne from './PageOne';
import PageTwo from './PageTwo';
cons... |
packages/playground/src/app/components/ComponentFormSandbox.js | Talend/ui | import React from 'react';
import PropTypes from 'prop-types';
import { cmfConnect } from '@talend/react-cmf';
import Layout from '@talend/react-components/lib/Layout';
import SubHeaderBar from '@talend/react-components/lib/SubHeaderBar';
import UIForm from '@talend/react-forms';
import ComponentForm from '@talend/reac... |
jenkins-design-language/src/js/components/material-ui/svg-icons/image/details.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageDetails = (props) => (
<SvgIcon {...props}>
<path d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z"/>
</SvgIcon>
);
ImageDetails.displayName = 'ImageDetails';
ImageDetails.muiName = 'SvgIcon';
export default ImageDetails;
|
src/Glyphicon.js | brynjagr/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Glyphicon = React.createClass({
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: React.PropTypes.string,
/**
* An icon name. See e.g. http://getbootstrap.com/components/#glyphicons
*/
glyph: Re... |
src/Main.js | Vosie/QianLiYan | import React from 'react';
import { Provider } from 'react-redux';
import { createReduxStore } from './main/store';
import MainApp from './containers/MainApp';
const mainStore = createReduxStore();
const Main = (props) => {
return (
<Provider store={mainStore}>
<MainApp/>
</Provider>
... |
src/shared/Checkbox.js | cityofasheville/coa-converse | import React from 'react';
import PropTypes from 'prop-types';
class Checkbox extends React.Component {
constructor(props) {
super(props);
this.state = { checked: props.checked };
this.label = props.label;
this.value = props.value;
this.toggleChecked = this.toggleChecked.bind(this);
this.onC... |
src/svg-icons/image/crop-16-9.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop169 = (props) => (
<SvgIcon {...props}>
<path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/>
</SvgIcon>
);
ImageCrop169 = pure(ImageCrop169);
ImageCr... |
src/svg-icons/editor/insert-drive-file.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertDriveFile = (props) => (
<SvgIcon {...props}>
<path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/>
</SvgIcon>
);
EditorInsertDriveFile = pure... |
src/svg-icons/notification/phone-paused.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhonePaused = (props) => (
<SvgIcon {...props}>
<path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C... |
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-bricks-accordion.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, ColorSchemaMixin, ContentMixin, Tools} from '../common/common.js';
import Panel from './panel.js';
import './accordion.less';
export const Accordion = React.createClass({
//@@viewOn:mixins
mixins: [
BaseMixin,
ElementaryMixin,
ColorSchema... |
src/ServiceInterval.js | clarkritchie/strava-bike-service-web | import React from 'react';
var ServiceInterval = React.createClass({
getDefaultProps() {
return {
active: null, // currently selected
onClick: null // what to do when clicked!
}
},
handleClick(v) {
if (typeof this.props.onClick === 'function') {
t... |
src/components/FormField.js | ishgroup/lightbook | import React, { Component } from 'react';
class FormField extends Component {
constructor(props) {
super(props);
this.state = {
value: this.props.value
}
}
handleChange() {
if(this.props.value !== undefined) {
this.setState({
value: this.item.value
});
}
}
ren... |
src/components/combined.js | sfordjasiri/TT | import React from 'react';
import Search from './search';
import Results from '../containers/results';
import CardFilter from './card-filter';
class Combined extends React.Component {
render() {
console.log("Combined.render() this.props: ", this.props);
return(
<div className='combined'>
<Searc... |
src/components/BackgroundGeolocationExample.js | timLoewel/sites | /**
* Created by tim on 19/03/17.
*/
import BackgroundGeolocation from "react-native-background-geolocation";
import React from 'react';
export default React.createClass({
componentWillMount() {
// 1. Wire up event-listeners
// This handler fires whenever bgGeo receives a location update.
BackgroundGeoloca... |
assets/javascripts/kitten/components/navigation/link-list/stories.js | KissKissBankBank/kitten | import React from 'react'
import { LinkList } from './index'
import { DocsPage } from 'storybook/docs-page'
export default {
component: LinkList,
title: 'Navigation/LinkList',
parameters: {
docs: {
page: () => <DocsPage filepath={__filename} importString="LinkList" />,
},
},
decorators: [
s... |
src/step-5/Routing.js | gufsky/react-native-workshop | import React, {Component} from 'react';
import Highlight from 'react-syntax-highlight';
import Note from '../Note';
class Routing extends Component {
render() {
const installRN = `$ npm install --save react-navigation`;
const firstScreen = `// App.js
class HomeScreen extends React.Component {
static navigatio... |
src/svg-icons/device/signal-wifi-off.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifiOff = (props) => (
<SvgIcon {...props}>
<path d="M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8 23.64 7zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.4... |
frontend/src/components/forms/cow-form/index.js | loganabsher/portfolio | 'use strict';
import React from 'react';
import propTypes from 'prop-types';
import Cowsay from 'cowsay-browser';
import Faker from 'faker';
class CowForm extends React.Component{
constructor(props){
super(props);
this.state = {
cowPath: 'default',
cowOptions: this.props.cowOptions,
cowsa... |
src/EventItemResources.js | retzloff/talks | import React from 'react'
import './EventItemResources.css'
const EventItemResources = (props) => {
var resources = props.resources
if (resources) {
var resourceElements = resources.map((resource) => {
return (
<li className="resourceItem">
{resource.title} - <a href={resource.url}>{re... |
docs/app/Examples/collections/Table/Types/TableExampleStriped.js | ben174/Semantic-UI-React | import React from 'react'
import { Icon, Table } from 'semantic-ui-react'
const TableExampleStriped = () => {
return (
<Table celled striped>
<Table.Header>
<Table.Row>
<Table.HeaderCell colSpan='3'>Git Repository</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table... |
app/javascript/mastodon/features/ui/components/report_modal.js | palon7/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { changeReportComment, submitReport } from '../../../actions/reports';
import { refreshAccountTimeline } from '../../../actions/timelines';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { ma... |
app/components/EditStat.js | mzanini/DeeMemory | import React from 'react'
import PropTypes from 'prop-types'
import TextField from '@material-ui/core/TextField'
const EditStat = ({ label, value, onChange }) => (
<TextField
label={label}
value={value}
onChange={ (event) => { onChange(event, label) }}
type="number"
margin="normal"
inputProps... |
app/javascript/mastodon/features/blocks/index.js | honpya/taketodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import LoadingIndicator from '../../components/loading_indicator';
import { ScrollContainer } from 'react-router-scroll-4';
import Column from '../ui/componen... |
src/react-image-touch-crop.js | vitrum/react-image-touch-crop | import React from 'react'
import ReactDOM from 'react-dom'
const isTouchDevice = !!(
typeof window !== 'undefined' &&
typeof navigator !== 'undefined' &&
('ontouchstart' in window || navigator.msMaxTouchPoints > 0)
)
const draggableEvents = {
touch: {
react: {
down: 'onTouchStart',
mouseDown... |
src/svg-icons/hardware/keyboard-arrow-left.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardArrowLeft = (props) => (
<SvgIcon {...props}>
<path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/>
</SvgIcon>
);
HardwareKeyboardArrowLeft = pure(HardwareKeyboardArrowLeft);
Hardware... |
src/icons/BluetoothConnectedIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class BluetoothConnectedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M14 24l-4-4-4 4 4 4 4-4zm21.41-8.59L24 4h-2v15.17L12.83 10 10 12.83 21.17 24 10 35.17 12.83 38 ... |
test/integration/scss-fixtures/single-global-src/src/pages/_app.js | flybayer/next.js | import React from 'react'
import App from 'next/app'
import '../../styles/global.scss'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
app/scripts/Dashboard/components/Loading.js | igr-santos/bonde-client | import React from 'react'
const Loading = (props) => {
return (
<div className="fixed top-0 right-0 bottom-0 left-0 bg-darken-4 z9">
<div className="table col-12 center full-height">
<i className="fa fa-circle-o-notch fa-spin fa-3x fa-w white table-cell align-middle" />
</div>
</div>
... |
examples/query-params/app.js | 9618211/react-router | import React from 'react';
import { history } from 'react-router/lib/HashHistory';
import { Router, Route, Link } from 'react-router';
var User = React.createClass({
render() {
var { query } = this.props.location;
var age = query && query.showAge ? '33' : '';
var { userID } = this.props.params;
retur... |
app/components/MainComponent.js | nemac/ncdeq-demo | import React from 'react';
//import components
var HeaderComponent = require('../components/HeaderComponent');
var SectionWrapper = require('../components/SectionWrapper');
var RowWrapper = require('../components/RowWrapper');
var MapRowComponent = require('../components/MapRowComponent');
import ChartRowContainer fro... |
node_modules/react-bootstrap/es/Pagination.js | firdiansyah/crud-req | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
js/common/LargeButton.js | BarberHour/barber-hour | import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
} from 'react-native';
import Touchable from './Touchable';
const LargeButton = (props) => {
const opacity = props.disabled ? { opacity: .6 } : { opacity: 1 };
const onPress = props.disabled ? null : props.onPress;
return(
<Vi... |
docs/pages/components/bottom-navigation.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'components/bottom-navigation';
const requireDemo = require.context(
'docs/src/pages/components/bottom-navigation',
false,
/... |
src/components/common/controls/LabeledCheckbox.js | tidepool-org/viz | /*
* == BSD2 LICENSE ==
* Copyright (c) 2016, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program ... |
docs/src/app/components/pages/components/RefreshIndicator/ExampleReady.js | kittyjumbalaya/material-components-web | import React from 'react';
import RefreshIndicator from 'material-ui/RefreshIndicator';
const style = {
container: {
position: 'relative',
},
refresh: {
display: 'inline-block',
position: 'relative',
},
};
const RefreshIndicatorExampleSimple = () => (
<div style={style.container}>
<RefreshIn... |
src/components/ScoreDisplay.js | kybp/redux-pong | import React from 'react'
import { connect } from 'react-redux'
const ScoreDisplay = ({ leftScore, rightScore }) => (
<div className="h2 text-muted" style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
}}>
<span>{ leftScore }</span>
<span>Redux... |
techCurriculum/ui/solutions/4.3/src/components/Message.js | jennybkim/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... |
src/components/App.js | vsherms/LifeCoach | import React from 'react';
import Navigation from './Navigation';
class App extends React.Component{
constructor() {
super();
}
render() {
return(
<div>
<Navigation/>
{this.props.children}
</div>
);
}
}
export default App;
|
stories/side_bar.js | uglymugs/JustNUM | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import SideNavBar from '../app/components/side_bar';
storiesOf('SideNavBar', module)
.add('simple', () =>
<MuiThemeProvider>
<SideNavBar />
</MuiThemeProvider>);... |
packages/wix-style-react/src/MessageBox/test/MessageBox.e2eStory.js | wix/wix-style-react | import React from 'react';
import { storiesOf } from '@storybook/react';
import { Category, getTestStoryKind } from '../../../stories/storiesHierarchy';
import { testStories, storySettings } from '../docs/storySettings';
import Scrollable from '../docs/AlertExamples/Scrollable';
import FullScreenModal from '../docs/Cus... |
client/src/components/auth/logout.js | iNeedCode/mern-starter | import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../../actions/auth';
class Logout extends Component {
componentWillMount() {
this.props.logoutUser();
}
render() {
return <div>Sorry to see you go!</div>;
}
}
export default connect(null, action... |
src/svg-icons/editor/drag-handle.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorDragHandle = (props) => (
<SvgIcon {...props}>
<path d="M20 9H4v2h16V9zM4 15h16v-2H4v2z"/>
</SvgIcon>
);
EditorDragHandle = pure(EditorDragHandle);
EditorDragHandle.displayName = 'EditorDragHandle';
Edi... |
client/src/javascript/components/icons/ErrorIcon.js | jfurrow/flood | import React from 'react';
import BaseIcon from './BaseIcon';
export default class Error extends BaseIcon {
render() {
return (
<svg className={`icon icon--error ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M34.3,51.3h-8.5v-9h8.5V51.3z M34.3,36.4h-8.5L23.6,8.7h12.7L34.3,36.4z" /... |
src/StarDistributionPlot.js | porterjamesj/goodreads-vis | import React, { Component } from 'react';
import { VerticalBarSeries, XYPlot, XAxis, YAxis } from 'react-vis';
import { extractField } from './utils.js';
import some from 'lodash/some';
import clone from 'lodash/clone';
import repeat from 'lodash/repeat';
const NO_REVIEWS = [0,0,0,0,0];
export default class StarDistr... |
app/components/helper/Loading.js | DeividasK/my-future-ai | import React from 'react'
export default class Loading extends React.Component {
render () {
return (
<div className="loader-container">
<div className="loader"></div>
</div>
)
}
} |
src/carousel.js | daversm/nuka-carousel | 'use strict';
import React from 'react';
import tweenState from 'react-tween-state';
import decorators from './decorators';
import assign from 'object-assign';
import ExecutionEnvironment from 'exenv';
React.initializeTouchEvents(true);
const addEvent = function(elem, type, eventHandle) {
if (elem == null || typeo... |
src/views/Feed/FeedEvent.js | aabustamante/Semantic-UI-React | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
createShorthand,
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import FeedContent from './FeedContent'
import FeedLabel from './FeedLabel'
/**
* A feed contains an event.
*/
fun... |
react-flux-mui/js/material-ui/src/svg-icons/editor/border-clear.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderClear = (props) => (
<SvgIcon {...props}>
<path d="M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v... |
app/pages/ArticlePage.js | EleTeam/Shop-React-Native | /**
* ShopReactNative
*
* @author Tony Wong
* @date 2016-08-13
* @email 908601756@qq.com
* @copyright Copyright © 2016 EleTeam
* @license The MIT License (MIT)
*/
import React from 'react';
import {
View,
StyleSheet,
WebView,
Image,
Text,
TouchableOpacity,
InteractionManager
} from ... |
src/svg-icons/hardware/laptop-windows.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopWindows = (props) => (
<SvgIcon {...props}>
<path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/>
</SvgIcon>
);
Hardwar... |
frontend/src/components/filters/DistanceFilter.js | jeroen-visser/strava | import React, { Component } from 'react';
import InputRange from 'react-input-range';
import 'react-input-range/lib/css/index.css';
const range = {
min: 5,
max: 21
};
class DistanceFilter extends Component {
constructor(props) {
super(props);
this.state = {
range
};
}
onChangeC... |
src/svg-icons/communication/present-to-all.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPresentToAll = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h18c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 16.02H3V4.98h18v14.04zM10 12H8l4-4 4 4h-2v4h-4v-4z"/... |
browser/react/components/Table.js | TranscendVR/transcend | import React from 'react';
export default (props) => (
<a-entity id="table" position={`${props.x} ${props.y} ${props.z}`}>
<a-entity geometry={`primitive: box; depth: ${props.depth}; height: 0.20; width: 3`}
material={`color: ${props.color}`}
position={`0 ${props.legHeight} 0`}></a-entity>
<a-ent... |
node_modules/rc-time-picker/es/Combobox.js | yhx0634/foodshopfront | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React, { Component } from 'react';
im... |
client/src/App.js | jarick/didji | 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/icons/airplane-badge.js | modestack/modestack.github.io | import React from 'react';
import badgeSVG from '../../assets/svgs/badge.svg';
const styles = {
margin: '0',
minHeight: '100px',
minWidth: '100px'
};
const AirplaneBadge = () => (
<img style={styles} src={badgeSVG}/>
);
export default AirplaneBadge; |
src/client/utils/utils.js | pmeijer/user-management-page | /* globals document */
/**
* Utility functions
* @author patrickkerrypei / https://github.com/patrickkerrypei
*/
import React from 'react';
import blockies from 'blockies';
/**
* Format string so that only first letter is capitalized
* Note: String.prototype.charAt & String.prototype.slice handle out of bounds
... |
src/containers/search_bar.js | mattstuhring/react_redux_weather | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: '' };
this.onInputChange = this.onInp... |
app/components/WhatsHappeningComponents/index.js | BeautifulTrouble/beautifulrising-client | /**
*
* WhatsHappeningComponents
*
*/
import React from 'react';
// import styled from 'styled-components';
function WhatsHappeningComponents() {
return (
<div>
</div>
);
}
WhatsHappeningComponents.propTypes = {
};
export default WhatsHappeningComponents;
|
client/page/home/update-notice.js | johngodley/redirection | /**
* External dependencies
*/
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import { useDispatch } from 'react-redux'
/**
* Internal dependencies
*/
import { ExternalLink, Notice, Button } from 'wp-plugin-components';
import { saveSettings } from 'state/settings/action';
import { CAP... |
v21/v21.0.0/sdk/magnetometer.js | ccheever/expo-docs | import markdown from 'markdown-in-js'
import withDoc, { components } from '~/lib/with-doc'
import { expoteam } from '~/data/team'
// import { InternalLink, ExternalLink } from "~/components/text/link";
// import { P } from "~/components/text/paragraph";
// import Image from '~/components/base/image'
import { Code } fr... |
client2/src/components/menu.js | zhangbenny/Board | import React from 'react';
const ReactDOM = require("react-dom");
const ReactDriveIn = require("react-drive-in");
const Menu = require('react-burger-menu').stack;
const NavBar = () => {
return (
<div>
<ReactDriveIn
show="dogwallpaper.mp4" />
<Menu>
<h3>Login</h3>
<a href="/auth/facebook" c... |
app/javascript/mastodon/features/report/thanks.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
import { connect } from 'react-redux';
import {
unfollowAccount,
muteAccount,
blockAccount,
} f... |
docs/app/Examples/elements/Button/Types/ButtonExampleIcon.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Button, Icon } from 'semantic-ui-react'
const ButtonExampleIcon = () => (
<Button icon>
<Icon name='world' />
</Button>
)
export default ButtonExampleIcon
|
serverRender.js | jritterbush/fulljs | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import App from './src/components/App';
import config from './config';
import axios from 'axios';
const getApiUrl = (contestId) => {
if (contestId) {
return `${config.serverUrl}/api/contests/${contestId}`;
}
return `${confi... |
app/javascript/mastodon/features/list_timeline/index.js | blackle/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader from '../../compon... |
app/javascript/mastodon/features/ui/components/embed_modal.js | kibousoft/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage, injectIntl } from 'react-intl';
import api from '../../../api';
@injectIntl
export default class EmbedModal extends ImmutablePureComponent {
static propTypes... |
client/modules/polls/VoteForm/VoteForm.js | ncrmro/reango | import React from 'react'
import Button from 'react-mdc-web/lib/Button/Button'
import { createFragmentContainer, graphql } from 'react-relay'
import QuestionChoices from './QuestionChoices'
import styles from '../Polls.scss'
import VoteMutation from './VoteMutation'
export const variables = { count: 10 }
type VoteMut... |
app/components/ProductTable.js | Heatequation/react-router-redux-todo | import PropTypes from 'prop-types';
import React from 'react';
import ProductRow from './ProductRow';
const products = [
{ category: 'Sporting Goods', price: '$49.99', stocked: true, name: 'Football' },
{ category: 'Sporting Goods', price: '$9.99', stocked: true, name: 'Baseball' },
{ category: 'Sporting Goods',... |
jenkins-design-language/src/js/components/material-ui/svg-icons/image/exposure.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageExposure = (props) => (
<SvgIcon {...props}>
<path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"/>
</SvgIcon>
);
ImageExposure.display... |
src/svg-icons/maps/near-me.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsNearMe = (props) => (
<SvgIcon {...props}>
<path d="M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"/>
</SvgIcon>
);
MapsNearMe = pure(MapsNearMe);
MapsNearMe.displayName = 'MapsNearMe';
MapsNearMe.muiName... |
clients/packages/admin-client/src/mobrender/components/block.js | nossas/bonde-client | import PropTypes from 'prop-types'
import React from 'react'
import { FormattedMessage } from 'react-intl'
import Widget from './widget.connected'
import BlockConfigMenu from './block-config-menu.connected'
import { EDIT_KEY } from './block-config-menu'
import BlockChangeBackground from './block-change-background.conne... |
src/components/video_list.js | bournecreative/react-video-search | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = function(props){
const videoItems = props.videos.map((video)=>{
return <VideoListItem
key={video.etag}
videos={video}
onVideoSelect={props.onVideoSelect}
/>
});
... |
app/javascript/mastodon/features/ui/components/modal_loading.js | palon7/mastodon | import React from 'react';
import LoadingIndicator from '../../../components/loading_indicator';
// Keep the markup in sync with <BundleModalError />
// (make sure they have the same dimensions)
const ModalLoading = () => (
<div className='modal-root__modal error-modal'>
<div className='error-modal__body'>
... |
app/src/js/component/side-navigation/sidenav-menu-list.js | enoa7/chart-account | import React from 'react';
export default class SideNavMenuList extends React.Component{
render() {
return (
<div className="sidenav-menu">
<div className="sidenav-menu-list">
<i className="fa fa-tachometer fa-lg"></i>
<span>Dashboard</span>
</div>
<div className="sidenav-menu-list">
... |
node_modules/react-bootstrap/es/CarouselCaption.js | jkahrs595/website | 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/modules/CostPay/List.js | hong1012/FreePay | //ES6
import React from 'react';
class List extends React.Component {
constructor(props) {
super(props);
// 设置 initial state
this.state = {
text: props.initialValue || 'placeholder',
name: props.name,
show: 'none'
};
// ES6 类中函数必须手动绑定
... |
web/src/routes.js | AshanFernando/loghour | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import * as store from 'store';
import App from './components/App';
import OrganizationPage from './components/organization/OrganizationPage';
import IssuesPage from './components/issues/IssuesPage';
let requireLogin = (nextState, replace, ne... |
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/expected.js | kelong/react-native-with-amazon-s3 | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
examples/pinterest/app.js | cold-brew-coding/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var PICTURES = [
{ id: 0, src: 'http://placekitten.com/601/601' },
{ id: 1, src: 'http://placekitten.com/610/610' },
{ id: 2, src: 'http://placekitten.com/620/620' }
];
var Modal = React.createClass({
styles: {
posi... |
src/svg-icons/maps/add-location.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsAddLocation = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"/>
</SvgIcon>
);
MapsAddLocation = pure(Map... |
src/Header.js | prince1809/react-grid | import React from 'react';
import Const from './Const';
import Util from './Util';
import classSet from 'classnames';
import selectRowHeaderColumn from './SelectRowHeaderColumn';
class Header extends React.Component{
constructor(props){
super(props);
this._attachClearSortCaretFunc();
}
}
|
src/Affix.js | Azerothian/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import AffixMixin from './AffixMixin';
import domUtils from './utils/domUtils';
const Affix = React.createClass({
statics: {
domUtils
},
mixins: [AffixMixin],
render() {
let holderStyle = {top: this.state.affixPositionTop};
return (... |
spec/javascripts/jsx/shared/MessageStudentsSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas 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, version 3 of the License.
*
* Canvas is distribut... |
scripts/BackgroundCanvas.js | nrobin24/react-sidescroller | import React from 'react';
import {branch} from 'baobab-react/mixins';
import backgroundPainter from './backgroundPainter';
var canvasStyle = {
position: 'absolute',
left: 0,
top:0,
zIndex: 1
};
export default React.createClass({
mixins: [branch],
cursors: {
cameraX: ['camera','gameX']
},
componen... |
src/RefreshIndicator/RefreshIndicator.js | skarnecki/material-ui | import React from 'react';
import autoPrefix from '../utils/autoPrefix';
import transitions from '../styles/transitions';
import Paper from '../Paper';
const VIEWBOX_SIZE = 32;
function getStyles(props) {
const padding = props.size * 0.1; // same implementation of `this.getPaddingSize()`
return {
root: {
... |
src/svg-icons/notification/personal-video.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPersonalVideo = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/>
</SvgIcon>
);
Notifi... |
teste-redux-react/src/ProductList.js | igormontezano/testes | import React from 'react';
import { connect } from 'react-redux';
const ProductList = ( { products, removeProduct }) => (
<div>
<h2>Produtos</h2>
<ul>
{products.map((product, index) =>
<li key={product.price} >{product.price}
<button onClick={() => re... |
node_modules/react-bootstrap/es/NavbarToggle.js | superKaigon/TheCave | 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/templates/blog-post.js | Oluwasetemi/Oluwasetemi.github.io | /* eslint-disable react/no-danger */
import Bio from 'components/Bio'
import LinkSvg from 'components/LinkSvg'
import SEO from 'components/seo'
import { graphql, Link } from 'gatsby'
import { MDXRenderer } from 'gatsby-plugin-mdx'
import React from 'react'
import Utterance from 'react-utterances'
import styled from 'st... |
src/svg-icons/editor/format-align-center.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatAlignCenter = (props) => (
<SvgIcon {...props}>
<path d="M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"/>
</SvgIcon>
);
EditorFormatAlignCenter = pure(EditorFormatAli... |
src/entypo/Man.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--Man';
let EntypoMan = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M10,4c1.104,0,2-0.896,2-2c0-1.105-0.896-2-2-2S8,0.895,8,2C8,3.104,8.896,4,10,4z M15.978,11.583c-0.385-1.775... |
app/javascript/mastodon/features/ui/components/list_panel.js | tootsuite/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { fetchLists } from 'mastodon/actions/lists';
import { connect } from 'react-redux';
import { createSelector } from 'rese... |
app/javascript/mastodon/features/compose/components/text_icon_button.js | sylph-sin-tyaku/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const iconStyle = {
height: null,
lineHeight: '27px',
width: `${18 * 1.28571429}px`,
};
export default class TextIconButton extends React.PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,
title: PropTypes.string,
... |
examples/complete-todo-app/src/components/presentation/Link.js | mgmarlow/Redux-Samples | import React from 'react';
const Link = ({ active, children, onClick }) => {
if (active) {
return <span>{children}</span>;
}
return (
<a href='#'
onClick={e => {
e.preventDefault();
onClick();
}}
>
{children}
</a>
);
};
export default Link;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.