path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
test/helpers.js | brentertz/react-bootstrap | import React from 'react';
import { cloneElement } from 'react';
export function shouldWarn(about) {
console.warn.called.should.be.true;
console.warn.calledWithMatch(about).should.be.true;
console.warn.reset();
}
/**
* Helper for rendering and updating props for plain class Components
* since `setProps` is de... |
packages/theme-patternfly-org/components/gdprBanner/gdprBanner.js | patternfly/patternfly-org | import React from 'react';
import { Button } from '@patternfly/react-core';
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
import './gdprBanner.css';
export const GdprBanner = () => {
const initialBannerOpen = typeof window !== 'undefined' && window.localStorage && !localStorage.getItem('... |
src/main.js | ZeusTheTrueGod/WindsurfingNetwork-client | import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './store/createStore';
import AppContainer from './containers/AppContainer';
import { configure } from 'redux-auth';
if (__DEV__) {
// Perf! making it available in the dev tools
(async function () {
const Perf = await import('... |
src/svg-icons/image/collections-bookmark.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCollectionsBookmark = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z"/>... |
app/views/Proposals/Proposal/Settings/Settings.js | RcKeller/STF-Refresh | import React from 'react'
import PropTypes from 'prop-types'
import { compose, bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { layout } from '../../../../util/form'
import api from '../../../../services'
import { Form, Input, InputNumber,... |
docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupIconShorthand.js | clemensw/stardust | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupIconShorthand = () => (
<Button.Group>
<Button icon='play' />
<Button icon='pause' />
<Button icon='shuffle' />
</Button.Group>
)
export default ButtonExampleGroupIconShorthand
|
src/routes/VISPDAT.js | kawikadkekahuna/react-native-form | import React, { Component } from 'react';
import {
View,
Text,
TouchableHighlight,
} from 'react-native';
import {
Actions
} from 'react-native-router-flux';
class Vispdat extends Component {
render() {
return (
<TouchableHighlight onPress={Actions.home}>
<View>
<Text> ...like if... |
lib/components/Github/Github.js | vandreleal/react-social-github | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './Github.css';
import { MarkGithubIcon } from 'react-octicons';
import Tooltip from '../Tooltip/Tooltip';
import Widget from '../Widget/Widget';
import GithubUser from '../GithubUser/GithubUser';
import GithubRepo from '../GithubRepo... |
ajax/libs/recompose/0.20.1/Recompose.js | brix/cdnjs | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["Recompose"] = facto... |
docs/src/app/components/pages/components/List/Page.js | matthewoates/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import listReadmeText from './README';
import listExampleSimpleCode from '!raw!.... |
examples/instant-feedback/index.js | jaredpalmer/formik | import React from 'react';
import ReactDOM from 'react-dom';
import { useFormik, FormikProvider, Form, useField } from 'formik';
import './styles.css';
import * as Yup from 'yup';
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const TextInputLiveFeedback = ({ label, helpText, ...props }) => {
const [f... |
app/javascript/mastodon/features/ui/util/react_router_helpers.js | RobertRence/Mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Switch from 'react-router-dom/Switch';
import Route from 'react-router-dom/Route';
import ColumnLoading from '../components/column_loading';
import BundleColumnError from '../components/bundle_column_error';
import BundleContainer from '../container... |
docs/app/Examples/modules/Checkbox/States/index.js | vageeshb/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'semantic-ui-react'
const CheckboxStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExam... |
application/components/checkout/checkoutSummary/index.js | ronanamsterdam/squaredcoffee | import React, { Component } from 'react';
import { Text, View, ScrollView } from 'react-native';
import Button from 'react-native-button';
import {
Card,
CardImage,
CardTitle,
CardContent,
CardAction
} from 'react-native-card-view';
import { connect } from 'react-redux';
import { bindActionCreators } from ... |
web/src/IndexerList.js | cardigann/cardigann | import React, { Component } from 'react';
import { Table, ButtonToolbar, Button, Panel } from 'react-bootstrap';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
import CopyToClipboard from 'react-copy-to-clipboard';
import xhrUrl from './xhr';
function capitalizeFirstLetter(string) {
return string.charAt(... |
app/react-icons/fa/user-plus.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaUserPlus extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m13.7 20q-3.1 0-5.3-2.2t-2.2-5.3 2.2-5.2 5.3-2.2 5.2 2.2 2.2 5.2-2.2 5.3-5.... |
actor-apps/app-web/src/app/components/modals/create-group/Form.react.js | way1989/actor-platform | import _ from 'lodash';
import Immutable from 'immutable';
import keymirror from 'keymirror';
import React from 'react';
import { Styles, TextField, FlatButton } from 'material-ui';
import CreateGroupActionCreators from 'actions/CreateGroupActionCreators';
import ContactStore from 'stores/ContactStore';
import Cont... |
client/components/About/About.js | bjoberg/social-pulse | // React
import React from 'react';
import styles from '../../main.css';
import { problem, solution, customer, testing, justification } from "./aboutText";
export function About() {
return (
<div className={styles.container}>
<h1>About Social Pulse</h1>
<h2>The idea behind the project.</h2>
<h3... |
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/NavLink.js | GoogleCloudPlatform/prometheus-engine | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
disabled: PropTypes.bool,
active... |
docs/src/app/components/pages/components/IconButton/ExampleSize.js | w01fgang/material-ui | import React from 'react';
import IconButton from 'material-ui/IconButton';
import ActionHome from 'material-ui/svg-icons/action/home';
const styles = {
smallIcon: {
width: 36,
height: 36,
},
mediumIcon: {
width: 48,
height: 48,
},
largeIcon: {
width: 60,
height: 60,
},
small: {
... |
manabi/static/js/draft-js-furigana-plugin/Furigana/index.js | aehlke/manabi | import React from 'react';
import { Entity } from 'draft-js';
import { fromJS } from 'immutable';
const TextWithFurigana = (props) => {
const furigana = fromJS(Entity.get(props.entityKey).getData().furigana);
const entityKey = props.entityKey
return (
<ruby>
{props.children}
<rt><b... |
e2e-tests/production-runtime/src/utils/instrument-page.js | 0x80/gatsby | import React from 'react'
export default Page =>
class extends React.Component {
addLogEntry(action) {
if (typeof window !== `undefined`) {
window.___PageComponentLifecycleCallsLog.push({
action,
pageComponent: this.props.pageResources.page.componentChunkName,
location... |
node_modules/react-bootstrap/es/Modal.js | NickingMeSpace/questionnaire | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... |
Paths/React/05.Building Scalable React Apps/5-react-boilerplate-building-scalable-apps-m5-exercise-files/Before/app/containers/HomePage/index.js | phiratio/Pluralsight-materials | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor it and remove
* the ... |
app/javascript/mastodon/components/column_back_button.js | pfm-eyesightjp/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class ColumnBackButton extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
handleClick = () => {
if (window.history && window.history.length === 1)... |
src/icons/GlyphFolder.js | ipfs/webui | import React from 'react'
const GlyphFolder = props => (
<svg viewBox='0 0 18.42 21' {...props}>
<path
d='M16.85 8v-.6a1.34 1.34 0 0 0-1.3-1.4h-5.2L8.4 4.66H3.85A1.33 1.33 0 0 0 2.55 6v2z'
opacity={0.45}
/>
<path
d='M2.55 8.32V15a1.31 1.31 0 0 0 1.3 1.32h11.7a1.31 1.31 0 0 0 1.3-1.32V8.... |
src/layouts/mainRender.js | TylerK/react-multi-platform | import React from 'react';
import Todo from '../containers/todo/todo';
import '../styles/index.css';
export default function (props, state) {
return <Todo />
};
|
src/Main/DevelopmentTab.js | hasseboulen/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPECS from 'common/SPECS';
import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import Icon from 'common/Icon';
import ItemLink from 'common/ItemLink';
import SpellLink from 'common/SpellLink';
import getItemQualityLabel from 'commo... |
src/svg-icons/notification/airline-seat-recline-extra.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatReclineExtra = (props) => (
<SvgIcon {...props}>
<path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0... |
src/lib/gui/components/AddHttpBehaviourForm/index.js | xclix/chan | import React from 'react';
import PropTypes from 'prop-types';
import {
Field,
reduxForm,
FormSection,
FieldArray,
SubmissionError
} from 'redux-form';
import Select from 'react-select';
import ResponseReactionSection from './ResponseReactionSection';
import { submitSucceededAction, submitFailedAction } from ... |
ajax/libs/react-instantsearch/4.1.0-beta.4/Connectors.js | ahocevar/cdnjs | /*! ReactInstantSearch 4.1.0-beta.4 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && ... |
src/index.js | andrkrn/react-weather | import React from 'react';
import ReactDOM from 'react-dom';
import WeatherApp from './components/WeatherApp';
import '../node_modules/normalize.css/normalize.css';
import './index.css';
ReactDOM.render(
<WeatherApp />,
document.getElementById('root')
);
|
docs/app/Examples/modules/Dimmer/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import States from './States'
import Types from './Types'
import Variations from './Variations'
import Usage from './Usage'
const DimmerExamples = () => (
<div>
<Types />
<States />
<Variations />
<Usage />
</div>
)
export default DimmerExamples
|
demo/index.js | scottlepich/react-input-box-done-typing | import React from 'react';
import ReactDOM from 'react-dom';
import InputBoxDoneTyping from '../src/InputBoxDoneTyping';
const App = (props) => {
return (
<div className="container">
<div className="row">
<InputBoxDoneTyping
defaultValue="lon"
onChange={(value) => { console.log(... |
examples/getstarted/src/plugins/myplugin/admin/src/components/PluginIcon/index.js | wistityhq/strapi | /**
*
* PluginIcon
*
*/
import React from 'react';
import Puzzle from '@strapi/icons/Puzzle';
const PluginIcon = () => <Puzzle />;
export default PluginIcon;
|
Libraries/Components/TextInput/TextInput.js | Bhullnatik/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
docs/src/HomePage.js | andrew-d/react-bootstrap | import React from 'react';
import NavMain from './NavMain';
import PageFooter from './PageFooter';
import Grid from '../../src/Grid';
import Alert from '../../src/Alert';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
export default class HomePage extends React.Component{
render()... |
docs/src/app/components/pages/components/IconButton/ExampleTouch.js | pomerantsev/material-ui | import React from 'react';
import IconButton from 'material-ui/IconButton';
import ActionGrade from 'material-ui/svg-icons/action/grade';
const IconButtonExampleTouch = () => (
<div>
<IconButton tooltip="bottom-right" touch={true} tooltipPosition="bottom-right">
<ActionGrade />
</IconButton>
<IconB... |
client/square.js | carpeliam/kriegspieljs | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { DropTarget } from 'react-dnd';
import Piece from './piece';
import Game from '../lib/game';
import { move } from './actions';
const squareTarget = {
canDrop({ canDrop, x, y }, monitor) {
return canDrop(... |
Libraries/Components/Keyboard/Keyboard.js | makadaw/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
examples/official-storybook/stories/addon-viewport/default.stories.js | storybooks/storybook | import React from 'react';
import { styled } from '@storybook/theming';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
const Panel = styled.div();
export default {
title: 'Addons/Viewport',
parameters: {
viewport: {
viewports: INITIAL_VIEWPORTS,
},
},
};
export const DefaultFn = ()... |
src/frontend/app.js | gregweston/fullcourtreport | import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter, Route, Link, Switch} from 'react-router-dom';
import Date from './components/Date.jsx'
import Game from './components/Game.jsx'
import NotFound from './components/NotFound.jsx'
ReactDOM.render(
<BrowserRouter>
<Switch>
<Route pa... |
app/javascript/mastodon/features/home_timeline/index.js | NS-Kazuki/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { expandHomeTimeline } from '../../actions/timelines';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader from '../../comp... |
docs/src/examples/elements/List/ContentVariations/ListExampleFloated.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Button, Image, List } from 'semantic-ui-react'
const ListExampleFloated = () => (
<List divided verticalAlign='middle'>
<List.Item>
<List.Content floated='right'>
<Button>Add</Button>
</List.Content>
<Image avatar src='/images/avatar/small/lena.png' />... |
src/main.js | deflexor/react_route_seek | /**
* App entry point
*/
// Polyfill
import 'babel-polyfill';
// Libraries
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory, hashHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
// Needed for onTouchTap
// Can go away when react 1... |
app/javascript/mastodon/features/ui/components/upload_area.js | sylph-sin-tyaku/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';
export default class UploadArea extends React.PureComponent {
static propTypes = {
active: PropTypes.boo... |
springboot/GReact/src/main/resources/static/app/components/activities/components/Activities.js | ezsimple/java | import React from 'react'
import classnames from 'classnames'
import Moment from '../../utils/Moment'
import getJSON from '../../utils/getJSON'
import Message from './Message'
import Notification from './Notification'
import Task from './Task'
const Components = {
message: Message,
notification: Notification,
ta... |
docs/src/app/components/pages/components/LinearProgress/Page.js | hwo411/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import linearProgressReadmeText from './README';
import LinearProgressExampleSim... |
app/javascript/mastodon/components/media_gallery.js | kibousoft/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { is } from 'immutable';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';
import class... |
src/components/Framework.react.js | bygloam/desktop | import $ from 'jquery';
import _ from 'underscore';
import React from 'react';
import Router from 'react-router';
import Sidebar from './Sidebar.react';
import Header from './Header.react';
import SubHeader from './SubHeader.react';
import metrics from '../utils/MetricsUtil';
import shell from 'shell';
import RetinaIma... |
src/parser/priest/holy/modules/talents/100/HolyWordSalvation.js | sMteX/WoWAnalyzer | import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import TalentStatisticBox, { STATISTIC_ORDER } from 'interface/others/TalentStatisticBox';
import React from 'react';
import Renew from 'parser/priest/holy/modules/spells/Renew';
import PrayerOfMending from 'parser/priest/holy/modules/spel... |
src/pages/Coronavirus/index.js | ProteinsWebTeam/interpro7-client | import React from 'react';
import Redirect from 'components/generic/Redirect';
const Coronavirus = () => {
return (
<Redirect
to={{
description: {
main: { key: 'proteome' },
proteome: { db: 'uniprot', accession: 'UP000464024' },
},
}}
/>
);
};
export defaul... |
src/with-click-outside.js | viralganatra/react-clickoutside | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import invariant from 'invariant';
import EVENT from './events';
export default function withClickOutside({ ...containerProps }) {
return function ClickOutsideHOC(WrappedComponent) {
invariant(
typeof WrappedComponent... |
src/components/withTracker/index.js | browne0/malik-react-portfolio | import React, { Component } from 'react';
import ReactGA from 'react-ga'
ReactGA.initialize('UA-106199608-1');
const withTracker = (WrappedComponent, options = {}) => {
const trackPage = page => {
ReactGA.set({
page,
...options,
});
ReactGA.pageview(page);
};
const HOC = class extends C... |
src/svg-icons/action/picture-in-picture-alt.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPictureInPictureAlt = (props) => (
<SvgIcon {...props}>
<path d="M19 11h-8v6h8v-6zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H3V4.97h18v14.05z"/>
</Svg... |
examples/custom-server-polka/pages/index.js | BlancheXu/test | import React from 'react'
import Link from 'next/link'
export default () => (
<ul>
<li>
<Link href='/b' as='/a'>
<a>a</a>
</Link>
</li>
<li>
<Link href='/a' as='/b'>
<a>b</a>
</Link>
</li>
</ul>
)
|
src/components/common/LogoutLink.js | RanjithNair/RJTube | import React from 'react'
const LogoutLink = ({ signOut }) =>
<a href='#' className='nav-link' onClick={signOut}>
Logout
</a>
LogoutLink.propTypes = {
signOut: React.PropTypes.func.isRequired
}
export default LogoutLink
|
src/lib/validation.js | mattybow/state-of-heads | /*
Simple serial "one by one" sync/async promises based validation.
*/
import Promise from 'bluebird';
import React from 'react';
import validator from 'validator';
export class ValidationError extends Error {
constructor(message: string, prop: string) {
super();
this.message = message;
this.prop = pro... |
pages/authUser.js | alivelee/NextTech | import React from 'react';
class AuthUser extends React.Component {
render(){
return (
<p>Loading</p>
)
}
}
export default AuthUser; |
src/components/Panel/index.js | cowback/charcode-client | import React from 'react'
import cn from 'utils/cn'
import './panel.css'
const Panel = ({
tag: Tag = 'div',
className,
children,
fit,
inset,
x,
y,
below,
between,
inline,
row,
column,
direction,
flex,
align,
justify,
wrap,
innerRef,
sizing,
centered,
style
}) => (
<Tag
... |
node_modules/react-bootstrap/es/Clearfix.js | C0deSamurai/muzjiks | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
app_learn/src/containers/Tab1/flat03Demo.js | liuboshuo/react-native | /**
* Created by liushuo on 17/7/18.
*/
/**
* Created by liushuo on 17/7/18.
*/
import React, { Component } from 'react';
import {
View,
Text,
Image,
StyleSheet,
Platform,
FlatList
} from 'react-native';
import NavigationBar from '../../component/navBarCommon'
import back from './../../sourc... |
app/containers/Blog/index.js | cbradley3/CharlieBradleyIII |
/*
*
* Blog
*
*/
import React from 'react';
import Helmet from 'react-helmet';
import Responsive from 'react-responsive';
import {Link} from "react-router";
import FlatButton from "material-ui/FlatButton";
import NavBar2 from 'components/NavBar2';
export default class Blog extends React.PureComponent {
... |
examples/dropzone/index.js | ahbing/Pure | import React, { Component } from 'react';
import { render } from 'react-dom';
import { Dropzone } from '../../src/';
render(
<Dropzone className='my-dropzone' autoUpload={false} accept='image/*'/>,
document.getElementById('root')
);
|
src/index.js | jarvisaoieong/react-redux | import React from 'react';
import createAll from './components/createAll';
export const { Provider, connect } = createAll(React);
|
src/components/posts_index.js | AmmarCloudtech/Simple-Blog | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions/index';
import { Link } from 'react-router';
class PostsIndex extends Component {
componentWillMount() {
this.props.fetchPosts();
}
renderPosts() {
return this.props.posts.map((post) ... |
examples/hapi/handler.js | ninja/ruto | import {Provider} from 'react-redux';
import React from 'react';
import {RouterContext} from 'react-router';
import {createServerStore} from '../store';
import {renderToStaticStyle} from '../style';
import {renderToString} from 'react-dom/server';
export function handler ({props, reply, request}) {
const style = ren... |
Libraries/Image/Image.ios.js | cosmith/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
docs/src/pages/index.js | aldanor/nuclear-js | import React from 'react'
import Wrapper from '../layouts/wrapper'
import ItemFilterExample from '../components/item-filter-example'
import UsageExample from '../components/usage-example'
import Nav from '../components/nav'
export default React.createClass({
render() {
return <Wrapper>
<Nav />
<div c... |
client/containers/Singleplayer.js | marksanghoonkim/nimblecode | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { changeLevel, getListOfPrompts, changeLanguage } from '../actions/index';
import { bindActionCreators } from 'redux';
import { browserHistory } from 'react-router';
import axios from 'axios';
import CodeEditor from './CodeEditor';
... |
app/components/MatchList/MatchList.js | arnef/ligatool-hamburg | import React from 'react';
import { connect } from 'react-redux';
import Container from '../Container';
import Text from '../Text';
import MatchItem from '../MatchItem';
import styles from './styles';
function MatchList(props) {
return (
<Container
error={props.error}
refreshing={props.refreshing}
... |
generators/app/templates/reactjs/src/app/main.js | TrigenSoftware/generator-trigen-frontend | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import Clicker from './clicker/clicker';
ReactDOM.render(
<Clicker/>,
document.querySelector('#view')
);
|
src/components/EventTable.js | branchology/branchology | import React from 'react';
import NoRecords from './NoRecords';
const EventTable = ({events, title = 'Events'}) => (
<div>
<div className="box box-info">
<div className="box-header with-border">
<h3 className="box-title">
<i className="fa fa-calendar" /> {title}
</h3>
&nbs... |
plugins/Files/js/components/redundancystatus.js | NebulousLabs/New-Sia-UI | import PropTypes from 'prop-types'
import React from 'react'
const colorNotAvailable = '#FF8080'
const colorGoodRedundancy = '#20EE82'
const colorNegativeRedundancy = '#b7afaf'
const RedundancyStatus = ({ available, redundancy, uploadprogress }) => {
const indicatorStyle = {
opacity: (() => {
if (!availab... |
app/components/shared/FormRadioGroup.js | fotinakis/buildkite-frontend | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import FormInputHelp from './FormInputHelp';
import FormInputErrors from './FormInputErrors';
class FormRadioGroup extends React.Component {
static propTypes = {
options: PropTypes.arrayOf(
PropTypes.shape(... |
static/src/components/Header/index.js | unmeshpro/easyPost | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import AppBar from 'material-ui/AppBar';
import LeftNav from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import FlatButton fr... |
ReactApp/util.ios.js | johnsiwicki/tbsrn | /**
* Global Util Functions
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
'use strict';
// React Plugins
// import React, { Component } from 'react';
var UTIL = {
/**
* Test if Obj is empty
*/
objIsEmpty: function(obj) {
for(var prop in obj) {
if(obj.hasOwn... |
src/components/Crawler/Jobs/JobItem/stories.js | saitodisse/scrap-cerebral-2 | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import JobItem from './index';
import { job_stub } from '../../../stubs/jobs';
import '../../../../../vendors/semantic/semantic.css';
storiesOf('JobItem', module)
.add('job_1', () => (
<JobItem job={job_stub}/>
))
;
|
src/server/routes/collection.js | bookbrainz/bookbrainz-site | /*
* Copyright (C) 2020 Prabal Singh
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distr... |
src/HoC/ButtonHoC/CreateAdvancedButton.js | LemonsLab/Quiz | import React from 'react';
import {
TouchableHighlight,
View,
} from 'react-native';
const CreateAdvancedButton = (params) => (WrapperComponent) => class Button extends React.Component {
constructor(props){
super(props)
}
render(){
return(
<TouchableHighlight>
... |
src/page/MenuPage.js | jerryshew/react-uikits | import React, { Component } from 'react';
import {CN, TitleBlock} from '../util/tools';
import {Menu, SubMenu, MenuGroup, MenuItem} from '../component';
import CodeView from './CodeView';
const formatChild = (props) => {
return (
<Menu {...props}>
<SubMenu title={<div>
<i c... |
components/Animate/Counter.js | rdjpalmer/bloom | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Motion, spring } from 'react-motion';
export default class Counter extends Component {
static propTypes = {
transform: PropTypes.func,
startValue: PropTypes.number,
endValue: PropTypes.number.isRequired,
className:... |
app/components/Logout/Logout.js | guilsa/ducker | import React from 'react'
import { text } from './styles.css'
export default function Logout (props) {
return (
<div className={text}>{'You are not logged out'}</div>
)
}
|
src/components/subjects/BookSubjectList.js | great-design-and-systems/cataloguing-app | import { BookSubjectItem } from './BookSubjectItem';
import PropTypes from 'prop-types';
import React from 'react';
export const BookSubjectList = ({ managedBook, removeSubject }) => {
return (<ul className="list-group">
{managedBook.subjects.map((subject, index) => (<BookSubjectItem removeSubject={() => {... |
boilerplate/App/Navigation/index.js | TelaClaims/ignite-tela-boilerplate | import React from 'react'
import * as ReactNavigation from 'react-navigation'
import { connect } from 'react-redux'
import RootNav from './root-nav'
// here is our redux-aware our smart component
function ReduxNavigation (props) {
const { dispatch, nav } = props
const navigation = ReactNavigation.addNavigationHelp... |
src/bundles/CaseStudy/components/View/View.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import isEmpty from 'lodash/isEmpty';
import { newline, validURL } from '../../../../helpers';
import view from './View.css'
class View extends React.Component {
state = { showConfirm: false }
toggleConfirm(sh... |
web-ui/src/common/snackbar_notification/snackbar_notification.js | pixelated/pixelated-user-agent | /*
* Copyright (c) 2017 ThoughtWorks, Inc.
*
* Pixelated is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pixelated i... |
node_modules/react-bootstrap/es/CarouselCaption.js | caughtclean/but-thats-wrong-blog | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
packages/react-scripts/fixtures/kitchensink/src/index.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 ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById(... |
src/view/components/noteAttributeSelect.js | tkaetzel/sympho.net | import React from 'react';
import Select from './select.js'
let NoteAttributeSelect = props =>
<Select
id={props.attribute}
change={props.changeNote}
options={props.options}
value={props.note[props.attributeCategory][props.attribute].toString()}
useIndexAsText={true}
/>... |
src/index.js | dingww/gallery-by-react | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
client/src/components/Dashboard.js | zinsani/calmemo | // @flow
import React, { Component } from 'react';
import TextEditor from './TextEditor';
class Dashboard extends Component {
render() {
return (
<div>
<h2>Dashboard</h2>
<div className="row">
<div className="col">
<TextEditor />
</div>
</div>
<... |
stories/helpers.js | VulcanJS/Vulcan | import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';
import { registerComponent } from 'meteor/vulcan:core';
export function capitalize (string) {
return string.replace(/\-/, ' ').split(' ').map(word => {
return word.charAt(0).toUpperCase() + word.slice(1);
}).join(' ');
}
export functi... |
client/userinterface/DialogBox/InputText.js | benstuijts/darkage-framework | import React from 'react';
export default class InputText extends React.Component {
render() {
return(
<div class="InputText">
<input type="text" placeholder="__"/>
</div>
);
}
} |
app/src/components/Footer/index.js | AlexandreBourdeaudhui/abourdeaudhui.fr | /*
* Package Import
*/
import React from 'react';
/*
* Local Import
*/
// Composant
import Social from './Social';
import Links from './Links';
/*
* Component
*/
const Footer = () => {
const getYear = new Date().getFullYear();
/*
* View
*/
return (
<footer id="footer">
<div id="footer-c... |
app/javascript/mastodon/features/compose/components/warning.js | Nyoho/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
export default class Warning extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
};
render () {
const { mes... |
client/components/CategoriesBar/CategoriesBar.js | Dokvel/outfit_ua | /**
* Created by alex on 03.10.16.
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Link } from 'react-router';
import cn from 'classnames';
import { getCategoryLink } from '../../util/productHelpers';
import styles from './CategoriesBar.css';
export default function Categories... |
node_modules/react-router/es/Router.js | together-web-pj/together-web-pj | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _classCallCheck(instance, Constructor) { if (!(insta... |
modules/Router.js | nottombrown/react-router | import React from 'react'
import warning from 'warning'
import createHashHistory from 'history/lib/createHashHistory'
import { createRoutes } from './RouteUtils'
import RoutingContext from './RoutingContext'
import useRoutes from './useRoutes'
import { routes } from './PropTypes'
const { func, object } = React.PropTyp... |
local-cli/generator/templates/index.ios.js | InterfaceInc/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';
class <%= name %> extends Component {
render() {
return (
<View style={styles.container}>
<T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.