path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/PartiesPage/PartiesPage.js | cbellino/roster | import React, { Component } from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './PartiesPage.scss';
import PartyListContainer from '../../containers/PartyListContainer/PartyListContainer';
const PartiesPage = () => (
<div className={s.root}>
<PartyListContainer />
</... |
packages/react-ui-core/src/List/__tests__/ListItem-test.js | rentpath/react-ui | import React from 'react'
import { shallow } from 'enzyme'
import theme from './mocks/theme'
import ThemedListItem from '../ListItem'
const ListItem = ThemedListItem.WrappedComponent
describe('ListItem', () => {
let wrapper
beforeEach(() => {
wrapper = shallow(
<ListItem theme={theme} />,
)
})
... |
packages/node_modules/@ciscospark/react-component-avatar/src/index.js | bzang/react-ciscospark | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon, {ICON_TYPE_MESSAGE} from '@ciscospark/react-component-icon';
import styles from './styles.css';
function Avatar({baseColor, name, image, isSelfAvatar, size}) {
let avatarClass, avatarContents;
let backg... |
src/parser/shaman/restoration/modules/talents/Torrent.js | FaideWW/WoWAnalyzer | import React from 'react';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import calculateEffectiveHealing from 'parser/core/calculateEffectiveHealing';
import StatisticListBoxItem from 'inter... |
client/components/GalleryComponent.js | spectralsun/reactgur | import React from 'react';
import {Glyphicon} from 'react-bootstrap';
import xhttp from 'xhttp';
import MediaComponent from './../components/MediaComponent.js';
import ee from '../Emitter.js';
import Scroll from '../Scroll.js';
export default class GalleryComponent extends React.Component
{
constructor(props) ... |
src/js/components/LocationListItem.js | grommet/grommet-people-finder | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import PropTypes from 'prop-types';
import ListItem from 'grommet/components/ListItem';
import config from '../config';
const LocationListItem = (props) => {
const { item } = props;
return (
<ListItem
justify... |
src/containers/header/Header.js | Gullskatten/react-seating-map-webapp | import './Header.css';
import React, { Component } from 'react';
import Title from '../../components/title/Title';
import FontAwesome from 'react-fontawesome';
import Modal from '../../components/modal/Modal';
import { UrlAddTeam, UrlAddFloor } from '../constants/UrlConstants';
import axios from 'axios';
import { injec... |
fixtures/packaging/systemjs-builder/prod/input.js | chicoxyzzy/react | import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
React.createElement('h1', null, 'Hello World!'),
document.getElementById('container')
);
|
node_modules/lite-server/node_modules/browser-sync/node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | ghanvatpriyanka/angular2demo | 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/components/dialog/demos/FullWidthActions.js | isogon/styled-mdl | import React from 'react'
import { withStateHandlers } from 'recompose'
import {
Dialog,
DialogTitle,
DialogActions,
DialogContent,
Button,
} from '../../../'
const mdSpecLink =
'https://www.google.com/design/spec/components/dialogs.html#dialogs-specs'
export default withStateHandlers(
{ isShowingDialog... |
demo/components/confirmation/ConfirmationDemo.js | f0zze/rosemary-ui | import DemoWithSnippet from '../../../demo/layout/DemoWithSnippet';
import Confirmation from '../../../src/components/Confirmation';
import React from 'react';
export default class ConfirmationDemo extends React.Component {
constructor(props) {
super(props);
this.state = {
open: false
... |
packages/zensroom/lib/components/reviews/ReviewsList.js | SachaG/Zensroom | /*
List of reviews, wrapped with withList
http://docs.vulcanjs.org/data-loading.html#List-Resolver
*/
import React from 'react';
import { Components, registerComponent, withList, withCurrentUser, Loading } from 'meteor/vulcan:core';
import { FormattedMessage } from 'meteor/vulcan:i18n';
import Reviews from '../../... |
blueocean-material-icons/src/js/components/svg-icons/action/lock-open.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionLockOpen = (props) => (
<SvgIcon {...props}>
<path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.... |
src/Namster/ClientApp/components/home.js | ucdavis/Namster | import React from 'react'
export default class Home extends React.Component {
render() {
return (
<div>
Hi From Home
</div>
);
}
}
|
app/components/Dashboard/TestingSessions/Objectives.js | cdiezmoran/AlphaStage-2.0 | import React from 'react';
import uuid from 'uuid/v4';
import { array, func } from 'prop-types';
import styles from './Objectives.scss';
const Objectives = ({ objectives, handleChange }) => {
const addObjective = (objective) => {
const value = [...objectives, objective];
handleChange({ target: { name: 'objec... |
client/App/Members/Table/TableRow/Mails/index.js | JohannesAnd/SKWebsite | import React from 'react';
import { connect } from '@cerebral/react';
import { state, sequences, props } from 'cerebral';
import { faCircleNotch, faEnvelope } from '@fortawesome/free-solid-svg-icons';
import {
IconAnimated,
IconClickable,
Buttons,
Button,
ModalText,
Modal,
} from '../elements';
export defa... |
frontend/src/Components/withScrollPosition.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React from 'react';
import scrollPositions from 'Store/scrollPositions';
function withScrollPosition(WrappedComponent, scrollPositionKey) {
function ScrollPosition(props) {
const {
history
} = props;
const scrollTop = history.action === 'POP' || (history.... |
src/routes/private/PanelTools/LayoutManager/LayoutActionsPopup.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types'
import {graphql} from 'react-apollo';
import List, { ListItem, ListItemIcon, ListItemSecondaryActionStart, ListItemSecondaryAction, ListItemText } from '../../../../components/List'
import { Manager, Target, Popper } from 'react-popper'
import classNames fro... |
RankDemo/index.ios.js | MisterZhouZhou/ReactNativeLearing | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import Launcher from './app/Launcher';
AppRegistry.registerComponent('RankDemo', () => Launcher);
|
ui/src/pages/DataSourcePage/ExportManager/ExportDownloadManager.js | LearningLocker/learninglocker | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Map } from 'immutable';
import { withProps, compose } from 'recompose';
import Spinner from 'ui/components/Spinner';
import { withSchema } from 'ui/utils/hocs';
import DownloadListItem from './DownloadListItem';
class ExportDownload... |
examples/ModalWithFixedFooter.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Modal from '../src/Modal';
import Button from '../src/Button';
export default
<Modal
header='Modal Header'
fixedFooter
trigger={
<Button waves='light'>MODAL WITH FIXED FOOTER</Button>
}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incid... |
src/pages/dadiva.js | vitorbarbosa19/ziro-online | import React from 'react'
import BrandGallery from '../components/BrandGallery'
export default () => (
<BrandGallery brand='Dadiva' />
)
|
src/components/atoms/Link/index.js | nennes/nenn_es | import React from 'react'
import GatsbyLink from 'gatsby-link'
const isExternal = (link) => link.startsWith('http')
const Link = (props) => {
const {to, ...rest} = props
if (isExternal(to)) {
return <a href={to} target='_blank' {...rest} />
}
return <GatsbyLink {...props} />
}
export default Link |
packages/mineral-ui-icons/src/IconPersonPin.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconPersonPin(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProp... |
src/components/Header/Header.js | ashlynbaum/react-test | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.less';
import withStyles from '../../decorators/withStyles';
import Link from '../../utils/Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header {
render() {
... |
webpack/scenes/ModuleStreams/Details/Profiles/ModuleStreamDetailProfiles.js | snagoor/katello | import React from 'react';
import PropTypes from 'prop-types';
import { Table } from 'patternfly-react';
import TableSchema from './TableSchema';
const ModuleStreamDetailProfiles = ({ profiles }) => (
<div>
<Table.PfProvider columns={TableSchema}>
<Table.Header />
<Table.Body rows={profiles} rowKey="... |
Realization/frontend/czechidm-core/src/components/basic/AbstractContent/AbstractContent.js | bcvsolutions/CzechIdMng | import React from 'react';
import Helmet from 'react-helmet';
//
import AbstractContextComponent from '../AbstractContextComponent/AbstractContextComponent';
import PageHeader from '../PageHeader/PageHeader';
import ContentHeader from '../ContentHeader/ContentHeader';
import Icon from '../Icon/Icon';
import Configurati... |
app/components/common/IssueReporter/issue-reporter.js | builtwithluv/ZenFocus | import React from 'react';
import PropTypes from 'prop-types';
import { Dialog } from '@blueprintjs/core';
const URL = 'https://docs.google.com/forms/d/e/1FAIpQLSc498W0BqVHGhhb_A9WyxrHGfbMeynnuEXa5NYpjMD9nDQpng/viewform?embedded=true';
const IssueReporter = ({ showIssueReportingModal, closeFeedback }) => (
<Dialog
... |
src/svg-icons/action/open-in-browser.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenInBrowser = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/>
</SvgIcon>
);
... |
code/L7/Contact Search /components/movies/movies-page.js | santhoshthepro/reactjs | import React, { Component } from 'react';
import { Link } from 'react-router';
export default class MoviesPage extends Component{
render(){
return ( <div>
<h2>This is a Movies Page</h2>
</div>
);
}
} |
[2]. Demo_RN/[15]. loginPage_demo/index.ios.js | knightsj/RN_Demo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
var LoginView = require('./loginView');
class LoginViewDemo extends Component{
render(){
retur... |
examples/huge-apps/components/Dashboard.js | carlosmontes/react-router | import React from 'react';
import { Link } from 'react-router';
class Dashboard extends React.Component {
render () {
let { courses } = this.props;
return (
<div>
<h2>Super Scalable Apps</h2>
<p>
Open the network tab as you navigate. Notice that only the amount of
... |
vgdb-frontend/src/index.js | mattruston/idb | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import { BrowserRouter } from 'react-router-dom'
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render((
<BrowserRouter>
<App />
</BrowserRouter>
), document.getElementById('root'));
... |
src/client/components/input.js | berkeley-homes/near-miss-positive-intervention | import React from 'react'
export default ({ name, label, value, onChange }) => (
<div className='w-100 pa3'>
<label className='black-60 pointer' htmlFor={name}>
{label}
</label>
<input
id={name}
type='text'
className='w-100 h3 ba pa1 bw1 mt2 b--nearmiss-black nearmiss_input_text'
... |
baker/generators/app/templates/app/setup.js | samtgarson/MyFirstReactNativeApp | import App from './components/App';
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from './store';
const store = configureStore();
function setup() {
class Root extends Component {
render() {
return (
<Provider store={store}>
<App ... |
examples/custom-server-hapi/pages/index.js | sedubois/next.js | import React from 'react'
import Link from 'next/link'
export default () => (
<ul>
<li><Link href='/b' as='/a'><a>a</a></Link></li>
<li><Link href='/a' as='/b'><a>b</a></Link></li>
</ul>
)
|
src/components/common/Spinner.js | amir5000/react-native-manager-app | import React from 'react';
import { View, ActivityIndicator } from 'react-native';
const Spinner = ({ size }) => {
return (
<View style={styles.spinnerStyle}>
<ActivityIndicator size={size || 'large' } />
</View>
);
};
const styles = {
spinnerStyle: {
flex: 1,
justifyContent: 'center',
... |
test/__babel_fixtures__/drop-hot.prod.js | gaearon/react-hot-loader | import React from 'react'
import { hot, foo } from 'react-hot-loader'
import { hot as namedHot, foo as namedFoo } from 'react-hot-loader'
import { hot as rootHot } from 'react-hot-loader/root'
import { hot as namedHot2 } from 'react-hot-loader'
import { hot as notRHLHot } from 'not-react-hot-loader'
import * as RHL fro... |
example/__tests__/index.android.js | beaurushton/react-native-tableview-simple | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
electron/app/containers/EditorRenderer.js | zindlerb/motif | import React from 'react';
import { connect } from 'react-redux';
import { createImmutableJSSelector } from '../utils';
import { renderTreeSelector } from '../selectors';
import StaticRenderer from '../components/StaticRenderer';
const EditorRenderer = React.createClass({
render() {
const {
renderTree,
... |
components/events/event-content-loader.js | coderplex/coderplex | import React from 'react';
import ContentLoader from 'react-content-loader';
import styled from 'react-emotion';
import { space } from 'styled-system';
import { Flex } from 'grid-styled/emotion';
import { breakpoints, graySecondary } from '../../utils/base.styles';
const EventLoader = styled(Flex)`
${space};
bord... |
src/svg-icons/content/content-cut.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentContentCut = (props) => (
<SvgIcon {...props}>
<path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-... |
src/Footer.js | jareth/react-materialize | import React from 'react';
import cx from 'classnames';
import Row from './Row';
import Col from './Col';
class Footer extends React.Component {
render() {
let { className, ...props } = this.props;
let classes = {
'page-footer': true
};
return (
<footer className={cx(classes, className)}>... |
examples/huge-apps/routes/Course/routes/Assignments/components/Sidebar.js | gdi2290/react-router | import React from 'react';
import { Link } from 'react-router';
class Sidebar extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//assignments: COURSES[params.courseId].assignments
//});
//}
render () {
//var { assignments } = this.props;
var assignments = COURSES[th... |
src/components/TimetableScreen.js | Dennitz/Timetable | // @flow
import React from 'react';
import {
Animated,
Dimensions,
FlatList,
TouchableWithoutFeedback,
ScrollView,
View,
} from 'react-native';
import moment from 'moment';
import i18n from 'react-native-i18n';
import TimetableWeek from '../containers/TimetableWeek';
import { AddButton, EditButton } from '... |
docs/src/app/components/pages/components/IconMenu/ExampleScrollable.js | pradel/material-ui | import React from 'react';
import IconMenu from 'material-ui/IconMenu';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton/IconButton';
import MapsPlace from 'material-ui/svg-icons/maps/place';
const IconMenuExampleScrollable = () => (
<IconMenu
iconButtonElement={<IconBu... |
docs/src/draftComponents/TeX/EntityTeX.js | gocreating/redux-draft | import React, { Component } from 'react';
import classNames from 'classnames';
import { reduxDraftEntity } from '../../../../lib';
import TeX from './TeX';
import './EntityTeX.css';
class EntityTeX extends Component {
constructor(props) {
super(props);
this.state = {
editMode: false,
math: '',
... |
src/components/Icons/SvgIcon.js | chrisxclash/play-midnight | import React from 'react';
import styled from 'styled-components';
const StyledSvg = styled.svg`
display: inline-flex;
fill: currentColor;
height: 24px;
width: 24px;
`;
const SvgIcon = ({ children, viewBox, color, ...props }) => (
<StyledSvg fill={color} focusable="false" viewBox={viewBox} {...props}>
{... |
client/src/components/Gifts.js | xmas-bunch/amigo-invisible | import React, { Component } from 'react';
import Gift from './Gift';
class Gifts extends Component {
componentDidMount() {
this.props.getGifts();
}
render() {
let mainContent;
if (this.props.gifts.length) {
mainContent = this.props.gifts.map(gift => {
r... |
src/sources/icons.js | kirainmoe/ymplayer | import React from 'react';
export const PlayButton = () => {
return (
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M8 5v14l11-7z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
);
};
export const PauseButton = () => {
... |
app/javascript/mastodon/containers/status_container.js | abcang/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Status from '../components/status';
import { makeGetStatus, makeGetPictureInPicture } from '../selectors';
import {
replyCompose,
mentionCompose,
directCompose,
} from '../actions/compose';
import {
reblog,
favourite,
bookmark,
unreb... |
react/features/authentication/components/LoginDialog.native.js | bgrozev/jitsi-meet | /* @flow */
import React, { Component } from 'react';
import { Text, TextInput, View } from 'react-native';
import { connect as reduxConnect } from 'react-redux';
import type { Dispatch } from 'redux';
import { ColorSchemeRegistry } from '../../base/color-scheme';
import { toJid } from '../../base/connection';
import... |
src/index.js | serlo-org/serlo-abc | import { AppLoading } from 'expo';
import { find, identity, map } from 'ramda';
import React, { Component } from 'react';
import { View } from 'react-native';
import { NativeRouter, Redirect, Route } from 'react-router-native';
import { PageHit } from 'expo-analytics';
import Analytics from './helpers/analytics';
impor... |
stories/MultipleVertical.js | tomkp/react-split-pane | import React from 'react';
import SplitPane from '../src';
export default () => (
<SplitPane split="vertical" defaultSize="33%">
<div>pane 1 size: 33%</div>
<SplitPane split="vertical" defaultSize="50%">
<div>pane 2 size: 50% (of remaining space)</div>
<div>pane 3</div>
</SplitPane>
</Split... |
es6/Notification/NotificationCenter.js | yurizhang/ishow | import React from 'react';
import ReactDOM from 'react-dom';
import Notification from './Notification';
import '../Common/css/Notification.css';
var className = '.ishow-notification';
export default function NotificationCenter() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
... |
test/specs/views/Feed/FeedLike-test.js | ben174/Semantic-UI-React | import React from 'react'
import * as common from 'test/specs/commonTests'
import FeedLike from 'src/views/Feed/FeedLike'
describe('FeedLike', () => {
common.isConformant(FeedLike)
common.implementsIconProp(FeedLike)
common.rendersChildren(FeedLike)
it('renders text with content prop', () => {
shallow(<F... |
client/app/components/Bit/index.js | Kielan/onDemanager | import React from 'react';
import styles from './styles.css';
class Bit extends React.Component {
render() {
console.log('log them bitty props', this.props)
return (
<section className={styles.bitContainer}>
<div className={styles.itemHeader}>
<a><strong>Kielan Lemons</strong>
<b>{this.props.a... |
contact/containers/addContact.js | linuxing3/electron-react | import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { addContact, fetchContacts } from '../actions'
import AllContactList from './AllContactList'
// <Link to="/">Todo List</Link><br/>
import { Button } from 'react-desktop/macOs'
import { Label } from 'react-deskto... |
test/index.ios.callback.js | andpor/react-native-sqlite-storage | /**
* sqlite.ios.callback.js
*
* Created by Andrzej Porebski on 10/29/15.
* Copyright (c) 2015 Andrzej Porebski.
*
* Test App using JS Callbacks for react-naive-sqlite-storage
*
* This library is available under the terms of the MIT License (2008).
* See http://opensource.org/licenses/alphabetical for full tex... |
lib/components/itemAdd.js | tombenke/react-ui-archetype | import React from 'react';
import { Router, Link } from 'react-router';
import { Grid, Row, Col, Button, Glyphicon, Panel, Navbar, Input } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import Header from './header';
import Footer from './footer';
import ConfirmPanel from './confirmPa... |
src/GodPantheon.js | Visovsiouk/smite-random-picker | import React from 'react';
import { Col } from 'react-bootstrap';
import db from "./components/firebase";
/*"Pantheon" option component*/
class GodPantheon extends React.Component {
constructor(props) {
super(props);
this.state = {
pantheon: 'All',
pantheons: []
};
this.pantheonChange = this.pantheonCha... |
src/components/radar-list/index.js | hechoendrupal/drupalconsole.com | import React from 'react';
import PropTypes from 'prop-types';
import { useStaticQuery, graphql } from "gatsby";
import './style.css';
const RadarList = props => {
const { allResourcesYaml } = useStaticQuery(
graphql`
query {
allResourcesYaml {
edges {
node {
id
... |
packages/cf-component-radio/test/RadioGroup.js | mdno/mdno.github.io | import React from 'react';
import { felaSnapshot } from 'cf-style-provider';
import { RadioGroup } from '../../cf-component-radio/src/index';
test('should render', () => {
const snapshot = felaSnapshot(
<RadioGroup
value="option1"
onChange={() => {}}
options={[
{ label: 'Option 1', nam... |
src/frontend/App.js | uwwebservices/idcard-webapp-poc | import React from 'react';
import ReactDom from 'react-dom';
import 'css/style';
import { MuiThemeProvider } from '@material-ui/core/styles';
import theme from 'css/materialTheme';
import Register from 'Containers/Register';
import Configure from 'Containers/Configure';
import Welcome from 'Containers/Welcome';
... |
src/client/layouts/layout.js | danietzio/LiveChat | import React from 'react';
import $ from 'jquery';
// import css files
import '../styles/layout.css';
// checking last message sender
// true means 'client'
let changed = false;
export default class Layout extends React.Component {
constructor() {
super();
this.state = {
messages : []
... |
packages/react-ui-components/src/_lib/injectProps.spec.js | neos/neos-ui | import React from 'react';
import {shallow} from 'enzyme';
import injectProps from './injectProps';
const WrappedComponent = props => <div {...props}/>;
describe('injectProps()', () => {
it('should return a curried function.', () => {
const fn = injectProps();
expect(typeof fn).toBe('function');
... |
src/components/calculator.js | trihpham/react-calculator | import React, { Component } from 'react';
import { connect } from 'react-redux';
import CalculatorButtons from './calculator_buttons';
class Calculator extends Component {
render(){
const inputArray = this.props.inputArray;
const cursorLocation = this.props.cursorLocation;
const inputBeforeCursor = inputArray... |
client/src/components/dashboard/Profile/Preferences/common/RepoInput.js | no-stack-dub-sack/alumni-network | import { isEmpty } from 'lodash';
import propTypes from 'prop-types';
import React from 'react';
import styled from 'styled-components';
import { Button, Dropdown, Input } from 'semantic-ui-react';
const ErrorLabel = ({ isMobile, error }) => (
<div
className={`ui ${!isMobile ? 'left pointing' : ''} red basic lab... |
site/src/components/Room.js | livesmoking/livesmoking | import React from 'react'
import Signaler from '../signaler'
import MultiPeer from '../multi-peer'
import Chat from './Chat'
const peerOpts = {
config: {
iceServers: [
{
urls: process.env.SITE_TURN_SERVER
}
]
}
}
const signaler = new Signaler(process.env.SITE_SIGNAL_SERVER)
const multi... |
node_modules/semantic-ui-react/dist/es/elements/Image/ImageGroup.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, SUI } from '../../lib';
/**
* A group of images.
*/
function ImageGroup(props) {
var children = props... |
client/js/components/Item.js | vladimirutenkov/universal-app | import React from 'react';
export default function Item(props) {
return (
<div className="item">
{props.caption}
</div>
);
}
|
apps/marketplace/components/BuyerATM/BuyerATMResponseFormatsStage.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { actions, Form } from 'react-redux-form'
import CheckboxDetailsField from 'shared/form/CheckboxDetailsField'
import formProps from 'shared/form/formPropsSelector'
import { required } from 'marketplace/components/v... |
website/modules/examples/PreventingTransitions.js | DelvarWorld/react-router | import React from 'react'
import {
BrowserRouter as Router,
Route,
Link,
Prompt
} from 'react-router-dom'
const PreventingTransitionsExample = () => (
<Router>
<div>
<ul>
<li><Link to="/">Form</Link></li>
<li><Link to="/one">One</Link></li>
<li><Link to="/two">Two</Link></li... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.js | picter/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(prefix) {
return [
{ id: 1, [`${prefi... |
src/js/map/Loader.js | cleberar38/esri-flux-react | import React from 'react';
export class Loader extends React.Component {
render () {
let style = { display: (this.props.visible ? 'block' : 'none') };
return (
<div className='loading-container' style={style}>
<div className='loader'></div>
<div className='loader-label'>{this.props.tex... |
src/svg-icons/content/create.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentCreate = (props) => (
<SvgIcon {...props}>
<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/... |
app/react-icons/fa/terminal.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaTerminal extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m14.6 21.9l-10.4 10.4q-0.3 0.3-0.6 0.3t-0.5-0.3l-1.1-1.1q-0.2-0.2-0.2-0.5t0... |
test/integration/custom-error/pages/_error.js | flybayer/next.js | import React from 'react'
class Error extends React.Component {
static getInitialProps({ res, err }) {
const statusCode = res ? res.statusCode : err ? err.statusCode : null
return { statusCode }
}
render() {
return (
<>
<h3>Custom error!!</h3>
<p>
{this.props.statusCo... |
src/client.js | onelink-translations/react-localization | /**
* 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 ReactDOM from 'react-... |
src/index.js | simonhenke/BrickPlaner | import React from 'react';
import ReactDOM from 'react-dom';
import Board from './Board';
import { observe } from './Game';
const rootEl = document.getElementById('root');
observe(content =>
ReactDOM.render(
<Board content={content} />,
rootEl
)
);
$(function() {
var bricksInSet = $(".brickset .brick"); ... |
examples/cards.js | steos/reactcards | import React from 'react'
import cards from '../dist/client.bundle'
import {Foo, Bar, StatefulCounter, StatelessCounter, TodoList} from './components'
import * as testSimple from './test/simple'
import * as testComponents from './test/components'
import * as advancedTestComponents from './test/advanced'
const demo = c... |
app/components/APIError.js | mapbox/osm-comments | import React from 'react';
var APIError = React.createClass({
render: function() {
return (
<div className="pad2y">
<h5 className="center fancy">An unexpected error occurred.</h5>
</div>
);
}
});
export default APIError; |
src/js/logout/Logout.js | TTFG-Analytics/commonground | import React from 'react'
import FaceBookButton from '../discussion/camps/FaceBookButton'
import store from '../store'
import ProfileButton from '../discussion/camps/ProfileButton'
import Router from 'react-router'
import Navigation from 'Navigation'
import { Panel, Col, Grid } from 'react-bootstrap';
require('./logout... |
jenkins-design-language/src/js/components/material-ui/svg-icons/av/not-interested.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvNotInterested = (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 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 ... |
app/routes.js | foysalit/runkeeper-desktop | 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';
import StatsPage from './containers/StatsPage';
export default (
<Route path="/" component={App}>
<In... |
client/react/src/components/order/OrdersView.js | peasy/peasy-js-samples | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import OrderActions from '../../actions/orderActions';
import OrderItemActions from '../../actions/orderItemActions';
import constants from '../../constants';
import OrderLineItemViewModel from '../../viewModels/o... |
web/demo/client/src/app.js | yinweiwen/study | /**
* User: liuxinyi/liu.xinyi@free-sun.com.cn
* Date: 2016/1/13
* Time: 11:55
*
*/
'use strict';
import React from 'react';
import Layout from './layout';
import Auth from './sections/auth';
import Default from './sections/default';
class App extends React.Component {
constructor(props) {
super(pro... |
example/__tests__/index.ios.js | Durgaprasad-Budhwani/azure-activedirectory-library-for-react-native | 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 />
);
});
|
source/view/searchDetail.js | togayther/react-native-cnblogs | import React, { Component } from 'react';
import {
View
} from 'react-native';
import moment from 'moment';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Toast from '@remobile/react-native-toast';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import * as Pos... |
ajax/libs/react-instantsearch/5.7.0/Connectors.js | extend1994/cdnjs | /*! React InstantSearch 5.7.0 | © Algolia, inc. | https://github.com/algolia/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
... |
src/svg-icons/image/timer-10.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimer10 = (props) => (
<SvgIcon {...props}>
<path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-... |
src/app/components/comment_stats.js | alexboev/hnpwa | import React from 'react'
import { Link } from 'react-router-dom'
import TimeAgo from 'components/time_ago'
const CommentStats = (props) => {
var data = props.item;
return (
<span className={"comment-stats"}>
<Link to={"/user/" + data.author}>{data.author}</Link> <TimeAgo timestamp={d... |
packages/material-ui-icons/src/PhoneLocked.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61... |
src/decorators/withViewport.js | pppp22591558/ChinaPromotion | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... |
src/routes.js | spartan082189/eCartCloud | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import Login from './views/Login/LoginView';
import Home from './views/Home/HomeView';
import ProductDetail from './views/Products/ProductDetailView';
import NotFoundPage from './components/NotFoundPage.js'... |
examples/index.js | danielyaa5/react-contextulize | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, IndexRoute, hashHistory } from 'react-router';
import SimpleMenu from './SimpleMenu';
function App({ children }) {
return (
<div className='container-fluid'>
<h3>React ContextMenu <small>Context menus us... |
src/client.js | bigwaterconsulting/to_dash_live | /**
* 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 'babel-polyfill';
import React from 'react';
imp... |
src/containers/RequestPassword/Phone.js | mrnav90/react-enigma-employee | import React from 'react';
import {MasterLayout} from 'components/Layout';
import {ResetPasswordViaPhone} from 'components/ResetPasswordForm';
export default class RequestPasswordPhone extends React.Component {
render() {
return (
<MasterLayout>
<ResetPasswordViaPhone/>
</MasterLayout>
);... |
example/src/screens/types/Drawer.js | inalist/react-native-navigation | import React from 'react';
import {StyleSheet, View, Button} from 'react-native';
class MyClass extends React.Component {
onShowModal = () => {
this.toggleDrawer();
this.props.navigator.showModal({
screen: 'example.Types.Modal',
title: `Modal`
});
};
onPushToFirstTab = () => {
this.... |
example/views/src/ClientRouter.js | Lanfei/webpack-isomorphic | 'use strict';
import React from 'react';
import {BrowserRouter} from 'react-router-dom';
import App from './App';
/**
* @see https://reacttraining.com/react-router/web/guides/server-rendering
*/
export default class ClientRouter extends React.Component {
render() {
let data = this.props.data;
return <BrowserR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.