path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/pages/Account/Reset.js | ESTEBANMURUZABAL/my-ecommerce-template | /**
* Imports.
*/
import React from 'react';
import connectToStores from 'fluxible-addons-react/connectToStores';
import {FormattedMessage} from 'react-intl';
// Flux
import IntlStore from '../../../stores/Application/IntlStore';
import ResetStore from '../../../stores/Account/ResetStore';
import resetRequest from ... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/theme/context.js | Brandon-J-Campbell/codemash | import React from 'react';
export default React.createContext();
|
examples/async/index.js | contolini/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.getElementByI... |
app/containers/DashboardContainer/index.js | Blacksage959/Michael.McCann | /*
*
* DashboardContainer
*
*/
import React from 'react';
import Helmet from 'react-helmet';
export default class DashboardContainer extends React.PureComponent {
constructor(props){
super(props);
this.state ={
title:"",
body:"",
image:"",
preview:"",
}
}
handleTitle = (event) => {
... |
analysis/druidferal/src/modules/features/EnergyCapTracker.js | yajinni/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
import { formatPercentage } from 'common/format';
import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER';
import Statistic from 'parser/ui/Statistic';
import RegenResourceCapTracker from 'parser/shared/modu... |
src/icons/SendIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class SendIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M4.02 42L46 24 4.02 6 4 20l30 4-30 4z"/></svg>;}
}; |
docs/src/PageFooter.js | yickli/react-bootstrap | import React from 'react';
import packageJSON from '../../package.json';
let version = packageJSON.version;
if (/docs/.test(version)) {
version = version.split('-')[0];
}
const PageHeader = React.createClass({
render() {
return (
<footer className='bs-docs-footer' role='contentinfo'>
<div c... |
src/components/Icon/Icon.js | Amine-H/Amine-H.github.io | // @flow strict
import React from 'react';
import styles from './Icon.module.scss';
type Props = {
name: string,
icon: {
viewBox?: string,
path?: string
}
};
const Icon = ({ name, icon }: Props) => (
<svg className={styles['icon']} viewBox={icon.viewBox}>
<title>{name}</title>
<path d={icon.pa... |
src/components/App.js | eddiekollar/ReactSimple | import React, { Component } from 'react';
import Home from './Home';
class App extends Component {
render() {
return (
<div>
<h2>Welcome to React Simple</h2>
<p >
To get started, edit <code>src/components/App.js</code> or <code>src/components/Home.js</code> and save to reload.
... |
app/javascript/mastodon/components/autosuggest_textarea.js | tateisu/mastodon | import React from 'react';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import AutosuggestEmoji from './autosuggest_emoji';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { isRtl } from '../rtl';
import Im... |
client/menu/menu.js | sekainogenkai/faito | import {Buttons} from '../game/input';
import {DummyInputTarget} from '../player';
import React from 'react';
// maybe use this method later https://facebook.github.io/react-native/docs/style.html
const styles = {
menu: {
position: "absolute",
top: 0,
left: 0,
bottom: 0,
... |
src/common/StatusLabel/InactiveStatusLabel.js | Syncano/syncano-dashboard | import React from 'react';
import { FontIcon } from 'material-ui';
import { colors as Colors } from 'material-ui/styles';
const InactiveStatusLabel = ({ style }) => (
<FontIcon
style={style}
className="synicon-close"
color={Colors.red400}
/>
);
export default InactiveStatusLabel;
|
src/client/assets/js/nodes/processors/uibuilder/features/palette/components/Palette.js | me-box/iot.red | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { actionCreators as paletteActions, viewConstants, selector } from '../';
import "./Palette.scss";
import FontIcon from 'react-md/lib/FontIcons';
import Paper from 'react-md/lib/Papers';
i... |
examples/date-type/src/DateField.js | fourlabsldn/fl-form-builder | import React from 'react';
import ReactDOM from 'react-dom';
import { curry } from 'lodash/fp';
const updateField = curry((update, state, initialState, fieldName, e) => {
const value = e.target.value || initialState[fieldName];
const newState = Object.assign({}, state, { [fieldName]: value });
update(newState);
... |
ui/src/containers/SideNav/CollapsibleNav.js | LearningLocker/learninglocker | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { routeNodeSelector } from 'redux-router5';
import { VelocityComponent } from 'velocity-react';
import { compose } from 'recompose';
import { connect } from 'react-redux';
import { includesSegment } from 'router5.helpers';
import Link ... |
src/svg-icons/action/restore-page.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRestorePage = (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-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.... |
example/src/pages/ResponsiveImages.js | ethanselzer/react-image-magnify | import React, { Component } from 'react';
import {
Col,
Grid,
Jumbotron,
Row
} from 'react-bootstrap';
import Helmet from 'react-helmet';
import Header from '../components/Header';
import ResponsiveImages from '../components/ResponsiveImages';
import 'bootstrap/dist/css/bootstrap.css';
import '../styles/app.c... |
src/server.js | peeyush1234/react-nodejs-skeleton | /**
* 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 path from 'path';
import express from 'express';... |
app/src/components/Users/index.js | jeremyhon/sia-challenge | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Route, Switch, Link, withRouter } from 'react-router-dom';
import { fetchUsers } from './actions';
import List from './views/list';
import Form from './views/form';
import Detail from './views/detail';
class Users extends Compon... |
src/ButtonInput.js | snadn/react-bootstrap | import React from 'react';
import Button from './Button';
import FormGroup from './FormGroup';
import InputBase from './InputBase';
import childrenValueValidation from './utils/childrenValueInputValidation';
class ButtonInput extends InputBase {
renderFormGroup(children) {
let {bsStyle, value, ...other} = this.p... |
src/components/Username/WithCard.js | u-wave/web | import React from 'react';
import PropTypes from 'prop-types';
import useUserCard from '../../hooks/useUserCard';
import UsernameBase from '.';
const { useCallback } = React;
function UsernameWithCard({ user }) {
const userCard = useUserCard(user);
const onUsernameClick = useCallback((event) => {
event.preven... |
packages/icons/src/md/maps/RestaurantMenu.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdRestaurantMenu(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M15.71 26.417l5.66-5.66L7.34 6.727c-3.12 3.12-3.12 8.19 0 11.31l8.37 8.38zm13.57-3.63c3.05 1.43 7.36.42 10.54-2.76 3.83-3.83 4.56-9.3 1.63-12.... |
src/server.js | cssinjs/cssinjs | import React from 'react'
import {renderToString} from 'react-dom/server'
import {match, RouterContext} from 'react-router'
import {stripIndents} from 'common-tags'
import {minify} from 'html-minifier'
import {SheetsRegistry} from 'react-jss'
import {version} from '../package.json'
import routes from './routes'
import... |
app/index.js | Andrew-Hird/bFM-desktop | import React from 'react';
import { render } from 'react-dom';
import { hashHistory } from 'react-router';
import { AppContainer } from 'react-hot-loader';
import { syncHistoryWithStore } from 'react-router-redux';
import Root from './containers/Root';
import configureStore from './store/configureStore';
import './app.... |
examples/auth-with-shared-root/components/About.js | bs1180/react-router | import React from 'react'
const About = React.createClass({
render() {
return <h1>About</h1>
}
})
export default About
|
code/workspaces/web-app/src/components/app/NavLink.js | NERC-CEH/datalab | import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import { NavLink } from 'react-router-dom';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import Icon from '@material-ui/core/Icon';
const styles = theme => ({
listIcon: {... |
src/svg-icons/editor/format-indent-increase.js | ruifortes/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... |
src/Parser/Mage/Shared/Modules/Features/RuneOfPower.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import { formatNumber, formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Combatants from 'Parser/Core/Module... |
examples/todomvc/containers/Root.js | knowbody/redux | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import rootReducer from '../reducers';
const store = createStore(rootReducer);
export default class Root extends Component {
render() {
return ... |
react-flux-mui/js/material-ui/src/svg-icons/image/grid-off.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageGridOff = (props) => (
<SvgIcon {...props}>
<path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h... |
src/client.js | pavlosvos/krifominima | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import 'babel-polyfill';
import React from 'react';
import... |
packages/bonde-admin-canary/src/components/Tutorial/Dialog/index.js | ourcities/rebu-client | import React from 'react'
import PropTypes from 'prop-types'
import Context from '../Context'
import DialogTooltip from './DialogTooltip'
export class RegisterDialog extends React.Component {
componentDidMount () {
const { name, context } = this.props
context.registerStep(name)
}
render () {
const {... |
src/js/components/icons/base/PlatformFreebsd.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
frontend/containers/form/CaptchaForm.js | datoszs/czech-lawyers | import React from 'react';
import PropTypes from 'prop-types';
import {Form} from 'react-bootstrap';
import {reduxForm, Field} from 'redux-form/immutable';
import Captcha from 'react-google-recaptcha';
import {wrapEventStop} from '../../util';
import {siteKey} from '../../serverAPI';
const CaptchaComponent = ({input, ... |
packages/bonde-admin/src/pages/admin/container.js | ourcities/rebu-client | import React from 'react'
import { Switch } from 'react-router-dom'
import { graphql } from 'react-apollo'
import FetchCurrentUser from '@/account/queries/current-user'
import { connect } from 'react-redux'
import { load } from '@/account/redux/action-creators'
import { Loading } from '@/components/await'
// Routes
im... |
app/javascript/mastodon/features/public_timeline/index.js | rekif/mastodon | 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/components/Button/ButtonAnchor.js | GetAmbassador/react-ions | import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
import style from './style.scss'
import classNames from 'classnames/bind'
const ButtonAnchor = props => {
const cx = classNames.bind(style)
const collapseClass = props.collapse ? 'collapse' : null
const btnAnchorClas... |
src/Card/CardSubtitle.js | kradio3/react-mdc-web | import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
const propTypes = {
className: PropTypes.string,
children: PropTypes.node,
};
const CardSubtitle = ({ className, children }) => (
<h2
className={classnames('mdc-card__subtitle', className)}
>
{children}... |
app/containers/LoginCallback/index.js | belongapp/belong | import React from 'react';
import { connect } from 'react-redux';
import { loginCallbackRequest } from './actions';
export class LoginCallback extends React.Component { // eslint-disable-line react/prefer-stateless-function
static propTypes = {
dispatchLoginCallbackRequest: React.PropTypes.func.isRequired,
};
... |
test/helpers.js | zerkms/react-bootstrap | import React from 'react';
import { cloneElement } from 'react';
export function shouldWarn(about) {
console.warn.called.should.be.true;
console.warn.calledWithMatch(about).should.be.true;
console.warn.reset();
}
/**
* Helper for rendering and updating props for plain class Components
* since `setProps` is de... |
static/src/components/Layout.js | Termnator/mikebot | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import AirhornStatsStore from '../stores/AirhornStatsStore';
import Cloud from './Cloud';
import IslandPond from './islands/IslandPond';
import IslandTree from './islands/IslandTree';
import IslandTrees from './islands/IslandTrees';
import IslandTen... |
app/javascript/mastodon/features/compose/components/upload.js | danhunsaker/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } fr... |
react/features/notifications/components/native/Notification.js | bgrozev/jitsi-meet | // @flow
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { translate } from '../../../base/i18n';
import { Icon, IconClose } from '../../../base/icons';
import AbstractNotification, {
type Props
} from '../AbstractNotification';
import styles from './styles';
/**
... |
src/svg-icons/hardware/security.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareSecurity = (props) => (
<SvgIcon {...props}>
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
</SvgIcon>
);
Hardwa... |
src/js/components/ui/Textarea/Textarea.js | nekuno/client | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import styles from './Textarea.scss';
export default class Textarea extends Component {
static propTypes = {
placeholder : PropTypes.string,
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
... |
src/containers/NotFoundPage/__tests__/index.js | skyuplam/technical-test01 | import { shallow } from 'enzyme';
import React from 'react';
import NotFound from '../index';
describe('<NotFound />', () => {
it('should render the Page Not Found text', () => {
const renderedComponent = shallow(
<NotFound />
);
expect(renderedComponent.contains(
<h1>
Page not found... |
app/javascript/mastodon/features/compose/components/reply_indicator.js | TheInventrix/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from '../../../components/avatar';
import IconButton from '../../../components/icon_button';
import DisplayName from '../../../components/display_name';
import { defineMessages, injec... |
src/svg-icons/notification/time-to-leave.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationTimeToLeave = (props) => (
<SvgIcon {...props}>
<path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.... |
hops/src/App.js | Hops-401/hops-native | import React, { Component } from 'react';
import { StyleSheet, Text, View, AppRegistry } from 'react-native';
import { NativeRouter, Route, Link, Switch } from 'react-router-native';
import Home from './components/home';
import LoginContainer from './containers/LoginContainer';
import SignUpContainer from './containers... |
docs/app/Examples/modules/Accordion/Variations/AccordionExampleInverted.js | clemensw/stardust | import _ from 'lodash'
import faker from 'faker'
import React from 'react'
import { Accordion, Segment } from 'semantic-ui-react'
const panels = _.times(3, () => ({
title: faker.lorem.sentence(),
content: faker.lorem.paragraphs(),
}))
const AccordionExampleInverted = () => (
<Segment inverted>
<Accordion pa... |
miniact3/client/index.js | eliorivero/miniact | import React from 'react';
import ReactDOM from 'react-dom';
class DaleReact extends React.Component {
render() {
return <div>{ this.props.app } listo en React!</div>;
}
}
ReactDOM.render(<DaleReact app="Miniact" />, document.getElementById( 'miniact' ) ); |
modules/pages/client/components/FaqTribes.component.js | Trustroots/trustroots | import React from 'react';
import Faq from '@/modules/pages/client/components/Faq.component.js';
import { Trans, useTranslation } from 'react-i18next';
export default function FaqTribes() {
const { t } = useTranslation('pages');
return (
<Faq category="circles">
<div className="faq-question" id="what-ar... |
app/jsx/context_cards/SubmissionProgressBars.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/svg-icons/editor/monetization-on.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let 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... |
components/BookDetailApp/BookDetailApp.react.js | react-douban/douban-book-web | import React from 'react'
import { render } from 'react-dom'
import request from 'request'
import BookDetail from './BookDetail.react'
import Config from '../Config.react'
const BookDetailApp = React.createClass({
getInitialState() {
return {
book: {},
loading: true
}
},
componentDidMount() {
const b... |
src/containers/Transition/Transition.js | dongxiaofen/react-redux-motion | import React, { Component } from 'react';
import { TransitionDemo } from 'components';
export default class Transition extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div style={{width: '500px', margin: '0 auto'}}>
<TransitionDemo />
... |
src/components/lists/AddressOutputList.js | openvcash/vcash-electron | import React from 'react'
import List from 'react-list'
import { translate } from 'react-i18next'
import { inject, observer } from 'mobx-react'
/** Component */
import AddressOutputListItem from './AddressOutputListItem.js'
@translate(['common'])
@inject('gui', 'send')
@observer
class AddressOutputList extends React.... |
packages/react-cookie-demo/src/client.js | eXon/react-cookie | import React from 'react';
import ReactDOM from 'react-dom';
import { CookiesProvider } from 'react-cookie';
import App from './components/App';
const appEl = document.getElementById('main-app');
ReactDOM.render(
<CookiesProvider>
<App />
</CookiesProvider>,
appEl
);
|
imports/client/components/About/AboutBand.js | evancorl/skate-scenes | import React from 'react';
import Scroll from 'react-scroll';
const ScrollElement = Scroll.Element;
class AboutBand extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
const languages = ['HTML', 'CSS', 'JavaScript', 'C#', 'SQL', 'PHP'];
const tools = ['Meteor', 'React', '... |
src/interface/report/PlayerSelection/index.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPECS from 'game/SPECS';
import ROLES from 'game/ROLES';
import PlayerTile from './PlayerTile';
import './PlayerSelection.scss';
const ROLE_SORT_KEY = {
[ROLES.TANK]: 0,
[ROLES.HEALER]: 1,
[ROLES.DPS.MELEE]: 2,
[ROLES.DPS.RANGED]: 2,
};
fu... |
src/client/assets/js/nodes/outputs/export/node.js | me-box/databox-sdk | import React from 'react';
//import composeNode from 'utils/composeNode';
import Textfield from 'components/form/Textfield';
import Select from 'components/form/Select';
import Cell from 'components/Cell';
import Cells from 'components/Cells';
import { formatSchema } from 'utils/utils';
import {configNode} from 'utils/... |
lib/ui/widgets/notification.js | SignalK/instrumentpanel | import React from 'react';
import { render } from 'react-dom';
import {Bus} from 'baconjs';
import util from 'util'
import BaseWidget from './basewidget';
var notificationLevels = {
"nominal": 0,
"normal": 1,
"alert": 2,
"warn": 3,
"alarm": 4,
"emergency": 5
};
let defaultValue = {
state: 'nominal',
... |
tests/site2/code/components/projects.js | dominikwilkowski/cuttlebelle | import PropTypes from 'prop-types';
import React from 'react';
/**
* The Projects component for Listing two projects
*/
const Projects = ({ projects }) => (
<table>
<tbody>
<tr><td>
{ projects[ 0 ] }
</td><td>
{ projects[ 1 ] }
</td></tr>
</tbody>
</table>
);
Projects.propTypes = {
/**
*... |
app/containers/Page/index.js | ZhengRaymond/portfolio | /*** PRESENTATIONAL COMPONENT ***/
import React from 'react';
import styled from 'styled-components';
import Header, { SubHeader } from 'components/header';
import { fadein, fadein2 } from 'styles/animations';
import './page.css';
var FAExternalLink = require('react-icons/lib/fa/external-link');
const PanelGroup = s... |
src/App.js | sombreroEnPuntas/trust-builder | import React, { Component } from 'react';
import reviews from './mocks/reviews';
import Widget from './widget';
import './App.scss';
class App extends Component {
render() {
return (
<div className="App">
<Widget reviews={reviews} totalCards={reviews.length} />
</div>
);
}
}
export ... |
until_201803/react/modern/router/src/RouterExample.js | shofujimoto/examples | import React from 'react'
import {
BrowserRouter as Router,
Route,
Link
} from 'react-router-dom'
const RouterApp = () => (
<Router>
<div style={{margin: 20}}>
<Route exact path='/' component={Home} />
<Route path='/easy' component={EasyCourse} />
<Route path='/normal' component={NormalCo... |
src/jsx-render-engine/strategy/react-router/v4.js | yeojz/metalsmith-react-templates | import React from 'react';
import {renderToStaticMarkup, renderToString} from 'react-dom/server';
import {StaticRouter} from 'react-router';
import constants from '../../constants';
import Provider from './Provider';
function getRouter(location, context, defaultProps, routes) {
return (
<StaticRouter location={l... |
client/index.js | denistakeda/evolution | /**
* Client entry point
*/
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import { configureStore } from './store';
import transit from "transit-immutable-js";
// Initialize store
const store = configureStore(transit.fromJSON(... |
client/src/components/Confirmation.js | jeffersonsteelflex69/mytv | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import api from '../lib/api';
class Confirmation extends Component {
componentDidMount(){
if(!Object.keys(this.props.location.query).length > 0)
return
let code = this.props.location.query["code"]... |
fields/components/columns/CloudinaryImageSummary.js | pr1ntr/keystone | import React from 'react';
const IMAGE_SIZE = 18;
const linkStyle = {
marginRight: 8,
};
const boxStyle = {
borderRadius: 3,
display: 'inline-block',
height: IMAGE_SIZE,
overflow: 'hidden',
verticalAlign: 'middle',
width: IMAGE_SIZE,
};
const imageStyle = {
display: 'block',
height: IMAGE_SIZE,
left: '50%',... |
webpack/components/WithOrganization/withOrganization.js | tstrachota/katello | import React, { Component } from 'react';
import { orgId } from '../../services/api';
import SetOrganization from '../SelectOrg/SetOrganization';
import titleWithCaret from '../../helpers/caret';
function withOrganization(WrappedComponent, redirectPath) {
return class CheckOrg extends Component {
componentDidUpd... |
src/svg-icons/action/gavel.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionGavel = (props) => (
<SvgIcon {...props}>
<path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z... |
packages/icons/src/md/hardware/Headset.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdHeadset(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 5C14.06 5 6 13.06 6 23v14c0 3.31 2.69 6 6 6h6V27h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V23c0-9.94-8.06-18-18-18z" /... |
example/src/index.js | ryo33/redux-pages | import React from 'react'
import ReactDOM from 'react-dom'
import {
createStore, combineReducers, applyMiddleware
} from 'redux'
import { Provider } from 'react-redux'
import createLogger from 'redux-logger'
import createHistory from 'history/createHashHistory'
import { createPagesReducer } from 'redux-pages'
import ... |
src/routes/register/Register.js | foxleigh81/foxweb | /**
* 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-... |
client/admin/settings/inputs/PasswordSettingInput.js | subesokun/Rocket.Chat | import { Box, Field, Flex, PasswordInput } from '@rocket.chat/fuselage';
import React from 'react';
import { ResetSettingButton } from '../ResetSettingButton';
export function PasswordSettingInput({
_id,
label,
value,
placeholder,
readonly,
autocomplete,
disabled,
hasResetButton,
onChangeValue,
onResetButto... |
packages/material-ui-icons/src/VerticalAlignBottom.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let VerticalAlignBottom = props =>
<SvgIcon {...props}>
<path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z" />
</SvgIcon>;
VerticalAlignBottom = pure(VerticalAlignBottom);
VerticalAlignBottom.muiName = ... |
frontend/src/Components/Form/AutoCompleteInput.js | lidarr/Lidarr | import jdu from 'jdu';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import AutoSuggestInput from './AutoSuggestInput';
class AutoCompleteInput extends Component {
//
// Lifecycle
constructor(props, context) {
super(props, context);
this.state = {
suggestions: []
... |
src/mui/input/BooleanInput.js | matteolc/admin-on-rest | import React from 'react';
import PropTypes from 'prop-types';
import Toggle from 'material-ui/Toggle';
import FieldTitle from '../../util/FieldTitle';
const styles = {
block: {
margin: '1rem 0',
maxWidth: 250,
},
label: {
color: 'rgba(0, 0, 0, 0.298039)',
},
toggle: {
... |
src/subscribe.js | DigitalGlobe/jetset | import React from 'react';
import { Map as iMap } from 'immutable';
import store from './store';
import logger, { formatBranchArgs } from './lib/log';
const isObject = item => !Array.isArray( item ) && typeof item === 'object';
function subscribe({ local, paths }) {
return Component => {
const rootPath = loc... |
201601react/许海英/react/app/index.js | zhufengreact/homework | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './container/App';
let root = document.getElementById('app');
ReactDOM.render( <App />, root );
|
src/containers/weather-list.js | 86mattw/weather |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Chart from '../components/chart';
class WeatherList extends Component {
renderWeather(cityData) {
const name = cityData.city.name;
const temps = cityData.list.map(weather => weather.main.temp);
const pressures = cit... |
app/containers/NotFoundPage/index.js | mamaracas/MEventsRegistration | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import messages from './messages';
export default function NotFound() {
return (
<article>
... |
examples/full-example/src/isomorphic/base/components/lazy_content.js | yahoo/mendel | /* Copyright 2015, Yahoo Inc.
Copyrights licensed under the MIT License.
See the accompanying LICENSE file for terms. */
import React from 'react';
class Button extends React.Component {
render() {
return <span style={{ color: 'blue' }}>
Content inside lazy
</span>;
}
}
expo... |
src/parser/priest/shadow/modules/talents/ShadowCrash.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS/index';
import Analyzer from 'parser/core/Analyzer';
import TalentStatisticBox, { STATISTIC_ORDER } from 'interface/others/TalentStatisticBox';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import { formatNumber } from 'common/format';
impor... |
packages/material-ui-icons/src/AirlineSeatFlat.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z" /></g>
, 'Airl... |
packages/veritone-widgets/src/widgets/MediaPlayer/DefaultControlBar.js | veritone/veritone-sdk | import React from 'react';
import { connect } from 'react-redux';
import cx from 'classnames';
import { get } from 'lodash';
import { bindActionCreators } from 'redux';
import {
VolumeMenuButton,
ControlBar,
ReplayControl,
ForwardControl,
PlayToggle,
playerActions,
videoActions,
CurrentTimeDisplay,
Ti... |
src/Stepper/StepButton.spec.js | hwo411/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import {spy} from 'sinon';
import StepButton from './StepButton';
import StepLabel from './StepLabel';
import getMuiTheme from '../styles/getMuiTheme';
describe('<StepButton />', () => {
const muiTheme = ge... |
client/modules/comments/components/.stories/create_comment.js | TheAncientGoat/mantra-sample-blog-coffee | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
const CreateComment = require('../create_comment.coffee');
storiesOf('comments.CreateComment', module)
.add('default view', () => {
return (
<div className='comments'>
<CreateComment postId='the-id' create={action('cr... |
admin/client/App/components/Navigation/Mobile/SectionItem.js | frontyard/keystone | /**
* A mobile section
*/
import React from 'react';
import MobileListItem from './ListItem';
import { Link } from 'react-router';
const MobileSectionItem = React.createClass({
displayName: 'MobileSectionItem',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
curren... |
src/components/charts/charts/svg/path.js | noahehall/udacity-corporate-dashboard | import React from 'react';
export const Path = ({ // eslintignore https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path
chartType = 'pie',
d,
fill = 'blue',
id = '',
stroke = 'gray',
}) => <path
className={`${chartType}-path`}
d={d}
fill={fill}
id={id}
stroke={stroke}
/>;
Path.propTypes = ... |
common/components/Header.js | BostonGlobe/elections-2016 | import React from 'react'
import svgs from './../utils/svgs.js'
import Navigation from './Navigation.js'
const Header = () => (
<header className='header' key='header'>
<a href='#content' className='skip-to-main'>Skip to main content</a>
<div className='header__logo'>
<a
href='http://www.bostonglobe.com/'
... |
packages/@lyra/form-builder/src/inputs/BlockEditor/Toolbar/DecoratorButtons.js | VegaPublish/vega-studio | // @flow
import type {
BlockContentFeature,
BlockContentFeatures,
SlateChange,
SlateValue
} from '../typeDefs'
import React from 'react'
import {keyMaps} from '../plugins/SetMarksOnKeyComboPlugin'
import {toggleMark} from '../utils/changes'
import CustomIcon from './CustomIcon'
import FormatBoldIcon from 'p... |
containers/SearchBar/index.js | bmagic/acdh-client | import React from 'react'
import { connect } from 'react-redux'
import { createStructuredSelector } from 'reselect'
import PropTypes from 'prop-types'
import { searchChange } from 'actions/programs'
import { makeSearch } from 'selectors/programs'
export class SearchBar extends React.PureComponent {
render () {
... |
node_modules/semantic-ui-react/dist/es/views/Statistic/StatisticValue.js | mowbell/clickdelivery-fed-test | import _extends from 'babel-runtime/helpers/extends';
import _isNil from 'lodash/isNil';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly } from '../../lib';
/**
* A statistic can contain a numer... |
client/src/components/loader/index.js | commoncode/ontap | import React from 'react';
const Loader = () => (
<div className="loader">
OnTap
</div>
);
export default Loader;
|
src/components/video_detail.js | martezconner/react_vidhub | 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-responsive embed-respons... |
apps/app/src/pages/Repository/BuildDetail/Context.js | argos-ci/argos | import React from 'react'
import gql from 'graphql-tag'
import { useMutation } from '@apollo/react-hooks'
export const BuildContextFragment = gql`
fragment BuildContextFragment on Build {
id
createdAt
number
status
repository {
name
owner {
login
}
}
baseScreensh... |
src/svg-icons/maps/pin-drop.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPinDrop = (props) => (
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/>
</SvgIcon>
);
... |
src/containers/Home/Home.js | dbertella/react-hot-reload-starter | import React, { Component } from 'react';
import { SimpleForm } from 'components';
class Home extends Component {
render() {
return (
<div>
<h1>Home</h1>
<SimpleForm />
</div>
);
}
}
export default Home;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.