path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/Feedback/FeedbackCard/FeedbackCard.js | ctco/rosemary-ui | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import noop from 'lodash/noop';
import types from '../types';
const cardTitle = {
[types.error]: 'Error',
[types.success]: 'Success',
[types.waring]: 'Warning',
[types.info]: 'Info'
};
class FeedbackCar... |
src/index.js | ryanml/RegexHub | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
import './sass/style.scss';
const createStoreWithMiddleware = applyMiddleware()(createStore... |
src/js/App.js | firKing/the-jigsaw-puzzle | import React, { Component } from 'react';
export default class App extends Component {
render() {
return (
<h1>Hello, world. thank you very much</h1>
);
}
}
|
frontend/.storybook/preview.js | omidfi/moro | import React from 'react';
import { ThemeProvider } from 'styled-components';
import { Theme } from 'Theme';
export const decorators = [
(Story) => (
<Theme>
<Story />
</Theme>
),
];
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
};
|
src/routes/video/index.js | ykx456654/hr_admin | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import cookies from 'cookiesjs'
import { message } from 'antd'
import { getQiniuToken } from '../../services/common'
import { Link,routerRedux } from 'dva/router'
// import LzEditor from 'react-lz-editor'
import MyUpload from ... |
src/svg-icons/action/reorder.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionReorder = (props) => (
<SvgIcon {...props}>
<path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"/>
</SvgIcon>
);
ActionReorder = pure(ActionReorder);
ActionReorder.displayName = 'Action... |
src/Menu.js | dbburgess/danielburgess.me | import React, { Component } from 'react';
import getStyleByKey from './getStyleByKey';
import Icon from './Icon';
class Menu extends Component {
render() {
const styles = this.props.animationStyles;
const dividerStyle = ((progress) => ({
height: (100 * progress) + '%'
}))(getStyleByKey(styles, 'di... |
client/src/components/dashboard/messaging/conversation-list.js | hah-nan/papabear2 | import React, { Component } from 'react';
import cookie from 'react-cookie';
import ConversationItem from './conversation-item';
const moment = require('moment');
class ConversationList extends Component {
constructor(props) {
super(props);
this.userCookie = cookie.load('user');
}
render() {
cons... |
form/TextInput.js | moretti/react-components | import React, { Component } from 'react';
import { TextInput as InputPropTypes } from './propTypes';
import styles from './styles.css';
import cx from 'classnames';
export default class TextInput extends Component {
render() {
const isInline = this.props.layout && this.props.layout.match(/^inline/);
const c... |
pnpm-cached/.pnpm-store/1/registry.npmjs.org/react-bootstrap/0.31.0/es/Grid.js | JamieMason/npm-cache-benchmark | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/app/hello.spec.js | XingMeansOK/gallery-by-react | /* eslint-env jasmine */
import React from 'react';
import TestUtils from 'react-dom/lib/ReactTestUtils';
import {Hello} from './hello';
describe('hello component', () => {
it('should render hello world', () => {
const hello = TestUtils.renderIntoDocument(<Hello/>);
const h1 = TestUtils.findRenderedDOMCompon... |
frontend/src/js/test/components/pages/HomePage.spec.js | udontknowmeapp/udontknowme | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { Link } from 'react-router';
import { setupShallowRender } from '../../helpers';
import HomePage from '../../../pages/HomePage';
describe('pages/HomePage', () => {
it('should render the component content'... |
src/js/test/components/common/common.spec.js | athill/wimf | import React from 'react';
import { shallow } from 'enzyme';
import faker from 'faker';
import { Icon, Spinner, NoOp } from '../../../components/common/common';
describe('common', () => {
describe('Icon', () => {
it('works', () => {
const iconName = faker.lorem.word();
const output = shallow(<Icon icon={icon... |
src/components/Header/Header.js | Ealon/react-redux-starter-kit | /*
created by Ealon H.
on 01/Feb/2017
*/
import React from 'react'
import { IndexLink, Link } from 'react-router'
import './Header.scss'
// import EalonImage from './assets/ealon_profile.jpg'
import { Icon } from 'semantic-ui-react'
import headerIcon from './assets/analytics.svg'
import { Col, Row } from 'react-bootstr... |
src/IconMenu/IconMenu.spec.js | mtsandeep/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import getMuiTheme from '../styles/getMuiTheme';
import IconMenu from './IconMenu';
describe('<IconMenu />', function() {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => shallow(node,... |
tests/components/rect-series-tests.js | Apercu/react-vis | import test from 'tape';
import React from 'react';
import {mount} from 'enzyme';
import HorizontalRectSeries from 'plot/series/horizontal-bar-series';
import VerticalRectSeries from 'plot/series/vertical-bar-series';
import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils';
import Histogram from ... |
js/App.js | acbde45/bookRead |
import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import CodePush from 'react-native-code-push';
import { Container, Content, Text, View } from 'native-base';
import Modal from 'react-native-modalbox';
import AppNavigator from './AppNavigator';
import ProgressBar from './components... |
client/components/surveys/edit/SurveyParameters.js | AnatolyBelobrovik/itechartlabs | import React from 'react';
import PropTypes from 'prop-types';
const SurveyParameters = ({
onChecked,
isAnonymous,
hasMandatoryLabel,
hasPageNumbers,
hasProgressIndication,
hasQuestionNumbers
}) => {
return (
<div className="panel panel-default">
<div className="panel-heading">
<h3 cla... |
src/components/TabPanel.js | rackt/react-tabs | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import cx from 'clsx';
const DEFAULT_CLASS = 'react-tabs__tab-panel';
export default class TabPanel extends Component {
static defaultProps = {
className: DEFAULT_CLASS,
forceRender: false,
selectedClassName: `${DEFAULT_CLASS}... |
stories/index.js | Painatalman/fortunecookie | import React from 'react';
import { storiesOf, action, linkTo } from '@kadira/storybook';
// import {Provider} from 'react-redux';
// import {createStore} from 'redux';
// // loads index automatically
// import reducers from '../components/reducers';
import FortuneCookie from '../src/components/FortuneCookie/Fortune... |
client/routes/index.js | Art404/platform404 | import {Route, Router, browserHistory, IndexRoute} from 'react-router'
import App from '../containers/App/App'
import React from 'react'
import Page from '../components/Page/Page'
import About from '../components/About/About'
import User from '../components/User/User'
import ProjectDetail from '../components/ProjectDet... |
src/containers/Recipe-Form.js | MichaelLSmith/recipeBox | import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { connect } from 'react-redux';
import shortid from 'shortid';
import { Button, ButtonToolbar } from 'react-bootstrap';
import changeCase from 'change-case';
// import toTitleCase from 'to-title-case'
//tried to add a normal... |
app/imports/ui/client/components/misc/BoxFooter/index.js | valcol/ScrumNinja | import React, { Component } from 'react';
class BoxFooter extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="box-footer">
{this.props.children}
</div>
);
}
}
export default BoxFooter;
|
packages/ringcentral-widgets-test/test/integration-test/CallLogFields/CallLogFields.spec.js | ringcentral/ringcentral-js-widget | import React from 'react';
import { RcThemeProvider } from '@ringcentral-integration/rcui';
import { mount } from 'enzyme';
import CallLogFields from 'ringcentral-widgets/components/CallLogFields';
const WrappedCallLogFields = (props) => {
return (
<RcThemeProvider>
<CallLogFields {...props} />
</RcThe... |
examples/components/TodoList/widgets/List.js | pashaigood/react-component-redux | import React from 'react';
const Style = {
height: 200,
overflow: 'hidden',
overflowY: 'scroll'
};
export default class List extends React.Component {
static propTypes = {
todos: React.PropTypes.object.isRequired,
toggleDone: React.PropTypes.func.isRequired
};
render() {
const {todos, toggleD... |
src/svg-icons/image/flash-auto.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFlashAuto = (props) => (
<SvgIcon {...props}>
<path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/>
</SvgIcon>
);
ImageFlashAuto = pure(ImageFla... |
app/containers/FeaturePage/index.js | samit4me/react-boilerplate | /*
* FeaturePage
*
* List all the features
*/
import React from 'react';
import Helmet from 'react-helmet';
import messages from './messages';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import List from './List';
import ListItem from './ListItem';
import ListItemTitle from './Li... |
client/lib/react-helpers/index.js | tinkertinker/wp-calypso | /**
* External dependencies
*/
import ReactDom from 'react-dom';
import React from 'react';
import { Provider as ReduxProvider } from 'react-redux';
/**
* Internal dependencies
*/
import analytics from 'lib/analytics';
export function concatTitle( ...parts ) {
return parts.join( ' › ' );
}
export function rende... |
src/components/Charity/Charity.js | GJMcGowan/personal_site | import React, { Component } from 'react';
import { Pie } from 'react-chartjs';
class Charity extends Component {
render() {
const data = [
{
value: 3300.00,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Centre for Effective Altruism"
},
{
value... |
test/renderer/components/transforms/image-spec.js | 0u812/nteract | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import ImageDisplay, {
PNGDisplay,
GIFDisplay,
JPEGDisplay,
} from '../../../../src/notebook/components/transforms/image';
const imageData = 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
describe('ImageDis... |
ebook-leaning-react/ch06_valid_refs_bind/color-organizer/src/index.js | wefine/reactjs-guide | 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();
|
app/javascript/mastodon/features/ui/components/actions_modal.js | pixiv/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import StatusContent from '../../../components/status_content';
import Avatar from '../../../components/avatar';
import Relative... |
src/components/SpeakersSection/SpeakersSection.js | ksevezich/DayOfBlueprint | import React from 'react'
import classes from './SpeakersSection.scss'
import { Col, Row } from 'react-bootstrap'
export const SpeakersSection = (props) => (
<div>
<Row className={classes.section}>
<Col md={1}>
<div>
<img className={classes.sectionImage} src={props.imagePath} />
... |
src/Card/__tests__/Card-test.js | react-mdl/react-mdl | /* eslint-env mocha */
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
import { shallow } from 'enzyme';
import React from 'react';
import { Card } from '../';
chai.use(chaiEnzyme());
describe('Card', () => {
it('should render a div with the card css class', () => {
const wrappe... |
src/components/RestaurantNameForm/RestaurantNameForm.js | labzero/lunch | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './RestaurantNameForm.scss';
class RestaurantNameForm extends Component {
componentDidMount() {
// React Bootstrap steals focus, grab it back
const inpu... |
src/containers/Asians/_components/ViewLockedRound/Ballots/SmallBallots/Instance/BallotInstance/Total.js | westoncolemanl/tabbr-web | import React from 'react'
import List, {
ListItem,
ListItemIcon,
ListItemText
} from 'material-ui/List'
import StarIcon from 'material-ui-icons/Star'
export default ({
total,
winner
}) =>
<div
className={'w-100'}
>
<List>
<ListItem>
{winner && <ListItemIcon>
<StarIcon />
... |
tests/lib/rules/vars-on-top.js | knpwrs/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
* @copyright 2014 Danny Fritz. All rights reserved.
* @copyright 2014 Gyandeep Singh. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requiremen... |
fixtures/fiber-debugger/src/App.js | with-git/react | import React, { Component } from 'react';
import Draggable from 'react-draggable';
import ReactNoop from 'react-noop-renderer';
import ReactFiberInstrumentation from 'react-noop-renderer/lib/ReactFiberInstrumentation';
import Editor from './Editor';
import Fibers from './Fibers';
import describeFibers from './describeF... |
src/components/app.js | n1ckp/spotmybands | import React, { Component } from 'react';
require('../style/app.scss');
export default class App extends Component {
render() {
return (
<div>
{ this.props.children }
</div>
);
}
}
|
app/javascript/mastodon/components/avatar.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class Avatar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
size: PropType... |
src/components/MenuLinks/index.js | evandromacedo/evandromacedo.com | import React from 'react'
import { SearchAlt2 as Search } from 'styled-icons/boxicons-regular/SearchAlt2'
import * as S from './styled'
import ThemeBulb from '../ThemeBulb'
const MenuLinks = ({ isOpen, closeMenu }) => (
<S.MenuLinksWrapper isOpen={isOpen}>
{/* Nav Links */}
<S.MenuLinksList>
<S.MenuLin... |
app/components/LinkText.js | alexindigo/ndash | import React, { Component } from 'react';
import { Text } from 'react-native';
import { openUrl, shareUrl } from '../helpers/url';
export default class LinkText extends Component {
render() {
const {url, style, ...props} = this.props;
return (
<Text
style={style}
{...props}
... |
src/routes/NotFound/NotFound.js | jsebax/react-finance-app | import React from 'react'
import { browserHistory } from 'react-router'
const goBack = (e) => {
e.preventDefault()
return browserHistory.goBack()
}
export const NotFound = () => (
<div>
<h4>Page not found!</h4>
<p><a href='#' onClick={goBack}>← Back</a></p>
</div>
)
export default NotFound
|
app/javascript/mastodon/features/ui/components/column.js | mecab/mastodon | import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
const easingOutQuint = (x, t, b, c, d) => c*((t=t/d-1)*t*t*t*t + 1) + b;
const scrollTop = (node) => {
const startTime = Date.now();
const offset = node.scrollTop;
con... |
src/components/Navigation/index.js | AnhHT/my-first-reactjs | import React from 'react'
import { Link } from 'react-router'
const Navigation = (props) => {
const isLoggedIn = props.isAuthenticated
return (
<nav className={props.className}>
<ul>
{ !isLoggedIn && <li><Link activeClassName={props.activeClassName} to='/login'>Login</Link></li> }
{ isLog... |
app/javascript/mastodon/features/ui/components/boost_modal.js | res-ac/mstdn.res.ac | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
import StatusContent from '../../../components/status_content';
import Av... |
internals/templates/containers/App/index.js | kossel/react-boilerplate | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
app/javascript/mastodon/components/icon_with_badge.js | tateisu/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
const formatNumber = num => num > 40 ? '40+' : num;
const IconWithBadge = ({ id, count, className }) => (
<i className='icon-with-badge'>
<Icon id={id} fixedWidth className={className} />
{count > 0 &... |
packages/wix-style-react/src/Accordion/docs/index.story.js | wix/wix-style-react | import React from 'react';
import {
header,
tabs,
tab,
title,
description,
importExample,
divider,
example,
api,
testkit,
playground,
} from 'wix-storybook-utils/Sections';
import InfoCircle from 'wix-ui-icons-common/InfoCircle';
import { storySettings } from './storySettings';
import Accordion, ... |
src/js/components/IconLink.js | bcongdon/gdq-stats | import React from 'react'
import Glyphicon from 'react-bootstrap/lib/Glyphicon'
import { PropTypes } from 'prop-types'
import { LIGHT_FILL_COLOR, DARK_FILL_COLOR } from '../constants'
const IconLink = ({ icon, active, ...props }) => {
const color = active ? DARK_FILL_COLOR : LIGHT_FILL_COLOR
return (
<a
... |
src/routes/user/UserModal.js | IssaTan1990/antd-admin | import React from 'react'
import PropTypes from 'prop-types'
import { Form, Input, InputNumber, Radio, Modal, Cascader } from 'antd'
import city from '../../utils/city'
const FormItem = Form.Item
const formItemLayout = {
labelCol: {
span: 6,
},
wrapperCol: {
span: 14,
},
}
const modal = ({
visible,... |
src/ComponentFactory.js | gearz-lab/react-metaform | import React from 'react';
import _ from 'underscore';
// component definitions
class ComponentFactory {
constructor() {
// this is expected to contain a property for each supported type
// and this property's value is expected to be an array of ComponentBuilder
this.fieldComponentsByType... |
src/packages/@ncigdc/components/SampleSize.js | NCI-GDC/portal-ui | import React from 'react';
import { css } from 'glamor';
const styles = {
deemphasizedHeading: {
fontWeight: 'bold',
letterSpacing: -0.5,
fontSize: '0.8em',
opacity: 0.8,
color: '#3a3a3a',
},
};
export default ({
n,
style,
formatter = x => x.toLocaleString(),
symbol = 'n',
}) => (
<s... |
packages/demos/demo/src/components/Client/form.js | garth/cerebral | import React from 'react'
import { connect } from '@cerebral/react'
import { signal, state } from 'cerebral/tags'
import translations from '../../common/compute/translations'
import Input from './Input'
import Header from './Header'
import Textarea from '../Textarea'
export default connect(
{
item: state`client... |
src/components/common/svg-icons/action/description.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionDescription = (props) => (
<SvgIcon {...props}>
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/>
</SvgIcon>
);
A... |
examples/official-storybook/stories/addon-measure/ShadowRoot.stories.js | storybooks/storybook | import React from 'react';
import { ShadowRoot } from '../../components/addon-measure/ShadowRoot';
export default {
title: 'Addons/Measure/ShadowRoot',
component: ShadowRoot,
};
const Template = (args) => (
<div
style={{
display: 'inline-block',
padding: 64,
}}
>
<ShadowRoot {...args}... |
app/containers/HomePage.js | manojsinghnegiwd/ReactElectronImageBrowser | // @flow
import React, { Component } from 'react';
import Home from '../components/Home/';
import Header from '../components/Layout/Header';
export default class HomePage extends Component {
render() {
let {images} = this.props.mainStore;
return (
<div className="main-container">
<Header {...this.p... |
src/front/js/components/settings/__tests__/SettingPanel.spec.js | raccoon-app/ui-kit | import React from 'react';
import SettingPanel from '../SettingPanel';
import { shallow } from 'enzyme';
describe('Setting Panel Appearance', () => {
let wrapper;
const props = {
markerColorList: [],
backgroundColorList: [],
onSwitcherChange: jest.fn,
markerColor: {},
ba... |
ui/kirk/src/Dashboard/index.js | socx/Kirk | import React from 'react'
const Dashboard = (props) => (
<div>
<h1>Dashboard</h1>
<p>{console.log(props)}</p>
</div>
)
export default Dashboard |
views/pages/questsId/quest.js | urfu-2016/team5 | import './quests-id.css';
import './../../styles/block/block.css';
import React from 'react';
import ReactDOM from 'react-dom';
import QuestContainer from '../../blocks/Quest/QuestContainer';
import CommentsPoster from '../../blocks/comments/CommentsPoster';
import PhotoSender from '../../blocks/QuestPhotos/PhotoSend... |
complete-example/client/src/components/presentation/cart/cart.js | jpaulptr/ecom-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Items from './items';
import { Link } from 'react-router-dom';
import TextBox from '../form-controls/text-box';
import Button from '../form-controls/button';
import Heading from '../headers/heading';
class Cart extends Component {
... |
client/modules/Post/__tests__/components/PostList.spec.js | maicongil/fcc_voting_app | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... |
src/esm/components/graphics/icons-next/eye-icon-next/index.js | KissKissBankBank/kitten | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["color", "title"];
import React from 'react';
import PropTypes from 'prop-types';
export var EyeIconNext = function EyeIconNext(_ref) {
var color = _... |
fields/types/date/DateColumn.js | dryna/keystone-twoje-urodziny | import React from 'react';
import moment from 'moment';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var DateColumn = React.createClass({
displayName: 'DateColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.obj... |
webapp/src/components/ProgressBar/ProgressBar.js | OverStruck/deep-dream-maker | import React from 'react'
import { withStyles } from '@material-ui/core/styles';
import LinearProgress from '@material-ui/core/LinearProgress'
import { getProgress } from "../../utils/Api";
const StyledProgressBar = withStyles({
root: {
height: 30
}
})(LinearProgress);
class ProgressBar extends React.... |
modules/__tests__/Router-test.js | kelsadita/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createHistory from 'history/lib/createMemoryHistory'
import Router from '../Router'
import Route from '../Route'
describe('Router', function () {
var node
beforeEach(function () {
node = document.... |
src/pages/success.js | braidn/Nesta-Cloudbacon-Blog | /* eslint jsx-a11y/label-has-for:0 */
import React from 'react'
import Helmet from 'react-helmet'
import { Link } from 'gatsby'
import styled from 'styled-components'
import { Layout, Wrapper, Header } from '../components'
import config from '../../config'
const Content = styled.div`
grid-column: 2;
box-shadow: ... |
src/components/LogInIndex.js | jlmonroy13/brainstutor-client | import React from 'react';
import { Link } from 'react-router';
const LogInIndex = () => {
return (
<div className="section__auth section__auth--index">
<div className="section__auth-hero" />
<div className="section__auth-container section__auth-container--index">
<div className="section__aut... |
src/components/CounterSegment.js | umbrellio/rollex | import React from 'react'
import PropTypes from 'prop-types'
import AnimatedCounterDigit from './AnimatedCounterDigit'
import StaticCounterDigit from './StaticCounterDigit'
/**
* @type {Object}
* Maximum decimal values for available periods' numbers.
*/
const PERIOD_LIMITS = {
seconds: 59,
minutes: 59,
hours:... |
classic/src/scenes/wbfa/generated/FABGoogle.free.js | wavebox/waveboxapp | import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faGoogle } from '@fortawesome/free-brands-svg-icons/faGoogle'
export default class FABGoogle extends React.Component {
render () {
return (<FontAwesomeIcon {...this.props} icon={faGoogle} />)
}
}
|
billing-ui/src/index.js | CancerCollaboratory/billing | /*
* Copyright 2016(c) The Ontario Institute for Cancer Research. All rights reserved.
*
* This program and the accompanying materials are made available under the terms of the GNU Public
* License v3.0. You should have received a copy of the GNU General Public License along with this
* program. If not, see <http:... |
src/icons/Arrow.js | ericyd/surfplotjs | /**
* Icon uses a 100x100 grid for layout
*/
import React from 'react';
import Icon from './Icon';
const Arrow = props => (
<Icon className={props.className}>
<path d='M0 10 L40 50 L0 90 L0 10'/>
</Icon>
);
Arrow.propTypes = {
className: React.PropTypes.string
};
export default Arrow;
|
fixtures/packaging/systemjs-builder/prod/input.js | empyrical/react | import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
React.createElement('h1', null, 'Hello World!'),
document.getElementById('container')
);
|
node_modules/react-slick/src/mixins/helpers.js | DaveSpivey/muttwhat | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
const slickList = ReactDOM.findDOMNode(this.list);
var slideCount = Reac... |
components/ImageList/ImageItem/ImageInfo/index.js | samuelngs/px |
import React, { Component } from 'react';
import { View, Text, Image, TouchableHighlight, StyleSheet } from 'react-native';
import Moment from 'moment';
import ProgressiveImage from 'px/components/ProgressiveImage';
import Options from 'px/assets/icons/options.png';
export default class ImageInfo extends Component {... |
server/server.js | Blaumeiser/dronegames | import Express from 'express';
import compression from 'compression';
import mongoose from 'mongoose';
import bodyParser from 'body-parser';
import path from 'path';
import IntlWrapper from '../client/modules/Intl/IntlWrapper';
// Webpack Requirements
import webpack from 'webpack';
import config from '../webpack.confi... |
src/containers/search_bar.js | OatsAndSquats25/React-redux-weather-app | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = {term: ''};
this.onInputChange ... |
src/svg-icons/action/favorite-border.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFavoriteBorder = (props) => (
<SvgIcon {...props}>
<path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 2... |
js/routes.js | xuorig/insyto | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import ViewerQueries from './queries/ViewerQueries';
import InsyteQueries from './queries/InsyteQueries';
import QuizQueries from './queries/QuizQueries';
import App from './components/App';
import InsyteList from './components/InsyteList/In... |
docs/app/Examples/views/Feed/Types/FeedExampleShorthand.js | ben174/Semantic-UI-React | import React from 'react'
import { Feed } from 'semantic-ui-react'
const events = [
{
date: '1 Hour Ago',
image: 'http://semantic-ui.com/images/avatar/small/elliot.jpg',
meta: '4 Likes',
summary: 'Elliot Fu added you as a friend',
},
{
date: '4 days ago',
image: 'http://semantic-ui.com/im... |
src/Parser/Core/Modules/NetherlightCrucibleTraits/TormentTheWeak.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
/**
* Torment the... |
src/svg-icons/maps/local-airport.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalAirport = (props) => (
<SvgIcon {...props}>
<path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/>
</SvgIcon>
);
MapsLocalA... |
src/js/views/Settings.js | jaedb/Iris | import React from 'react';
import { connect, useDispatch } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Route, Link } from 'react-router-dom';
import localForage from 'localforage';
import ConfirmationButton from '../components/Fields/ConfirmationButton';
import PusherConnectionList fr... |
examples/cra-kitchen-sink/src/stories/welcome.stories.js | storybooks/storybook | import React from 'react';
import { Welcome } from '@storybook/react/demo';
import { linkTo } from '@storybook/addon-links';
export default {
title: 'Welcome',
component: Welcome,
};
export const Story1 = () => <Welcome showApp={linkTo('Button')} />;
Story1.title = 'to Storybook';
|
addons/a11y/src/A11yManager.js | rhalff/storybook | import React from 'react';
import WrapStory from './components/WrapStory';
// Run all a11y checks inside
class A11yManager {
wrapStory(channel, storyFn, context, axeOptions) {
const props = { context, storyFn, channel, axeOptions };
return <WrapStory {...props} />;
}
}
export default A11yManager;
|
.storybook/components/DetailPageHeaderStory.js | hellobrian/carbon-components-react | import React from 'react';
import { action, storiesOf } from '@storybook/react';
import Breadcrumb from '../../components/Breadcrumb';
import BreadcrumbItem from '../../components/BreadcrumbItem';
import OverflowMenu from '../../components/OverflowMenu';
import OverflowMenuItem from '../../components/OverflowMenuItem';... |
docs/src/components/Home/Hero/Hero.js | seekinternational/seek-asia-style-guide | import styles from './Hero.less';
import React from 'react';
import { PageBlock, Section } from 'seek-asia-style-guide/react';
import ColorPreview from './ColorPreview/ColorPreview';
import ButtonsPreview from './ButtonsPreview/ButtonsPreview';
import TypographyPreview from './TypographyPreview/TypographyPreview';
impo... |
src/components/InDepthSection.js | ekatzenstein/DynamoDictionary_React | import React from 'react';
import TextEditor from './TextEditor';
import IconButton from 'material-ui/IconButton';
function InDepthSection(props) {
let node=props.node;
return (
<div className='inDepth' >
<b>In Depth:</b>
<IconButton tooltip='Edit In Depth Description' touch={true} toolti... |
myCompany/myCompany/static/js/base.js | Rom4eg/myCompany |
import "foundation-sites/dist/foundation";
// import "foundation-sites/js/foundation.core";
// import "foundation-sites/js/foundation.util.keyboard";
// import "foundation-sites/js/foundation.util.box";
// import "foundation-sites/js/foundation.util.nest";
// import "foundation-sites/js/foundation.util.mediaQuery";
//... |
packages/examples/src/goTo/index.js | diegomura/react-pdf | /* eslint react/prop-types: 0, react/jsx-sort-props: 0 */
import React from 'react';
import { Page, Document, Link, View, Image } from '@react-pdf/renderer';
export default () => (
<Document>
<Page size="A4">
<Link href="#myDest">Link</Link>
</Page>
<Page size="A4">
<View style={{ height: ... |
docs/app/Examples/elements/Loader/Variations/LoaderExampleInverted.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Image, Loader, Segment } from 'semantic-ui-react'
const LoaderExampleInverted = () => (
<Segment inverted>
<Loader active inverted />
<Image src='http://semantic-ui.com/images/wireframe/short-paragraph.png' />
</Segment>
)
export default LoaderExampleInverted
|
fields/components/DateInput.js | wustxing/keystone | import moment from 'moment';
import DayPicker from 'react-day-picker';
import React from 'react';
import Popout from '../../admin/src/components/Popout';
import { FormInput } from 'elemental';
function isSameDay(d1, d2) {
d1.setHours(0, 0, 0, 0);
d2.setHours(0, 0, 0, 0);
return d1.getTime() === d2.getTime();
}
m... |
js/react-native/albums/__tests__/index.ios.js | rysard/cursos | 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 />
);
});
|
test/CollapseSpec.js | erictherobot/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Collapse from '../src/Collapse';
describe('Collapse', function () {
let Component, instance;
beforeEach(function(){
Component = React.createClass({
render(){
let { children, ...props } = this.props;
... |
public/src/admin/content/Content.react.js | SLedunois/personal-website | import React, { Component } from 'react';
import CustomEditor from '../editor/Editor.react';
class Content extends Component {
render() {
return (
<div>
<h1>Content</h1>
<CustomEditor />
</div>
);
}
}
export default Content;
|
src/containers/views/tests/datafiles.spec.js | ashmaroli/jekyll-admin | import React from 'react';
import { mount } from 'enzyme';
import { DataFiles } from '../DataFiles';
import { datafile } from './fixtures';
import Button from '../../../components/Button';
function setup(datafiles=[datafile]) {
const actions = {
fetchDataFiles: jest.fn(),
deleteDataFile: jest.fn(),
sea... |
assets/jqwidgets/demos/react/app/calendar/firstdayoftheweek/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxCalendar from '../../../jqwidgets-react/react_jqxcalendar.js';
import JqxDropDownList from '../../../jqwidgets-react/react_jqxdropdownlist.js';
class App extends React.Component {
componentDidMount() {
this.refs.myDropDownList.on('sele... |
src/panel/Panel.js | alelk/houses-building-website | /**
* Panel
*
* Created by Alex Elkin on 19.10.2017.
*/
import React from 'react';
import PropTypes from 'prop-types'
import './Panel.css'
const Panel = ({className, children, centerVertically}) => {
return (
<div className={`Panel${(className && ' ' + className) || ''}${(centerVertically && ' center... |
blueocean-material-icons/src/js/components/svg-icons/editor/monetization-on.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const EditorMonetizationOn = (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 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 ... |
app/components/RunPlugin.js | surrealroad/electron-react-boilerplate | // @flow
import React, { Component } from 'react';
import { Button } from 'hig-react';
// import { Link } from 'react-router-dom';
export default class RunPlugin extends Component {
props: {
exec: () => void,
disabled: boolean
};
render() {
const { exec } = this.props;
return (
<div>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.