path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/svg-icons/content/add-box.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddBox = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>
</SvgIcon>
);
ContentAddBox = pu... |
test/specs/views/Feed/FeedDate-test.js | jamiehill/stardust | import faker from 'faker'
import React from 'react'
import * as common from 'test/specs/commonTests'
import FeedDate from 'src/views/Feed/FeedDate'
describe('FeedDate', () => {
common.isConformant(FeedDate)
common.rendersChildren(FeedDate)
it('renders text with date prop', () => {
const text = faker.hacker... |
app/javascript/mastodon/features/notifications/components/clear_column_button.js | kagucho/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
export default class ClearColumnButton extends React.Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
};
render () {
return (
<button className='text-btn column-header... |
src/svg-icons/av/surround-sound.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSurroundSound = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.76 16.24l-1.41 1.41C4.78 16.1 4 14.05 4 12c0-2.05.78-4.1 2.34-5.66l1.4... |
src/svg-icons/action/camera-enhance.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCameraEnhance = (props) => (
<SvgIcon {...props}>
<path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.2... |
src/svg-icons/action/http.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttp = (props) => (
<SvgIcon {...props}>
<path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-... |
app/javascript/mastodon/features/compose/components/search_results.js | pointlessone/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import AccountContainer from '../../../containers/account_container';
import StatusContainer from '../../../containers/sta... |
src/components/Entry/Integration/index.js | ProteinsWebTeam/interpro7-client | // @flow
import React from 'react';
import T from 'prop-types';
import Link from 'components/generic/Link';
import loadable from 'higherOrder/loadable';
import { foundationPartial } from 'styles/foundation';
import ipro from 'styles/interpro-new.css';
import local from './style.css';
import loadData from 'higherOrd... |
src/js/ui/menu.js | SpaceHexagon/pylon | import React from 'react';
import Icon from './icon.js';
import EventEmitter from 'events';
export default class Menu extends React.Component {
constructor() {
super();
// Initial state of the component
this.state = {
applet: null,
resized: false
};
}
componentDidM... |
src/svg-icons/hardware/scanner.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareScanner = (props) => (
<SvgIcon {...props}>
<path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/>
</... |
src/components/decorators/__tests__/testWithRelayHelpers.js | mixcloud/relay-helpers | /* @noflow */
import React from 'react';
import {shallow} from 'enzyme';
import withRelayHelpers from "../withRelayHelpers";
function TestComponent() {}
const WithHelpers = withRelayHelpers()(TestComponent);
describe('withRelayHelpers decorator', () => {
it('should pass other props through', () => {
con... |
react-router-tutorial/lessons/08-index-routes/modules/About.js | zerotung/practices-and-notes | import React from 'react'
export default React.createClass({
render() {
return <div>About</div>
}
})
|
app/components/Toastr/Toastr.js | danielzy95/oaa-chat | import React from 'react'
import styles from './Toastr.css'
const DEFAULT_TIMEOUT = 5
const getStyles = (str, def) => {
if (str) {
const style = styles[str]
if (style)
return style
}
return styles[def]
}
const getTypeStyles = type => getStyles(type, 'success')
const getPosStyles = pos => getStyles(pos, '... |
src/molecules/formfields/DateField/index.js | policygenius/athenaeum | import React from 'react';
import PropTypes from 'prop-types';
import BaseDateField from '../util/BaseDateField';
class DateField extends BaseDateField {
render() {
const { children } = this.props;
return (
this.wrapper(React.Children.map(children, this.wrapChild))
);
}
}
DateField.propTypes =... |
src/components/ui/Card.js | npdat/Demo_React_Native | /**
* Cards
*
<Card></Card>
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Card } from 'react-native-elements';
// Consts and Libs
import { AppSizes, AppColors, AppStyles } from '@th... |
src/svg-icons/action/face.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFace = (props) => (
<SvgIcon {...props}>
<path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-... |
examples/huge-apps/routes/Profile/components/Profile.js | nauzethc/react-router | import React from 'react';
class Profile extends React.Component {
render () {
return (
<div>
<h2>Profile</h2>
</div>
);
}
}
export default Profile;
|
app/components/ListItem/ListItem.js | zhrkian/SolarDataApp | import React from 'react'
import { Link } from 'react-router'
import s from './ListItem.css'
import Paper from 'material-ui/Paper'
import FloatingActionButton from 'material-ui/FloatingActionButton'
import ActionDelete from 'material-ui/svg-icons/action/delete'
import Spinner from '../Spinner/Spinner'
const ListItem ... |
tests/js/containers/Home.spec.js | CRUDNS/CRUDNS | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint import/no-named-default: 0 */
import React from 'react';
import { expect } from 'chai';
import { mount, shallow } from 'enzyme';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { defa... |
works/react-native/redux/TodoList/index.android.js | JoelPub/wordpress-amazon | /**
* 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 TodoList extends Component {
render() {
return (
<View style={styles.container}>
<Text... |
packages/bonde-admin-canary/src/scenes/Logged/scenes/Home/components/MobilizationsGadget/MobilizationsGadget.js | ourcities/rebu-client | import React from 'react'
import { Text, Pagination } from 'bonde-styleguide'
import { Queryset } from 'components'
import ImageColumn from '../ImageColumn'
import TableCardGadget from '../TableCardGadget'
import Filter from './Filter'
import allUserMobilizationsQuery from './query.graphql'
import { authSession } from ... |
ui/containers/Root.dev.js | yih-en/data-triangulation-tool | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import App from './App';
import DevTools from './DevTools';
export default class Root extends Component {
render() {
const { store } = this.props;
return (
<Provider store={store}>
<div>
<App />
... |
src/parser/warlock/affliction/modules/talents/DrainSoul.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import Enemies from 'parser/shared/modules/Enemies';
import Events from 'parser/core/Events';
import SPELLS from 'common/SPELLS';
import { formatPercentage, f... |
src/components/StaticPageContent.js | dawsonbotsford/vimrcBuilder | // @flow
import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.div`
padding: 6vw 10vw;
/* light pink */
background-color: #fff5f5;
/* near-black pink */
color: 1px solid #1f0200;
@media (max-width: 900px) {
padding: 10vh 4vw;
}
`;
const StaticPageContent = () => ... |
app/containers/CatKitDemo/CalculationsView.js | mhoffman/CatAppBrowser | import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import JSZip from 'jszip';
import { saveAs } from 'file-saver';
/* import IconButton from 'material-ui/IconButton';*/
import Table, {
TableBody,
TableCell,
TableHead,
TableRow,
} from 'material-ui/Table';
import Button fro... |
tests/routes/Home/components/HomeView.spec.js | uraway/stt-app | import React from 'react'
import { HomeView } from 'routes/Home/components/HomeView'
import { render } from 'enzyme'
describe('(View) Home', () => {
let _component
beforeEach(() => {
_component = render(<HomeView />)
})
it('Renders a welcome message', () => {
const welcome = _component.find('h4')
... |
frontend/components/player-controls.js | meandavejustice/min-vid | import React from 'react';
import cn from 'classnames';
import Progress from './progress';
import SoundControl from './sound-control';
import PlaybackControl from './playback-control';
export default class PlayerControls extends React.Component {
constructor(props) {
super(props);
this.state = {exited: false... |
fields/types/list/ListColumn.js | matthewstyers/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
import { plural } from '../../../admin/client/utils/string';
var ListColumn = React.createClass({
displayName: 'ListColumn',
propTypes: {
col: React.PropTypes.obj... |
admin/client/components/Popout/PopoutBody.js | suryagh/keystone | import React from 'react';
import blacklist from 'blacklist';
import classnames from 'classnames';
var PopoutBody = React.createClass({
displayName: 'PopoutBody',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
scrollable: React.PropTypes.bool,
},
render () {
cons... |
boxroom/archive/backup-js-glow-2018-01-28/boxroom/archive/js-surface-2018-01-27/boxroom/archive/2017-10-23-before-redesign/src/main/js-surface-react.js | js-works/js-surface | import adaptReactLikeRenderEngine from './adaption/adaptReactLikeRenderEngine';
import React from 'react';
import ReactDOM from 'react-dom';
function reactMount(content, targetNode) {
ReactDOM.render(content, targetNode);
return () => ReactDOM.unmountComponentAtNode(targetNode);
}
const {
createElement,... |
src/routes/dashboard/components/recentSales.js | zhangjingge/sse-antd-admin | import React from 'react'
import PropTypes from 'prop-types'
import { Table, Tag } from 'antd'
import styles from './recentSales.less'
import { color } from '../../../utils'
const status = {
1: {
color: color.green,
text: 'SALE',
},
2: {
color: color.yellow,
text: 'REJECT',
},
3: {
color:... |
app/javascript/mastodon/features/status/components/action_bar.js | theoria24/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import IconButton from '../../../components/icon_button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMess... |
src/components/RestaurantDecision/RestaurantDecision.js | labzero/lunch | import PropTypes from 'prop-types';
import React from 'react';
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';
import Tooltip from 'react-bootstrap/lib/Tooltip';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './RestaurantDecision.scss';
// TODO return null when upgradi... |
test/calendar_test.js | BrunoAlcides/react-datepicker | import React from 'react'
import moment from 'moment'
import Calendar from '../src/calendar'
import Month from '../src/month'
import Day from '../src/day'
import YearDropdown from '../src/year_dropdown'
import MonthDropdown from '../src/month_dropdown'
import { shallow, mount } from 'enzyme'
describe('Calendar', funct... |
app/components/Home.js | wilomgfx/code-push-gui | // @flow
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import styles from './Home.css';
export default class Home extends Component {
render() {
return (
<div>
<div className={styles.container} data-tid="container">
</div>
</div>
);
}
}
|
node_modules/semantic-ui-react/src/views/Feed/FeedLike.js | mowbell/clickdelivery-fed-test | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import Icon from '../../elements/Icon'
/**
* A feed can contain a like element.
*/
function FeedLike(props) {
... |
app/containers/App/Loading.js | CityOfZion/neon-wallet | // @flow
import React from 'react'
import classNames from 'classnames'
import themes from '../../themes'
import Loader from '../../components/Loader'
import styles from './Loading.scss'
type Props = {
theme: ThemeType,
nobackground?: boolean,
}
export default function Loading(props: Props) {
const { theme, nob... |
server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
frontend/js/components/details/table.js | mcallistersean/b2-issue-tracker | /**
* Created by sean on 22/12/16.
*/
import React from 'react'
class DetailTable extends React.Component {
render() {
let items = this.props.items || [];
let rows = items.map(i => {
return <tr key={i[0]}>
<th>{i[0]}</th>
<td>{i[1]}</td>
</t... |
fields/types/embedly/EmbedlyField.js | woody0907/keystone | import React from 'react';
import Field from '../Field';
import { FormField, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'EmbedlyField',
// always defers to renderValue; there is no form UI for this field
renderField () {
return this.renderValue();
},
renderValue (path, label, ... |
src/Location/Html4.js | gaearon/component-router | import React from 'react';
import url from 'url';
import Store from '../Store';
import ActionCreator from '../ActionCreator';
const Html4 = React.createClass({
componentWillMount() {
this.restoreUrl();
},
componentDidMount() {
this.paramsUnsubscribe = Store.addChangeListener(this.onChange);
window... |
client/components/lists/ManageLists.js | zhakkarn/Mail-for-Good | import React from 'react';
import ManageListsBox from '../../containers/lists/ManageListsBox';
const ManageLists = () => {
return (
<div>
<div className="content-header">
<h1>Manage lists
<small>Edit, delete and segement your lists here</small>
</h1>
</div>
<section ... |
frontend/src/MovieFile/Editor/MovieFileRowCellPlaceholder.js | Radarr/Radarr | import React from 'react';
import styles from './MovieFileRowCellPlaceholder.css';
function MovieFileRowCellPlaceholder() {
return (
<span className={styles.placeholder} />
);
}
export default MovieFileRowCellPlaceholder;
|
packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.js | viankakrisna/create-react-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 './assets/style.css';
import { test, version } from 'test-integrity';
export default () => {
const ... |
flex.js | aarongoin/react-flex-component | import React from 'react';
class Box extends React.Component {
static defaultProps = {
prefix: (navigator.userAgent.indexOf('AppleWebKit') > -1) ? 'Webkit' : (navigator.userAgent.indexOf('MSIE') > -1) ? 'ms' : null,
justifyContent: 'flex-start',
alignItems: 'stretch'
};
constructor(props) {
super(props);
... |
app/stories/PostSummary.js | manavsehgal/reactspeedcoding | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import PostSummary from '../components/PostSummary.jsx';
storiesOf('PostSummary', module)
.add('default', () => (
<PostSummary />
));
|
app.js | ygpark2/react-img-component | /*!
* React Component Starter Kit
* https://github.com/kriasoft/react-component-starter
* Copyright (c) KriaSoft, LLC. All rights reserved. See LICENSE.txt
*/
import React from 'react';
import Component from './src';
React.render(<Component />, document.getElementById('component'));
|
webapp/app/components/Stats/StatisticGraph/index.js | EIP-SAM/SAM-Solution-Server | import React from 'react';
import styles from 'components/Stats/StatisticGraph/styles.css';
const chartJs = require('react-chartjs');
/* eslint-disable react/prefer-stateless-function */
export default class StatisticGraphComponent extends React.Component {
componentDidMount() {
this.props.getGraphListByType('R... |
react/src/JobInput.js | jbadson/render_controller | import React, { Component } from 'react';
import './JobInput.css';
import axios from "axios";
import { FileBrowserPopup } from './FileBrowser';
/**
* Number input field that changes CSS className if value contains a non-digit.
* @prop {string} name: Name attribute of HTML input
* @prop {string} label: Label text
... |
src/parser/deathknight/blood/modules/features/checklist/Component.js | fyruna/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Checklist from 'parser/shared/modules/features/Checklist';
import Rule from 'parser/shared/modules/features/Checklist/Rule';
import Requirement from 'parser/shared/modules... |
packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.js | in2core/create-react-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, { Component } from 'react';
import PropTypes from 'prop-types';
import load from 'absoluteLoad';
export default class ext... |
src/index.js | Kazooooo/react-sample-newBlog | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render(
<Provi... |
src/DropdownButton.js | glenjamin/react-bootstrap | import React from 'react';
import PropTypes from 'prop-types';
import Dropdown from './Dropdown';
const propTypes = {
/**
* An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
* @type {string|number}
* @required
*/
id: PropTypes.any,
/** An `hre... |
src/server/middleware/error.js | nhardy/web-scaffold | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { createMemoryHistory, match } from 'react-router';
import { ReduxAsyncConnect, loadOnServer } from 'redux-connect';
import { Provider } from 'react-redux';
import assetManifest from 'server/lib/assetManifest';
import createStore from 'ap... |
src/components/common/layout/Header/index.js | ESTEBANMURUZABAL/my-ecommerce-template | /**
* Imports
*/
import React from 'react';
// Required components
import Breakpoint from '../../../core/Breakpoint';
import DesktopHeader from './DesktopHeader';
import HandheldsHeader from './HandheldsHeader';
import HeaderHighlight from './HeaderHighlight';
/**
* Module's default component
*/
class Header ext... |
5.3.1/src/index.js | erikras/redux-form-docs | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import store from 'redux/store'
import DevTools from './components/DevTools'
import component from './routes'
import Perf from 'react-addons-perf'
import devToolsEnabled from './devToolsEnabled'
const dest = document.ge... |
actor-apps/app-web/src/app/components/modals/InviteUser.react.js | Just-D/actor-platform | import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import { Styles, FlatButton } from 'material-ui';
import ActorTheme from 'constants/ActorTheme';
import ActorClient from 'utils/ActorClien... |
client/js/component/Feed.js | fupslot/linkmator | import React from 'react';
import { connect } from 'react-redux';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import {List, ListItem} from 'material-ui/List';
import Checkbox from 'material-ui/Checkbox';
import TextField from 'material-ui/TextField';
import { fetchPosts }... |
src/pages/Projects/Projects.js | cdtinney/cdtinney.github.io | import React from 'react';
import PropTypes from 'prop-types';
import PageLayout from '../../layouts/PageLayout';
import ProjectCard from '../../components/ProjectCard';
import classes from './Projects.module.css';
function Projects({ data = {} }) {
const {
allProjectsJson: {
edges = [],
} = {},
s... |
app/containers/ChatListItem/index.js | davidnum/chat | import React from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import { createStructuredSelector } from 'reselect';
import Avatar from 'material-ui/Avatar';
import { makeSelectCurrentUser } from '../App/selectors';
import { formatDate } from '../../utils/date';
import ListI... |
SynapseClient/components/LoginPage.js | jmorg/synapse | import React, { Component } from 'react';
import {
Image,
Text,
View,
Navigator,
Dimensions,
AsyncStorage,
} from 'react-native';
export class LoginPage extends Component {
componentWillMount() {
var navigator = this.props.navigator;
var doIntroSequence = this.props.doIntroS... |
packages/metadata-react/src/Diagrams/Line.js | oknosoft/metadata.js | /**
* ### Диаграмма Line
*
* @module Line
*
* Created by Evgeniy Malyarov on 18.08.2018.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {chartData} from './Bar';
function Line({width, height, data, isFullscreen, Recharts}) {
const {LineChart, Line, XAxis, YAxis, CartesianGrid, Tool... |
docs/src/new-components/basics/tooltip/TooltipMessage.js | storybooks/react-storybook | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { color, typography } from '../shared/styles';
import Link from '../Link';
const Title = styled.div`
font-weight: ${typography.weight.black};
`;
const Desc = styled.span``;
const Links = styled.div`
marg... |
src/svg-icons/communication/location-off.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationLocationOff = (props) => (
<SvgIcon {...props}>
<path d="M12 6.5c1.38 0 2.5 1.12 2.5 2.5 0 .74-.33 1.39-.83 1.85l3.63 3.63c.98-1.86 1.7-3.8 1.7-5.48 0-3.87-3.13-7-7-7-1.98 0-3.76.83-5.04 2.15l3.19 ... |
src/components/no-match/index.js | redaphid/react-svg-flexbox | import React from 'react';
import styles from './index.css';
const NoMatch = () => {
return <h1 className={styles.root}>No Match :(</h1>;
}
export default NoMatch;
|
src/svg-icons/action/view-list.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewList = (props) => (
<SvgIcon {...props}>
<path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"/>
</SvgIcon>
);
ActionViewList = pure(ActionViewList);
Actio... |
src/components/views/simple-list.js | mberneti/ReactAdmin | import React from 'react';
import { Table, Button, Glyphicon } from 'react-bootstrap';
import PanelLayout from '../layouts/panel-layout';
const simpleList = props => {
return (
<PanelLayout title={props.Title}>
<Table responsive hover>
<thead>
<tr>
<th>#</th>
<th>... |
src/config/routes.js | msangui/redux-boilerplate | import React from 'react';
import {Route} from 'react-router';
import App from '../views/app/App';
import Home from '../views/home/Home';
import Wiki from '../views/wiki/Wiki';
import PersonForm from '../views/personForm/PersonForm';
import NotFound from '../views/notFound/NotFound';
export default (
<Route componen... |
client/src/components/atomic/RuleCategoriesSelector.js | kfirprods/tpp | import React from 'react';
import { AsyncCreatable } from 'react-select';
export default class RuleCategoriesSelector extends React.Component {
constructor() {
super();
this.state = {
options: [],
value: ''
};
}
getCategories(input) {
if (!input) {... |
react/features/overlay/components/native/PageReloadOverlay.js | jitsi/jitsi-meet | // @flow
import React from 'react';
import { appNavigate, reloadNow } from '../../../app/actions';
import { ConfirmDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import { setFatalError, setPageReloadOverlayCanceled } from '../../act... |
modules/react-docs/src/components/Sidebar.js | socialtables/react-color | /* jshint node: true, esnext: true */
"use strict";
import React from 'react';
import ReactCSS from 'reactcss';
import markdown from '../helpers/markdown';
import { Tile } from '../../../react-material-design';
import SidebarItem from './SidebarItem';
class Sidebar extends ReactCSS.Component {
classes() {
ret... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js | gutenye/create-react-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, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return [
{ id: 1, name: '1' },
... |
Example/src/page/Home/index.js | dragonwong/rnx-ui | /**
* 主页面 rnx-ui 面板
*/
import React from 'react';
import {
HomeList,
} from 'BizComponent';
import Router from 'BizRouter';
import All from 'rnx-ui/All';
import NavBar from 'rnx-ui/NavBar';
const sectionList = ['Navigation', 'Data Entry', 'Data Display', 'Feedback', 'Other'];
const pageException = ['Home'];
const ... |
app/routes/__tests__/app.component.spec.js | dleszcz/ladder | import React from 'react';
import { expect } from 'chai';
import { shallow, mount } from 'enzyme';
import { spy } from 'sinon';
import Helmet from 'react-helmet';
import { IntlProvider } from 'react-intl';
import { translationMessages } from '../../i18n';
import { DEFAULT_LOCALE } from '../../modules/locales/locales.r... |
demos/menus/demos/upperRight.js | isogon/styled-mdl-website | import React from 'react'
import { Menu, MenuItem, MenuDivider, Button } from 'styled-mdl'
import More from 'react-icons/lib/md/more-vert'
import { Container, Bar, Bg } from './styled'
const demo = () => (
<Container align="right">
<Bg />
<Bar>
<Menu
topRight
control={
<Butto... |
still/src/components/Layout/Header.js | marktheshark13/Stillwaters-farm | import React, { Component } from 'react';
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap';
import { Link } from 'react-router-dom';
class Header extends Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
... |
packages/cf-component-page/test/Page.js | manatarms/cf-ui | import React from 'react';
import renderer from 'react-test-renderer';
import { Page } from 'cf-component-page';
test('should render', () => {
const component = renderer.create(<Page>Hello World</Page>);
expect(component.toJSON()).toMatchSnapshot();
});
|
packages/benchmarks/react-jss/client/index.js | A-gambit/CSS-IN-JS-Benchmarks | import ReactDOM from 'react-dom';
import React from 'react';
import App from 'benchmarks-utils';
import Table from './Table';
import './index.html';
ReactDOM.render(<App table={Table} />, document.getElementById('root'));
|
courses/react-for-beginners/src/components/Inventory.js | rmartin/experiments | import React from 'react';
import AddFishForm from './AddFishForm';
class Inventory extends React.Component {
render() {
return (
<div>
<h2>Inventory</h2>
<AddFishForm addFish={this.props.addFish}/>
<button onClick={this.props.loadSamples}>Load Sa... |
src/server.js | ChrisMaher/reactjs-project | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel-core/polyfill';
import path from 'path';
import express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Router from './routes';
import Html from './components/Html';
const server = global.... |
test/test_helper.js | ASH-khan/ReduxMiddleware | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
app/javascript/mastodon/features/blocks/index.js | foozmeat/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import LoadingIndicator from '../../components/loading_indicator';
import { ScrollContainer } from 'react-router-scroll-4';
import Column from '../ui/componen... |
src/utils/showDevTools.js | yoo2001818/react-against-humanity | import React from 'react';
import { render } from 'react-dom';
import DevTools from '../container/devTools';
export default function showDevTools(store) {
const popup = window.open(null, 'Redux DevTools',
'menubar=no,location=no,resizable=yes,' +
'scrollbars=no,status=no,width=450,height=5000');
if (!popu... |
client/modules/App/__tests__/App.spec.js | vibhas77/Student-Wallet | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow, mount } from 'enzyme';
import { App } from '../App';
import styles from '../App.css';
import { intlShape } from 'react-intl';
import { intl } from '../../../util/react-intl-test-helper';
import { toggleAddPost } from '../App... |
client/components/Login.js | steveleec/fbsdkinreact | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
export default class Login extends React.Component{
constructor(props) {
super(props);
}
componentWillMount() {
window.fbAsyncInit = function() {
FB.init({
appId : '1528085177508710',
xfbml : true,
... |
src/server.js | hourliert/diaper-project | /**
* Everything begins here!
* This file could seem heavy or scary, but wait!
* First if you don't want to use server rendering, check `./config.js` to
* enable/disable it. In this case, everything between line 12 and 82 is meaningless.
* Line 89, we simply run a web server that serves the static website.
* On t... |
src/components/Link.js | diivanand/DataBrowser | // Link.js - Temporary example class to show unit test working
import React from 'react';
const STATUS = {
HOVERED: 'hovered',
NORMAL: 'normal',
};
export default class Link extends React.Component {
constructor(props) {
super(props);
this._onMouseEnter = this._onMouseEnter.bind(this);
... |
src/frontend/components/RightColumn.js | gbgtech/gbgtechWeb | import React from 'react';
import EventsList from './EventsList';
import TwitterFeed from './TwitterFeed';
const RightColumn = React.createClass({
render() {
return (
<div className="right-column">
<EventsList />
<TwitterFeed path="search?q=%23gbgtech%20-RT" id="696282839873093633">#gbgte... |
web/src/client/components/loading.js | mrsharpoblunto/it-gets-the-hose-again | /*
* @format
*/
import React from 'react';
export default function Loading(props) {
return (
<div
className="valign-wrapper"
style={{
position: 'absolute',
top: '0',
left: '0',
width: '100%',
height: '100%',
}}>
<div className="valign center-align... |
src/galaxy/store/hover.js | oliverpaisley/pm | import React from 'react';
import eventify from 'ngraph.events';
import appEvents from '../service/appEvents.js';
import scene from './scene.js';
import getBaseNodeViewModel from './baseNodeViewModel.js';
export default hoverStore();
function hoverStore() {
var store = {};
eventify(store);
appEvents.nodeHover... |
src/components/scroll/scroll.js | getcha22/react-blog | import React from 'react'
import styles from './scroll.css'
class Scroll extends React.Component {
state = {
isShown: false
}
componentDidMount () {
document.addEventListener('scroll', () => {
this.handleScroll();
})
}
handleScroll() {
if (!this.state.is... |
test/integration/scss-fixtures/url-global-asset-prefix-1/pages/_app.js | azukaru/next.js | import React from 'react'
import App from 'next/app'
import '../styles/global1.scss'
import '../styles/global2.scss'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
src/svg-icons/communication/forum.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationForum = (props) => (
<SvgIcon {...props}>
<path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/>
</SvgIcon>
);
Co... |
react-server/pages/hello-world.js | axelson/home-dashboard | import React from 'react';
import {RootContainer, RootElement, TheFold} from 'react-server';
import Header from '../components/common/Header.jsx';
import HelloWorld from '../components/hello-world';
export default class SimplePage {
getElements() {
return <RootContainer>
<RootElement>
<Header />
... |
packages/material-ui-icons/src/VideoLibrary.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let VideoLibrary = 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-2zm-8 12.5v-9l6 4.5-6 4.5z" />
</SvgIcon... |
module_2/viz/js/app.js | getsmarter/bda | import React from 'react'
import d3 from 'd3'
import ReactDOM from 'react-dom'
import c3 from 'c3'
import TimeScaleBrush from "./timescale_brush"
import IndicatorChart from "./indicator_chart"
import NetworkChart from "./network"
import { meta_indicators, flatten } from "./utils"
class ControlPanel extends React.Comp... |
src/decorator/validator.js | psenger/ReactJS-Rapid-Prototype-Template | import React, { Component } from 'react';
export function Validator () {
return (Component) => {
class ComponentWrapper extends Component {
constructor (props, context) {
super(props, context);
this.displayName = 'decorator/Validator';
}
render () {
return <Component {.... |
components/Layout.js | NigelEarle/SSR-shopping | import React, { Component } from 'react';
import { Header } from '../components';
import { Provider } from 'mobx-react';
const Layout = ({ children }) => (
<div className="mainLayout">
<Header/>
{children}
</div>
);
export default Layout; |
tests/client/amo/containers/TestApp.js | mstriemer/addons-frontend | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
renderIntoDocument,
Simulate,
} from 'react-addons-test-utils';
import { AppBase, setupMapStateToProps } from 'amo/containers/App';
import * as api from 'core/api';
import { getFakeI18nInst } from 'tests/client/helpers';
describe('App',... |
assets/javascripts/kitten/components/interaction/drag-and-drop-list/test.js | KissKissBankBank/kitten | import React from 'react'
import ReactDOM from 'react-dom'
import renderer from 'react-test-renderer'
import { DragAndDropList } from './index'
describe('<DragAndDropList />', () => {
let component
describe('by default', () => {
beforeEach(() => {
ReactDOM.createPortal = jest.fn(element => {
ret... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.