path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
framework/react/react-tutorials/src/demo/app/App.js | yhtml5/YHTML5-Tutorial | import React, { Component } from 'react';
import logo from '../../static/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</h... |
packages/icons/src/md/image/Crop54.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdCrop54(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M38 10H10c-2.21 0-4 1.79-4 4v20c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V14c0-2.21-1.79-4-4-4zm0 24H10V14h28v20z" />
</IconBase>
);
}
export defa... |
bai/src/components/ProgramsHeader/index.js | blackinai/blackinai.github.io | import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Typography from '../Typography';
import { CardMedia, Container, Grid, } from '@material-ui/core';
import image from './../../assets/img/header/bai-img-5.jpg';
const styles = (theme) => ({
ro... |
actor-apps/app-web/src/app/components/activity/GroupProfile.react.js | lzpfmh/actor-platform | /*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import { assign } from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import classnames from 'classnames';
import ActorClient from 'utils/ActorClient';
import confirm from '... |
app/routes.js | codymorrison/gitassist | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
export default (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
<Route path... |
client/src/pages/activeRelease/tags/index.js | csleary/nemp3 | import { animated, config, useTrail } from 'react-spring';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
import { faTags } from '@fortawesome/free-solid-svg-icons';
import { nanoid } from '@reduxjs/toolk... |
app/javascript/mastodon/components/status.js | yukimochi/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from './avatar';
import AvatarOverlay from './avatar_overlay';
import AvatarComposite from './avatar_composite';
import RelativeTimestamp from './relative_timestamp';
import DisplayNa... |
src/Game/UI/Panel/Component/Header.js | digijin/space-station-sim | //@flow
import React from 'react'
import Close from './Close'
type Props = {
close:Function,
text:string
}
export default class Header extends React.Component{
props:Props
render(){
return <h3 className='header'>
{this.props.text}
<Close close={this.props.close} />
</h3>
}
}
|
src/Parser/DeathKnight/Unholy/Modules/Features/Checklist.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import SpellLink from 'common/SpellLink';
import Wrapper from 'common/Wrapper';
import CoreChecklist, { Rule, Requirement } from 'Parser/Core/Modules/Features/Checklist';
import { PreparationRule } from 'Parser/Core/Modu... |
docs/src/examples/modules/Dropdown/Usage/DropdownExampleCustomNoResultsMessage.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const DropdownExampleCustomNoResultsMessage = () => (
<Dropdown
options={[]}
search
selection
placeholder='A custom message...'
noResultsMessage='Try another search.'
/>
)
export default DropdownExampleCustomNoResultsMessag... |
src/desktop/apps/categories/components/TAGPContent.js | kanaabe/force | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import TAGPIntro from './TAGPIntro'
import GeneFamilies from './GeneFamilies'
const propTypes = {
geneFamilies: PropTypes.array.isRequired,
allFeaturedGenesByFamily: PropTypes.array.isRequired
}
const ResponsiveCo... |
app/react-icons/fa/h-square.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaHSquare extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m31.6 30v-20q0-0.6-0.5-1t-1-0.4h-2.8q-0.6 0-1 0.4t-0.4 1v7.1h-11.5v-7.1q0-0.... |
src/components/TeamPage/TeamPage.js | ScrantonHacks/website | import React from 'react';
import DeployIcon from 'grommet/components/icons/base/Deploy';
import SyncIcon from 'grommet/components/icons/base/Sync';
import TechnologyIcon from 'grommet/components/icons/base/Technology';
import Columns from 'grommet/components/Columns';
import Box from 'grommet/components/Box';
import s... |
src/views/sandbox/children/stateful/StatefulView.js | kallaspriit/react-base | import React, { Component } from 'react';
export default class StatefulView extends Component {
state = {
counter: 0,
};
render = () => (
<div className="stateful-view">
<h2>Counter example based on state</h2>
<p>Counter: {this.state.counter}</p>
<button onClick={this.handleIncrementCounter}>Incremen... |
src/routes/register/index.js | BankaiMikeH/HackWSU2017_AirRands | /**
* 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 Layout from '../../co... |
app/jsx/calendar/scheduler/components/appointment_groups/EditPage.js | venturehive/canvas-lms | /*
* Copyright (C) 2016 - 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... |
src/routes/dashboard/components/user.js | vincentdd/crm | import React from 'react'
import PropTypes from 'prop-types'
import { Button } from 'antd'
import CountUp from 'react-countup'
import { color } from 'utils'
import styles from './user.less'
const countUpProps = {
start: 0,
duration: 2.75,
useEasing: true,
useGrouping: true,
separator: ',',
}
function User (... |
frontend/src/lib/mui-components/MoreButton/MoreButtonPres.js | jf248/scrape-the-plate | import React from 'react';
import { IconButton, Menu, withStyles } from '@material-ui/core';
import MoreVert from '@material-ui/icons/MoreVert';
const styles = () => ({});
MoreButtonPres.defaultProps = {};
function MoreButtonPres(props) {
const {
anchorEl,
children,
className: classNameProp,
classe... |
index.js | craigbilner/react-modal-play | import React from 'react';
import { render } from 'react-dom';
import App from './src/app';
render(<App />, document.getElementById('main'));
|
src/svg-icons/maps/directions-railway.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsRailway = (props) => (
<SvgIcon {...props}>
<path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2... |
react/render.js | rumbleyam/morty-api | import React from 'react';
import ReactDOM from 'react-dom/server';
import {Provider} from 'react-redux';
import {flushChunkNames} from 'react-universal-component/server';
import flushChunks from 'webpack-flush-chunks';
import configureStore from './configureStore';
import App from './src/components/App';
import {Shee... |
src/List/List.spec.js | und3fined/material-ui | // @flow weak
/* eslint-env mocha */
import React from 'react';
import { assert } from 'chai';
import { createShallowWithContext } from 'test/utils';
import List, { styleSheet } from './List';
import ListSubheader from './ListSubheader';
describe('<List />', () => {
let shallow;
let classes;
before(() => {
... |
src/components/DeveloperMenu.android.js | jacktuck/registr | import React from 'react';
import * as snapshot from '../utils/snapshot';
import {
View,
Text,
TouchableOpacity,
StyleSheet
} from 'react-native';
/**
* Simple developer menu, which allows e.g. to clear the app state.
* It can be accessed through a tiny button in the bottom right corner of the screen.
* ON... |
src/components/Main.js | taotaoabc/pin2 | require('normalize.css/normalize.css');
require('styles/App.css');
import React from 'react';
import ReactDOM from 'react-dom';
let Penguins = require('../images/Penguins2.jpg');
class Cell extends React.Component {
handleClick(e){
(this.props.move)();
e.stopPropagation();
e.preventDefault();
}
componentD... |
src/svg-icons/av/video-call.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvVideoCall = (props) => (
<SvgIcon {...props}>
<path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4zM14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2z"/>
</SvgIcon>
)... |
docs/components/common/paragraph/paragraph.js | t1m0n/air-datepicker | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import {FormattedMessage} from 'react-intl';
import css from './paragraph.module.scss';
function Paragraph({id, doubleOffset, values, className} = {}) {
return (
<FormattedMessage
className={cn(classNam... |
src/components/NewsList.js | amoghesturi/react-news-app | import React from 'react';
import PropTypes from 'prop-types';
import Article from './Article.js';
class NewsList extends React.Component {
render() {
if(this.props.articles.length) {
let newsArticles = this.props.articles.map( (article, i) => (
<Article article={article} key={i}/>
));
... |
docs/app/Examples/modules/Rating/Variations/RatingSizeExample.js | jamiehill/stardust | import React from 'react'
import { Rating } from 'stardust'
const RatingSizeExample = () => (
<div>
<Rating maxRating={5} defaultRating={3} icon='star' size='mini' />
<br />
<br />
<Rating maxRating={5} defaultRating={3} icon='star' size='tiny' />
<br />
<br />
<Rating maxRating={5} def... |
src/components/Headline.js | wbreakell/changeover | // @flow
import React from 'react';
import styled from 'styled-components';
import { media } from '../styles/media';
const Headline = styled.h1`
color: #fff;
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 6rem;
margin-top: 2rem;
${media.md`
font-size: 2.25rem;
margin-bottom: 8rem;
margin... |
src/index.js | jed/react-swipe | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Swipe from 'swipe-js-iso';
import isEqual from 'lodash.isequal';
class ReactSwipe extends Component {
static propTypes = {
swipeOptions: PropTypes.shape({
startSlide: PropTypes.number,
speed: PropTypes.number,
... |
zanata-editor/src/__tests__/components/ToggleSwitchTest.js | Halcom/zanata-server | jest.disableAutomock()
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import TestUtils from 'react-addons-test-utils'
import ToggleSwitch from '../../app/components/ToggleSwitch'
describe('ToggleSwitchTest', () => {
it('ToggleSwitch markup', () => {
const switchTheBlade = () => {}
c... |
app/react-icons/fa/folder-open.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaFolderOpen extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m39.9 21.2q0 0.6-0.6 1.4l-7.2 8.4q-0.9 1.1-2.5 1.9t-3.1 0.7h-23.1q-0.7 0-... |
packages/bonde-styleguide/src/content/IconColorful/svg/Greeting.js | ourcities/rebu-client | import React from 'react'
const Icon = () => (
<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' viewBox='0 0 60 40'>
<g fill='none' fillRule='evenodd'>
<circle cx='30' cy='20' r='20' fill='#E09' opacity='.297' />
<circle cx='30' cy='20' r='16' fill='#E09' opacity='.3' />
<circle c... |
src/components/footer.js | mozilla/donate.mozilla.org | import React from 'react';
var Footer = React.createClass({
contextTypes: {
intl: React.PropTypes.object
},
render: function() {
return (
<footer>
<div className="footer">
<div className="footer-links">
<ul>
<li><a href="https://twitter.com/mozilla" targe... |
fields/types/cloudinaryimages/CloudinaryImagesField.js | tanbo800/keystone | import _ from 'underscore';
import React from 'react';
import Field from '../Field';
import { Button, FormField, FormInput, FormNote } from 'elemental';
const SUPPORTED_TYPES = ['image/gif', 'image/png', 'image/jpeg', 'image/bmp', 'image/x-icon', 'application/pdf', 'image/x-tiff', 'image/x-tiff', 'application/postscri... |
new-lamassu-admin/src/pages/Wizard/components/OperatorInfo.js | naconner/lamassu-server | import { makeStyles } from '@material-ui/core'
import React from 'react'
// import OperatorInfo from 'src/pages/OperatorInfo'
import styles from 'src/pages/AddMachine/styles'
const useStyles = makeStyles(styles)
function WizardOperatorInfo() {
const classes = useStyles()
return (
<div className={classes.wra... |
src/CardImg.js | reactstrap/reactstrap | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
top: PropTypes.bool,
bottom: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
};
const de... |
frontend/modules/header/components/CreateRecipeMenuItem.js | RyanNoelk/OpenEats | import React from 'react'
import {
injectIntl,
IntlProvider,
defineMessages,
formatMessage
} from 'react-intl';
import { MenuItem } from 'react-bootstrap'
import { LinkContainer } from 'react-router-bootstrap'
class CreateRecipeMenuItem extends React.Component {
render () {
const {formatMessage} ... |
app/javascript/flavours/glitch/components/link.js | Kirishima21/mastodon | // Inspired by <CommonLink> from Mastodon GO!
// ~ 😘 kibi!
// Package imports.
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
// Utils.
import { assignHandlers } from 'flavours/glitch/util/react_helpers';
// Handlers.
const handlers = {
// We don't handl... |
src/lightbox/LightboxHeader.js | saketkumar95/zulip-mobile | /* @flow */
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import ModalNavBar from '../nav/ModalNavBar';
import { SlideAnimationView, Avatar } from '../common';
import { shortTime, humanDate } from '../utils/date';
import { PopRouteAction } from '../types';
const customStyles = Styl... |
src/components/Scheme/HypertensionA.js | lethecoa/work-order-pc | import React from 'react';
import {Form, InputNumber, Row, Col, Radio} from 'antd';
import MedicationInfo from './MedicationInfo';
import styles from './Scheme.less';
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCo... |
src/components/link/link-controls.js | xutou12/draft-richer |
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import { RichUtils, EditorState } from 'draft-js';
import Icon from '../icons';
import Button from '../button';
import LinkModal from './link-modal';
import { linkFilter } from '../decorator/link';
import { prefixCls } fr... |
node_modules/semantic-ui-react/src/views/Feed/FeedLabel.js | mowbell/clickdelivery-fed-test | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
createHTMLImage,
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import Icon from '../../elements/Icon'
/**
* An event can contain an image or icon label.
*... |
Example/__tests__/index.android.js | pvanliefland/react-native-motion-detector | 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 />
);
});
|
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | pheadra/react-router | /*globals COURSES:true */
import React from 'react'
import { Link } from 'react-router'
class AnnouncementsSidebar extends React.Component {
render() {
let { announcements } = COURSES[this.props.params.courseId]
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{announcements.... |
docs/pages/system/api.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'system/api';
const requireDemo = require.context('docs/src/pages/system/api', false, /\.(js|tsx)$/);
const requireRaw = require.c... |
src/components/post/short-post.js | Lokiedu/libertysoil-site | /*
This file is a part of libertysoil.org website
Copyright (C) 2016 Loki Education (Social Enterprise)
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 License, o... |
app/javascript/mastodon/components/__tests__/button-test.js | abcang/mastodon | import { render, fireEvent, screen } from '@testing-library/react';
import React from 'react';
import renderer from 'react-test-renderer';
import Button from '../button';
describe('<Button />', () => {
it('renders a button element', () => {
const component = renderer.create(<Button />);
const tree = com... |
src/svg-icons/maps/local-florist.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalFlorist = (props) => (
<SvgIcon {...props}>
<path d="M12 22c4.97 0 9-4.03 9-9-4.97 0-9 4.03-9 9zM5.6 10.25c0 1.38 1.12 2.5 2.5 2.5.53 0 1.01-.16 1.42-.44l-.02.19c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.... |
src/routes/yourwins/Yourwins.js | zsu13579/pinterest-apollo | /**
* 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 PropTypes from 'prop-... |
src/parser/warrior/arms/modules/talents/FervorOfBattle.js | FaideWW/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage';
import SPELLS from 'common/SPELLS';
import { formatPercentage, formatThousands } from 'common/format';
import SpellLink from 'common/SpellLink';
impor... |
client/containers/NoMatchPage.js | Temzasse/ntu-crysis | import React from 'react';
const NoMatchPage = () => (
<div className='NoMatchPage' style={{ width: '100%' }}>
Page Not Found
</div>
);
export default NoMatchPage;
|
src/interface/icons/Dropdown.js | FaideWW/WoWAnalyzer | import React from 'react';
// https://thenounproject.com/search/?q=dropdown&i=1871189
// Dropdown by zalhan from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 9" {...other}>
<path d="M14.0059397,2.26485497e-14 C15.1072288,2.26485497e-14 15.3722573,0.6... |
src/views/HomeView.js | gj262/noaa-coops-viewer | import PropTypes from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import { actions as coOpsActions } from 'actions/coOps'
import LeftPane from 'components/LeftPane'
import RightPane from 'components/RightPane'
import './HomeView.scss'
class HomeView extends React.Component {
static ... |
frontend/pages/ErrorPage.js | StefanKjartansson/drf-react-skeleton | import React from 'react';
export default class ErrorPage extends React.Component {
render() {
return (
<div>Some error occured</div>
);
}
}
|
FunPaceReact/app/components/ListItem/index.js | mul1sh/Fun-Pace | import React from 'react';
import Item from './Item';
import Wrapper from './Wrapper';
function ListItem(props) {
return (
<Wrapper>
<Item>
{props.item}
</Item>
</Wrapper>
);
}
ListItem.propTypes = {
item: React.PropTypes.any,
};
export default ListItem;
|
src/components/Modal/ModalBody.js | nolawi/champs-dialog-sg | /**
* Copyright 2017 dialog LLC <info@dlg.im>
* @flow
*/
import React from 'react';
import classNames from 'classnames';
import styles from './Modal.css';
export type Props = {
className?: string,
children?: React.Element<any>
};
function ModalBody(props: Props): React.Element<any> {
const className = class... |
stories/Scansion/index.js | cltk/annotations | import React from 'react'
import Annotatable, { createEditorState } from '../../src'
import { argonautica } from '../stubs'
import {
addScansionToBlocks,
greekProsodyDecorator,
} from '../../src'
export default class Scansion extends React.Component {
constructor(props) {
super(props)
this.state = {
... |
docs/app/Views/Usage.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import pkg from 'package.json'
import {
Container,
Header,
Segment,
} from 'src'
import Logo from '../Components/Logo/Logo'
import { semanticUIDocsURL, semanticUIRepoURL, semanticUICSSRepoURL } from 'docs/app/utils'
const suiCSSVersion = pkg.devDependencies['semantic-ui-css'].replace(/[... |
test/App.spec.js | keyanzhang/repo.cat | // import React from 'react';
// import ReactDOM from 'react-dom';
// import TestUtils from 'react-addons-test-utils';
// import { patchDOMEnv } from './__setup__/domEnv';
// import expect from 'expect';
//
// import App from '../src/App';
//
// patchDOMEnv();
//
// describe('App', () => {
// it('content should be fo... |
test/components/Counter.spec.js | merklelabs/SlickIRC | /* eslint no-unused-expressions: 0 */
import { expect } from 'chai'
import { spy } from 'sinon'
import React from 'react'
import {
renderIntoDocument,
scryRenderedDOMComponentsWithTag,
findRenderedDOMComponentWithClass,
Simulate
} from 'react-addons-test-utils'
import Counter from '../../app/components/Counter'... |
addons/jest/src/hoc/provideJestResult.js | rhalff/storybook | import React from 'react';
import PropTypes from 'prop-types';
const provideTests = Component => {
class TestProvider extends React.Component {
static propTypes = {
channel: PropTypes.shape({
on: PropTypes.func,
removeListener: PropTypes.func,
}).isRequired,
api: PropTypes.shape... |
3.react/main.js | jadekler/git-js-workshop | import './stylesheets/app.scss'
import React from 'react'
import ReactDOM from 'react-dom'
import ResultsPage from './src/ResultsPage'
ReactDOM.render(
<ResultsPage/>,
document.getElementById('content')
) |
testResources/reactProject/src/index.js | mthmulders/stryker-jest-runner | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
src/HOCs/archive/ShowOnArchivedHOC.js | VGraupera/1on1tracker | import React from 'react';
import PropTypes from 'prop-types';
import ArchiveHocFactory from './ArchiveHocFactory';
const propTypes = {
isArchived: PropTypes.bool,
};
const defaultProps = {
isArchived: false,
};
export const componentFactory = (WrappedComponent) => {
const ShowOnArchived = (props) => {
c... |
src/server.js | ryaneof/streaming-pics | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
import ApiC... |
src/modules/common/footer.js | shojib/react-seed | import React from 'react';
class Footer extends React.Component {
render () {
var currentYear = new Date().getFullYear();
var copyrightYears = currentYear > 2016 ? 2016 + '-' + currentYear : 2016;
return (
<small>(c) {copyrightYears} Shojib React-Seed.<br/>
This seed is based on ... |
app/containers/App.js | agrant216/React-Electron-Mtg | // @flow
import React, { Component } from 'react';
export default class App extends Component {
props: {
children: HTMLElement
};
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
|
examples/shared-root/app.js | BerkeleyTrue/react-router | import React from 'react'
import { render } from 'react-dom'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
const history = useBasename(createHistory)({
basename: '/shared-root'
})
class App extends React.Component {
render() {
return (
<div>
... |
lib-module-node7-dev/layout/Html.js | turacojs/fody | 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; };
var _jsxFileName = 'layout/Html.jsx',
_this = this;
impo... |
src/Parser/Rogue/Common/Legendaries/MantleOfTheMasterAssassin.js | hasseboulen/WoWAnalyzer | import React from 'react';
import ITEMS from 'common/ITEMS';
import Combatants from 'Parser/Core/Modules/Combatants';
import Analyzer from 'Parser/Core/Analyzer';
import Wrapper from 'common/Wrapper';
class MantleOfTheMasterAssassin extends Analyzer {
static dependencies = {
combatants: Combatants,
};
on_i... |
src/platform/apps/team/admin/views/users/index.js | ccetc/platform | import React from 'react'
import Page from 'admin/components/page'
import Collection from 'admin/components/collection'
import Avatar from 'admin/components/avatar'
import moment from 'moment'
import New from './new'
class Index extends React.Component {
render() {
return (
<div className="chrome-body">
... |
src/components/Icons/TwitterIcon.js | zerkedev/zerke-app | import React from 'react';
import SvgIcon from 'material-ui/SvgIcon';
const TwitterIcon = (props) => {
return (
<SvgIcon width={300} height={244} viewBox="550 550 300 300" {...props}>
<path d="m633.9 812.04c112.46 0 173.96-93.168 173.96-173.96 0-2.6463-0.0539-5.2806-0.1726-7.903 11.938-8.6302 22.31... |
src/test/containersSpec/ChannelDropdown.spec.js | dramich/twitchBot | import React from 'react';
import { mount } from 'enzyme';
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
import sinon from 'sinon';
chai.use(chaiEnzyme());
import ConnectedChannelDropdown from '../../containers/ChannelDropdown';
import configureStore from '../../store/configureStore';
con... |
frontend/src/CategoryCreator/CategoryCreator.js | swpease/MoodJournal | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Button from 'material-ui/Button';
import AddIcon from 'material-ui-icons/Add';
import { withStyles } from 'material-ui/styles';
import CategoryEditor from '../CategoryEditor/CategoryEditor.js';
/*
* CategoryCreator has two states: ... |
src/views/LogoutView.js | ghartong/react_falcor | import React from 'react'
import {Paper} from 'material-ui'
class LogoutView extends React.Component {
constructor(props) {
super(props)
}
componentWillMount() {
if (typeof localStorage !== 'undefined' && localStorage.token) {
delete localStorage.token
delete localS... |
core/router.js | ReidWilliams/hello-react | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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.
*/
/* eslint-disable no-conti... |
Realization/frontend/czechidm-core/src/content/notification/NotificationAttachmentTable.js | bcvsolutions/CzechIdMng | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
//
import * as Basic from '../../components/basic';
import * as Advanced from '../../components/advanced';
import * as Utils from '../../utils';
import { NotificationAttachmentManager } from '../../redux';
const notif... |
tests/format/flow-repo/react_modules/es6class-proptypes-module.js | jlongster/prettier | /* @flow */
import React from 'react';
class Hello extends React.Component<void, {name: string}, void> {
defaultProps = {};
propTypes = {
name: React.PropTypes.string.isRequired,
};
render(): React.Element<*> {
return <div>{this.props.name}</div>;
}
}
module.exports = Hello;
|
techCurriculum/ui/solutions/4.5/src/components/Card.js | jennybkim/engineeringessentials | /**
* Copyright 2017 Goldman Sachs.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
src/server.js | alexbonine/react-starter-kit | /*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
impo... |
src/components/Editor/index.js | NE-SmallTown/React-QuietWater | /**
* v0.0.1
*
* Copyright (c) 2017
*
* Date: 2017/5/18 by Heaven
*/
import React from 'react';
import PropTypes from 'prop-types';
import RichTextEditor from 'react-rte';
import globalConfig from '../../globalConfig';
import './index.css';
// TODO 编辑器要能全屏
// TODO 找个更合适的编辑器
// https://github.com/leejaen/reac... |
src/SafeAnchor.js | bvasko/react-bootstrap | import React from 'react';
import createChainedFunction from './utils/createChainedFunction';
/**
* Note: This is intended as a stop-gap for accessibility concerns that the
* Bootstrap CSS does not address as they have styled anchors and not buttons
* in many cases.
*/
export default class SafeAnchor extends React... |
Realization/frontend/czechidm-core/src/components/basic/EnumValue/EnumValue.js | bcvsolutions/CzechIdMng | import React from 'react';
import PropTypes from 'prop-types';
//
import Label from '../Label/Label';
import Icon from '../Icon/Icon';
/**
* Simple enum formatter.
*
* @author Radek Tomiška
*/
export default function EnumValue(props) {
const { rendered, value, style, label, level, title } = props;
const enumCl... |
src/js/components/startMenuItem.js | GarrettEstrin/windows.garrettestrin.com | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { clickStartMenuItem } from '../actions/start_menu_actions';
class StartMenuItem extends Component {
constructor(props) {
super(props);
this.showWindow = this.showWindow.bind(this);
}
showWindow(){
if(this.prop... |
app/client/src/scenes/Settings/Settings.js | uprisecampaigns/uprise-app | import React from 'react';
import { List, ListItem } from 'material-ui/List';
import Divider from 'material-ui/Divider';
import Link from 'components/Link';
import s from 'styles/Settings.scss';
function Settings(props) {
return (
<div className={s.outerContainer}>
<div className={s.innerContainer}>
... |
__sites_/src/components/doc/en/home.js | Vanthink-UED/react-core-image-upload | import React from 'react';
import vendor from '../../../lib/vendor';
export default class EnHome extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="components c-home">
<p className="center">
<img src="http://img1.vued.vanthink.cn/vu... |
app/javascript/mastodon/components/__tests__/avatar_overlay-test.js | lynlynlynx/mastodon | import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import AvatarOverlay from '../avatar_overlay';
describe('<AvatarOverlay', () => {
const account = fromJS({
username: 'alice',
acct: 'alice',
display_name: 'Alice',
avatar: '/animated/alice.gif',... |
__tests__/index.ios.js | i8wu/Converrency | 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/hardware/phonelink-off.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhonelinkOff = (props) => (
<SvgIcon {...props}>
<path d="M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6... |
app/javascript/mastodon/components/media_gallery.js | tri-star/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { is } from 'immutable';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';
import class... |
src/svg-icons/navigation/arrow-forward.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowForward = (props) => (
<SvgIcon {...props}>
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/>
</SvgIcon>
);
NavigationArrowForward = pure(NavigationArrowForward);
Navigation... |
modules/__tests__/createRoutesFromReactChildren-test.js | emmenko/react-router | import expect from 'expect';
import React from 'react';
import { createRoutesFromReactChildren } from '../RouteUtils';
import Route from '../Route';
describe('createRoutesFromReactChildren', function () {
var Parent = React.createClass({
render() {
return (
<div>
<h1>Parent</h1>
... |
server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js | joansmith/sonarqube | /*
* 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... |
app/javascript/mastodon/features/public_timeline/index.js | kazh98/social.arnip.org | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
src/SplitToggle.js | pombredanne/react-bootstrap | import React from 'react';
import DropdownToggle from './DropdownToggle';
export default class SplitToggle extends React.Component {
render() {
return (
<DropdownToggle
{...this.props}
useAnchor={false}
noCaret={false}
/>
);
}
}
SplitToggle.defaultProps = DropdownToggle... |
client/app/scripts/main.dev.js | kinvolk/scope | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import '../styles/main.scss';
import '../images/favicon.ico';
import configureStore from './stores/configureStore.dev';
const store = configureStore();
function renderApp() {
const App = re... |
tests/framework.spec.js | abkfenris/inferno-react | import assert from 'assert'
import React from 'react'
import {mount, render, shallow} from 'enzyme'
class Fixture extends React.Component {
render () {
return (
<div>
<input id='checked' defaultChecked />
<input id='not' defaultChecked={false} />
</div>
)
}
}
describe('(Framewo... |
client/tests/components/Login.spec.js | andela-eshaibu/document_management_system | /* eslint-disable no-unused-vars*/
import 'babel-polyfill';
import expect from 'expect';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import React from 'react';
import { LoginComponent } from '../../src/components/auth';
import initialState from '../../src/store/initialState';
import configur... |
test/test.spec.js | ivantran2290/react-webpack-starter-master | import Component from '../src/Component.jsx';
import TestUtils from 'react-addons-test-utils';
import React from 'react';
var component;
var spy = sinon.spy();
describe('Given an instance of the Component', () => {
describe('when we render the component', () => {
before(() => {
component = TestUtils.rende... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.