path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/browser/todos/TodosPage.js | chad099/react-native-boilerplate | // @flow
import Buttons from './Buttons';
import NewTodo from './NewTodo';
import React from 'react';
import Todos from './Todos';
import linksMessages from '../../common/app/linksMessages';
import { Box, PageHeader } from '../../common/components';
import { FormattedMessage } from 'react-intl';
import { Title } from '... |
src/containers/tableDescriptions/AverageWeekdayVolumeTableDescription.js | availabs/avail_app_bootstrap | import React from 'react';
import { QueryRenderer, graphql } from 'react-relay';
import relay from '../../relay.js';
export default function AverageWeekdayVolumeTableDescription(props) {
const q = graphql`
query AverageWeekdayVolumeTableDescriptionQuery {
__type(name: "AverageWeekdayVolume") {
name... |
src/svg-icons/editor/linear-scale.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorLinearScale = (props) => (
<SvgIcon {...props}>
<path d="M19.5 9.5c-1.03 0-1.9.62-2.29 1.5h-2.92c-.39-.88-1.26-1.5-2.29-1.5s-1.9.62-2.29 1.5H6.79c-.39-.88-1.26-1.5-2.29-1.5C3.12 9.5 2 10.62 2 12s1.12 2.5 ... |
src/components/CarInfo.js | sateez/salestracker | import React from 'react';
const CarInfo = ({car}) => {
console.log('CarInfo of car:--->', car)
return (
<div className='col-sm-7 car-info'>
<div className='col-sm-12'>
<div className='col-sm-4 model-image'>
<img className='img-responsive img-thumbn... |
examples/namespacing/src/components/Input/Container.js | jas-chen/redux | import React from 'react'
import { connect } from 'react-redux'
import { Change } from './actions'
import Input from './Component'
const mapDispatchToProps = {
onChange: value => new Change(value)
}
const InputContainer = ({ stateKey }) => {
const mapStateToProps = state => {
return {
value: state[state... |
examples/nested-animations/app.js | brenoc/react-router | import React from 'react'
import { render } from 'react-dom'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
require('./app.css')
const history = useBasename(createHistory)({
basename: '/n... |
src/svg-icons/social/cake.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialCake = (props) => (
<SvgIcon {...props}>
<path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l... |
src/parser/druid/feral/modules/azeritetraits/WildFleshrending.js | sMteX/WoWAnalyzer | import React from 'react';
import { formatNumber } from 'common/format';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { calculateAzeriteEffects } from 'common/stats';
import HIT_TYPES from 'game/HIT_TYPES';
import Analyzer from 'parser/core/Analyzer';
import calculateBonusAzerit... |
techCurriculum/ui/solutions/4.5/src/index.js | AnxChow/EngineeringEssentials-group | /**
* 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 in writ... |
results/scripts/app.js | kouryuu/react-questionnaire | import React from 'react';
import ReactDOM from 'react-dom';
import Table from './ui-lib/table.js';
ReactDOM.render(<Table test="TEST" />,document.getElementById('results'));
|
app/Pages/SettlementViewNew/ReceiptAddress/AddressSelect.js | jd-daojia/DaojiaRN | /* @flow */
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
} from 'react-native';
import AddressText from './AddressText'
import IconArrow from '../IconArrow'
// 选择收货地址 或 新建收货地址
export default class AddressSelect extends Component {
render() {
let {title, isNew} = this.props
... |
src/config/router.js | Alex-Gurung/Lighthouse | import React from 'react';
import {TabNavigator, ScrollView, Button, StackNavigator} from 'react-navigation';
import {Icon} from 'react-native-elements';
import Victim from '../screens/Victim';
import Host from '../screens/Host';
import Splash from '../components/Splash/Splash'
// import Home from '../screens/Home';
... |
app/component/ButtonPlay/index.js | andy-shi88/MusicProgramador | import React, { Component } from 'react';
import {
StyleSheet,
Text,
Button,
View
} from 'react-native';
import { navigate } from 'react-navigation';
export default class ButtonPlay extends Component {
render() {
const { navigate } = this.props.navigation;
return (
<View >
<Button
... |
src/js/components/Menu.js | vbence86/giftassistant-client | import React, { Component } from 'react';
import { View } from 'react-native';
import { SideMenu, List, ListItem } from 'react-native-elements';
import MenuButton from './MenuButton';
class Menu extends React.Component {
constructor (props) {
super(props);
this.state = {
isOpen: false
}
this.t... |
rules/frontend/src/views/Main/routes.js | rdowinton/auth0-rules-viewer | import React from 'react'
import {Route, IndexRedirect} from 'react-router'
import AuthService from 'utils/AuthService'
import Container from './Container'
import Login from './Login/Login'
import Rules from './Rules/Rules'
const auth = new AuthService(__AUTH0_CLIENT_ID__, __AUTH0_DOMAIN__);
// onEnter callback to va... |
node_modules/rc-tabs/es/InkTabBarMixin.js | ZSMingNB/react-news | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import { setTransform, isTransformSupported } from './utils';
import React from 'react';
import classnames from 'classnames';
export function getScroll(w, top) {
var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
var method = 'scroll' + (top ? 'T... |
src/svg-icons/av/art-track.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvArtTrack = (props) => (
<SvgIcon {...props}>
<path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1... |
src/svg-icons/action/perm-phone-msg.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermPhoneMsg = (props) => (
<SvgIcon {...props}>
<path d="M20 15.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.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2... |
client/modules/core/components/.stories/nav_user.js | StorytellerCZ/Socialize-starter | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { setComposerStub } from 'react-komposer';
import NavUser from '../nav_user.jsx';
storiesOf('core.NavUser', module)
.add('default view', () => {
return (
<NavUser />
);
})
|
examples/server-rendering/shared/components/demos/ScrollSpyNav.js | amazeui/amazeui-react | import React from 'react';
import {
Sticky,
Panel,
ScrollSpyNav,
} from '../AMUIReact';
export class ScrollSpyNavDemo extends React.Component {
render() {
return (
<div>
<h2>ScrollSpyNav</h2>
<h3>使用演示</h3>
<Sticky>
<ScrollSpyNav offsetTop={50}>
<nav
... |
example/helpers/clickToCopy.js | leetercola/dotfiles | import React from 'react';
const ClickToCopy = ({children}) => {
function doCopy (e) {
e.currentTarget.focus();
document.execCommand('copy');
}
return (
<span style={{ cursor: 'pointer' }} onClick={doCopy}>{children}</span>
)
}
export default ClickToCopy;
|
apps/mk-app-login/action.js | ziaochina/mk-demo | import React from 'react'
import { action as MetaAction, AppLoader } from 'mk-meta-engine'
import config from './config'
class action {
constructor(option) {
this.metaAction = option.metaAction
this.config = config.current
this.webapi = this.config.webapi
}
onInit = ({ component, i... |
components/Deck/ContentPanel/AttachSubdeck/AttachMyDecks.js | slidewiki/slidewiki-platform | import React from 'react';
import {connectToStores} from 'fluxible-addons-react';
import UserProfileStore from '../../../../stores/UserProfileStore';
import AttachSubdeckModalStore from '../../../../stores/AttachSubdeckModalStore';
import AttachDeckList from './AttachDeckList';
import { Segment, Loader,Label, Image,Di... |
src/server.js | tommy351/redux-example | import React from 'react';
import {renderToString, renderToStaticMarkup} from 'react-dom/server';
import {match, RoutingContext} from 'react-router';
import getRoutes from './routes';
import HtmlDocument from './components/HtmlDocument';
import configureStore from './store/configureStore.prod';
import Root from './com... |
pages/miniaboutGM.js | etaiklein/gameghost | import React from 'react'
import {baseValLarge, MiniItem, ItemsContainer} from '../components/Item'
export default class Index extends React.Component {
render() {
return (
<div>
<h1 style={{padding: `${2 * baseValLarge}px ${2 * baseValLarge}px 0`, textAlign: 'center'}}>
Our Game Masters
... |
frontend/src/index.js | c0un7-z3r0/deep_thought | import React from 'react'
import {render} from 'react-dom'
import {createStore, applyMiddleware} from 'redux'
import {Provider} from 'react-redux'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import reducer from './reducers'
import App from './containers/App'
import './index.css';
import {com... |
contact/todo/containers/addTodo.js | linuxing3/electron-react | import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { addTodo } from '../actions'
import VisibleTodoList from './VisibleTodoList'
let AddTodo = ({ dispatch }) => {
let input
return (
<div>
<Link to="/">Todo List</Link><br/>
<form onSubmit={e... |
app/javascript/mastodon/features/ui/util/reduced_motion.js | pointlessone/mastodon | // Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
import React from 'react';
import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
const stylesToKeep = ['opacity', 'backgroundOpacity'];
const extractValue = (value) =>... |
src/components/FormWizard/FormWizard-story.js | wfp/ui | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import FormWizard from '../FormWizard';
const props = {
tabs: () => ({}),
};
storiesOf('Components|FormWizard', module)
.addDecorator(withKnobs)
.add('Default', () => (
<FormWizard {... |
test/regressions/site/src/tests/Checkbox/CheckedCheckbox.js | und3fined/material-ui | // @flow weak
import React from 'react';
import Checkbox from 'material-ui/Checkbox';
export default function CheckedCheckbox() {
return <Checkbox checked />;
}
|
src/containers/DevTools/DevTools.js | AndriyShepitsen/svredux | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor toggleVisibilityKey="H"
changePositionKey="Q">
<LogMonitor />
</Dock... |
app/components/Header/index.js | haithemT/app-test | import React from 'react';
import PropTypes from 'prop-types';
import { Wrapper } from './style';
class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
return (
<Wrapper>
{this.props.text}
</Wrapper>
);
}
}
Header.propTypes = {
text... |
components/Map.js | sunday-school/sundayschool.rocks | import React from 'react'
const Map = ({location}) =>
<iframe
className='ba0 w-100 h5'
frameBorder='0'
src={`https://www.google.com/maps/embed/v1/place?key=AIzaSyA1KdSgHcworDOmYrubo8zti_e-X4_7ZFU&q=${location.replace(/ /g, '+')}`}
allowFullScreen
/>
export default Map
|
packages/core/app-extensions/src/form/FormBuilder.js | tocco/tocco-client | /* eslint-disable react/prop-types */
// propTypes are not recognized properly in this file
import _get from 'lodash/get'
import PropTypes from 'prop-types'
import React from 'react'
import {Field} from 'redux-form'
import {Layout, Panel, Typography} from 'tocco-ui'
import {consoleLogger, js} from 'tocco-util'
import ... |
src/app/core/atoms/icon/icons/cards.js | blowsys/reservo | import React from 'react'; const Cards = (props) => <svg {...props} viewBox="0 0 24 24"><g><g><g transform="translate(5.000000, 7.000000)"><polygon points="0 4 6 4 6 0 0 0"/><polygon points="8 4 14 4 14 0 8 0"/><polygon points="0 10 6 10 6 6 0 6"/><polygon points="8 10 14 10 14 6 8 6"/></g></g></g></svg>; export defaul... |
src/pages/UserPage.js | pekkis/react-training-broilerplate | // @flow
import React from 'react';
import { Link } from 'react-router';
import { List } from 'immutable';
import TodoLists from '../components/TodoLists';
type Props = {
user: UserType,
lists: List<UserType>,
};
const UserPage = (props: Props): React.Element<any> => {
const { user, lists } = props;
return... |
mlflow/server/js/src/experiment-tracking/components/ExperimentPage.js | mlflow/mlflow | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import _ from 'lodash';
import { withRouter } from 'react-router-dom';
import './ExperimentPage.css';
import {
getExperimentApi,
searchRunsApi,
loadMoreRunsApi,
searchRunsPayload,
setCompareEx... |
app/components/ToolEpigraph/index.js | BeautifulTrouble/beautifulrising-client | /**
*
* ToolEpigraph
*
*/
import React from 'react';
import styled from 'styled-components';
import Markdown from 'react-remarkable';
import { injectIntl } from 'react-intl';
const Container = styled.section`text-align: left;`;
const Viewport = styled.div``;
const Content = styled.div`
padding-left: 15px;
text-al... |
examples/server-rendering/client.js | rackt/redux-router | import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, compose } from 'redux';
import {
ReduxRouter,
reduxReactRouter,
} from 'redux-router';
import { Provider } from 'react-redux';
import { devTools } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devto... |
frontend/containers/SearchForm/SearchForm.js | uesteibar/timehub | /* eslint-disable no-unused-vars */
import React from 'react'
/* eslint-enable no-unused-vars */
import injectSheet from 'react-jss'
import Icon from '../../components/Icon'
const styles = {
container: {
minWidth: 200,
maxWidth: 500,
margin: '20px auto',
},
form: {
position: 'relative',
displ... |
src/svg-icons/social/person-outline.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPersonOutline = (props) => (
<SvgIcon {...props}>
<path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C... |
ext/lib/site/home-forum/component.js | RosarioCiudad/democracyos | import React from 'react'
import * as HomeForum from 'lib/site/home-forum/component'
import HomePresupuesto from 'ext/lib/site/home-presupuesto/component'
import HomeConsultas from 'ext/lib/site/home-consultas/component'
import HomeDesafios from 'ext/lib/site/home-desafios/component'
import HomeIdeas from 'ext/lib/site... |
lib/LoaderStack.js | poetic/react-super-components | import React from 'react';
import Stack from './Stack';
export default (props) => {
const {
status,
loadingElement,
errorElement,
displayElement,
wrapperProps,
...other
} = props;
const _loadingElement = loadingElement
? React.cloneElement(loadingElement, {index: 'loading'})
: <De... |
client/src/components/Callsign.js | harpojaeger/vanity-callsigns | import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import '../style/Callsign.css'
import moment from 'moment'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
function Callsign(props) {
// By default, mark callsigns as 'available'. This will be replaced by '... |
src/components/FullWidthSection.js | micrum/react-material-dashboard | import React from 'react';
import ClearFix from 'material-ui/internal/ClearFix';
import spacing from 'material-ui/styles/spacing';
const desktopGutter = spacing.desktopGutter;
const FullWidthSection = React.createClass({
propTypes: {
children: React.PropTypes.node,
contentStyle: React.PropTypes.object,
... |
src/components/common/svg-icons/image/add-a-photo.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAddAPhoto = (props) => (
<SvgIcon {...props}>
<path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-... |
app/components/Footer/index.js | kenzanboo/tumbler-blog-api | import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from 'components/A';
import LocaleToggle from 'containers/LocaleToggle';
import Wrapper from './Wrapper';
import messages from './messages';
function Footer() {
return (
<Wrapper>
<section>
<FormattedMessage {...mes... |
src/svg-icons/maps/directions-run.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsRun = (props) => (
<SvgIcon {...props}>
<path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l... |
charts/react-chartjs-3/example2/src/index.js | rob-blackbourn/scratch-js | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register()... |
src/svg-icons/image/wb-incandescent.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbIncandescent = (props) => (
<SvgIcon {...props}>
<path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.... |
src/image/Controls/AddCircle.js | sanchesking9/image_builder | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Button from '../components/button';
@connect((state) => {
const {image} = state;
return {image};
})
export default class AddCircle extends Component {
addCircle = () => {
let {frame = {}} = this.props.image;
const {le... |
src/AsyncCreatable.js | dmatteo/react-select | import React from 'react';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
const AsyncCreatable = React.createClass({
displayName: 'Asyn... |
src/components/organize/SwiperSelector.js | yiweimatou/admin-antd | import React, { Component } from 'react';
import { Table, message, Button, Modal } from 'antd'
import { info, list } from '../../services/organize'
import SearchInput from '../SearchInput'
class SwiperSelector extends Component {
constructor(props) {
super(props)
this.state = {
title: '... |
app/containers/UniqueEvent.js | Block-and-Frame/block-and-frame | import React from 'react';
import update from 'react-addons-update';
import eventHelpers from '../utils/eventHelpers';
import imageHelpers from '../utils/imageHelpers';
import userHelpers from '../utils/userHelpers';
import UniqueEventEdit from '../components/events/UniqueEventEdit';
import UniqueEventView from '... |
packages/component/src/Attachment/AudioAttachment.js | billba/botchat | import PropTypes from 'prop-types';
import React from 'react';
import AudioContent from './AudioContent';
import useStyleSet from '../hooks/useStyleSet';
const AudioAttachment = ({ attachment }) => {
const [{ audioAttachment: audioAttachmentStyleSet }] = useStyleSet();
return (
<div className={audioAttachmen... |
app/imports/ui/client/components/ScrumBoard/Board.js | valcol/ScrumNinja | import React, { Component } from 'react';
import { Session } from 'meteor/session';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import Card from './Card.js';
import Column from './Column.js';
import Box from '../misc/Box';
import BoxHeader from '../misc/BoxHeader'... |
node_modules/react-bootstrap/es/FormControlFeedback.js | mohammed52/something.pk | 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 ... |
public/scripts-es6/app.js | zhangsiy/TestReactNode | import React from 'react';
import ReactDOM from 'react-dom';
import Component from './Component';
ReactDOM.render(
<Component />,
document.getElementById('app')
)
|
src/Jumbotron.js | chrishoage/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
const Jumbotron = React.createClass({
propTypes: {
/**
* You can use a custom element for this component
*/
componentClass: CustomPropTypes.elementType
},
getDefaultProps() {
... |
app/containers/LinkFormContainer/index.js | rjgreaves/finances | /*
*
* LinkFormContainer
*
*/
import React from 'react';
import { connect } from 'react-redux';
import selectLinkFormContainer from './selectors';
import LinkForm from '../../components/LinkForm';
import { addLink, addLinkCancelled } from './actions';
export class LinkFormContainer extends React.Component { // es... |
source/javascripts/index.js | senthilporunan/packman | import React from 'react'
import { render } from 'react-dom'
import Root from './containers/Root.dev'
import configureStore from './store/configureStore'
const store = configureStore()
render(
<Root store={store} />,
document.getElementById('root')
)
|
src/Input/Ticker/testkit/Ticker.js | nirhart/wix-style-react | import React from 'react';
import {Simulate, renderIntoDocument} from 'react-addons-test-utils';
import Ticker from '../Ticker';
import styles from '../Ticker.scss';
export const tickerDriverFactory = component => {
const handlers = {
getUp: () => component.querySelector(`.${styles.up}`),
getDown: () => co... |
src/layout.js | phoomparin/phoom.in.th | import React from 'react'
import Helmet from 'react-helmet'
import {StaticQuery, graphql} from 'gatsby'
import './style.sass'
const meta = [
{name: 'description', content: 'Sample'},
{name: 'keywords', content: 'sample, something'},
]
const Layout = ({children}) => (
<StaticQuery
query={graphql`
{
... |
draft-js-linkify-plugin/src/Link/index.js | dagopert/draft-js-plugins | import React, { Component } from 'react';
import unionClassNames from 'union-class-names';
import linkifyIt from 'linkify-it';
import tlds from 'tlds';
const linkify = linkifyIt();
linkify.tlds(tlds);
// The component we render when we encounter a hyperlink in the text
export default class Link extends Component {
... |
src/server/server.js | klaytonfaria/marvel-heroes | /* eslint-disable no-console, no-use-before-define */
import Express from 'express';
import webpack from 'webpack';
import React from 'react';
import { renderToString } from 'react-dom/server';
import webpackDevMiddleware from 'webpack-dev-middleware';
import jsdom from 'jsdom';
// import webpackHotMiddleware from 'w... |
src/components/headernav/AccountMenu.js | kryptnostic/gallery | import React from 'react';
import FontAwesome from 'react-fontawesome';
import PropTypes from 'prop-types';
import { DropdownButton, MenuItem } from 'react-bootstrap';
import { hashHistory } from 'react-router';
import PageConsts from '../../utils/Consts/PageConsts';
import styles from './headernav.module.css';
cons... |
public/app/components/dialogs/dialog-operation-select.js | vincent-tr/mylife-home-studio | 'use strict';
import React from 'react';
import * as mui from 'material-ui';
const DialogOperationSelect = ({ operations, ok, cancel, setAll, setOne }) => (
<mui.Dialog
title="Select operations to execute"
actions={<div>
<mui.FlatButton
label="Select all"
onTouc... |
src/Heading.js | mschaeffner/react-getting-started | import React, { Component } from 'react';
class Heading extends Component {
render() {
return (
<h1>Friend list ({this.props.count})</h1>
);
}
}
export default Heading;
|
app/routes/index.js | browniefed/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';
... |
src/app/components/team/SmoochBot/SmoochBotPreviewFeed.js | meedan/check-web | import React from 'react';
import { QueryRenderer, graphql } from 'react-relay/compat';
import Relay from 'react-relay/classic';
import PropTypes from 'prop-types';
const SmoochBotPreviewFeed = ({
feedUrl,
count,
refetch,
installationId,
onError,
onSuccess,
}) => {
if (!feedUrl) {
onSuccess('');
... |
dashboard/src/index.js | checkr/codeflow | import React from 'react'
import { render } from 'react-dom'
import { browserHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import Root from './containers/Root'
import configureStore from './store/configureStore'
const store = configureStore()
const history = syncHistoryWithSto... |
code/L6/React Page Routing using React-Router/components/app.js | santhoshthepro/reactjs | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
// Components
import HomePage from './home/home-page';
import MoviesPage from './movies/movies-page';
import ContactPage from './contact/contact-page';
//ES6 Const
const app = document.getElemen... |
src/browser/index.js | carnesen/mathjs-app | import React from 'react'
import ReactDOM from 'react-dom'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import { Provider } from 'react-redux'
import io from 'socket.io-client'
import 'roboto-fontface/css/roboto/roboto-fontface.css'
import '@carnesen/styles/css/default.css'
import RootComponent ... |
docs/src/routes/not-found/index.js | bmatthews/haze-lea | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
react/features/local-recording/components/LocalRecordingButton.js | bgrozev/jitsi-meet | /* @flow */
import React, { Component } from 'react';
import { translate } from '../../base/i18n';
import { IconRec } from '../../base/icons';
import { ToolbarButton } from '../../toolbox';
/**
* The type of the React {@code Component} state of
* {@link LocalRecordingButton}.
*/
type Props = {
/**
* Whe... |
04/EW/trding/trding/src/UserContext.js | rgllm/uminho | import React from 'react';
export const UserContext = React.createContext({
user: {logged: false,
data: undefined,},
setUser : () => {}
}); |
public/src/js/components/header.js | asarode/learn-buckets | import React from 'react';
import { RouteHandler, Navigation } from 'react-router';
class Header extends React.Component {
constructor(props) {
super(props)
this.state = {};
}
render() {
return (
<div>
<div className="col-xs-8">
<h1>Learn Buckets</h1>
</div>
</div>
)
}
}
Header.context... |
src/index.js | caesarsol/sequencer | import React from 'react'
import ReactDOM from 'react-dom'
import App from 'components/App'
import 'tachyons'
ReactDOM.render(<App />, document.getElementById('root'))
// import 'lib/math-synth'
|
packages/wix-style-react/src/GenericModalLayout/docs/modalWrapper.js | wix/wix-style-react | import React from 'react';
import { Button, Modal } from 'wix-style-react';
export class ModalWrapper extends React.Component {
state = {
isModalOpen: false,
};
openModal = () => {
this.setState({ isModalOpen: true });
};
closeModal = () => {
this.setState({ isModalOpen: false });
};
render... |
app/components/link2.js | varunagg45/webpack-react-sample-project | import React from 'react';
export default React.createClass({
getInitialState: function() {
return {
'page': 'This is from Link 2'
};
},
render: function() {
return (
<div>{this.state.page}</div>
);
}
});
|
Web Developer Skills/Learn ReactJS Part II/Unit 01 Stateless Components Inherit From Stateful Components/02 Build a Stateful Component Class/Parent.js | ummahusla/codecademy-exercise-answers | import React from 'react';
import ReactDOM from 'react-dom';
class Parent extends React.Component {
constructor(props) {
super(props)
this.state = { name: 'Frarthur'}
}
render() {
return <div></div>;
}
}
|
js/components/taskEdit/tabItems.js | bsusta/HelpdeskAppTemplate |
import React, { Component } from 'react';
import { Right, Left, Container, Content, Card, CardItem, Text, Body, Footer, FooterTab, Button, Icon } from 'native-base';
import { withApollo } from 'react-apollo';
import styles from './styles';
import { Actions } from 'react-native-router-flux';
import { ActivityIndicator... |
client/modules/core/components/.stories/navigation.js | hacksong2016/angel | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import Navigation from '../navigation';
storiesOf('core.Navigation', module)
.add('default view', () => {
return (
<Navigation />
);
});
|
stories/Mention/SimpleMentionEditor/index.js | dagopert/draft-js-plugins | import React, { Component } from 'react';
import { EditorState } from 'draft-js';
import Editor from 'draft-js-plugins-editor';
import createMentionPlugin, { defaultSuggestionsFilter } from 'draft-js-mention-plugin';
import editorStyles from './editorStyles.css';
import mentions from './mentions';
const mentionPlugin ... |
analysis/druidferal/src/modules/spells/ThrashHitCount.js | anom0ly/WoWAnalyzer | import { t } from '@lingui/macro';
import SPELLS from 'common/SPELLS';
import { SpellLink } from 'interface';
import { ThresholdStyle } from 'parser/core/ParseResults';
import { STATISTIC_ORDER } from 'parser/ui/StatisticBox';
import React from 'react';
import HitCountAoE from '../core/HitCountAoE';
/**
* Even with ... |
fields/components/columns/InvalidColumn.js | jacargentina/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var InvalidColumn = React.createClass({
displayName: 'InvalidColumn',
propTypes: {
col: React.PropTypes.object,
},
renderValue () {
return (
<ItemsTableVal... |
app/components/PropsRoute.js | DrPandemic/TwiolioRN | // @flow
import React from 'react';
import { Route } from 'react-router-native';
const renderMergedProps = (component, ...rest) => {
const finalProps = Object.assign({}, ...rest);
return (
React.createElement(component, finalProps)
);
};
export default ({ component, ...rest }) => (
<Route {...rest} render... |
ui/InputText/index.js | mymaytang/maytang.co-ui | import React from 'react'
import { Input, Label, ContainerDiv } from '../Core'
import './InputText.less'
export default class InputText extends React.Component {
static defaultProps = {
id: null,
label: null,
placeholder: '',
width: undefined
}
constructor() {
super()
}
componentWillMo... |
modules/RouteContext.js | barretts/react-router | import React from 'react'
const { object } = React.PropTypes
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent transitions.
*/
const RouteContext = {
prop... |
frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Form, FormGroup, Label } from 'reactstrap';
import { gettext, orgID } from '../../../utils/constants';
import { seafileAPI } from '../../../utils/seafile-api';
const propTypes = {
groupI... |
src/views/components/AutomationEditTrigger.js | physiii/home-gateway | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {withRouter} from 'react-router-dom';
import ChooseDeviceScreen from './ChooseDeviceScreen.js';
import AutomationChooseServiceTriggerScreen from './AutomationChooseServiceTriggerScreen.js';
import {getDevicesWithA... |
src/views/pages/unused/LearnerStatusEntryPage.js | Domiii/project-empire | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { dataBind } from 'dbdi/react';
import {
Alert, Button, Jumbotron, Well, Panel
} from 'react-bootstrap';
import { LoadOverlay } from 'src/views/components/overlays';
import LearnerStatusEntryForm from 'src/views/components/scaffol... |
src/components/Welcome/index.js | kkav004/react-native-redux-real-world | import React from 'react';
import { View, Text } from 'react-native';
import styles from './styles';
const Welcome = () => (
<View style={styles.container}>
<Text style={styles.welcome}>
It works \o/ !
</Text>
</View>
);
export default Welcome;
|
src/interface/character/Page.js | sMteX/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import DocumentTitle from 'interface/common/DocumentTitle';
import NavigationBar from 'interface/layout/NavigationBar';
import Parses from './Parses';
class Page extends React.PureComponent {
static propTypes = {
region: PropTypes.string.isRequired... |
src/components/new-person.js | osxi/react-pouch-redux-starter-kit | 'use strict';
import { upsertPerson } from '../redux/actions';
import store from '../redux/store';
import MUI from 'material-ui';
import React from 'react';
const {
RaisedButton,
TextField
} = MUI;
export default React.createClass({
_submitHandler() {
let { newPersonName } = this.refs;
store.dispatch(... |
frontend/Stories/StoryList.js | fdemian/Morpheus | import React from 'react';
import StoryElement from './StoryElement';
const StoryList = ({storiesList, history, loggedIn, deleteFn, editFn}) => (
<div>
{storiesList.map((story, i) =>
<div key={i}>
<StoryElement story={story} history={history} loggedIn={loggedIn} deleteFn={deleteFn} editFn={editFn} />
<... |
src/containers/verify_forgot_password_wrapper.js | TedtheDev/Tic-Tac-Toe | import React, { Component } from 'react';
import { reduxForm } from 'redux-form';
import axios from 'axios';
import VerifyForgotPassword from '../components/verify_forgot_password';
// Wrapper component to hold all logic to verify player's
// reset password and update it via an API call when validated
class VerifyForg... |
examples/react-router/src/index.js | joshblack/carbon-components-react | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { BrowserRouter as Router } from 'react-router-dom';
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('root')
);
// If you ... |
node_modules/browser-sync/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | df-a/par-cw | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
src/components/user/Profile.js | teamNOne/showdown | import React from 'react';
// import UserStore from '../../stores/UserStore';
// import Combatant from '../combatant/Combatant';
export default class Profile extends React.Component {
render() {
return (
<div>
<button>Change Password</button>
</div>
)
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.