path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/js/components/Header.js | arcsecw/myfd | import React from 'react';
import {
Link,
} from 'react-router';
import {
Topbar,
CollapsibleNav,
Nav,
NavItem,
Icon,
Badge,
Dropdown,
} from 'amazeui-react';
import auth from './auth'
import Logout from '../pages/Logout';
const Header = React.createClass({
handleClick() {
if (matchMedia && matchM... |
src/people/PeopleList.js | dash-/netjumpio-tabs-web | ///
// Dependencies
///
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as types from './types';
import CardsList from '../elements/CardsList';
import PeopleListItem from './PeopleListItem';
///
// View
///
class PeopleListView extends Component {
renderPeople(people) {
... |
mochasetup.js | panayi/react-styleguidist | import React from 'react';
import { expect } from 'chai';
import expectReactShallow from 'expect-react-shallow';
import 'css-modules-require-hook';
global.React = React;
global.expect = expect;
global.expectReactShallow = expectReactShallow;
|
app/containers/NotFoundPage/index.js | GuiaLa/guiala-web-app | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import Navbar from 'Navbar';
export function NotFound() {
return (
<div>
<Navbar />
... |
node_modules/react-select/src/Option.js | xuan6/admin_dashboard_local_dev | import React from 'react';
import createClass from 'create-react-class';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const Option = createClass({
propTypes: {
children: PropTypes.node,
className: PropTypes.string, // className (based on mouse position)
instancePrefix: Pr... |
node_modules/react-router/es/Router.js | ge6285790/test | 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... |
src/svg-icons/action/turned-in.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTurnedIn = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionTurnedIn = pure(ActionTurnedIn);
ActionTurnedIn.displayName = 'Ac... |
examples/src/components/BooleanSelect.js | Dem0n3D/react-select | import React from 'react';
import Select from 'react-select';
var ValuesAsBooleansField = React.createClass({
displayName: 'ValuesAsBooleansField',
propTypes: {
label: React.PropTypes.string
},
getInitialState () {
return {
options: [
{ value: true, label: 'Yes' },
{ value: false, label: 'No' }
]... |
src/calculator/HouseBuildingCalc.js | alelk/houses-building-website | /**
* House Building Calculator
*
* Created by Alex Elkin on 23.10.2017.
*/
import calculateFoundationCost from './foundationCalc'
import React from 'react';
import PropTypes from 'prop-types'
import {Card, CardTitle, CardText} from 'material-ui/Card';
import Slider from 'material-ui/Slider';
import SelectField f... |
src/routes/poll/index.js | binyuace/vote | import React from 'react';
import { connect } from 'react-redux';
import Layout from '../../components/Layout';
import initialPoll from '../../actions/initialPoll';
import Poll from '../../components/Poll';
import voteAsync from '../../actions/voteAsync';
import Votes from './Votes';
import NewVote from './NewVote';
im... |
src/components/Header/Header.js | veskoy/ridiko | /**
* 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... |
app/javascript/mastodon/features/status/index.js | Arukas/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchStatus } from '../../actions/statuses';
import MissingIndicator from '../../components/missing_indicator';
... |
gh-page/src/Components/GitHubRepoList.js | metodiobetsanov/metodiobetsanov.github.io | import React from 'react';
import axios from 'axios';
import CardHeader from "@material-ui/core/CardHeader";
import {Divider, makeStyles} from "@material-ui/core";
import CardContent from "@material-ui/core/CardContent";
import List from "@material-ui/core/List";
import Card from "@material-ui/core/Card";
import GitHub... |
1.YouTube-API-Search/src/components/video-list-item.js | Branimir123/Learning-React | import React from 'react';
const VideoListItem = ({video, onVideoSelect}) => {
const imageUrl = video.snippet.thumbnails.default.url;
const videoTitle = video.snippet.title;
return (
<li onClick={() => onVideoSelect(video)} className="list-group-item">
<div className="video-list media"... |
src/components/images/adventure-boss.js | vFujin/HearthLounge | import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
const ExtensionBossImg = ({extension, wing, boss}) =>{
return <img src={boss.img} alt={_.startCase(boss.url)} />;
};
export default ExtensionBossImg;
ExtensionBossImg.propTypes = {
extension: PropTypes.string.isRequired,
win... |
app/javascript/mastodon/features/ui/components/column_subheading.js | dwango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
|
app/javascript/mastodon/features/ui/components/doodle_modal.js | Chronister/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Button from '../../../components/button';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Atrament from 'atrament'; // the doodling library
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immut... |
src/popup/components/Pack/MorePakage.js | fluany/fluany | /**
* @fileOverview A component to click and see more packages
* @name MorePakage.js
* @license GNU General Public License v3.0
*/
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { changePagination } from 'actions/flags'
import * as translator from 'shared/... |
app/containers/LocaleToggle/index.js | omniva/react | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
frontend/src/app/components/ExperimentPreFeedbackDialog.js | mozilla/testpilot | import React from 'react';
import classnames from 'classnames';
export default class ExperimentPreFeedbackDialog extends React.Component {
render() {
const { experiment, surveyURL } = this.props;
const l10nArgs = JSON.stringify({
title: experiment.title
});
return (
<div className="mod... |
src/containers/app/vouchers/voucher_summary.js | w280561543/financial | import React from 'react';
class VoucherSummary extends React.Component {
render() {
return(<div>VoucherSummary</div>);
}
}
export default VoucherSummary; |
src/svg-icons/image/filter-frames.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterFrames = (props) => (
<SvgIcon {...props}>
<path d="M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM18 8H6v10h12"/>
</... |
lib/animatedPull.ios.js | evetstech/react-native-animated-ptr | import React from 'react'
import {
View,
StyleSheet,
Animated,
} from 'react-native'
import TimedAnimation from '../animations/TimedAnimation';
import ScrollAnimation from '../animations/ScrollAnimation';
import FadeAnimation from '../animations/FadeAnimation';
class AnimatedPTR extends React.Component {
const... |
src/scripts/views/components/avatar.js | TayLang/IronPong | import React from 'react'
import ACTIONS from '../../actions.js'
import STORE from '../../store.js'
var Avatar = React.createClass({
render: function(){
return(<div className = 'avatar-wrapper'>
</div>)
}
})
export default Avatar |
src/store/shared/containers/category.js | cezerin/cezerin | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { mapStateToProps, mapDispatchToProps } from '../containerProps';
import { CategoryContainer } from 'theme';
export default withRouter(
connect(
mapStateToProps,
mapDispatchToProps
)(CategoryContai... |
test/integration/initial-ref/pages/index.js | JeromeFitz/next.js | import React from 'react'
class App extends React.Component {
constructor() {
super()
this.divRef = React.createRef()
this.state = {
refHeight: 0,
}
}
componentDidMount() {
const refHeight = this.divRef.current.clientHeight
this.setState({ refHeight })
}
render() {
const... |
src/components/LocaleFormattedMessage/index.js | hasibsahibzada/quran.com-frontend | import React from 'react';
import { intlShape, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
const LocaleFormattedMessage = ({ id, defaultMessage, intl, values, className }) => (
<span className={`${intl.messages.local} ${className}`}>
<FormattedMessage id={id} defaultMess... |
src/routes/Login/Login.js | peksi/ilmomasiina | import React from 'react';
import PropTypes from 'prop-types';
import Formsy from 'formsy-react';
import { Input } from 'formsy-react-components';
import { connect } from 'react-redux';
import * as AdminActions from '../../modules/admin/actions';
class Login extends React.Component {
static propTypes = {
loginE... |
src/components/user/LoginFormContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import { FormattedMessage, FormattedHTMLMessage, injectIntl } from 'react-intl';
import LoginForm from './LoginForm';
import PageTitle from '../common/PageTitle'... |
indico/modules/events/editing/client/js/management/editable_type/review_conditions/context.js | pferreir/indico | // This file is part of Indico.
// Copyright (C) 2002 - 2021 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
import React from 'react';
const ReviewConditionsContext = React.createContext(null);
export defaul... |
tests/Rules-equals-spec.js | yesmeck/formsy-react | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import immediate from './utils/immediate';
import Formsy from './..';
import { InputFactory } from './utils/TestInput';
const TestInput = InputFactory({
render() {
return <input value={this.getValue()} readOnly/>;
}
});
const TestFor... |
src/components/ui/List.js | shojil/bifapp | /**
* List
*
<List><ListView /></List>
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { List } from 'react-native-elements';
// Consts and Libs
import { AppColors } from '@theme/';
/*... |
src/Grid.js | tonylinyy/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
const Grid = React.createClass({
propTypes: {
/**
* Turn any fixed-width grid layout into a full-width layout by this property.
*
* Adds `container-fluid` class.
*/
fluid... |
src/index.js | dynamitechetan/susi_skill_wiki | import React from 'react';
import ReactDOM from 'react-dom';
// import registerServiceWorker from './registerServiceWorker';
import Sidebar from './components/Sidebar/Sidebar';
import Header from './components/Header/Header';
import Chatbox from "./components/Chatbox/Chatbox";
import Home from "./components/Home/Home";... |
app/scenes/Info/components/CodeOfConduct/index.js | Thinkmill/react-conf-app | // @flow
import React, { Component } from 'react';
import Icon from 'react-native-vector-icons/Ionicons';
import {
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import theme from '../../../../theme';
import Modal from '../../../../components/Modal';
export default class CodeOf... |
client/components/Input/BorderBottom.js | jkettmann/universal-react-relay-starter-kit | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import classnames from 'classnames'
const Wrapper = styled.div`
position: relative;
width: 100%;
margin-top: 3px;
`
const InactiveBorderBottom = styled.div`
width: 100%;
height: 1px;
background: ${props => ... |
src/config.js | uber-common/vis-academy | import React from 'react';
export const PROJECT_TYPE = 'github'; // 'github' || 'phab'
export const PROJECT_NAME = 'vis-academy';
export const PROJECT_ORG = 'uber-common';
export const PROJECT_URL = `https://github.com/${PROJECT_ORG}/${PROJECT_NAME}`;
export const PROJECT_DESC = 'An introduction to Uber Visualization... |
client/apps/web/routes.js | defe266/keystone-starter | import React from 'react'
import { Route, IndexRoute } from 'react-router'
var sd = require('sharify').data;
var I18N = sd.I18N;
//import Counter from './components/Counter.js'
import App from './components/index';//./containers/
import Home from './components/pages/Home';
import Page from './components/pages/Page';
i... |
components/tree/demo/loadData.js | TDFE/td-ui | /* eslint-disable no-unused-vars */
import React from 'react';
import ReactDOM from 'react-dom';
let Tree = require('../index').default;
let TreeNode = Tree.TreeNode;
function generateTreeNodes(treeNode) {
const arr = [];
const key = treeNode.props.eventKey;
for (let i = 0; i < 3; i++) {
arr.push({ name: `l... |
src/Parser/DemonologyWarlock/Modules/Features/GrimoireOfService.js | mwwscott0/WoWAnalyzer | import React from 'react';
import Module from 'Parser/Core/Module';
import AbilityTracker from 'Parser/Core/Modules/AbilityTracker';
import Combatants from 'Parser/Core/Modules/Combatants';
import { calculateMaxCasts } from 'Parser/Core/getCastEfficiency';
import SPELLS from 'common/SPELLS';
import SpellLink from 'co... |
src/modules/AppRouter.js | Kortelainen/Softala3SuperAda | /*eslint-disable react/prop-types*/
import React from 'react';
import CounterViewContainer from './counter/CounterViewContainer';
import ColorViewContainer from './colors/ColorViewContainer';
import ExampleViewContainer from './exampleView/ExampleViewContainer';
import LoginViewContainer from './login/LoginViewContain... |
src/main.js | abdih17/celebrityMatch | import React from 'react'
import ReactDom from 'react-dom'
import App from './component/app'
ReactDom.render(<App />, document.getElementById('root'))
|
src/components/common/svg-icons/action/android.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAndroid = (props) => (
<SvgIcon {...props}>
<path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8... |
tests/fixtures/fixture-children-jsx.js | brekk/glass-menagerie | import React from 'react'
const types = React.PropTypes
export const ComponentWithKids = (props) => (
<article>
<h1>{props.text}</h1>
{props.children}
</article>
)
ComponentWithKids.propTypes = {
text: types.string.isRequired,
children: types.node
}
export default ComponentWithKids
|
app/components/stations/StationValuesGrid.js | sheldhur/Vector | import { remote } from 'electron';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Icon, Popconfirm } from 'antd';
import moment from 'moment';
import resourcePath ... |
src/components/article/tools/MobileArticleTools.js | hanyulo/twreporter-react | import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
import Link from 'react-router/lib/Link'
import { LINK_PREFIX } from '../../../constants/link-prefix'
import BackToTopicIcon from '../../../../static/asset/article-back-to-topic-mobile.svg'
import BackToTopIcon from '../../../../static/asset/art... |
internals/templates/containers/LanguageProvider/index.js | BartoszBazanski/react-100-pushup-challenge | /*
*
* 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... |
node_modules/react-native-maps/lib/components/MapCallout.js | RahulDesai92/PHR | import PropTypes from 'prop-types';
import React from 'react';
import {
StyleSheet,
ViewPropTypes,
} from 'react-native';
import decorateMapComponent, {
SUPPORTED,
USES_DEFAULT_IMPLEMENTATION,
} from './decorateMapComponent';
const propTypes = {
...ViewPropTypes,
tooltip: PropTypes.bool,
onPress: PropTyp... |
platform/ui/src/contextProviders/LanguageProvider.js | OHIF/Viewers | // Reference > https://reactjs.org/docs/context.html
import React from 'react';
import {
withTranslation as I18NextWithTranslation,
I18nextProvider,
} from 'react-i18next';
import i18n from '@ohif/i18n';
const WrapperI18n = Component => {
const WrapperComponent = props => (
<I18nextProvider i18n={i18n}>
... |
src/esm/components/action/social-button-icon-words/index.js | KissKissBankBank/kitten | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["children"],
_excluded2 = ["children"],
_excluded3 = ["children"],
_excluded4 = ["children"];
import React from 'react';
import { Button } from '../../action/button';
import { FacebookIcon } fro... |
packages/netlify-cms-backend-test/src/AuthenticationPage.js | netlify/netlify-cms | import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled';
import { Icon, buttons, shadows, GoBackButton } from 'netlify-cms-ui-default';
const StyledAuthenticationPage = styled.section`
display: flex;
flex-flow: column nowrap;
align-items: center;
justify-content: cen... |
src/components/player-selection.js | RaulEscobarRivas/React-Redux-High-Order-Components | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { updatePlayerSelection } from '../actions';
import { getPositionSelected, getPlayersSelected } from '../reducers';
class PlayerSelection extends Component {
constructor(props) {
super(props);
this.state = {
... |
tests/layouts/CoreLayout.spec.js | mjosh954/mtg-toolbox | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import CoreLayout from 'layouts/CoreLayout';
function shallowRender (component) {
const renderer = TestUtils.createRenderer();
renderer.render(component);
return renderer.getRenderOutput();
}
function shallowRenderWithProps (props = {}... |
app/components/Header/index.js | Ennovar/clock_it | import React from 'react';
import { FormattedMessage } from 'react-intl';
import { ImgSmall } from './Img';
import NavBar from './NavBar';
import HeaderLink from './HeaderLink';
import Banner from './banner.png';
import messages from './messages';
class Header extends React.Component { // eslint-disable-line react/pr... |
docs/app/Examples/views/Statistic/Variations/StatisticExampleHorizontalGroup.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Statistic } from 'semantic-ui-react'
const items = [
{ label: 'Views', value: '2,204' },
{ label: 'Downloads', value: '3,322' },
{ label: 'Tasks', value: '22' },
]
const StatisticExampleHorizontalGroup = () => <Statistic.Group horizontal items={items} />
export default Statis... |
app/javascript/mastodon/components/admin/Trends.js | ikuradon/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import Hashtag from 'mastodon/components/hashtag';
export default class Trends extends React.PureComponent {
static propTypes = {
lim... |
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/actual.js | ge6285790/test | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
src/svg-icons/av/games.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvGames = (props) => (
<SvgIcon {...props}>
<path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/>
</SvgIcon>
);
AvGames = pure(AvGames);
AvGames.dis... |
assets/jqwidgets/demos/react/app/chart/chartprinting/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
this.refs.printBtn.on('click', () => {
... |
src/_wlk/AboutPage.js | welovekpop/uwave-web-welovekpop.club | import React from 'react';
import FacebookIcon from './icons/Facebook';
import YouTubeIcon from './icons/YouTube';
import InstagramIcon from './icons/Instagram';
import GithubIcon from './icons/Github';
import TwitterIcon from './icons/Twitter';
import SlackIcon from './icons/Slack';
import SocialMediaLink from './Soci... |
app/containers/Cart/CartPage.js | ryanwashburne/react-skeleton | // React
import PropTypes from 'prop-types';
import React from 'react';
import { NavLink } from 'react-router-dom';
// Constants
import { subtotal } from 'app/util/env';
// Redux
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as storeActions from 'app/reducers/storeReducer... |
src/client/app.js | rvboris/finalytics | import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { AppContainer } from 'react-hot-loader';
import { addLocaleData } from 'react-intl';
import { ConnectedRouter } from 'react-router-redux';
import { renderRoutes } from 'react-router-co... |
test/jest/defaults.js | mariusandra/kea | /* global test, expect, beforeEach */
import { kea, resetContext, getContext } from '../../src'
import './helper/jsdom'
import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import { render, screen } from '@testing-library/react'
beforeEach(() => {
resetContext()
})
te... |
app/routes.js | dfucci/Borrowr | 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';
export default (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
</Route>
);
|
components/price/price.js | Travix-International/travix-ui-kit | // Imports
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { getClassNamesWithMods, getDataAttributes, warnAboutDeprecatedProp } from '../_helpers';
/**
* Adds the thousands separator to a given value.
* If either the thousands separator is not set or the va... |
node_modules/react-router/modules/RouteUtils.js | jameswatkins77/React-Blogger-App | import React from 'react'
import warning from './warning'
function isValidChild(object) {
return object == null || React.isValidElement(object)
}
export function isReactChildren(object) {
return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild))
}
function checkPropTypes(componentName,... |
src/js/components/icons/base/BrandHpeElementPath.js | odedre/grommet-final | /**
* @description BrandHpeElementPath SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textC... |
src/index.js | brod4910/React-Webpack-Boilerplate | const css = require('./app.css');
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
); |
app/javascript/mastodon/features/followers/index.js | verniy6462/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import {
fetchAccount,
fetchFollowers,
expandFollowers,
} from '../../actions/account... |
components/slider/__tests__/index.spec.js | showings/react-toolbox | import React from 'react';
import { mount, shallow } from 'enzyme';
import { Input } from '../../input/Input';
import { ProgressBar } from '../../progress_bar/ProgressBar';
import { Slider } from '../Slider';
import theme from '../theme.css';
describe('Slider', () => {
describe('#positionToValue', () => {
it('re... |
src/components/Navbar/Searchbar.js | nicolas-adamini/littleblue | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { search } from '../../redux/actions/index';
import { withRouter } from 'react-router-dom';
class Searchbar extends Component {
constructor(props) {
super(props);
this.state = ... |
src/views/components/VideoPlayer.js | physiii/open-automation | import React from 'react';
import PropTypes from 'prop-types';
import VideoStream from './VideoStream.js';
import Toolbar from './Toolbar.js';
import PlayButtonIcon from '../icons/PlayButtonIcon.js';
import StopButtonIcon from '../icons/StopButtonIcon.js';
import ExpandIcon from '../icons/ExpandIcon.js';
import fscreen... |
assets/javascripts/kitten/components/navigation/header-menu/test.js | KissKissBankBank/kitten | import React from 'react'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
import { HeaderMenu } from './index'
const CustomComponent = () => <a href="#custom-component">Custom component</a>
describe('<HeaderMenu />', () => {
let component
describe('with three items', () => {
before... |
App/node_modules/react-native/Libraries/Image/Image.ios.js | Dagers/React-Native-Differential-Updater | /**
* 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... |
example/main.js | tanem/react-salvager | import React from 'react'
import ReactDOM from 'react-dom'
import Salvager from '../src/Salvager'
import Row from './Row'
ReactDOM.render(
<Salvager
bufferSize={25}
rowWrapperStyle={{
listStyleType: 'none',
marginBottom: 0,
marginTop: 0,
paddingLeft: 0
}}
visibleAreaStyle={{
... |
src/svg-icons/device/signal-cellular-4-bar.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellular4Bar = (props) => (
<SvgIcon {...props}>
<path d="M2 22h20V2z"/>
</SvgIcon>
);
DeviceSignalCellular4Bar = pure(DeviceSignalCellular4Bar);
DeviceSignalCellular4Bar.displayName = 'DeviceSign... |
test/fixtures/react/nonJSX/expected.js | davesnx/babel-plugin-transform-react-qa-classes | import React, { Component } from 'react';
class TestClass extends Component {
test() {
return true;
}
}
export default TestClass;
|
ui/browser/index.js | linclark/tofino | /*
Copyright 2016 Mozilla
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 writing, software distributed
u... |
client/src/Flash.js | panter/mykonote | import React, { Component } from 'react';
import NoticeFlash from './NoticeFlash';
import AlertFlash from './AlertFlash';
import './Flash.css';
class Flash extends Component {
render() {
return (
<div>
<NoticeFlash />
<AlertFlash />
</div>
);
}
}
export default Flash;
|
native/ChatItem/ChatItem.js | abdurrahmanekr/react-chat-elements | import React, { Component } from 'react';
import styles from './ChatItemStyle.js';
import Avatar from '../Avatar/Avatar';
import {
View,
Text,
Image,
} from 'react-native';
export class ChatItem extends Component {
render() {
return (
<View
style={styles.rceContai... |
src/render.js | pshrmn/cryptonite | import React from 'react';
import ReactDOM from 'react-dom';
import { ApolloProvider } from 'react-apollo';
import { CuriProvider } from '@curi/react';
import client from './apolloClient';
import Header from './components/Header';
import Footer from './components/Footer';
import 'scss/base.scss';
import 'scss/main.s... |
services/QuillLMS/client/app/bundles/Connect/utils/devTools.js | empirical-org/Empirical-Core | import React from 'react';
// Exported from redux-devtools
import { createDevTools } from '@redux-devtools/core';
// Monitors are separate packages, and you can make a custom one
import LogMonitor from '@redux-devtools/log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import SliderMonitor from 'red... |
lib/components/DevTools.js | emmenko/redux-react-router-async-example | import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor
toggleVisibilityKey='ctrl-h'
changePositionKey='ctrl-q'>
<LogMonitor />
</DockM... |
app/components/GeometryCanvasCifdata/index.js | mhoffman/CatAppBrowser | /**
*
* GeometryCanvasCifdata
*
*/
import { compose } from 'recompose';
import React from 'react';
import _ from 'lodash';
import PropTypes, { instanceOf } from 'prop-types';
import { withStyles } from 'material-ui/styles';
import { connect } from 'react-redux';
import Paper from 'material-ui/Paper';
/* import But... |
client/components/reqApproved.js | marhyorh/booktrade | import React from 'react';
export default (props) => {
const onRemove = (book, event) => {
event.preventDefault();
Meteor.call('book.removeOutstanding', book);
Meteor.call('book.unApprove', book);
}
const reqApproved = () => {
return props.books.map(book => {
return (
<li classNam... |
app/view/API/index.js | Juice4213/GZHReactNativeDemo | /**
* Created by tompda on 2017/2/5.
*/
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
ScrollView,
Navigator,
InteractionManager,
AlertIOS,
Linking,
} from 'react-native... |
ui/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | carmine/northshore | import React from 'react';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
clients/packages/admin-client/src/pages/admin/mobilizations/blocks/create/page.spec.js | nossas/bonde-client | import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import { FormattedMessage } from 'react-intl';
import BLOCK_LAYOUTS from '../../../../../mobilizations/blocks/constants/block-layouts';
import Page from './page';
describe('routes/admin/authenticated/sidebar/blocks-create/page... |
src/Tabs/TabBar.js | react-mdl/react-mdl | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const propTypes = {
activeTab: PropTypes.number,
className: PropTypes.string,
cssPrefix: PropTypes.string.isRequired,
onChange: PropTypes.func,
};
const defaultProps = {
activeTab: 0
};
class TabBa... |
rojak-ui-web/src/app/utils/Navbar.js | bobbypriambodo/rojak | import React from 'react';
import { Link } from 'react-router';
import rojakBlack from '../../assets/images/rojak-black.svg';
import styles from './Navbar.css';
const Navbar = () => (
<nav className={`uk-navbar ${styles.navbar}`}>
<ul className="uk-navbar-nav">
<li className="uk-active">
... |
src/index.js | Nexapp/NexappCart | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './cart/reducers/configureStore';
import ShoppingCart from './cart/containers/ShoppingCart';
import './index.css';
const store = configureStore();
ReactDOM.render(
<Provider store={store}>... |
packages/react-tv/modules/renderOnAppLoaded.js | raphamorim/react-tv | /**
* Copyright (c) 2017-present, Célio Latorraca.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import Plaform from './Platform';
export default Component =>
class extends React.Component... |
techCurriculum/ui/solutions/7.1/src/components/TextInput.js | jennybkim/engineeringessentials | /**
* Copyright 2017 Goldman Sachs.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
App/Client/node_modules/react-router/modules/Redirect.js | qianyuchang/React-Chat | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL path a client should
... |
src/svg-icons/av/av-timer.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvAvTimer = (props) => (
<SvgIcon {...props}>
<path d="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-... |
src/containers/Bookcase.js | claclacla/_Udacity_-Organize-your-bookshelves-using-ReactJS | import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import Data from '../Data';
import BookShelf from '../components/BookShelf';
const ListBooks = function (props) {
const { books } = props;
return (
<div className="list-books">
<div className="list-b... |
ReactApp/LastChance/src/app.js | Mastenka/josefina | import React, { Component } from 'react';
import {
AppRegistry,
Dimensions,
StyleSheet,
Text,
TouchableHighlight,
View
} from 'react-native';
export default class LastChance extends Component {
render() {
return (
<View style={styles.container}>
<Text>
Neco
... |
frontend/src/components/partners/profile/buttons/addNewVerificationButton.js | unicef/un-partner-portal | import React from 'react';
import PropTypes from 'prop-types';
import VerifiedUser from 'material-ui-icons/VerifiedUser';
import IconWithTextButton from '../../../common/iconWithTextButton';
const messages = {
text: 'Verify Profile',
};
const AddNewVerificationButton = (props) => {
const { handleClick } = props;
... |
node_modules/enzyme/test/Debug-spec.js | lauracurley/2016-08-ps-react | import { expect } from 'chai';
import React from 'react';
import {
spaces,
indent,
debugNode,
} from '../src/Debug';
import { mount } from '../src/';
import { describeWithDOM, itIf } from './_helpers';
import { REACT013 } from '../src/version';
describe('debug', () => {
describe('spaces(n)', () => {
it('s... |
src/components/__tests__/ui/alerts-test.js | visa-innovation-sf/ldn-retail-demo | /**
* Test to check if the component renders correctly
*/
/* global it expect */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Alerts from '@ui/Alerts';
it('Alerts (empty) renders correctly', () => {
const tree = renderer.create(
<Alerts />,
).toJSON();... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.