path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
admin/src/components/PrimaryNavigation.js | geminiyellow/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
var PrimaryNavItem = React.createClass({
displayName: 'PrimaryNavItem',
propTypes: {
className: React.PropTypes.string,
children: React.PropTypes.node.isRequired,
href: Reac... |
fields/types/file/FileColumn.js | sendyhalim/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var LocalFileColumn = React.createClass({
renderValue: function () {
var value = this.props.data.fields[this.props.col.path];
if (!value || !value.filename) ret... |
react-flux-mui/js/material-ui/src/svg-icons/image/crop-16-9.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop169 = (props) => (
<SvgIcon {...props}>
<path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/>
</SvgIcon>
);
ImageCrop169 = pure(ImageCrop169);
ImageCr... |
screens/SchoolInfoScreen.js | Helena-High/school-app | import React from 'react';
import {
Linking,
StyleSheet,
ScrollView,
TouchableOpacity,
Image,
Text,
View,
} from 'react-native';
import {
Ionicons,
Entypo,
EvilIcons,
} from '@exponent/vector-icons';
import Router from '../navigation/Router';
export default class SchoolInfoScreen extends React.Comp... |
src/higher_order_components/focusable.js | TouchBistro/frig | import React from 'react'
import ReactDOM from 'react-dom'
/*
* A higher order component that passes a focused attribute to it's child
* component. The focused is true when the component should be focused
* (ie. when it is clicked on or tabbed into) and false when it is not (ie.
* initially, when it is clicked off... |
client/patch-react.js | nikvm/next.js | // monkeypatch React for fixing https://github.com/facebook/react/issues/2461
// based on https://gist.github.com/Aldredcz/4d63b0a9049b00f54439f8780be7f0d8
import React from 'react'
let patched = false
export default (handleError = () => {}) => {
if (patched) {
throw new Error('React is already monkeypatched')... |
src/index.js | scottjbarr/blinky | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import { Router, browserHistory } from 'react-router'
import App from './components/app';
import reducers from './reducers';
import routes from './routes'
... |
src/Information.js | haroldhues/kkblueberries | import React from 'react'
export default () => (
<div id="about">
<h1>What do I bring with me?</h1>
<ul>
<li>
We have large and small buckets available to pick into, or you may bring
your own. Stop by the shed to weigh your bucket and get a row
assignment. If you are picking int... |
website/icons/GitHub.js | rofrischmann/fela | import React from 'react'
export default function GitHub(props) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" {...props}>
<path d="M16 0.395c-8.836 0-16 7.163-16 16 0 7.069 4.585 13.067 10.942 15.182 0.8 0.148 1.094-0.347 1.094-0.77 0-0.381-0.015-1.642-0.022-2.979-4.452 0.968-5.391... |
client/src/components/Toasts/tests/Toast-test.js | silverstripe/silverstripe-admin | /* global jest, describe, it, expect */
import React from 'react';
import Toast from '../Toast';
import { ToastActions as Actions } from '../ToastActions';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16/build/index';
Enzyme.configure({ adapter: new Adapter() });
describe('Toas... |
frontend/app/components/App.js | mcwright/heartattack_scheduler | /**
* Created by orel- on 06/Dec/15.
*/
import React from 'react';
import Navbar from './Navbar';
/**
* This class should be mainly left as-is.
* Main purpose is to form the general markup for all the "pages".
* So you have a "static" navbar which is always present,
* and then all the content is inside a contai... |
app/javascript/mastodon/features/following/index.js | ebihara99999/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,
fetchFollowing,
expandFollowing,
} from '../../actions/account... |
docs/src/app/components/pages/components/DatePicker/ExampleSimple.js | nathanmarks/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
/**
* The Date Picker defaults to a portrait dialog. The `mode` property can be set to `landscape`.
* You can also disable the Dialog passing `true` to the `disabled` property.
*/
const DatePickerExampleSimple = () => (
<div>
<DatePic... |
client/components/Where.js | TobiahRex/reactTravelApp | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import ClientActions from '../actions/ClientActions';
import ClientStore from '../stores/ClientStore';
import { Panel, Container, Row, Col, Form, Input, Button } from 'muicss/react';
export default class Where extends Component {
... |
packages/material-ui-icons/src/SignalCellularConnectedNoInternet0BarRounded.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M22 8V4.41c0-.89-1.08-1.34-1.71-.71L3.71 20.29c-.63.63-.19 1.71.7 1.71H18V11c0-1.66 1.34-3 3-3h1z" /><path d="M20 22h2v-2h-2v2zm0-11v6c0 .55.45 1 1 1s1-.45 1-1v-6c0-.5... |
examples/huge-apps/components/GlobalNav.js | bmathews/react-router | import React from 'react';
import { Link } from 'react-router';
const styles = {};
class GlobalNav extends React.Component {
static defaultProps = {
user: {
id: 1,
name: 'Ryan Florence'
}
};
constructor (props, context) {
super(props, context);
this.logOut = this.logOut.bind(this);... |
newclient/scripts/components/user/revise/questionnaire-section/index.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program 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
Lic... |
packages/react-router-dom/modules/__tests__/BrowserRouter-test.js | asaf/react-router | import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
import BrowserRouter from '../BrowserRouter'
describe('A <BrowserRouter>', () => {
it('puts history on context.router', () => {
let history
const ContextChecker = (props, context) => {
history = context.router... |
src/pages/surveys/Questions.js | nick/boulder-vote | import React from 'react'
import { Link } from 'react-router-dom'
import { Helmet } from 'react-helmet'
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import SideBarLink from '../../components/SideBarLink'
import QuestionLinks from './_QuestionLinks';
const Questions = (props) => {
if (prop... |
client/src/AppEntry.js | 15thnight/15thnight | import { Promise } from 'es6-promise/auto';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import 'lib/bootstrap3/dist/css/bootstrap.min.css';... |
pootle/static/js/admin/components/Project/ProjectForm.js | evernote/zing | /*
* Copyright (C) Pootle contributors.
* Copyright (C) Zing contributors.
*
* This file is a part of the Zing project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react... |
Board.js | imsolost/Set-React | import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View, Button } from 'react-native'
import Dimensions from 'Dimensions'
import Game from './classes/Game'
import Grid from './components/Grid'
import ScoreCard from './components/ScoreCard'
import Timer from './components/Timer'
import Pop... |
examples/redirect-using-index/app.js | frankleng/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... |
docs/src/app/components/pages/components/Stepper/HorizontalLinearStepper.js | skarnecki/material-ui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* Horizontal steppers are ideal when the contents of one step depend on an earlier step.
* Avoid using long step ... |
app/assets/scripts/views/country.js | openaq/openaq.github.io | 'use strict';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import config from '../config';
import { formatThousands } from '../utils/format';
import { fetchLocations, invalidateAllLocationData, fetchLatestMeasurements, openDownloadModal } from '../actions/action-creators';
... |
test/ColSpec.js | Azerothian/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Col from '../src/Col';
describe('Col', function () {
it('Should set Offset of zero', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Col xsOffset={0} smOffset={0} mdOffset={0} lgOffset={0} />
);
... |
app/react-icons/fa/assistive-listening-systems.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaAssistiveListeningSystems extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m2.9 38.6q0 0.5-0.5 1t-1 0.4-1-0.4-0.4-1 0.4-1 1-0.5 1 0.5... |
examples/links/index.js | AlbertHilb/slate |
import { Editor, getEventTransfer } from 'slate-react'
import { State } from 'slate'
import React from 'react'
import initialState from './state.json'
import isUrl from 'is-url'
/**
* Define a schema.
*
* @type {Object}
*/
const schema = {
nodes: {
paragraph: props => <p>{props.children}</p>,
link: (p... |
app/node_modules/react-router/es6/Link.js | lycha/masters-thesis | 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 _objectWithoutProperties(obj, keys) { var target = {... |
packages/icons/src/md/action/OfflinePin.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdOfflinePin(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 4c11 0 20 9 20 20s-9 20-20 20S4 35 4 24 13 4 24 4zm10 32v-4H14v4h20zm-13.4-8L34 14.6l-2.8-2.8-10.6 10.6-3.8-3.8-2.8 2.8 6.6 6.6z" />
</Ico... |
src/views/music_visualizer/music_visualizer.js | MillerDix/me.beating.io | import React, { Component } from 'react';
import {Rounded} from '../../common/button/button.js';
import request from '../../common/utils/request.js';
import api from '../../common/utils/api.js';
import style from './music_visualizer.css';
let el_player = null;
class MusicVisualizer extends Component {
constructor(... |
src/components/topic/provider/TopicTagUseContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedHTMLMessage, FormattedMessage, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import MenuItem from '@material-ui/core/MenuItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListItemIcon from '@... |
src/containers/Home/Home.js | Nuriddinkhuja/photoshare | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import * as postsActions from 'redux/modules/posts';
import { asyncConnect } from 'redux-connect';
import { connect } from 'react-redux';
import ListPosts from '../Posts/ListPosts';
@asyncConnect([{
deferred: __SERVER__,
promise: ({ sto... |
imports/ui/components/resident-details/accounts/mess-canteen/edit-mc-bill/edit-mc-bill.js | gagpmr/app-met | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import * as Styles from '/imports/modules/styles.js';
import { FullBill } from './full-bill.js';
import { ReduceCanteen } from './reduce-canteen.js';
import { ReduceMessOne } from './reduce-mess-one.js';
import {... |
app/javascript/mastodon/components/modal_root.js | kirakiratter/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import 'wicg-inert';
export default class ModalRoot extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
onClose: PropTypes.func.isRequired,
};
state = {
revealed: !!this.props.children,
};
activeElement = t... |
opentech/static_src/src/app/src/components/ReviewBlock/index.js | OpenTechFund/WebApp | import React from 'react'
import PropTypes from 'prop-types'
import './styles.scss';
export const Opinion = ({ author, icon, opinion }) => (
<li className="reviews-sidebar__item reviews-sidebar__item--decision">
<div className="reviews-sidebar__name">
<span>{author}</span><img src={icon} />
... |
setup/src/universal/features/common_ui/app/Footer/index.js | ch-apptitude/goomi | /**
*
* Footer
*
*/
import React from 'react';
import { Row } from 'react-flexbox-grid';
import styled from 'styled-components';
const FooterContainer = styled(Row)`
background-color: white;
`;
const Footer = () => <FooterContainer tagName="footer" />;
Footer.defaultProps = {};
Footer.propTypes = {};
export def... |
src/__tests__/components/wmspopup.js | geobeyond/mapreacter |
import React from 'react';
import { shallow, mount, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
import WMSPopup from '../../components/map/wms/wmspopup';
describe('WMSPopu... |
examples/js/advance/demo.js | neelvadgama-hailo/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import EditTypeTable from './edit-type-table';
import DataInsertTypeTable from './insert-type-table';
import AutoRowKeyTable from './auto-rowkey-table';
import ValidatorTable from './validator-table';
import HideOnInsertTable from './hide-on-insert-table';
import rend... |
src/components/ResistanceCalculator/BandSelector.js | mtharrison/react-resistance-calculator | import React, { Component } from 'react';
class BandSelector extends Component {
constructor(props) {
super(props);
}
handleChange() {
this.props.onChange(this.props.band, parseInt(this.refs.menu.value));
}
render(){
const { band, options, value } = this.props;
retur... |
client/modules/Post/__tests__/components/PostList.spec.js | svolkov92/TextStreams | 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: ... |
blueocean-material-icons/src/js/components/svg-icons/image/flash-auto.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageFlashAuto = (props) => (
<SvgIcon {...props}>
<path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/>
</SvgIcon>
);
ImageFlashAuto.displayName = 'ImageFlashAuto';
ImageFlashAuto.m... |
src/default.js | nlhuykhang/react-switchcase-condition | import React from 'react';
import PropTypes from 'prop-types';
const Default = ({ component: C, componentProps, }) => <C {...componentProps} />;
Default.componentName = 'Default';
Default.propTypes = {
component: PropTypes.func.isRequired,
// eslint-disable-next-line react/forbid-prop-types
componentProps: Prop... |
demo/src/components/App/components/Example12/Example12.js | moroshko/react-autowhatever | import styles from './Example12.less';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { updateInputValue, updateHighlightedItem } from '../../redux';
import Autowhatever from 'Autowhatever';
import SourceCodeLink from 'SourceCodeLink/SourceCo... |
pages/about.js | etaiklein/gameghost | import React from 'react'
import AboutUs from './aboutUs'
import AboutGM from './aboutGM'
import {baseValLarge} from '../components/Item'
export default class Index extends React.Component {
render() {
return (
<div>
<div style={{padding: `0 ${2 * baseValLarge}px 1px`, backgroundColor: "lightgray",... |
lib/FocusLink/stories/BasicUsage.js | folio-org/stripes-components | /**
* FocusLink: Basic Usage
*/
/* eslint-disable */
import React, { Component } from 'react';
import FocusLink from '../FocusLink';
import Icon from '../../Icon';
import Headline from '../../Headline';
import css from './FocusLinkExample.css';
export default class BasicUsage extends Component {
constructor(prop... |
examples/huge-apps/routes/Course/components/Dashboard.js | kurayama/react-router | import React from 'react'
class Dashboard extends React.Component {
render() {
return (
<div>
<h3>Course Dashboard</h3>
</div>
)
}
}
export default Dashboard
|
src/components/MainPage/FormTable/FormTableContainer.js | coolshare/ReactReduxStarterKit | import React from 'react';
import RightPane from './RightPane';
import LeftPane from './LeftPane';
import { Grid, Row, Col } from 'react-bootstrap';
/**
*
*/
export default class FormTableContainer extends React.Component{
/**
* render
* @return {ReactElement} markup
*/
render(){
return (
<div id="F... |
packages/strapi-admin/files/public/app/containers/LanguageProvider/index.js | skelpook/strapi | /*
*
* 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... |
web/src/components/statistics.js | frafra/is-osm-uptodate | import React from 'react';
import { maxZoom } from '../constants';
function flyAndOpen(marker, event) {
const { map } = marker;
map.once('moveend zoomend', (_) => marker.openPopup());
map.flyTo(marker._latlng, maxZoom);
}
function Statistics({ statistics }) {
return (
<table className="table table-stripe... |
js/common/PyMap.js | weihanglo/pycontw-mobile | import React from 'react'
import PropTypes from 'prop-types'
import {
Dimensions,
Image,
ScrollView,
StatusBar,
StyleSheet,
TouchableOpacity,
View,
ViewPropTypes
} from 'react-native'
import Header from './PyHeader'
import {LargeText} from './PyText'
import * as Colors from './PyColors'
import I18n fro... |
__tests__/index.ios.js | ChiragHindocha/stay_fit | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/svg-icons/notification/do-not-disturb-on.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationDoNotDisturbOn = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"/>
</SvgIcon>
);
NotificationDoNotDisturbOn = pure(No... |
src/index.js | cpennington/yomibase | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import App from './yomibase.jsx';
ReactDOM.render(<App />, document.getElementById('root'));
|
classic/src/scenes/mailboxes/src/Scenes/LinuxSetupScene/LinuxSetupSceneContent.js | wavebox/waveboxapp | import React from 'react'
import { DialogTitle, DialogContent, DialogActions, Button } from '@material-ui/core'
import shallowCompare from 'react-addons-shallow-compare'
import { settingsActions } from 'stores/settings'
import Resolver from 'Runtime/Resolver'
import { withStyles } from '@material-ui/core/styles'
import... |
app/components/Table.js | JakubMusik/where-your-money-goes | /**
* Created by jakub on 08.07.2017.
*/
import React from 'react';
import {connect} from 'react-redux';
import {RESPONSE_STATUS} from '../helpers/Enum';
import {showModal} from '../actions/showModal';
import {PoundIcon} from '../components/PoundIcon';
import {formatValue} from '../helpers/formatValue';
import {perf... |
examples/universal/src/render.js | 4Catalyzer/found | import createRender from 'found/createRender';
import React from 'react';
export default createRender({
/* eslint-disable react/prop-types */
renderError: ({ error }) => (
<div>{error.status === 404 ? 'Not found' : 'Error'}</div>
),
/* eslint-enable react/prop-types */
});
|
internals/templates/app.js | guruganeshm/ReactJs | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
/* eslint-disable import/no-unresolved, import/extensions */
// Load the manifest.json file and the .htaccess file
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].... |
web/components/common/Loader/index.js | xontab/basic-node-ci | import React, { Component } from 'react';
import CircularProgress from 'material-ui/CircularProgress';
import styles from './styles.scss';
export default class Loader extends Component {
render() {
return (
<div className={styles.loading}>
<CircularProgress size={60} thickness={5} />
</div>... |
src/ComboBox/ComboBox.stories.js | resmio/mantecao | import React from 'react'
import { storiesOf } from '@storybook/react'
import ComboBox from './ComboBox'
storiesOf('ComboBox', module).add('default', () =>
<ComboBox
placeHolder="example combobox"
options={[
'option 1',
'option 2',
'option 3',
'option 4',
'option 5',
'opti... |
test/regressions/tests/TextField/TextFieldRequired.js | cherniavskii/material-ui | // @flow
import React from 'react';
import TextField from 'material-ui/TextField';
export default function TextFieldRequired() {
return (
<div>
<TextField required label="Foo" />
<TextField required label="Foo" value="Hello world" />
</div>
);
}
|
examples/huge-apps/routes/Course/routes/Assignments/components/Sidebar.js | arbas/react-router | import React from 'react';
import { Link } from 'react-router';
class Sidebar extends React.Component {
render () {
var assignments = COURSES[this.props.params.courseId].assignments
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{assignments.map(assignment => (
... |
src/__tests__/forms/FieldLoader.js | crudlio/crudl | /* globals jest, require, test, expect, describe, it, beforeEach */
import { Provider } from 'react-redux'
import configureStore from 'redux-mock-store'
import React from 'react'
import { mount } from 'enzyme'
import FieldLoader from '../../forms/FieldLoader'
import fieldSchema from '../../admin-schema/field'
const de... |
src/components/DefaultLayout.js | zebras-filming-videos/streamr-web | import React from 'react'
import Header from './Header'
import Footer from './Footer'
import Bundle from './Bundle'
import loadMainRoutes from 'bundle-loader!./MainRoutes'
export default () => (
<div>
<Header />
<main>
<Bundle load={loadMainRoutes}>
{(MainRoutes) => MainRoutes ? <MainRoutes... |
src/svg-icons/social/cake.js | hai-cea/material-ui | 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... |
frontend/src/Components/InfoLabel.js | Radarr/Radarr | import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { kinds, sizes } from 'Helpers/Props';
import styles from './InfoLabel.css';
function InfoLabel(props) {
const {
className,
title,
kind,
size,
outline,
children,
...otherProps
} = ... |
src/main.js | hack-duke/hackduke-portal | import React from 'react'
import ReactDOM from 'react-dom'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { useRouterHistory } from 'react-router'
import { syncHistoryWithStore, push } from 'react-router-redux'
import createStore from './store/createStore'
import AppContainer from './contain... |
src/ActivitySummary.js | siiptuo/tiima-spa | import React from 'react';
import PropTypes from 'prop-types';
import ActivityList from './ActivityList';
import { duration } from './filters';
import { propType as activityPropType } from './activity';
const shortDateFormat = new Intl.DateTimeFormat(navigator.language, {
weekday: 'short',
day: 'numeric',
mont... |
src/App.js | Tectract/EthDeployer | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
src/components/services/service-list.js | adrienlozano/stephaniewebsite | import React from 'react';
import styled from 'styled-components';
import ServiceCard from './service-card';
import { Flex } from 'rebass';
import { width, space } from 'styled-system';
const CardWrapper = ({children, className}) => (<div className={className}>{children}</div>)
const StyledCardWrapper = styled(CardWr... |
es6/test.js | yurizhang/ishow | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
fmi-2022-03-react-todos/src/components/TodoFilter.js | iproduct/course-node-express-react |
import React from 'react';
import PropTypes from 'prop-types';
import { ACTIVE, ALL_STATUSES, CANCELED, COMPLETED } from '../model/todo-model';
import './TodoFilter.css';
const TodoFilter = ({ filter, onFilterChange }) => {
function handleFilterChange(event) {
onFilterChange(Number.parseInt(event.target.v... |
app/containers/WellKnownEndpointListItem/index.js | darrellesh/redux-react-boilerplate | /**
* WellKnownEndpointListItem
*
* Lists the name and id from the item
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import ListItem from 'components/ListItem';
export class WellKnownEndpointListItem extends React.PureComponent { // esli... |
src/svg-icons/image/straighten.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageStraighten = (props) => (
<SvgIcon {...props}>
<path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/>
</SvgIcon>
);
ImageStr... |
node_modules/native-base/Components/Widgets/Thumbnail.js | crod93/googlePlacesEx-react-native | /* @flow */
'use strict';
import React from 'react';
import {Image} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import _ from 'lodash';
export default class ThumbnailNB extends NativeBaseComponent {
getInitialStyle() {
... |
examples/huge-apps/components/Dashboard.js | nhunzaker/react-router | import React from 'react'
import { Link } from 'react-router'
class Dashboard extends React.Component {
render() {
const { courses } = this.props
return (
<div>
<h2>Super Scalable Apps</h2>
<p>
Open the network tab as you navigate. Notice that only the amount of
you... |
test/containers/CounterPage.spec.js | linuxing3/electron-react | import { expect } from 'chai';
import React from 'react';
import {
renderIntoDocument,
scryRenderedDOMComponentsWithTag,
findRenderedDOMComponentWithClass,
Simulate
} from 'react-addons-test-utils';
import { Provider } from 'react-redux';
import CounterPage from '../../app/containers/CounterPage';
import config... |
examples/with-flow/pages/_app.js | BlancheXu/test | import App from 'next/app'
import Link from 'next/link'
import React from 'react'
export default class MyApp extends App {
static async getInitialProps ({ Component, router, ctx }) {
let pageProps = {}
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}
return ... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | mecab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
class SettingToggle extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequ... |
src/views/Another.js | bfollington/react-redux-isomorphic-boilerplate | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as CounterActions from 'actions/CounterActions';
import Counter from 'components/Counter';
export default class Another extends React.Component {
/**
* Runs on server and client.
*/
componen... |
imports/ui/components/CurrencyInput.js | ctagroup/home-app | import React, { Component } from 'react';
import curr from 'currency.js';
const formatCurrency = (value = 0, code = 'USD', displayOptions = {}) => {
const config = {
symbol: '$',
precision: 2,
decimal: '.',
separator: ',',
};
if (!config) {
throw new Error(`You need to provide a currencyCon... |
src/components/Wrapper/Wrapper-test.js | wfp/ui | import React from 'react';
import Wrapper from '../Wrapper';
import { shallow } from 'enzyme';
describe('ReadMore', () => {
describe('Renders as expected', () => {
const wrapper = shallow(
<Wrapper className="some-class">Content</Wrapper>
);
it('should all for custom classes to be applied', () => {... |
src/svg-icons/content/redo.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRedo = (props) => (
<SvgIcon {...props}>
<path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/>
</Sv... |
example/index.js | adrianleb/sullivan | import React from 'react'
import {render} from 'react-dom'
import Sullivan from 'sullivan';
import Styleguide from './styleguide';
import {StyleSheet, css} from 'aphrodite';
const styles = new Sullivan({
aphroditeStylesheet: StyleSheet,
styleguide: Styleguide
});
const {utils, rawUtils: raw, inline, mq, z, styleg... |
src/routes/index.js | mattroid/turboiep | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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 App from '../components/... |
app/packs/src/components/ScreenWellplates.js | ComPlat/chemotion_ELN | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
import { DropTarget } from 'react-dnd';
import DragDropItemTypes from './DragDropItemTypes';
import UIStore from './stores/UIStore';
import { wellplateShowOrNew } from './routesUtils';
import QuillVie... |
src/components/icons/fork.js | mding5692/mding5692.github.io | import React from 'react';
const IconFork = () => (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="feather feather-git-branch">
<title>Git Fork</title>
<line x1="6" y1="3" x2="6" y2="15"></line>
... |
test/helpers/shallowRenderHelper.js | wangweida/gallery-by-react | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
app/containers/Spa/SpaHelp/index.js | vollmerr/app-hub | import React from 'react';
import PropTypes from 'prop-types';
import { compose } from 'redux';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import toJS from '../../../hocs/toJS';
import Help from '../../../components/Help';
import * as selectors from '../selectors';
im... |
rn-14-tabsWithTabNavigator/tabs/FirstScreen.js | KyoungRan/react-native-ex-NDH | import React, { Component } from 'react';
import { Text, View, Button, Image } from 'react-native';
export default class FirstScreen extends Component {
static navigationOptions = {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<Image
source={require('../images/icon-home.png')}
... |
node_modules/lite-server/node_modules/browser-sync/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | idreamind/_k-v.xyz | 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'));
|
src/icons/IosMicOff.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosMicOff extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<rect x="264.2" y="1.1" transform="matrix(0.8629 -0.5053 0.5053 0.8629 -92.0515 172.66)" width="16" height="509.8"></rect>
... |
node_modules/react-router/es6/Link.js | superKaigon/TheCave | 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 _objectWithoutProperties(obj, keys) { var target = {... |
node_modules/recharts/demo/component/ComposedChart.js | SerendpityZOEY/Solr-Search-React-UI | import React from 'react';
import { ResponsiveContainer, ComposedChart, Line, Bar, Area, XAxis, YAxis,
ReferenceLine, ReferenceDot, Tooltip, Legend, CartesianGrid, Brush } from 'recharts';
const data = [
{ name: 'Page A', uv: 590, pv: 800, amt: 1400 },
{ name: 'Page B', uv: 868, pv: 967, amt: 1506 },
{ name: '... |
CompositeUi/src/views/layout/ContentLayout.js | kreta/kreta | /*
* This file is part of the Kreta package.
*
* (c) Beñat Espiña <benatespina@gmail.com>
* (c) Gorka Laucirica <gorka.lauzirika@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import './../../scss/layout/_content.scss... |
js/app/signup/components.js | monetario/web |
'use strict';
import React from 'react';
import {Router, Route, Link, History} from 'react-router'
import Formsy from 'formsy-react';
import Actions from './actions';
import InputField from '../../components/input_field';
var SignUpForm = React.createClass({
mixins: [History],
getInitialState: function () {
... |
app/jsx/gradebook/default_gradebook/components/SubmissionCommentListItem.js | djbender/canvas-lms | /*
* Copyright (C) 2017 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas 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, version 3 of the License.
*
* Canvas is distribut... |
modules/Navigation.js | tmbtech/react-router | import React from 'react';
var { object } = React.PropTypes;
/**
* A mixin for components that modify the URL.
*
* Example:
*
* import { Navigation } from 'react-router';
*
* var MyLink = React.createClass({
* mixins: [ Navigation ],
* handleClick(event) {
* event.preventDefault();
* ... |
blueocean-material-icons/src/js/components/svg-icons/social/mood.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const SocialMood = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 ... |
week3/react/express-react/views/bootstrap/LoginForm.js | jfhinchcliffe/Coderfactory_Term3_Notes |
import React from 'react'
export default function Form({ label = 'label' }){
return (
<div className="form-group">
<label for={label}>{label} form: </label>
<input type="text" class="form-control" id="`{label}`" />
</div>
)
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.