path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/stories/lottie-control.js | chenqingspring/react-lottie | import React from 'react';
import Lottie from '../index';
import * as animationDataA from './pinjump.json';
import * as animationDataB from './TwitterHeart.json';
export default class LottieControl extends React.Component {
constructor(props) {
super(props);
this.state = {
isStopped: false,
isP... |
app/js/seed/views/_seedconfirm.js | blockstack/blockstack-browser | import React from 'react'
import { ShellScreen, Type, Button, Buttons } from '@blockstack/ui'
import PropTypes from 'prop-types'
import { Box, Inline, Flex } from '@components/ui/components/primitives'
import { Trail, config, animated } from 'react-spring'
function getRandomInt(min, max, exclude) {
min = Math.ceil(m... |
lib/components/MapLocalTile.js | zigbang/react-native-maps | import PropTypes from 'prop-types';
import React from 'react';
import {
ViewPropTypes,
View,
} from 'react-native';
import decorateMapComponent, {
USES_DEFAULT_IMPLEMENTATION,
SUPPORTED,
} from './decorateMapComponent';
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
cons... |
transforms/__testfixtures__/undecorate/with-param.input.js | tizmagik/undecorate-codemod | import React from 'react';
import hoc1 from 'hoc1';
@hoc1('my-param')
export default class Thing extends React.Component {
render() {
return <div>Thing</div>;
}
}
|
app/client/layouts/components/Breadcrumbs.js | jmdesiderio/swan-cms | import React from 'react'
import styled from 'styled-components'
const Wrapper = styled.div`
border-bottom: 1px solid ${p => p.theme.colors.gainsboro};
padding: 1rem;
`
const Breadcrumbs = () => <Wrapper>Breadcrumbs</Wrapper>
export default Breadcrumbs
|
src/components/Header/Header.js | remoteportal/widgets-spa-react | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import styles from './Header.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header extends Compo... |
client/components/menu/banks.js | bnjbvr/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get } from '../../store';
import BankListItemComponent from './bank';
const BankListComponent = props => {
let { currentAccessId, currentAccountId } = props;
let banks = props.accessIds.map(accessId ... |
packages/mineral-ui-icons/src/IconPageview.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconPageview(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps... |
packages/mineral-ui-icons/src/IconCollectionsBookmark.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconCollectionsBookmark(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {.... |
components/Layout/Header.js | Zetoff/react-flexbox-grid-jss-demo | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
... |
examples/universal/client/index.js | arusakov/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import App from '../common/containers/App';
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
const rootElement = do... |
index/components/LinkButton.js | JDRomano2/VenomKB | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class LinkButton extends React.Component {
constructor(props) {
super(props);
this.state = {
linkedId: props.linkedId,
};
}
render() {
return (
... |
src/svg-icons/communication/call-merge.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallMerge = (props) => (
<SvgIcon {...props}>
<path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/>
</SvgIcon>
);
CommunicationCallMerge... |
app/containers/LanguageProvider/index.js | wellingtonsampaio/react-kanban-board | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
catalog/app/utils/string.js | quiltdata/quilt | /* String utils */
import * as R from 'ramda'
import React from 'react'
export function printObject(obj) {
return JSON.stringify(obj, null, ' ')
}
const suffixes = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
const splitNumber = (n) => {
const exp = n === 0 ? 0 : Math.log10(n)
const index = Math.min(Math.floo... |
src/index.js | gilbox/elegant-react-hot-demo | import 'core-js/shim'; // for Array.fill
import React from 'react';
import App from './App';
import {fromJS} from 'immutable';
import Atom from './atom';
import timeTravelPlugin from './time-travel-plugin/'
import TimeTravelControlPanel from './time-travel-plugin/ControlPanel';
// initial app state
const state = modu... |
step5-forms/node_modules/react-router/modules/Lifecycle.js | jintoppy/react-training | import warning from './routerWarning'
import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method to a
* component that may be used to cancel a transition or prompt the user
* for confirmation.
*
* On standard ... |
viewer/core/static/js/app/components/containers/chart-container.js | openjck/distribution-viewer | import React from 'react';
import { connect } from 'react-redux';
import * as d3Scale from 'd3-scale';
import * as d3Array from 'd3-array';
import Chart from '../views/chart';
import * as metricApi from '../../api/metric-api';
import { debounce } from '../../utils';
class ChartContainer extends React.Component {
c... |
client/components/charts/index.js | bnjbvr/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get, actions } from '../../store';
import { translate as $t } from '../../helpers';
import InOutChart from './in-out-chart';
import BalanceChart from './balance-chart';
import CategoryCharts from './category... |
src/components/messages/message_entry.js | obie-obie-oh/obie | import React from 'react'
const MessageEntry = ({
message
}) => (
<section className="message-entry list-entry" style={{ display: 'block' }}>
<img src={message.user_image_url} width="50px" />
<div className="username">
<p>{message.name}</p>
</div>
<div className="message-text">
<p>{mess... |
src/svg-icons/device/brightness-high.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBrightnessHigh = (props) => (
<SvgIcon {...props}>
<path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 ... |
fields/types/boolean/BooleanFilter.js | tanbo800/keystone | import React from 'react';
import { SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Is Checked', value: true },
{ label: 'Is NOT Checked', value: false }
];
var BooleanFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || TOGGLE_OPTIONS[0].value
};
... |
assets/jqwidgets/demos/react/app/datetimeinput/timeinput/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDateTimeInput from '../../../jqwidgets-react/react_jqxdatetimeinput.js';
class App extends React.Component {
render() {
return (
<JqxDateTimeInput
width={250} height={25} formatString={'T'}
s... |
public/js/cat_source/es6/components/modals/CreateTeam.js | matecat/MateCat | import React from 'react'
import ManageActions from '../../actions/ManageActions'
import CommonUtils from '../../utils/commonUtils'
import {ModalWindow} from './ModalWindow'
class CreateTeam extends React.Component {
constructor(props) {
super(props)
this.state = {
errorInput: false,
errorDropdo... |
src/client/story_list.js | codevlabs/hacker-menu | import React from 'react'
import Story from './story.js'
import _ from 'lodash'
export default class StoryList extends React.Component {
render () {
var onUrlClick = this.props.onUrlClick
var onMarkAsRead = this.props.onMarkAsRead
var storyNodes = _.map(this.props.stories, function (story, index) {
... |
src/components/mensaje-commit.js | ReactJS-BA/meetup-2016-04-05 | import React from 'react';
var defaultGravatar = 'http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y';
class MensajeCommit extends React.Component {
render() {
var avatar = this.props.commit.author ? this.props.commit.author.avatar_url : defaultGravatar,
d = new Date(this.props.co... |
routes.js | housseindjirdeh/git-point | /* eslint-disable react/prop-types */
import React from 'react';
import {
StackNavigator,
TabNavigator,
TabBarBottom,
NavigationActions,
} from 'react-navigation';
import { Icon } from 'react-native-elements';
import { colors } from 'config';
// Auth
import {
SplashScreen,
LoginScreen,
WelcomeScreen,
... |
src/components/MiniInput/MiniInput.stories.js | austinknight/ui-components | import React from "react";
import styled from "styled-components";
import { storiesOf, action } from "@storybook/react";
import MiniInput from "./MiniInput";
import {
renderThemeIfPresentOrDefault,
wrapComponentWithContainerAndTheme,
colors
} from "../styles";
const Wrapper = styled.div`
background-color: ${... |
wrappers/html.js | philipnilsson/Badness10k | import React from 'react'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const page = this.props.route.page.data
return (
<div>
<Helmet
ti... |
node_modules/react-bootstrap/src/Label.js | gitoneman/react-home | import React from 'react';
import classSet from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSet(... |
src/components/NavBar/NavBar.js | patrickfatrick/audio-book-react | import React from 'react';
import PropTypes from 'prop-types';
import c from 'classnames';
import truncate from '../../utils/truncate';
import useResizeObserver from '../../hooks/useResizeObserver';
import Controls from '../Controls';
import Chapters from '../Chapters';
import infoShape from '../../shapes/infoShape';
i... |
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.android.js | dikaiosune/react-native | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default class WelcomeText extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<... |
src/components/lessons/Vigenere.js | pshrmn/cryptonite | import React from 'react';
import Lesson from './LessonBase';
import VigenereTable from 'components/tools/VigenereTable';
import { EnglishAlphabet } from 'constants/CharacterSets';
const title = 'The Vigenère Cipher';
export default () => (
<Lesson title={title}>
<div>
<p>
The Vigenère cipher is ... |
client/js/components/paginated-car-table.js | pvogel1967/relayClassTeam2_11012017 | import React from 'react';
import { createPaginationContainer, graphql } from 'react-relay';
import { CarViewRowContainer } from './car-view-row';
export class CarTable extends React.Component {
constructor(props) {
super(props);
this.state = {
currentPage: 0,
lastPageLoa... |
src/desktop/apps/auction/components/layout/Banner.js | kanaabe/force | import _ClockView from 'desktop/components/clock/react'
import PropTypes from 'prop-types'
import React from 'react'
import block from 'bem-cn-lite'
import get from 'lodash.get'
import { connect } from 'react-redux'
import { data as sd } from 'sharify'
// FIXME: Rewire
let ClockView = _ClockView
function Banner (prop... |
node_modules/react-router/es6/RoutingContext.js | ddigioia/react_router_practice_1 | import React from 'react';
import RouterContext from './RouterContext';
import warning from './routerWarning';
var RoutingContext = React.createClass({
displayName: 'RoutingContext',
componentWillMount: function componentWillMount() {
process.env.NODE_ENV !== 'production' ? warning(false, '`RoutingContext` has... |
app/javascript/mastodon/features/followers/index.js | riku6460/chikuwagoddon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import LoadingIndicator from '../../components/loading... |
tools/render.js | maven-hackathon/TheQueerTour | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import glob from 'glob';
import { join, dirname } from 'path';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Html from '../components/Html'... |
client/src/LeftNav/index.react.js | wenhao/fixed-asset | import React from 'react'
import {
Navigation,
State
} from 'react-router'
import {
LeftNav
} from 'material-ui'
const menuItems = [{
text: 'Home',
route: 'home'
},{
text: 'User',
route: 'user'
},{
text: 'User Assets',
route: 'asset'
},{
text: 'Add Asset',
route: 'addAsset'
}];
const AppLeftNa... |
src/js/components/ItemDataset/index.js | waagsociety/ams.datahub.client | import React from 'react'
import Li from '../Li'
export default function ItemDataset({ data }) {
const { access, sourceType, spatialResolution, temporalResolution, publisher, creator, contributor, author } = data
return <section className='ItemDataset content'>
<h1>Dataset</h1>
<ul>
<Li header='Acc... |
src/admin/containers/AdminContainer.js | firescribe/firescribe | import React, { Component } from 'react';
import { connect } from 'react-redux';
import AppBar from 'material-ui/AppBar';
import DrawerContainer from './DrawerContainer';
class AdminContainer extends Component {
constructor(props) {
super(props);
this.state = {
drawerOpen: props.isDesktop,
};
}
... |
resources/assets/js/components/responses/WriteResponseComponent.js | jrm2k6/i-heart-reading | import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
fetchAssignedBooks,
saveResponse
} from '../../actions/crudActions';
import { MarkdownEditor } from 'react-markdown-editor';
const mapStateToProps = (state) => {
return {
assignedBooks: state.bookReducers.assignedBooks
... |
dispatch/static/manager/src/js/components/inputs/selects/EventSelectInput.js | ubyssey/dispatch | import React from 'react'
import { connect } from 'react-redux'
import ItemSelectInput from './ItemSelectInput'
import eventsActions from '../../../actions/EventsActions'
class EventSelectInputComponent extends React.Component {
listEvents(query) {
let queryObj = {}
if (query) {
queryObj['q'] = que... |
storybook/config.js | Secullum/secullum-react-ui | import React from 'react';
import { configure, addDecorator } from '@kadira/storybook';
import 'font-awesome/css/font-awesome.css';
import '../src/index.css';
addDecorator(story => (
<div style={{ padding: '10px' }}>
{story()}
</div>
));
const req = require.context('../src/components', true, /stories.js$/);
... |
src/containers/HelloWorld.js | Jon-Biz/simple-static-react | import React from 'react'
const HelloWorld = (props) => {
return (
<div>
<h1>Hello World</h1>
<p>Here is some data:</p>
<p>
{
props.helloWorldData
}
</p>
<a href="#hello-again-world">
Go to the other page.
</a>
<p>
<i>
... |
clients/packages/admin-client/src/community/components/dns/button-preview/index.js | nossas/bonde-client | import PropTypes from 'prop-types'
import React from 'react'
if (require('exenv').canUseDOM) require('./styles.scss')
const ButtonPreview = ({ text, onClick }) => (
<div className='button-preview flex flex-wrap' onClick={onClick}>
<div className='circle bg-pagenta'>
<i className='fa fa-plus' />
</div>... |
pages/index.js | hillcitymnag/www.hillcitymnag.church | import css from 'next/css'
import Head from 'next/head'
import React from 'react'
import 'whatwg-fetch'
import Contact from '../components/contact'
import Footer from '../components/footer'
import Header from '../components/header'
import LatestSermon from '../components/latest-sermon'
import Navigation from '../compo... |
techCurriculum/ui/solutions/5.3/src/index.js | tadas412/EngineeringEssentials | /**
* Copyright 2017 Goldman Sachs.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writ... |
src/svg-icons/notification/sms-failed.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSmsFailed = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</SvgIcon>
);
NotificationSmsFail... |
src/components/ReCaptcha.js | pixelcanvasio/pixelcanvas | /**
* Created by arkeros on 9/6/17.
*
* @flow
*/
import React from 'react';
import type { State } from '../reducers';
import store from '../ui/store';
import { requestPlacePixel } from '../actions';
import { RECAPTCHA_SITEKEY } from '../core/constants';
function onCaptcha(token: string) {
console.log('token',... |
src/routes/Counter/components/Counter.js | shengnian/webpack2-react-redux-starter | import React from 'react'
export const Counter = (props) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {props.counter}</h2>
<button className='btn btn-default' onClick={props.increment}>
Increment
</button>
{' '}
<button className='btn btn-default' onClick={props.doubleAsync}>
... |
stories/InputArea/ExamplePaneltitleStyle.js | nirhart/wix-style-react | import React from 'react';
import InputArea from 'wix-style-react/InputArea';
export default () =>
<div className="ltr">
<div style={{background: '#3899ec', padding: '20px', width: '400px'}}>
<div style={{width: '400px'}} className="ltr">
<InputArea theme="paneltitle"/>
</div>
</div>
</... |
information/blendle-frontend-react-source/app/containers/ManifestContainer/ManifestDropdownWrapper/index.js | BramscoChill/BlendleParser | import React from 'react';
import { string, shape } from 'prop-types';
import ManifestDropdownContainer from 'containers/ManifestDropdownContainer';
import CSS from './style.scss';
function ManifestDropdownWrapper({ itemId, analytics }) {
return (
<div className={CSS.manifestDropdownWrapper}>
<ManifestDrop... |
examples/huge-apps/routes/Course/components/Nav.js | pheadra/react-router | import React from 'react'
import { Link } from 'react-router'
const styles = {}
styles.nav = {
borderBottom: '1px solid #aaa'
}
styles.link = {
display: 'inline-block',
padding: 10,
textDecoration: 'none'
}
styles.activeLink = {
...styles.link,
color: 'red'
}
class Nav extends React.Component {
rende... |
src/president.js | kylefdoherty/ipsum-generator | import React, { Component } from 'react';
class President extends Component {
render() {
const {displayName, prez, selected} = this.props;
const klass = selected ? 'z-depth-1' : 'z-depth-3'
return(
<div className="col col s12 m6 l3">
<label>
<img className={ klass } src={'http://... |
examples/nextjs/pages/index.js | dsslimshaddy/material-ui | // @flow
import React, { Component } from 'react';
import Button from 'material-ui/Button';
import Dialog, {
DialogTitle,
DialogContent,
DialogContentText,
DialogActions,
} from 'material-ui/Dialog';
import Typography from 'material-ui/Typography';
import withRoot from '../components/withRoot';
const styles =... |
src/containers/Home/Home.js | Viral-MediaLab/viralSitePubPub | import React, { Component } from 'react';
// import { Link } from 'react-router';
const ImageGallery = require('react-image-gallery');
const images = require('../../../data/images.json');
export default class Home extends Component {
handleSlide(index) {
// console.log('Slid to ' + index);
}
render() {
... |
src/client/index.js | uschen/react-redux-universal-rendering-starter | localStorage.debug = 'app:*';
import _debug from 'debug';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './../routes';
import configureStore from '../redux/configureStore';
import { createFor... |
app/containers/Header/index.js | easingthemes/berlinmap | /*
*
* Header
*
*/
import React from 'react';
import { connect } from 'react-redux';
import AppBar from 'material-ui/AppBar';
import selectHeader from './selectors';
// import { FormattedMessage } from 'react-intl';
// import messages from './messages';
export class Header extends React.Component { // eslint-disa... |
src/js/components/pds.js | VitorHP/TI3 | import React from 'react';
export default function Pds(props) {
return (
<svg>
<g className="pds" {...props}>
<g transform="translate(361.46546,-15.287633)">
<path d="m -359.96546,55.788253 4.919,-8.058793 2.72115,-1.988533 3.45377,-24.490358 1.88387,-4.291045 1.67456,-0.10466 1.36057,3.7... |
src/svg-icons/editor/mode-comment.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorModeComment = (props) => (
<SvgIcon {...props}>
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/>
</SvgIcon>
);
EditorModeComment = pure(EditorModeComment);
Edito... |
js/jqwidgets/demos/react/app/datatable/validation/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDataTable from '../../../jqwidgets-react/react_jqxdatatable.js';
class App extends React.Component {
render() {
let source =
{
dataFields: [
{ name: 'OrderID', type: 'int' },
... |
src/containers/book_detail.js | Jesus-Gonzalez/ReactReduxTestNumberTwo | import React from 'react';
import { connect } from 'react-redux';
const BookDetail = ({ books, activeBook }) => {
if (!books)
return (<div></div>);
if (!activeBook)
return (
<h4 className="col-xs-7">Choose a book</h4>
);
return (
<article className="col-xs-7">
<h1>{ activeBook.title }</h1... |
.storybook/config.js | yangshun/react-storybook-addon-chapters | import React from 'react';
import { configure, setAddon, addDecorator } from '@storybook/react';
import chapterAddon from '../src/';
addDecorator((story) => (
<div style={{padding: 20}}>
{story()}
</div>
));
setAddon(chapterAddon);
configure(function () {
require('../example/story');
}, module);
|
examples/src/components/CustomOption.js | jaakerisalu/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... |
examples/bookmark/moveButton.js | jjmulenex/sdk | import React from 'react';
import {connect} from 'react-redux';
import * as bookmarkAction from './action';
import * as mapActions from '@boundlessgeo/sdk/actions/map';
// Custom Bookmark Component
class MoveButtonComponent extends React.PureComponent {
// This is the where action really happens, update state and m... |
my-app/src/components/pages/projectpages/arrayexercise/Container.js | sThig/jabbascrypt | import React, { Component } from 'react';
import styled from 'styled-components';
import { ContainLeft } from '../../../helper/comps';
import { Col, Row } from 'react-flexbox-grid';
import SyntaxHighlighter from 'react-syntax-highlighter';
import { agate } from 'react-syntax-highlighter/dist/styles';
import jeditemples... |
src/components/Session/context.js | b1oki/b1oki.github.io | import React from 'react';
const AuthUserContext = React.createContext(null);
export default AuthUserContext;
|
1.YouTube-API-Search/src/components/search-bar.js | Branimir123/Learning-React | import React, { Component } from 'react';
class SearchBar extends Component {
constructor(props){
super(props);
this.state = { term: 'Search here' };
}
render() {
return (
<div className="search-bar">
<input
value={this.state.term}
onCh... |
react/L3/src/pages/GamesPage.js | luolisave/starters | import React from 'react';
import GamesList from './GamesList'
import {bindActionCreators} from 'redux';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import {initGame, selectGame} from '../actions/games'
class GamesPage extends React.Component {
constructor(){
super();
console.l... |
node_modules/react-select/examples/src/components/GithubUsers.js | ivanhristov92/bookingCalendar | import React from 'react';
import Select from 'react-select';
import fetch from 'isomorphic-fetch';
const GithubUsers = React.createClass({
displayName: 'GithubUsers',
propTypes: {
label: React.PropTypes.string,
},
getInitialState () {
return {
backspaceRemoves: true,
multi: true
};
},
onChange (val... |
client/routes.js | kenware/more-recipes | import React from 'react';
//import { Route, IndexRoute } from 'react-router';
import Home from './components/home/index';
import Detail from './components/detail/index';
import Login from './components/login/index';
import Register from './components/register/index';
import Dashbord from './components/Dashbor... |
js/components/TodoInput.js | clairefritz/todo | import React from 'react';
export default class TodoInput extends React.Component {
static propTypes = {
submitTodo: React.PropTypes.func.isRequired,
onBlur: React.PropTypes.func,
content: React.PropTypes.string,
layout: React.PropTypes.string
};
state = {
text: this.props.content || ''
};... |
src/components/DeviceAddButton.js | Bucko13/kinects-it | import React from 'react';
// import RaisedButton from 'material-ui/RaisedButton';
import { NavLink } from './NavLink';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import ContentAdd from 'material-ui/svg-icons/content/add';
import kinectsitTheme from '../assets/kinectsitTheme';
import Paper fro... |
app/javascript/mastodon/features/tutorial/components/tutorial_nav.js | masarakki/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class TutorialNav extends React.Component {
static propTypes = {
tutorialSkip: PropTypes.func.isRequired,
tutorialNextPage: PropTypes.func.isRequired,
navText: PropTypes.string.isRequired,
isLast: PropTypes.bool,
};
t... |
examples/todos-with-undo/src/containers/UndoRedo.js | heyesther/redux | import React from 'react'
import { ActionCreators as UndoActionCreators } from 'redux-undo'
import { connect } from 'react-redux'
let UndoRedo = ({ canUndo, canRedo, onUndo, onRedo }) => (
<p>
<button onClick={onUndo} disabled={!canUndo}>
Undo
</button>
<button onClick={onRedo} disabled={!canRedo}>... |
src/svg-icons/social/cake.js | mit-cml/iot-website-source | 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... |
client/util/react-intl-test-helper.js | mraq1234/mod11 | /**
* Components using the react-intl module require access to the intl context.
* This is not available when mounting single components in Enzyme.
* These helper functions aim to address that and wrap a valid,
* English-locale intl context around them.
*/
import React from 'react';
import { IntlProvider, intlSha... |
src/js/pages/OwnProposalsPage.js | nekuno/client | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import translate from '../i18n/Translate';
import connectToStores from '../utils/connectToStores';
import AuthenticatedComponent from '../components/AuthenticatedComponent';
import BottomNavBar from '../components/BottomNavBar/BottomNavBar.js... |
src/components/Digit.js | jeetiss/madskillz | import React from 'react'
import styled from 'styled-components'
const digitColor = props => props.active ? 'black' : 'transparent'
const easing = props => props.active ? 'ease-in' : 'ease-out'
const dur = props => props.active ? '.3s' : '.1s'
const PalkaCore = styled.div`
width: 16px;
background-color: ${dig... |
src/components/icons/ReminderIcon.js | austinknight/ui-components | import React from 'react';
const ReminderIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A... |
src/components/containers/files/FilesLibraryManager.js | ESTEBANMURUZABAL/my-ecommerce-template | /**
* Imports
*/
import React from 'react';
import connectToStores from 'fluxible-addons-react/connectToStores';
import {FormattedMessage} from 'react-intl';
// Flux
import FileUploadStore from '../../../stores/Files/FileUploadStore';
import IntlStore from '../../../stores/Application/IntlStore';
import uploadFile f... |
backend/editor/react/src/challenge.js | wadobo/socializa | import React, { Component } from 'react';
import TinyMCE from 'react-tinymce';
import { GameSolModal } from './common';
import { tinyMCEConfig } from './common';
export class GameChallenge extends Component {
render() {
const { game, challenge, idx, actions } = this.props;
var id = 'challenge_' ... |
docs/src/examples/elements/Icon/Groups/IconExampleTwitterGroup.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Header, Icon } from 'semantic-ui-react'
const IconExampleTwitterGroup = () => (
<Header as='h2'>
<Icon.Group size='large'>
<Icon name='twitter' />
<Icon corner name='add' />
</Icon.Group>
Add on Twitter
</Header>
)
export default IconExampleTwitterGroup
|
demo/src/containers/Form.js | ilxanlar/cathode | import React from 'react';
import { Button, Form, Grid } from '../../../src';
const sizes = ['md', 'xxs', 'xs', 'sm', 'lg', 'xl', 'xxl'];
const moods = ['primary', 'secondary', 'tertiary', 'info', 'success', 'error', 'warning'];
const rockBands = [
{ id: 1, name: 'Pink Floyd' },
{ id: 2, name: 'Metallica' },
{ ... |
app/javascript/mastodon/features/hashtag_timeline/index.js | KnzkDev/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import ColumnSettingsContainer from './... |
app/components/children/dashboard-children/formNode-children/publishForm-children/BroadcastLink.js | asconwe/formulate | import React from 'react';
const base = 'https://www.formulate.fyi' // 'http://localhost:3000' : 'https://formulate-fyi.herokuapp.com';
class BroadcastLink extends React.Component {
constructor() {
super();
}
handleFocus(event) {
event.target.select();
}
// testing
render... |
src/interface/common/ReadableList.js | fyruna/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
/**
* I think this is ugly but it works so I am going to concede and use it. Turns React elements into a human readable sentence.
* E.g. <Maintainer1><Maintainer2><Maintainer3> becomes <Maintainer1>, <Maintainer2> and <Maintainer3>
*/
const ReadableList... |
local-cli/templates/HelloWorld/index.android.js | disparu86/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class HelloWorld extends Component {
render() {
return (
<View style={styles.containe... |
examples/analyze-bundles/pages/index.js | BlancheXu/test | import React from 'react'
import Link from 'next/link'
export default class Index extends React.Component {
static getInitialProps ({ req }) {
if (req) {
// Runs only in the server
const faker = require('faker')
const name = faker.name.findName()
return { name }
}
// Runs only in... |
src/components/nodejs/plain/NodejsPlain.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './NodejsPlain.svg'
/** NodejsPlain */
function NodejsPlain({ width, height, className }) {
return (
<SVGDeviconInline
className={'NodejsPlain' + ' ' + className}
... |
client/modules/Post/tests/components/PostList.spec.js | caleb272/ProjectAccent | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... |
app/components/main/Timer.js | ayqy/ready-to-work | import React, { Component } from 'react';
import { Button, Progress } from 'antd';
import notify, { NOTIFY_TYPES } from '../../utils/notify';
import path from 'path';
const initialState = {
percent: 0,
countDown: ''
};
export default class Timer extends Component {
state = {...initialState};
render() {
co... |
app/javascript/mastodon/components/intersection_observer_article.js | maa123/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
// Diff these props in the "unrendered" state
const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'c... |
js/components/loaders/ProgressBar.ios.js | chris50bn/Between | /* @flow */
'use strict';
import React from 'react';
import { ProgressViewIOS} from 'react-native';
import NativeBaseComponent from 'native-base/Components/Base/NativeBaseComponent';
import computeProps from 'native-base/Utils/computeProps';
export default class ProgressBarNB extends NativeBaseComponent {
rend... |
components/Input/index.js | insane-ux/rebulma | // @flow
import React from 'react'
import { themr } from 'react-css-themr'
import Icon from 'components/Icon'
import cn from 'classnames'
export const defaultStyles = {
root: '',
input: '',
leftIcon: '',
rightIcon: '',
}
const Input = ({
theme,
className,
leftIcon,
rightIcon,
...props
}: {
theme:... |
.storybook/components/PaginationStory.js | hellobrian/carbon-components-react | import React from 'react';
import { storiesOf } from '@storybook/react';
import Pagination from '../../components/Pagination';
const props = {
onChange: ({ page, pageSize }) => {
console.log(`Page: ${page}`, `Page Size: ${pageSize}`); // eslint-disable-line no-console
},
pageSizes: [10, 20, 30, 40, 50],
};
... |
src/utils/deep-compare-children.js | davidkpiano/redux-simple-form | import React from 'react';
import shallowCompare from 'shallow-compare';
import shallowEqual from './shallow-equal';
export function compareChildren(props, nextProps) {
const { children } = props;
const { children: nextChildren } = nextProps;
// If the number of children changed, then children are different.
... |
app/javascript/mastodon/components/loading_indicator.js | mecab/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const LoadingIndicator = () => (
<div className='loading-indicator'>
<FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' />
</div>
);
export default LoadingIndicator;
|
docs/app/Examples/views/Statistic/Variations/Floated.js | jcarbo/stardust | import React from 'react'
import { Segment, Statistic } from 'stardust'
const Floated = () => (
<Segment>
<Statistic floated='right' label='Views' value='2,204' />
<p>
Te eum doming eirmod, nominati pertinacia argumentum ad his. Ex eam alia facete scriptorem, est autem aliquip
detraxit at. Usu o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.