path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
js/components/Button.js | ecohealthalliance/GoodQuestion | import React from 'react';
import {
TouchableWithoutFeedback,
View,
Text,
} from 'react-native';
import Styles from '../styles/Styles';
const Button = React.createClass({
propTypes: {
action: React.PropTypes.func.isRequired,
color: React.PropTypes.string,
size: React.PropTypes.number,
wide: Re... |
src/Contact.js | parkjoon/trivia-aficionados | import React from 'react';
import Footer from './Footer';
import Header from './Header';
var ReactToastr = require('react-toastr');
var { ToastContainer } = ReactToastr;
var ToastMessageFactory = React.createFactory(ReactToastr.ToastMessage.animation);
export default class Contact extends React.Component {
cons... |
apps/marketplace/components/ItemSelect/ItemSelect.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react'
import ItemSelectInput from './ItemSelectInput'
import ItemSelectResultsList from './ItemSelectResultsList'
import SelectedItems from './SelectedItems'
const ItemSelect = props => {
const {
description,
emptyResultsMessage,
handleRemoveItem,
handleSearchChange,
handleSe... |
src/components/RegisterGyazoServiceFormComponent.js | ykzts/gyazo-web-client | import React from 'react';
import { connectToStores } from 'fluxible-addons-react';
import GyazoServiceStore from '../stores/GyazoServiceStore';
import saveGyazoServiceAction from '../actions/saveGyazoServiceAction';
import FormGroupHasFeedbackComponent from './FormGroupHasFeedbackComponent';
@connectToStores([GyazoSe... |
src/svg-icons/toggle/radio-button-checked.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonChecked = (props) => (
<SvgIcon {...props}>
<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3... |
examples/src/components/CustomOption.js | jwarning/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/components/ChallengeTree.js | petercollingridge/math-for-programmers-prototype | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Treebeard } from 'react-treebeard';
const treeStyle = {
tree: {
base: {
listStyle: 'none',
backgroundColor: 'white',
margin: 0,
padding: 0,
textAlign: 'Left',
color: 'blue',
fontFamily... |
src/components/Main.js | bjacobel/react-redux-boilerplate | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import styles from '../stylesheets/main.css';
import { link } from '../stylesheets/link.css';
import { getDataAsync } from '../actions/data';
const mapStateToProps = state => ({
data: state.data... |
src/containers/app/AppTitleBarContainer.js | PocketOfWeird/MediaGarden | import React from 'react'
import { connect } from 'react-redux'
import { setCurrentView, goBackward } from '../../actions'
import { isLoggedIn } from '../../selectors'
import { login, logout } from '../../helpers'
import AppTitleBar from '../../components/AppTitleBar'
const mapStateToProps = state => ({
title: 'Medi... |
setup/components/voting.js | sm-react/storybook-adk | import React from 'react';
export default function ({ index, onVote }) {
return (
<div>
{`Votes [${index}] `}
<button onClick={onVote(+1)}>+</button>
<button onClick={onVote(-1)}>-</button>
</div>);
}
|
src/pages/contact.js | Smittey/smittey.github.io | import React from 'react';
import Layout from '../components/layout';
import SEO from '../components/seo';
import Maps from '../components/Maps';
import ContactForm from '../components/ContactForm';
const ContactPage = () => (
<Layout>
<SEO title="Contact" />
<h1>
<span>Let's</span>
<span c... |
App/Navigation/NavigationHeader.js | taskrabbit/ReactNativeSampleApp | import React from 'react';
import {
NavigationExperimental,
StyleSheet,
} from 'react-native';
import cssVar from '../Lib/cssVar';
import NavigationTitle from '../Navigation/NavigationTitle';
import NavigationButton from '../Navigation/NavigationButton';
const {
Header: NavigationHeader,
} = NavigationExperim... |
src/form_builder/json_editor.js | clearbridgesoft/form-builder | import React, { Component } from 'react';
import Codemirror from 'react-codemirror';
import "codemirror/mode/javascript/javascript";
import "codemirror/lib/codemirror.css";
import "codemirror/theme/dracula.css";
import "codemirror/theme/blackboard.css";
import "codemirror/theme/mbo.css";
import "codemirror/theme/ttcn.c... |
app/javascript/mastodon/features/ui/components/column.js | pointlessone/mastodon | import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from '../../../scroll';
import { isMobile } from '../../../is_mobile';
export default class Column extends React.PureComponent {
static propTypes = {
... |
exercise-07-solution/src/components/PokemonCardHeader.js | learnapollo/pokedex-react | import React from 'react'
import { propType } from 'graphql-anywhere'
import gql from 'graphql-tag'
import styled from 'styled-components'
const Title = styled.div`
color: #7F7F7F;
font-size: 32px;
font-weight: 300;
max-width: 400px;
margin-top: 50px;
`
export default class PokemonCardHeader extends React.C... |
react/src/components/AtomForm/MultiAttachmentsSelect.js | sinfin/folio | import React from 'react'
import { connect } from 'react-redux'
import {
getFiles,
makeFilesStatusSelector,
makeFilesPaginationSelector,
changeFilesPage,
makeRawUnselectedFilesForListSelector,
makeFilesReactTypeIsImageSelector
} from 'ducks/files'
import {
atomFormPlacementsSelect,
atomFormPlacementsU... |
stories/react/RadioGroup.stories.js | onap-sdc/sdc-ui | import React from 'react';
import Examples from './utils/Examples.js';
import RadioGroup from '../../src/react/RadioGroup';
import HTMLRadioGroup from '../../components/radioGroup/radio-group.html';
import HTMLRadioGroupValue from '../../components/radioGroup/radio-group-value.html';
import HTMLRadioGroupDisabled from... |
react/text-box/src/index.js | kunukn/sandbox-web | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import 'whatwg-fetch';
import Promise from 'promise-polyfill';
import './index.css';
import App from 'components/App';
import configureStore from 'store/configureStore';
import initialState from 'reducers/initialState';... |
src/components/Main.js | 724400475/gallery-by-react |
require('normalize.css/normalize.css');
require('styles/App.scss');
import React from 'react';
import ReactDOM from 'react-dom';
//获取图片相关数据
var imageDatas = require('../data/imageDatas.json');
// let yeomanImage = require('../images/yeoman.png');
//利用自执行函数,讲图片名信息转成图片URL路径信息
function getImageUrl(imageDataArr) {
f... |
src/common/Container/EmptyContainer.js | Syncano/syncano-dashboard | import React from 'react';
import { FontIcon } from 'material-ui';
export default React.createClass({
displayName: 'EmptyContainer',
propTypes: {
icon: React.PropTypes.string,
text: React.PropTypes.string
},
getStyles() {
return {
container: {
margin: '64px auto',
textAlign:... |
client/app.js | neville1355/on-call-911 | import { AppContainer, CompaniesContainer } from './containers';
import { Route, Router, browserHistory } from 'react-router';
import React from 'react';
import ReactDOM from 'react-dom';
//Needed for React Developer Tools
window.React = React;
ReactDOM.render(
<Router history={browserHistory}>
<Route path='/'... |
src/app/App.js | halhenke/life-letters | import React from 'react';
import Header from './Header';
import Content from './Content';
import Footer from './Footer';
import {users} from '../data.json';
import {geneRegions, referrenceGenome} from '../data.json';
import './App.css';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin()... |
docs/src/pages/system/flexbox/FlexWrap.js | lgollut/material-ui | import React from 'react';
import Box from '@material-ui/core/Box';
export default function FlexWrap() {
return (
<div style={{ width: '100%' }}>
<Box
display="flex"
flexWrap="nowrap"
p={1}
m={1}
bgcolor="background.paper"
sx={{ maxWidth: 300 }}
>
... |
definitions/npm/react-helmet_v3.x.x/test_react-helmet.js | mkscrg/flow-typed | // @flow
import React from 'react';
import Helmet from 'react-helmet';
const HelmetComponent = () => (
<Helmet
htmlAttributes={{"lang": "en", "amp": undefined}} // amp takes no value
title="My Title"
titleTemplate="MySite.com - %s"
defaultTitle="My Default Title"
base={{"target": "_blank", "href":... |
admin/client/App/screens/Item/components/EditForm.js | xyzteam2016/keystone | import React from 'react';
import moment from 'moment';
import assign from 'object-assign';
import {
Button,
Col,
Form,
FormField,
FormInput,
ResponsiveText,
Row,
Spinner,
} from 'elemental';
import { Fields } from 'FieldTypes';
import AlertMessages from '../../../shared/AlertMessages';
import ConfirmationDial... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js | ConnectedHomes/create-react-web-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import logo from './assets/logo.svg';
export default () => <img id="feature-svg-inclusion" src={logo} alt="l... |
src/index.js | camilacnery/simple-calculator | import React, { Component } from 'react';
import { AppRegistry, StyleSheet, View } from 'react-native';
import Display from './components/display/Display';
import InputButtons from './components/input-buttons/InputButtons';
const initialState = {
previousValue: 0,
currentValue: 0,
selectedSymbol: null,
creatingFlo... |
cdap-ui/app/cdap/components/Market/TabConfig.js | caskdata/cdap | /*
* Copyright © 2016 Cask Data, Inc.
*
* 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 t... |
src/styles/style.js | SiverDX/siverdx.github.io | import React from 'react';
import PropTypes from 'prop-types';
const link = {
normal: {
borderBottom: '1px dotted rgb(0, 168, 0)',
},
hover: {
borderBottom: '1px solid rgb(0, 168, 0)',
color: 'black',
},
active: 'hover',
touchActive: {
borderBottom: '1px dashed rgb(0, 168, 0)',
color: '... |
src/routes.js | Exomnius/react-redux-universal-starter | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import {
App,
Home,
Links,
About,
NotFound
} from 'containers';
export default () => (
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="/links" component={Links} />
<Route path="/about" co... |
src/components/ui/Button.js | yursky/recommend | /**
* Buttons
*
<Button text={'Server is down'} />
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-native-elements';
// Consts and Libs
import { AppColors, AppFon... |
src/components/Activity.js | danesparza/appliance-monitor-cloud | // React
import React, { Component } from 'react';
import moment from 'moment';
// Activity represents a single Activity item
class Activity extends Component {
render() {
// Format the event time:
let eventtime = moment(this.props.activity.timestamp).format("h:mm a");
// F... |
js/components/content/alink.js | Krelix/krelix.github.io | /**
* Created by krelix on 27/04/2016.
*/
import React from 'react'
export default class ALink extends React.Component {
render() {
return (
<a href={this.props.src} target="_blank" rel="noreferrer">{this.props.children}</a>
)
}
} |
src/svg-icons/action/touch-app.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTouchApp = (props) => (
<SvgIcon {...props}>
<path d="M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.... |
docs/src/sections/PopoverSection.js | jesenko/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function PopoverSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
<A... |
src/routes/error/ErrorPage.js | jessiepullaro414/kiwi | /**
* 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 PropTypes from 'prop-... |
src/containers/shopping_cart.js | b0ts/react-redux-sweetlightstudios-website | import React, { Component } from 'react';
import { connect } from 'react-redux'; // glue between react and redux
import { Route } from 'react-router-dom';
import { Button, Modal } from 'react-bootstrap';
import CartItems from './cart_items';
import ShoppingCartIcon from '../components/shopping_cart_icon';
class Shoppi... |
app/components/ProgressBar/index.js | Princess310/antd-demo | import React from 'react';
import shareConfig from 'utils/shareConfig';
import ProgressBar from './ProgressBar';
function withProgressBar(WrappedComponent) {
class AppWithProgressBar extends React.Component {
constructor(props) {
super(props);
this.state = {
progress: -1,
loadedRoutes... |
src/svg-icons/action/event-seat.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionEventSeat = (props) => (
<SvgIcon {...props}>
<path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"/>
</SvgIcon>
);
ActionEventSeat = pure(ActionEventSe... |
src/svg-icons/image/photo-camera.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoCamera = (props) => (
<SvgIcon {...props}>
<circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24... |
app/routes.js | bird-system/bs-label-convertor | // @flow
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
import ScanPage from './containers/ScanPage';
export default (
<Route path="/" component={App}>
... |
src/utils/cloneChildren.js | timkrins/react-mdl | import React from 'react';
export default function(children, props) {
return React.Children.map(children, child => {
var p = typeof props === 'function' ? props(child) : props;
return React.cloneElement(child, p);
});
}
|
examples/contactlist/app/ContactList.js | zalmoxisus/react-chat | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject } from 'mobx-react';
import styles from './contactlist.scss';
import Contact from './Contact';
@inject('store')
export default class ContactList extends Component {
render() {
const { store } = this.props;
return (
... |
app/scripts/app.js | kyohei8/ethereum-controller | import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/app.jsx';
import '../styles/app.css';
ReactDOM.render(<App/>, document.getElementById('app'));
|
client/components/AskQuestionModal.js | andela-ksolomon/blocker | import React from 'react';
class AskQuestionModal extends React.Component {
constructor() {
super();
}
componentDidMount(){
$(this.getDOMNode()).modal('show').bind(this);
$(this.getDOMNode()).on('hidden.bs.modal', this.props.handleHideModal).bind(this);
}
render() {
return (
<div id... |
stories/components/button/index.js | OperationCode/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from 'shared/components/button/button';
storiesOf('shared/components/button', module)
.add('Default', () => (
<Button handleClick={action('action')}>Click</Button>
)); |
BackUp FIrebase/IQApp/src/components/common/Button.js | victorditadi/IQApp | import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
const ButtonForm = ({ onPress, children}) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity onPress={onPress} style={buttonStyle}>
<Text style={textStyle}>
{children}
</Text>
</To... |
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-forms-basic-form.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, SectionMixin} from './../common/common.js';
import {Button} from './../bricks/bricks.js';
import FormMixin from './form-mixin.js';
import './basic-form.less';
export default React.createClass({
mixins: [
BaseMixin,
ElementaryMixin,
SectionM... |
src/auth/screens/privacy-policy.screen.js | Antoine38660/git-point | import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Text } from 'react-native';
import { ViewContainer } from 'components';
import { translate } from 'utils';
import { colors, fonts, normalize } from 'config';
import { v3 } from 'api';
const styles = StyleSheet.create({
container: {
... |
src/client/menu.js | unclebean/hacker-menu | import React from 'react'
export default class Menu extends React.Component {
handleOnClick (e) {
e.preventDefault()
this.props.onQuitClick()
}
render () {
var statusText = 'v' + this.props.version
var buttonText = 'Quit'
if (this.props.status === 'update-available') {
statusText += ' ... |
src/frontend/App.js | ErdMutter92/Project-Atlantis | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, IndexRoute } from 'react-router';
import { createHashHistory } from 'history';
import NavBar from './components/NavBar';
import Blogs from './components/Blogs';
import Menu from './components/Menu';
import Stargates from './compo... |
app/javascript/mastodon/features/public_timeline/index.js | im-in-space/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
examples/custom-server-micro/pages/a.js | arunoda/next.js | import React from 'react'
export default () => <div>a</div>
|
app/components/NotFound/index.js | sandim27/ReduxApp | import React from 'react';
const NotFound = () => (
<h1>This page can not be found!</h1>
);
export default NotFound;
|
pages/lab/api/speed-dial-icon.js | cherniavskii/material-ui | import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './speed-dial-icon.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
atom/packages/linter-ui-default/lib/tooltip/message-legacy.js | GuilleDF/dotfiles | /* @flow */
import React from 'react'
import { openExternally } from '../helpers'
import type TooltipDelegate from './delegate'
import type { MessageLegacy } from '../types'
const NEWLINE = /\r\n|\n/
let MESSAGE_NUMBER = 0
class MessageElement extends React.Component {
props: {
message: MessageLegacy,
dele... |
src/parser/paladin/retribution/modules/talents/Crusade.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatNumber } from 'common/format';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import AbilityTracker from 'parser/shared/modules/AbilityTrac... |
App/containers/CodeContainer.js | jailbreak26/jswiz | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Form, Grid, Segment, Button, Icon } from 'semantic-ui-react';
import classNames from 'classnames';
import Dropzone from 'react-dropzone';
import EditorContainer from '../containers/EditorContainer';
const TAB_CODE = 0;
const ... |
src/components/Footer/Footer.js | nicolascine/site | /**
* 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 withStyles from 'isom... |
src/encoded/static/components/blocks/richtext.js | ENCODE-DCC/encoded | import React from 'react';
import PropTypes from 'prop-types';
import * as globals from '../globals';
export default class RichTextBlockView extends React.Component {
constructor(props) {
super(props);
// Set initial React component state.
this.state = {
value: this.props.valu... |
src/svg-icons/image/nature-people.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageNaturePeople = (props) => (
<SvgIcon {...props}>
<path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 ... |
wwwroot/app/src/components/LandingPage/LandingPage.js | AlinCiocan/FoodPlanApp | import React, { Component } from 'react';
import { Link } from 'react-router';
import TopBar from '../TopBar/TopBar';
import BrowserStore from '../../services/BrowserStore';
import Routes from '../../services/Routes';
import NavigationMenu from '../NavigationMenu';
class LandingPage extends Component {
constructor(... |
src/client/components/repo-list.js | cheminfo/grm | 'use strict';
import React from 'react';
import Repo from './repository';
export default React.createClass({
render() {
var l = this.props.repos.length;
var repos = new Array(l);
for (let i = 0; i < l; i++) {
var repo = this.props.repos[i];
repos[i] = (
... |
src/scripts/SetupContainer.js | whoisandie/yoda | 'use strict';
import React from 'react';
import {Navigation} from 'react-router';
import Actions from './Actions';
import {RenderMixin} from './Mixins';
export default React.createClass({
mixins: [RenderMixin, Navigation],
componentDidMount() {
Actions.fetchChannels().then(data => {
this.transitionTo('... |
example/js/index.js | D-Andreev/react-logger | import React from 'react';
import ReactDOM from 'react-dom';
import App from '../app/App';
ReactDOM.render(
<App />,
document.getElementById('container')
);
|
test/test_helper.js | Activesite/ReduxMiddleware | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
examples/todos-with-undo/containers/AddTodo.js | joshwreford/idle-game | import React from 'react'
import { connect } from 'react-redux'
import { addTodo } from '../actions'
let AddTodo = ({ dispatch }) => {
let input
return (
<div>
<form onSubmit={e => {
e.preventDefault()
if (!input.value.trim()) {
return
}
dispatch(addTodo(input.v... |
src/svg-icons/av/replay-10.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay10 = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.1 11H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.... |
app/javascript/mastodon/features/account_gallery/index.js | h3zjp/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 '... |
app/javascript/flavours/glitch/features/audio/index.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { formatTime } from 'flavours/glitch/features/video';
import Icon from 'flavours/glitch/components/icon';
import classNames from 'classnames';
import { throttle } from 'lodash';
import { getPoi... |
app/components/resources/searchResult.js | nypl-registry/browse |
import React from 'react'
import { Link } from 'react-router'
import ResourceImage from './resourceImage.js'
const ResourcesSearchResultsItem = React.createClass({
propTypes () {
return {
result: React.PropTypes.object.isRequired
}
},
render () {
var rowColorStyle = (this.props.rowIndex % 2... |
src/features/ComponentB/SubComponentB1.js | rldona/ReactNativeCourseBeeva | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Dimensions
} from 'react-native';
const { width, height } = Dimensions.get('window');
class SubComponentB1 extends Component {
render() {
return (
<View style={styles.container}>
<Text>
SubComponent B1
... |
techCurriculum/ui/solutions/5.1/src/components/Title.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... |
components/grid-list/index.js | react-material-design/react-material-design | import '@material/grid-list/dist/mdc.grid-list.css';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import { MDCGridList } from '@material/grid-list';
// TODO: Aspect ratio
/** Grid Lists */
class GridList extends Component {
static propTypes = {
... |
Console/app/src/components/league_standings/standings.js | RisenEsports/RisenEsports.github.io | //--------------------------------------------------
// Components
//--------------------------------------------------
import React from 'react';
//--------------------------------------------------
// CSS
//--------------------------------------------------
import './standings.css';
//--------------------------... |
admin/client/Signin/components/Brand.js | matthieugayon/keystone | /**
* Renders a logo, defaulting to the Keystone logo if no brand is specified in
* the configuration
*/
import React from 'react';
const Brand = function (props) {
// Default to the KeystoneJS logo
let logo = { src: `${Keystone.adminPath}/images/logo.png`, width: 205, height: 68 };
if (props.logo) {
// If th... |
src/layout.js | suhasdeshpande/cautious-computing-machine | import React from 'react'
import app from 'ampersand-app'
import ampersandMixin from 'ampersand-react-mixin'
import NavHelper from './components/nav-helper'
export default React.createClass({
mixins : [ampersandMixin],
displayName: 'Layout',
render() {
const { me } = this.props
return (
<Nav... |
components/common/SWDropdown.js | slidewiki/slidewiki-platform | import React from 'react';
import {
Wrapper,
Button,
Menu,
MenuItem,
openMenu,
closeMenu
} from 'react-aria-menubutton';
import AriaMenuButton from 'react-aria-menubutton';
import {getLanguageName} from '../../common';
import {Icon} from 'semantic-ui-react';
class SWDropdown extends React.Compo... |
src/parser/priest/holy/CHANGELOG.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import { Khadaj, niseko, Yajinni, Zerotorescue, blazyb } from 'CONTRIBUTORS';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import { change, date } from 'common/changelog';
export default [
change(date(2020, 5, 1), `Fixed an issue with the stat weights modu... |
app/javascript/packs/components/shared/AlertSuccess/index.js | NahlStudio/teamly-rails | import React from 'react';
function AlertSuccess(props) {
return (
<article className="message is-success">
<div className="message-body">
{props.children}
</div>
</article>
);
}
export default AlertSuccess;
|
src/pages/contact.js | marcneander/marcneander.se | import React from 'react';
import styled from 'styled-components';
import { Helmet } from 'react-helmet';
import Container from '../components/Container';
const IconWrap = styled.div`
display: inline-block;
margin-right: 4px;
svg {
fill: #fff;
height: 16px;
vertical-align: -1px;
... |
app/src/search/SearchBar.js | sfelderman/inverted-index | import React from 'react';
import {connect} from 'react-redux';
import {updateQuery} from '../actions';
import {clean} from '../util/createDict';
import SearchOptions from './SearchOptions';
let SearchBar = ({onSubmit}) => {
const checkSubmit = (e) => {
if (e.key === 'Enter' || e.target.keyCode === 13) {
e.preve... |
app/javascript/mastodon/containers/account_container.js | MastodonCloud/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../selectors';
import Account from '../components/account';
import {
followAccount,
unfollowAccount,
blockAccount,
unblockAccount,
muteAc... |
src/components/common/breadcrumbs/Breadcrumbs.js | fusionalliance/autorenter-react | import React from 'react';
import PropTypes from 'prop-types';
import { Route } from 'react-router-dom';
import { Well } from 'react-bootstrap';
import BreadcrumbItem from './BreadcrumbItem';
import styles from './breadcrumbs.css';
const Breadcrumbs = ({ path = '', nameResolvers = {} }) => (
<Well bsSize="small">
... |
src/routes.js | soltran/sample-redux | import React from 'react';
import { Route, IndexRedirect, Redirect, browserHistory } from 'react-router';
import App from './components/App';
import NotFoundPage from './components/NotFoundPage';
import Home from './components/Home';
import Employment from './containers/Employment/Employment.container';
import Todo fro... |
src/js/components/Basket.js | barbarosa/ECMAScript6_architecture | 'use strict';
import React from 'react';
import {cursors, shoppingCart} from '../services/ShoppingCart.js';
/**
* Basket Component
* @extends {React.Component}
*/
export default class BasketComponent extends React.Component {
/**
* @desc sets initial state from shoppingCart items
*/
constructor () {
... |
frontend/src/components/player/renderer/Html5VideoRenderer.js | OwenRay/Remote-MediaServer | import React from 'react';
import BaseRenderer from './BaseRenderer';
class Html5VideoRenderer extends BaseRenderer {
constructor() {
super();
this.onProgress = this.onProgress.bind(this);
this.reInit = this.reInit.bind(this);
this.onTrackLoad = this.onTrackLoad.bind(this);
this.onTrackRef = this... |
5.AdvancedReactAndRedux/src/index.js | Branimir123/Learning-React | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render(
<Provi... |
src/App.js | JasonAForral/quiz-client-json-rpc-react | 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>
... |
app/routes.js | emmorts/sheetr | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
import ListenerPage from './containers/ListenerPage';
export default (
<Route path="/" component={App}>
... |
src/svg-icons/toggle/radio-button-unchecked.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonUnchecked = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</SvgIco... |
frontend/Authentication/Container.js | fdemian/Morpheus | import React from 'react';
import { connect } from 'react-redux';
import Authentication from './Authentication';
import signIn from './Actions';
import register from '../Register/Actions';
const mapStateToProps = (state) => {
return {
user: state.session.user,
isFetching: state.session.isFetching,
error: st... |
app/components/Seat/ButtonJoinSeat.js | VonIobro/ab-web | /**
* Created by jzobro 20170518
*/
import React from 'react';
import {
ButtonIcon,
ButtonStyle,
ButtonText,
ButtonWrapper,
SeatWrapper,
} from './styles';
const ButtonJoinSeat = ({ coords, onClickHandler }) => (
<SeatWrapper coords={coords}>
<ButtonWrapper onClick={onClickHandler}>
<ButtonStyle>... |
src/app/containers/widgets/SalesChart.js | ucokfm/admin-lte-react | import React, { Component } from 'react';
export default class SalesChart extends Component {
componentDidMount() {
const Morris = window.Morris;
const area = new Morris.Area({
element: 'revenue-chart',
resize: true,
data: [
{ y: '2011 Q1', item1: 2666, item2: 2666 },
{ y: '... |
src/index.js | johatl/react-hot-boilerplate3 | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
const rootEl = document.getElementById('root');
ReactDOM.render(
<App />,
rootEl
);
|
src/js/components/test-editor/words-selector.js | daniel-madera/pijs | import React from 'react'
import { inject, observer } from 'mobx-react'
import WordsSelectorModuleFilter from './words-selector-module-filter'
import WordsSelectorList from './words-selector-list'
@inject('testEditorStore')
@observer
export default class TestEditor extends React.Component {
render() {
const { ... |
src/notfound/NotFound.js | carlodicelico/reify | import React from 'react';
const NotFound = (props) => {
return (
<div className='container not-found'>
<h1 className='title'>not found :(</h1>
</div>
);
};
export default NotFound;
|
src/common/components/help/help-custom.js | canonical-websites/build.snapcraft.io | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { HeadingThree } from '../vanilla-modules/heading/';
import styles from './help.css';
export default class HelpCustom extends Component {
render() {
const { children, headline } = this.props;
return (
<div className... |
app/containers/AthleteSchedule/AthleteEventList.js | kdprojects/nichesportapp | import React from 'react';
import H3 from 'components/H3';
import RaisedButton from 'material-ui/RaisedButton';
import CenteredSection from '../../containers/HomePage/CenteredSection';
import { graphql } from 'react-apollo';
import Dialog from 'material-ui/Dialog';
import gql from 'graphql-tag';
import FlatButton from ... |
src/components/App.js | arqex/freezer-todomvc | import React from 'react';
import TodoFooter from './Footer';
import TodoList from './TodoList';
import store from '../state/store';
var ENTER_KEY = 13;
class TodoApp extends React.Component {
componentDidMount () {
var me = this;
// Here the magic happens. Everytime that the
// state is updated the app will ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.