path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/pages/logOutPage.js | saf0911/dr-pat-demo1 | import React from 'react';
import Link from 'next/link';
const name = 'Clayton';
function logOutPage() {
return (
<div>
<h3> See you later, {name} </h3>
<Link href="/">
<button>Home</button>
</Link>
</div>
);
}
export default logOutPage;
|
app/App.js | mkbotoman/fitfood | import React from 'react';
import styles from './App.css';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {test: 'foo'};
}
render() {
return (
<div className={styles.app}>
bar
</div>
);
}
}
|
src/components/Main/Card/Body.js | thms-rmb/fcc-random-quote-machine | import React, { Component } from 'react';
class Body extends Component {
wrapper(props) {
return (
<div className="uk-card-body">
{props.children}
</div>
);
}
errorOutput() {
return (
<this.wrapper>
<div>
... |
src/svg-icons/image/crop-16-9.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop169 = (props) => (
<SvgIcon {...props}>
<path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/>
</SvgIcon>
);
ImageCrop169 = pure(ImageCrop169);
ImageCr... |
fields/components/DateInput.js | trentmillar/keystone | import moment from 'moment';
import DayPicker from 'react-day-picker';
import React from 'react';
import { findDOMNode } from 'react-dom';
import Popout from '../../admin/client/App/shared/Popout';
import { FormInput } from '../../admin/client/App/elemental';
let lastId = 0;
module.exports = React.createClass({
disp... |
nailgun/static/views/cluster_page_tabs/nodes_tab_screens/node.js | huntxu/fuel-web | /*
* Copyright 2015 Mirantis, Inc.
*
* 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 ... |
frontend/src/components/eois/details/applications/applicationSummary/reviewContent/reviews.js | unicef/un-partner-portal | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import R from 'ramda';
import Typography from 'material-ui/Typography';
import HeaderList from '../../../../../common/list/headerList';
import { selectReview } from '../../../../../../store';
import EmptyContent from '... |
src/js/components/icons/base/Basket.js | odedre/grommet-final | /**
* @description Basket SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* @pro... |
src/components/CommentList.js | alphasp/pxview | import React, { Component } from 'react';
import { StyleSheet, View, RefreshControl, FlatList } from 'react-native';
import { withTheme, Text } from 'react-native-paper';
import Color from 'color';
import moment from 'moment';
import { connectLocalization } from './Localization';
import NoResult from './NoResult';
impo... |
docs/src/app/components/pages/components/Drawer/ExampleSimple.js | tan-jerene/material-ui | import React from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import RaisedButton from 'material-ui/RaisedButton';
export default class DrawerSimpleExample extends React.Component {
constructor(props) {
super(props);
this.state = {open: false};
}
handl... |
src/Parser/Warlock/Destruction/Modules/Items/T20_2set.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatNumber } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import Enemies from 'Par... |
src/client/todos/buttons.react.js | gaurav-/este | import './buttons.styl';
import Component from '../components/component.react';
import React from 'react';
export default class TodoButtons extends Component {
static propTypes = {
actions: React.PropTypes.object.isRequired,
clearAllEnabled: React.PropTypes.bool.isRequired,
msg: React.PropTypes.object.i... |
docs/src/components/usage-example.js | bhamodi/nuclear-js | import React from 'react'
import { Reactor, Store, toImmutable } from 'nuclear-js'
import Code from './code'
const storeCode = `import { Reactor, Store, toImmutable } from 'nuclear-js'
import React from 'react'
const reactor = new Reactor({ debug: true });
reactor.registerStores({
typeFilter: Store({
getInitia... |
src/index.js | yeshdev1/Everydays-project | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware(... |
node_modules/native-base/Components/Widgets/Thumbnail.js | tedsf/tiptap | /* @flow */
'use strict';
import React from 'react';
import {Image} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import _ from 'lodash';
export default class ThumbnailNB extends NativeBaseComponent {
getInitialStyle() {
... |
src/js/components/meter/Spiral.js | samogami/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React from 'react';
import {baseUnit, baseDimension, classRoot, translateEndAngle,
arcCommands} from './utils';
import Graphic from './Graphic';
const CLASS_ROOT = classRoot;
var SPIRAL_WIDTH = baseDimension;
var SPIRAL_RADIUS = (baseDimen... |
examples/counter/counter-component.js | Nek/cycle-react | import React from 'react';
import {component} from 'cycle-react';
// Use separate interactions-type for the counter component to show
// every component has a isolated interaction collection.
const CounterInteractions = {
increment: 'increment',
decrement: 'decrement',
incrementIfOdd: 'incrementIfOdd'
};
const ... |
src/views/App.js | nobleach/react-redux-example | /*global __CLIENT__*/
import React from 'react';
import {Link} from 'react-router';
import {load} from '../actions/infoActions';
import InfoBar from '../components/InfoBar';
if (__CLIENT__) {
require('./App.scss');
}
export default class App {
render() {
return (
<div className="container app">
<... |
src/svg-icons/device/battery-charging-20.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryCharging20 = (props) => (
<SvgIcon {...props}>
<path d="M11 20v-3H7v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17h-4.4L11 20z"/><path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 ... |
docs/app/Examples/addons/Radio/Types/index.js | mohammed88/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'src'
const RadioTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='R... |
react/exercises/part_07/src/components/Button.js | jsperts/workshop_unterlagen | import React from 'react';
import PropTypes from 'prop-types';
function Button({ label, onClick }) {
return (
<button type="button" className="btn btn-default" onClick={onClick}>
{label}
</button>
);
}
Button.propTypes = {
label: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
}... |
client/app/libs/testHelper.js | roxolan/react-webpack-rails-tutorial | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai from 'chai';
import chaiImmutable from 'chai-immutable';
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>');
const win = doc.defaultView;
global.document = doc;
global.window = win;
//... |
src/svg-icons/image/panorama-vertical.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaVertical = (props) => (
<SvgIcon {...props}>
<path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02... |
src/components/molecules/CodeSponsor/index.js | DimensionLab/narc | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { palette } from 'styled-theme'
const Wrapper = styled.div`
background-color: ${palette(1, true)};
text-align: center;
`
class CodeSponsor extends React.Component {
componentDidMount() {
const script =... |
src/Scatter-plot.js | jcarapia/nationalParks | import React from 'react';
import d3 from 'd3';
import DataCircles from './data-circles';
// Returns the largest X coordinate from the data set
const xMax = (data) => d3.max(data, (d) => d[0]);
// Returns the largest Y coordinate from the data set
const yMax = (data) => d3.max(data, (d) => d[1]);
// Returns a funct... |
examples/demos/rendering.js | Incubity/react-big-calendar | import React from 'react';
import BigCalendar from 'react-big-calendar';
import events from '../events';
function Event({ event }) {
return (
<span>
<strong>
{event.title}
</strong>
{ event.desc && (': ' + event.desc)}
</span>
)
}
function EventAgenda({ event }) {
return <span>
... |
src/layouts/EditorPage.js | hydiant/rasowide | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import TabbedEditor from '../components/TabbedEditor';
class EditorPage extends Component {
render() {
return (
<div>
<TabbedEditor
onGoHome={this.props.onGoHome}
sendData={this.props.sendData}
... |
demo/index.js | brandonmowat/react-chat-ui | import React from 'react';
import { render } from 'react-dom';
import { ChatFeed, ChatBubble, BubbleGroup, Message } from '../lib';
const styles = {
button: {
backgroundColor: '#fff',
borderColor: '#1D2129',
borderStyle: 'solid',
borderRadius: 20,
borderWidth: 2,
color: '#1D2129',
fontSiz... |
src/options/imports/components/Concurrency.js | WorldBrain/WebMemex | import React from 'react'
import PropTypes from 'prop-types'
import styles from './AdvSettings.css'
const Concurrency = ({ concurrency, onConcurrencyChange }) => (
<React.Fragment>
<label htmlFor="concurrency">
# of simultaneous downloads (max. 20)
</label>
<input
c... |
js/components/actionButtons.js | mercycorps/TolaActivity | import React from 'react'
import { observer } from 'mobx-react';
import classNames from 'classnames';
import { library } from '@fortawesome/fontawesome-svg-core'
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
import { faPlusSquare, faMinusSquare } from '@fortawesome/free-solid-svg-icons'
library.add(fa... |
examples/master-detail/app.js | shunitoh/react-router | import React from 'react'
import { render, findDOMNode } from 'react-dom'
import { browserHistory, Router, Route, IndexRoute, Link, withRouter } from 'react-router'
import withExampleBasename from '../withExampleBasename'
import ContactStore from './ContactStore'
import './app.css'
const App = React.createClass({
... |
components/header.js | vnovick/redux-basic-prototyping-template | import React from 'react';
import {connect} from 'react-redux';
import header from 'html!pages/partials/header.html';
import 'styles/partials/header';
export const Header = class Footer extends React.Component {
render() {
return (
<header className={this.props.className} dangerouslySetInnerHTML=... |
components/react-semantify/src/views/statistic.js | react-douban/douban-book-web | import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
let defaultClassName = 'ui statistic';
const Statistic = React.createClass({
mixins: [ClassGenerator],
render: function () {
let {className, ...other} = this.props;
return (
<div {...other} className={this.getClass... |
src/svg-icons/editor/format-indent-increase.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatIndentIncrease = (props) => (
<SvgIcon {...props}>
<path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/>
</SvgIcon>
);
EditorFormatIndentIncrease... |
test/SafeAnchorSpec.js | roadmanfong/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import SafeAnchor from '../src/SafeAnchor';
describe('SafeAnchor', function() {
it('renders an anchor tag', function() {
const instance = ReactTestUtils.renderIntoDocument(<SafeAnchor />);
const node = React.findDOMNode(instanc... |
src/routes/Oppgave2/components/StarWarsCharacter.js | andreasnc/summer-project-tasks-2017 | import React from 'react';
import PropTypes from 'prop-types';
const StarWarsCharacter = (
{
firstname,
lastname,
height,
imageUrl,
movies
}) =>
<div className="star-wars-character">
<h3>First name: {firstname}</h3>
<span>Last name: {lastname}</span>
<span>Height: {height}</span>
... |
docs/pages/components/image-list.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 = 'components/image-list';
const requireDemo = require.context('docs/src/pages/components/image-list', false, /\.(js|tsx)$/);
const ... |
src/status/LoadableStatusPage.js | ipfs/webui | import React from 'react'
import Loadable from '@loadable/component'
import ComponentLoader from '../loader/ComponentLoader.js'
const LoadableStatusPage = Loadable(() => import('./StatusPage'),
{ fallback: <ComponentLoader/> }
)
export default LoadableStatusPage
|
src/@ui/AccountCard/index.js | NewSpring/Apollos | import React from 'react';
import PropTypes from 'prop-types';
import { compose, pure, setPropTypes, defaultProps } from 'recompose';
import { Platform } from 'react-native';
import { startCase, toLower } from 'lodash';
import { withIsLoading } from '@ui/isLoading';
import styled from '@ui/styled';
import Card, { Card... |
docs/src/app/components/PropTypeDescription.js | skarnecki/material-ui | import React from 'react';
import {parse} from 'react-docgen';
import {parse as parseDoctrine} from 'doctrine';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import MarkdownElement from './MarkdownElement';
import recast from 'recast';
require('./prop-type-description.css');
function getDeprecatedInfo... |
packages/metaweb-meta-react/src/routes/index.js | ericwooley/metawebjs | import React, { Component } from 'react';
import WidgetLoader from '../widgetLoader'
export default class App extends Component {
render() {
return (
<div>
<WidgetLoader loadWidget={(cb) =>
require.ensure([], (require) =>
cb(require('lodash')
))} />
</div>
);
}
}
|
src/svg-icons/device/data-usage.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceDataUsage = (props) => (
<SvgIcon {...props}>
<path d="M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95zM12 19c-3.87 0-7-3.13-7-7 0-3.53... |
client/src/components/shared/Icons/Mail.js | FreeCodeCampBA/freecodecampba.github.io | import React from 'react'
const MailIcon = props => (
<svg
width={24}
height={24}
fill="none"
stroke="currentColor"
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round"
className="prefix__feather prefix__feather-mail"
{...props}
>
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0... |
example/CartView/app/components/ProductItem.js | yaraht17/react-native-draggable-view |
import React, { Component } from 'react';
import {
StyleSheet, View, Dimensions, Image, Text,
Animated, Platform, TouchableOpacity, ScrollView, FlatList
} from 'react-native';
import iconStar from '../media/icon_star.png'
import iconStarDisable from '../media/icon_star_disable.png'
import demoProduct from '.... |
src/BackgroundWrapper.js | manishksmd/react-scheduler-smartdata | import React from 'react';
import PropTypes from 'prop-types';
class BackgroundWrapper extends React.Component {
render() {
return this.props.children;
}
}
BackgroundWrapper.propTypes = {
children: PropTypes.element,
value: PropTypes.instanceOf(Date),
range: PropTypes.arrayOf(PropTypes.instanceOf(Date))... |
src/app/components/UserHeader/UserHeader.js | GolosChain/tolstoy | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import styled from 'styled-components';
import tt from 'counterpart';
import o2j from 'shared/clash/object2json';
import proxifyImageUrl from 'app/utils/ProxifyUrl';
import normalizeProfile from 'app/ut... |
src/Input/Input.driver.js | skyiea/wix-style-react | import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import ReactDOM from 'react-dom';
import styles from './Input.scss';
const inputDriverFactory = ({element, wrapper, component}) => {
const input = element && element.querySelector('input');
const clearButton = element && element.querySel... |
tests/routes/Home/components/HomeView.spec.js | davezuko/react-redux-starter-kit | 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')
... |
src/shared/element-react/dist/npm/es6/src/breadcrumb/BreadcrumbItem.js | thundernet8/Elune-WWW | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import { Component, PropTypes } from '../../libs';
var BreadcrumbItem = functi... |
src/components/video_detail.js | danielnavram/React-youtube-api | import React from 'react';
const VideoDetail = ({video}) => {
if(!video) {
return <div>Loading...</div>
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed-re... |
src/routes/ImageSelect/components/ImageSelect.js | dannyrdalton/example_signup_flow | import React from 'react'
import { Link } from 'react-router'
import { Field } from 'redux-form'
import Dropzone from 'react-dropzone'
export const ImageSelect = (props) => (
<div>
<h2>Select An Image</h2>
<div>
<Dropzone
onDrop={props.handleImageDrop}
multiple={false}
accept="i... |
src/svg-icons/navigation/arrow-upward.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowUpward = (props) => (
<SvgIcon {...props}>
<path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/>
</SvgIcon>
);
NavigationArrowUpward = pure(NavigationArrowUpward);
NavigationA... |
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-layout-collections-row-collection.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react'
import {BaseMixin, ElementaryMixin, SectionMixin, CcrWriterMixin, ColorSchemaMixin} from '../../common/common.js'
import RowCollectionMixin from './row-collection-mixin.js'
import Row from './../row.js'
export const RowCollection = React.createClass({
//@@viewOn:mixins
mixins: [
Base... |
src/svg-icons/image/slideshow.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageSlideshow = (props) => (
<SvgIcon {...props}>
<path d="M10 8v8l5-4-5-4zm9-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/>
</SvgIcon>
);
ImageSlideshow = pure(I... |
src/components/ListItem.js | aaroncraigongithub/jsla-talk | import React from 'react';
import PropTypes from 'prop-types';
import {
Checkbox,
ListItem as UIListItem,
} from 'material-ui';
import Star from 'material-ui/svg-icons/toggle/star';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
import { yellow500 } from 'material-ui/styles/colors';
import { ite... |
public/components/PostSurvey.js | joeylaguna/angelHack2017 | import React from 'react';
// import FaStar from 'react-icons/lib/fa/star';
// import FaStarO from 'react-icons/lib/fa/star-o';
// import StarRating from 'react-star-rating';
import ReactStars from 'react-stars'
import { render } from 'react-dom'
class PostSurvey extends React.Component {
constructor() {
super()... |
src/schemas/Footer/index.js | cantonjs/re-admin | import React from 'react';
import PropTypes from 'prop-types';
export default function FooterSchema() {
return <noscript />;
}
FooterSchema.propTypes = {
children: PropTypes.node,
};
FooterSchema.configuration = {
name: 'footer',
propType: PropTypes.node,
pipe: ({ children }) => children,
initialData: null,
};... |
test/test_helper.js | ddigioia/react_router_practice_1 | 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... |
src/scripts/components/WelcomePage.js | fantasywind/React-Todo | import React from 'react';
import {Link} from 'react-router-component';
// Components
import Todo from './Todo.js';
const styles = {
wrap: {
margin: '0 auto',
width: '1200px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '48px 0 0 0',
boxSizing: 'border-box'
... |
__tests__/index-test.js | codingfishman/react-scroll-pagination | 'use strict'
jest.unmock('../src/index.jsx')
import React from 'react'
import ReactDOM from 'react-dom'
import jQuery from 'jquery'
import TestUtils from 'react-dom/test-utils'
import ReactScrollPagination from '../src/index.jsx'
describe('ReactScrollPagination', () => {
let fetchFunc = null
let mockConsoleWarn... |
packages/react-scripts/fixtures/kitchensink/template/src/features/webpack/DynamicImport.js | Timer/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';
const DynamicImport = () => {
return <>Hello World!</>;
};
export default DynamicImport;
|
src/components/pages/DeviceComponent.js | hzburki/innexiv-front-end | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { Col, Well } from 'react-bootstrap';
// import axios from 'axios';
import { linkChange, onUpdateDevice, onNotUpdateDevice, fetchDevice } from '../../actions';
import DeviceDetailComponent f... |
app/components/SubNavigation/index.js | projectcashmere/web-server | /**
*
* SubNavigation
*
*/
import React from 'react';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
import Tab from '../Tab';
const Div = styled.div`
background-color: #eeeeee;
height: 45px;
display: flex;
justify-content: center;
... |
docs/src/app/components/pages/components/CircularProgress/ExampleSimple.js | spiermar/material-ui | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
const CircularProgressExampleSimple = () => (
<div>
<CircularProgress />
<CircularProgress size={1.5} />
<CircularProgress size={2} />
</div>
);
export default CircularProgressExampleSimple;
|
packages/react-vis/src/plot/series/line-mark-series.js | uber/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
src/svg-icons/image/collections-bookmark.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCollectionsBookmark = (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-2zm0 10l-2.5-1.5L15 12V4h5v8z"/>... |
app/javascript/mastodon/features/compose/components/autosuggest_account.js | KnzkDev/mastodon | import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class AutosuggestAccount extends Immuta... |
src/routes/dashboard/components/sales.js | vincentdd/crm | import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import { color } from 'utils'
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'
import styles from './sales.less'
function Sales ({ data }) {
return (
<div ... |
examples/huge-apps/routes/Course/routes/Grades/components/Grades.js | meraki/react-router | /*globals COURSES:true */
import React from 'react'
class Grades extends React.Component {
render() {
let { assignments } = COURSES[this.props.params.courseId]
return (
<div>
<h3>Grades</h3>
<ul>
{assignments.map(assignment => (
<li key={assignment.id}>{assignment... |
src/app/views/printCalculation.js | webcoding/reactui-starter | import React from 'react';
import Reflux from 'reflux';
import { Navigation, State } from 'react-router';
import calculatorStore from 'stores/calculator';
import RecipePrintArea from 'components/recipePrintArea';
export default React.createClass( {
mixins: [
Navigation,
State,
Reflux.con... |
App/Views/Settings/index.js | BelinChung/react-native-hiapp | import React from 'react'
import connect from 'redux-connect-decorator'
import t from '@Localize'
import config from '@Config'
import styles from '@Styles'
import Icon from '@Components/Icon'
import { View, StyleSheet } from 'react-native'
import { ListItem } from 'react-native-elements'
import req from '@Network'
@co... |
src/svg-icons/navigation/unfold-less.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationUnfoldLess = (props) => (
<SvgIcon {...props}>
<path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"/>
</SvgIcon>
)... |
src/Stepper/StepLabel.js | igorbt/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import CheckCircle from '../svg-icons/action/check-circle';
import SvgIcon from '../SvgIcon';
const getStyles = ({active, completed, disabled}, {muiTheme, stepper}) => {
const {
textColor,
disabledTextColor,
iconColor,
inactiveIconColor,
... |
classic/src/scenes/mailboxes/src/Scenes/AppScene/Toolbar/ToolbarNavigation/ToolbarNavigation.js | wavebox/waveboxapp | import PropTypes from 'prop-types'
import React from 'react'
import shallowCompare from 'react-addons-shallow-compare'
import { accountStore } from 'stores/account'
import { remote } from 'electron'
import BrowserToolbarContent from 'wbui/BrowserToolbarContent'
import WBRPCRenderer from 'shared/WBRPCRenderer'
class To... |
src/components/NotFound.js | GBLin5566/BackExchange | import React, { Component } from 'react';
export default class NotFound extends Component {
render() {
return (
<div>
<h1>404 Not Found</h1>
</div>
);
}
}
|
src/components/custom-components/Chip/Chip.js | ArtyomVolkov/music-search | import React from 'react';
// Style
import './Chip.scss';
class Chip extends React.Component {
constructor (props) {
super(props);
}
render () {
const { tagName, children } = this.props;
return (
<div className={`chip ${tagName}`}>
<span className="tag-content">{children}</span>
... |
tests/layouts/CoreLayout.spec.js | SteveHoggNZ/Choice-As | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
RNDemo/RNComment/node_modules/react-native/Libraries/Components/WebView/WebView.ios.js | 995996812/Web | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/ModalBody.js | yickli/react-bootstrap | import React from 'react';
import classnames from 'classnames';
class ModalBody extends React.Component {
render() {
return (
<div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalBody.propTypes = {
/**
... |
src/core/display/App/util/View/Layout/Basic/index.js | JulienPradet/pigment-store | import React from 'react'
import styles from './layout.css'
const Layout = ({nav, horizontalNav, children}) => <div className={styles.container}>
<div className={styles.nav}>{nav}</div>
<div className={styles.contentContainer}>
<div className={styles.horizontalNav}>{horizontalNav}</div>
<div className={sty... |
public/js/cat_source/es6/components/header/manage/SearchInput.js | riccio82/MateCat | import React from 'react'
class SearchInput extends React.Component {
constructor(props) {
super(props)
this.onKeyPressEvent = this.onKeyPressEvent.bind(this)
let self = this
this.filterByNameDebounce = _.debounce(function (e) {
self.filterByName(e)
}, 500)
}
filterByName(e) {
if (... |
docs-ui/components/charts.stories.js | beeftornado/sentry | import React from 'react';
import {withInfo} from '@storybook/addon-info';
import {number, boolean, text} from '@storybook/addon-knobs';
import LineChart from 'app/components/charts/lineChart';
import BarChart from 'app/components/charts/barChart';
export default {
title: 'DataVisualization/Charts/Playground',
};
... |
blueprints/smart/files/__root__/containers/__name__/__name__.js | tyleriguchi/photoshop-battles | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
type Props = {
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
const mapStateToProps = (state) => {
return {}
}
const... |
src/ReactBoilerplate/Scripts/components/TwoFactor/VerifyCodeForm.js | pauldotknopf/react-dot-net | import React from 'react';
import Form from 'components/Form';
import { reduxForm } from 'redux-form';
import { Input } from 'components';
import { verifyCode } from 'redux/modules/account';
class VerifyCodeForm extends Form {
modifyValues(values) {
return {
...values,
provider: this.props.sentCodeWi... |
src/components/widgets/widgets-create.js | johnamiahford/widgets-spa | 'use strict';
import React from 'react';
class WidgetsCreate extends React.Component {
renderActionButtons() {
let {isNewMode, handleIsNewModeToggle} = this.props;
let actionText = isNewMode ? 'Cancel' : 'Create New Widget';
let actionClass = isNewMode ? 'danger' : 'info';
return (<button className... |
frontend/src/Loginscreen.js | swapnalikadam/cloudprint | import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import RaisedButton from 'material-ui/RaisedButton';
import Login from './Login';
import Register from './Register';
class Loginscreen extends Component {
constructor(props){
super(props);
var loginB... |
js/components/App.js | orionwei/mygit | import React from 'react';
import Relay from 'react-relay';
class App extends React.Component {
render() {
return (
<div>
<h1>Widget list</h1>
<ul>
{this.props.viewer.widgets.edges.map(edge =>
<li key={edge.node.id}>{edge.node.name} (ID: {edge.node.id})</li>
... |
actor-apps/app-web/src/app/components/modals/InviteUser.react.js | fengchenlianlian/actor-platform | import _ from 'lodash';
import React from 'react';
import ActorClient from 'utils/ActorClient';
import { KeyCodes } from 'constants/ActorAppConstants';
import InviteUserActions from 'actions/InviteUserActions';
import ContactStore from 'stores/ContactStore';
import InviteUserStore from 'stores/InviteUserStore';
im... |
docs/app/Examples/elements/Step/index.js | clemensw/stardust | import React from 'react'
import Content from './Content'
import Groups from './Groups'
import States from './States'
import Types from './Types'
import Variations from './Variations'
const StepExamples = () => (
<div>
<Types />
<Groups />
<Content />
<States />
<Variations />
</div>
)
export... |
app/components/MainLayout.js | wbowling/deciderer | import React from 'react'
import { Grid } from 'react-bootstrap'
import TopBar from './TopBar'
import Footer from './Footer'
const MainLayout = React.createClass({
render() {
return (
<div>
<TopBar />
<Grid>
{this.props.children}
<Footer />
</Grid>
</div... |
src/icons/AccessibilityIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class AccessibilityIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm18 14H30v26h-4V32h-4v12h-4V18H6v-4h36v4z"... |
src/components/Layout/Navigation.js | EthHead/ens.trade | import React from 'react';
import Link from '../Link';
class Navigation extends React.Component {
componentDidMount() {
window.componentHandler.upgradeElement(this.root);
}
componentWillUnmount() {
window.componentHandler.downgradeElements(this.root);
}
render() {
return (
<nav className... |
app/javascript/mastodon/features/ui/util/reduced_motion.js | unarist/mastodon | // Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
import React from 'react';
import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
const stylesToKeep = ['opacity', 'backgroundOpacity'];
const extractValue = (value) =>... |
src/js/components/ui/reduxForm/Radio.js | knowncitizen/tripleo-ui | /**
* Copyright 2018 Red Hat Inc.
*
* 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... |
ButtonExample/src/components/Text.js | jacklam718/react-native-button-component | import React from 'react';
import ReactNative, { StyleSheet, Dimensions } from 'react-native';
const scale = Dimensions.get('window').width / 375;
export default function Heading1(props) {
return (
<ReactNative.Text style={styles.h1} {...props} />
);
}
function normalize(size: number): number {
return Math... |
client/src/__tests__/components/RecipesForm.spec.js | Billmike/More-Recipes | import React from 'react';
import moxios from 'moxios';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import DropZone from 'react-dropzone';
import RecipesForm from '../../components/RecipesForm';
import recipes from '../fixtures/recipes';
describe('<RecipesForm/>', () => {
it('Should render the recip... |
src/components/ui/Radio.js | meetfranz/franz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import { Field } from 'mobx-react-form';
import classnames from 'classnames';
export default @observer class Radio extends Component {
static propTypes = {
field: PropTypes.instanceOf(Field).isReq... |
js/components/QuestionTypes/ShortAnswer.js | ecohealthalliance/GoodQuestion | import React from 'react';
import {
Text,
TextInput,
View,
} from 'react-native';
import Styles from '../../styles/Styles';
import Color from '../../styles/Color';
import ViewText from '../ViewText';
const ShortAnswer = React.createClass({
propTypes: {
id: React.PropTypes.string.isRequired,
text: React... |
app/routes/method-type/CreateRoute.js | ryrudnev/dss-wm | import React from 'react';
import Helmet from 'react-helmet';
import { Route } from '../../core/router';
import { Model as MethodType } from '../../entities/MethodType';
import { PageHeader, Row, Col, Panel } from 'react-bootstrap';
import MethodTypeForm from '../../components/MethodTypeForm';
import Progress from 'rea... |
components/__tests__/Cell-Subtitle.js | beaurushton/react-native-tableview-simple | /* eslint-env node, jest */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Cell from '../Cell';
it('renders with subtitle', () => {
const tree = renderer.create(
<Cell
cellStyle="Subtitle"
title="Subtitle"
detail="No linebreakkkkkkkkkkkkkkk... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.