path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
wegas-app/src/main/node/wegas-react-form/src/Views/Interacting/flatvariableselect.js | Heigvd/Wegas | import PropTypes from 'prop-types';
import React from 'react';
import Select from '../select';
import { getY } from '../../index';
function genSpaces(nb) {
let i;
let ret = '';
for (i = 0; i < nb; i += 1) {
ret += '\u00a0\u00a0\u00a0'; // 3 whitespaces
}
return ret;
}
function genChoices(it... |
src/svg-icons/action/account-balance.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccountBalance = (props) => (
<SvgIcon {...props}>
<path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/>
</SvgIcon>
);
ActionAccountBalance = pure(ActionA... |
frontend/src/Components/Page/Header/PageHeaderActionsMenu.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React from 'react';
import Icon from 'Components/Icon';
import Menu from 'Components/Menu/Menu';
import MenuButton from 'Components/Menu/MenuButton';
import MenuContent from 'Components/Menu/MenuContent';
import MenuItem from 'Components/Menu/MenuItem';
import MenuItemSeparato... |
src/index.js | rebekahpadula/reacting | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js | rekif/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
import Overlay from 'react-overlays/lib/Overlay';
import classNames from 'classnames';
import ImmutablePropTypes from ... |
styleguide/screens/Overview/Introduction.js | rdjpalmer/bloom | import React from 'react';
import Markdown from '../../../components/Markdown/Markdown';
import introduction from './introduction.md';
import { markdown } from '../../typography.css';
const Introduction = () => (
<div>
<Markdown className={ markdown } overrideClassname>
{ introduction }
</Markdown>
... |
src/svg-icons/av/skip-previous.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSkipPrevious = (props) => (
<SvgIcon {...props}>
<path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/>
</SvgIcon>
);
AvSkipPrevious = pure(AvSkipPrevious);
AvSkipPrevious.displayName = 'AvSkipPrevious';
AvSkipPrevious.mu... |
src/components/WeatherWidget.js | GatesmanAgency/GraphQL-Relay-Modern-QuickStart | import React from 'react'
import environment from '../createRelayEnvironment'
import {QueryRenderer,graphql} from 'react-relay'
const WeatherWidgetQuery = graphql`
query WeatherWidgetQuery($zipCode: String!) {
viewer {
id
weather(zipcode: $zipCode) {
temperature
descripti... |
src/components/MyiWorlds/ContainerMapperLevel1/containers/HeaderContainer1/HeaderContainer1.js | DaveyEdwards/myiworlds | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
src/icons/IosCloud.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosCloud extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M399.3,232.8c0-1.2,0.2-2.4,0.2-3.6c0-64.3-52.8-117.2-116.8-117.2c-46.1,0-85.8,27.9-104.4,67c-8.1-4.1-17.1-6.4-26.8-6.4
... |
app/client/app.js | AndreyGermanov/relayboard_server | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
import Store from './store/Store';
Store.ddpConnect(function() {
/*jshint ignore:start */
ReactDOM.render(<App/>,document.getElementById('app'));
/*jshint ignore:end */
});
|
node_modules/antd/es/layout/layout.js | yhx0634/foodshopfront | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
src/index.js | greenteamer/form | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('form'));
|
app/forms/components/RefluxFormController.js | Evyy/cffs-ui | 'use strict';
import React from 'react';
import FormController from './FormController';
class RefluxFormController extends FormController {
constructor(props) {
super(props);
}
static propTypes = {
requestManager: React.PropTypes.object.isRequired,
formModel: React.PropTypes.obj... |
client/views/admin/info/OfflineLicenseModal.stories.js | VoiSmart/Rocket.Chat | import React from 'react';
import OfflineLicenseModal from './OfflineLicenseModal';
export default {
title: 'admin/info/OfflineLicenseModal',
component: OfflineLicenseModal,
};
export const _default = () => <OfflineLicenseModal onClose={() => {}} />;
|
src/routes/Dashboard/components/Map/MapMarker/MapMarker.story.js | gabe-terrell/acme-freight-webui | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import MapMarker from './MapMarker';
storiesOf('MapMarker', module)
.add('distributionCenter', () => (
<MapMarker
type="distributionCenter"
/>
))
.add('retailer', () => (
<MapMarker
type="retailer"
/>
))
.ad... |
example2/index.ios.js | hbarve1/react-native-examples | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import Js from "./js";
const example2 = () => <Js/>;
export default example2;
AppRegistry.registerComponent('example2', () => example2);
|
src/parser/mage/fire/modules/features/AlwaysBeCasting.js | sMteX/WoWAnalyzer | import React from 'react';
import CoreAlwaysBeCasting from 'parser/shared/modules/AlwaysBeCasting';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import SpellLink from 'common/SpellLink';
class AlwaysBeCasting ex... |
src-changed/Home.js | aryalprakash/omgyoutube | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { browserHistory, Link } from 'react-router'
import {getVideoData, getChannelVideos} from './actions/video.js'
import Header from './Header.js'
import Loader from './Loader.js'
import App from './App.js'
export default class Home ... |
web/static/js/index.js | TattdCodeMonkey/hmc5883l_demo | import React from 'react';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import App from './app';
import {initCompassSocket} from './utils/socket';
import reducer from './reducers';
const store = createStore(reducer);
React.render(
<Provider store={store}>
{() => <App />}
</Prov... |
src/@ui/Button/Button.js | NewSpring/Apollos | import React from 'react';
import { View } from 'react-native';
import PropTypes from 'prop-types';
import { compose, withProps } from 'recompose';
import { get } from 'lodash';
import { withTheme, withThemeMixin } from '@ui/theme';
import styled from '@ui/styled';
import Touchable from '@ui/Touchable';
import { H5 } f... |
src/svg-icons/navigation/more-vert.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationMoreVert = (props) => (
<SvgIcon {...props}>
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"... |
docs/src/pages/system/flexbox/FlexShrink.js | lgollut/material-ui | import React from 'react';
import Box from '@material-ui/core/Box';
export default function FlexShrink() {
return (
<div style={{ width: '100%' }}>
<Box display="flex" p={1} bgcolor="background.paper">
<Box p={1} width="100%" bgcolor="grey.300">
Item 1
</Box>
<Box p={1} fl... |
src/index.js | zklinger2000/fcc-voting-zklinger | /* eslint-disable import/default */
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack t... |
templates/rubix/relay/relay-example/src/main.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import ReactDOM from 'react-dom';
import routes from './routes';
import render, { setNetworkLayer } from '@sketchpixy/rubix/lib/node/relay-router';
import GraphQLSettings from '../graphql.json';
let GraphQLEndpoint = GraphQLSettings.development.endpoint;
if (process.env.NODE_ENV === 'prod... |
src/svg-icons/action/settings-cell.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsCell = (props) => (
<SvgIcon {...props}>
<path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"... |
client/extensions/woocommerce/app/settings/taxes/taxes-wcs.js | Automattic/woocommerce-connect-client | /**
* External dependencies
*
* @format
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { localize } from 'i18n-calypso';
/**
* Internal dependencies
*/
import ActionHeader from 'woocommerc... |
pages/covid.js | uclaacm/website | import { faExternalLinkAlt, faFilePdf } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { NextSeo } from 'next-seo';
import React from 'react';
import Layout from '../components/Layout';
function COVID() {
return (
<Layout>
<NextSeo
title... |
src/components/edit/AdressForm.js | chjourdain/react-redux-ref | import React from 'react';
import Form from '../Form/Form';
import Input from '../Form/Input';
/**
* Created by chjourdain on 15/07/16.
*/
export default class AdressForm extends React.Component {
render() {
return (
<div>
<Form
onSubmit={values => {
... |
app/components/PureComponent.js | ramsundark5/stitchchat | import React from 'react';
import shallowCompare from 'react-addons-shallow-compare';
export default class Component extends React.Component {
shouldComponentUpdate(nextProps, nextState) {
const shouldUpdate = shallowCompare(this, nextProps, nextState);
return shouldUpdate;
}
} |
src/components/tab3/addOptInfo.js | dfw-chris-diaz/react-demo | import React from 'react';
import { Glyphicon } from 'react-bootstrap';
export default class ADDOPTINFO extends React.Component {
render() {
return(
<div>
<br />
<a href="#" onClick={() => this.props.addRecord({})}><Glyphicon glyph="plus-sign" /></a>
</div>
);
}
} |
Ethereum-based-Roll4Win/node_modules/react-bootstrap/es/CloseButton.js | brett-harvey/Smart-Contracts | import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import React from 'react';
var defaultProps = {
label: 'Close'
};
var CloseButton =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose(CloseButton, _React$Component);
function CloseButton() {
return _React$Component.apply(this, a... |
src/views/Comment/CommentAuthor.js | aabustamante/Semantic-UI-React | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
/**
* A comment can contain an author.
*/
function CommentAuthor(props) {
const { className, children } = props
const classes = c... |
src/containers/DevTools.js | mak4alex/unicorn-shop | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
export default createDevTools(<LogMonitor />);
|
envkey-react/src/containers/key_manager_container.js | envkey/envkey-app | import React from 'react'
import { connect } from 'react-redux'
import h from "lib/ui/hyperscript_with_helpers"
import R from 'ramda'
import {Link} from "react-router"
import {
getIsOnboarding,
getCurrentAppUserForApp,
getDecryptedAll,
getServersForApp,
getApps,
getLocalKeysForAppUser
} from 'selectors'
imp... |
archimate-frontend/src/main/javascript/components/view/nodes/model_b/businessEvent.js | zhuj/mentha-web-archimate | import React from 'react'
import _ from 'lodash'
import { ModelNodeWidget } from '../BaseNodeWidget'
export const TYPE='businessEvent';
export class BusinessEventWidget extends ModelNodeWidget {
getClassName(node) { return 'a-node model_b businessEvent'; }
}
|
docs/src/app/components/pages/components/AutoComplete/ExampleDataSources.js | ngbrown/material-ui | import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
import MenuItem from 'material-ui/MenuItem';
const dataSource1 = [
{
text: 'text-value1',
value: (
<MenuItem
primaryText="text-value1"
secondaryText="☺"
/>
),
},
{
text: 'text-value2'... |
src/routes/Home/components/IndexView.js | parauchf/transmogrifier | import React from 'react'
import './IndexView.scss'
const style = {
display: 'flex',
flex: 0,
height: 50,
background: 'steelblue'
}
export const IndexView = () => (
<div style={style}>
<h1>Collection: </h1>
</div>
)
export default IndexView
|
app/containers/BookDetailsPage.js | InfiniteLibrary/infinite-electron | import React, { Component } from 'react';
import BookDetails from '../components/BookDetails';
import findBook from '../utils/find-book';
export default class BookDetailsPage extends Component {
render() {
const selected = findBook(this.props.books, this.props.params.bookId);
return (
<BookDetails book... |
actor-apps/app-web/src/app/components/modals/invite-user/ContactItem.react.js | daodaoliang/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import classnames from 'classnames';
import InviteUserStore from 'stores/InviteUserStore';
import { AsyncActionStates } from 'constants/ActorAppConstants';
import AvatarItem from 'components/common/AvatarItem.react';
... |
src/components/users/GoTo/index.js | Menternship/client-web | // @flow
import React from 'react';
import { createStructuredSelector } from 'reselect';
import { connect } from 'react-redux';
import { Clickable } from 'ui-kit';
import userSelectors from '@client/selectors/users';
import userActions from '@client/actions/users';
type $props = Object;
export class GoToUser extends ... |
index.ios.js | smay1227/winterfellapp | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class winterfellapp extends Component {
render() {
return (
<View style={styles.conta... |
docs/app/Examples/views/Card/Content/CardExampleHeaderCard.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Card } from 'semantic-ui-react'
const CardExampleHeaderCard = () => (
<Card.Group>
<Card>
<Card.Content>
<Card.Header>Matthew Harris</Card.Header>
<Card.Meta>Co-Worker</Card.Meta>
<Card.Description>Matthew is a pianist living in Nashville.</Card.De... |
components/datasets/metadata/form/Source.js | resource-watch/resource-watch | import React from 'react';
import Proptypes from 'prop-types';
import isEqual from 'lodash/isEqual';
// redux
import { connect } from 'react-redux';
// redactions
import { setTmpSources } from 'redactions/admin/sources';
// components
import Field from 'components/form/Field';
import Input from 'components/form/Inpu... |
src/components/InfoBar/InfoBar.js | prakash-u/react-redux | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { load } from 'redux/modules/info';
@connect(state => ({ info: state.info.data }), { load })
export default class InfoBar extends Component {
static propTypes = {
info: PropTypes.shape({
... |
client/src/components/LoadingSpinner/LoadingSpinner.js | FlipperPA/wagtail | import React from 'react';
import { STRINGS } from '../../config/wagtailConfig';
import Icon from '../../components/Icon/Icon';
/**
* A loading indicator with a text label next to it.
*/
const LoadingSpinner = () => (
<span>
<Icon name="spinner" className="c-spinner" />{` ${STRINGS.LOADING}`}
</span>
);
exp... |
src/components/page.js | xavier-besson/react-playground | import React from 'react';
import ReactDOM from 'react-dom';
import LayoutManager from 'utils/layout-manager';
import RouterManager from 'utils/router-manager';
import LayoutHeader from 'components/layout/header';
import LayoutNav from 'components/layout/nav';
import LayoutFooter from 'components/layout/footer';
import... |
src/components/shopping_cart_icon.js | b0ts/react-redux-sweetlightstudios-website | import React from 'react';
const ShoppingCartIcon = ({ productCount, open }) => (
<div className = "shopping-icon-button" >
<button type="button" id = "cart-icon-button" onClick = { () => open() }>
<span id = "cart-icon-button-text">{ productCount }</span>
<svg
xmlns="http://www.w3.org/2000... |
src/pages/zones/index.js | pprimm/ds-contest-material | import React from 'react'
import AppWrapper from '../../components/AppWrapper'
import ZonesTitleBar from '../../components/ZonesTitleBar'
import ZoneList from '../../components/ZoneList'
export default function ZonesPage() {
return (
<AppWrapper>
<ZonesTitleBar />
<ZoneList />
</AppWrapper>
)
... |
packages/material-ui-icons/src/Error.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /></g>
, 'Error');
|
client/src/app-components/articles-list.js | opensupports/opensupports | import React from 'react';
import {connect} from 'react-redux';
import i18n from 'lib-app/i18n';
import ArticlesActions from 'actions/articles-actions';
import TopicViewer from 'app-components/topic-viewer';
import ModalContainer from 'app-components/modal-container';
import TopicEditModal from 'app-components/topic... |
react-context-api/src/components/layout/Navbar.js | pinoytech/react-playground | import React from 'react';
const Navbar = () => {
return (
<nav className="navbar navbar-dark bg-dark mb-5">
<span className="navbar-brand mb-0">
<h1 className="mx-auto">Lyric Finder</h1>
</span>
</nav>
);
}
export default Navbar;
|
lib/InfoPopover/stories/InfoPopover.stories.js | folio-org/stripes-components | import React from 'react';
import { storiesOf } from '@storybook/react';
import withReadme from 'storybook-readme/with-readme';
import readme from '../readme.md';
import BasicUsage from './BasicUsage';
storiesOf('InfoPopover', module)
.addDecorator(withReadme(readme))
.add('Basic Usage', () => <BasicUsage />);
|
src/components/auth/Register.js | haki-projects/mapping-feminism-v2 | import React from 'react';
import * as firebase from 'firebase';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { getRegisterationError } from './../../utils/helper_functions';
import Notifications, { notify } from 'react-notify-toast';
class Register extends React.Component {
sta... |
src/components/atoms/List/ListItem.js | ygoto3/artwork-manager | // @flow
import React from 'react';
export type ListItemProps = {
children: React$Element<any>;
};
export const ListItem = ({ children, ...otherProps }: ListItemProps) => {
return (
<li {...otherProps}>{children}</li>
);
};
Object.assign(ListItem, {
displayName: 'ListItem',
});
|
src/components/secrets/SecretEdit.js | secretin/secretin-app | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import PropTypes from 'prop-types';
import * as EditSecretUIActions from 'slices/EditSecretUISlice';
import SecretFields from 'components/secrets/SecretFields';
class SecretEdit extends Compon... |
src/client/auth/index.react.js | obimod/este | import Component from '../components/component.react';
import DocumentTitle from 'react-document-title';
import Login from './login.react';
import React from 'react';
export default class AuthIndex extends Component {
static propTypes = {
msg: React.PropTypes.object.isRequired
}
render() {
const {msg} ... |
client/src/app/routes/forms/components/layouts/CheckoutForm.js | zraees/sms-project | import React from 'react'
import countries from '../../../../components/forms/commons/countries'
export default class CheckoutForm extends React.Component {
static defaultProps = {
countries
};
onSubmit(e) {
e.preventDefault()
console.log('checkout submit stuff')
}
render() {
return (
... |
client/extensions/woocommerce/components/woocommerce-logo/index.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
const WooCommerceLogo = ( { height = 32, width = 120 } ) => {
return (
<svg
className="woocommerce-logo"
height={ height }
width={ width }
viewBox="0 0 723 146"
version="1.1"
>
<g id="... |
src/components/libs/helpers.js | keenethics/estimateit | /* eslint-disable */
import React from 'react';
import moment from 'moment';
import DateField from 'react-datepicker';
import { FormGroup, Input, InputGroup, InputGroupAddon } from 'reactstrap';
import ValidationState, { hintClass } from './ValidationState';
export class renderTaskNameField extends React.Component {
... |
fluent-react/examples/async-messages/src/App.js | zbraniecki/fluent.js | import React from 'react';
import { Localized } from 'fluent-react/compat';
export default function App() {
return (
<div>
<Localized id="title">
<h1>Something went wrong.</h1>
</Localized>
</div>
);
}
|
wp-content/plugins/liveblog/src/react/components/Loader.js | MinnPost/minnpost-wordpress | import React from 'react';
const Loader = () => (
<div className="liveblog-loader">
<div className="liveblog-loader-bounce1"></div>
<div className="liveblog-loader-bounce2"></div>
</div>
);
export default Loader;
|
src/app/core/atoms/icon/icons/office.js | blowsys/reservo | import React from 'react'; const Office = (props) => <svg {...props} viewBox="0 0 48 48"><g><path d="M10.5,24.5L10.5,28 14,28 14,24.5z M4,24.300003L4,28 7.6999969,28 7.6999969,24.300003z M26,22L26,28 28,28 28,22z M22,22L22,28 24,28 24,22z M10.399994,18L10.399994,21.599998 14,21.599998 14,18z M4,18L4,21.599998 7.5999985... |
src/PropertyView.js | gordongordon/propertytodos | import React from 'react'
import {observer} from 'mobx-react'
// This is a React component.
// The property "model" of the passed props object is an instance of our TodoViewModel class.
// do you remember all those @observable and @computed?
// In order to let your React component automatically update whenever any of... |
src/router/components/RouterLink.js | nnance/react-backbone-flux-example | import React from 'react';
import RouterActions from '../RouterActions';
module.exports = React.createClass({
navigate: function(ev) {
ev.preventDefault();
RouterActions.navigate(ev.target.getAttribute('href'), true);
},
render: function() {
return <a {...this.props} onClick={this... |
src/components/app.component.js | YGO/compe-frontend | import React from 'react'
import { browserHistory, Router } from 'react-router'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
class App extends React.Component {
static propTypes = {
store: PropTypes.object.isRequired,
routes: PropTypes.object.isRequired,
}
shouldComponentUpd... |
theme/src/components/productList/loadMore.js | cezerin/cezerin | import React from 'react';
import { themeSettings, text } from '../../lib/settings';
const LoadMore = ({
loadMoreProducts,
hasMore,
loading,
className = 'button is-fullwidth is-dark'
}) => {
if (hasMore) {
const buttonStyle = {};
if (
themeSettings.button_loadmore_bg &&
themeSettings.button_loadmore_bg.... |
src/parser/deathknight/frost/modules/Abilities.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import CoreAbilities from 'parser/core/modules/Abilities';
class Abilities extends CoreAbilities {
spellbook() {
const combatant = this.selectedCombatant;
return [
// COOLDOWNS
{
spe... |
packages/lore-hook-dialog-bootstrap/src/config.js | lore/lore-forms | /* eslint no-param-reassign: "off" */
import React from 'react';
import ReactDOM from 'react-dom';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
// templates
import Dialog from './templates/Dialog';
import Modal from './templates/Modal';... |
src/component/Blog/List/BlogCard.js | myflwq/big-demo | import React, { Component } from 'react';
import {hashHistory} from 'react-router';
class BlogCard extends Component {
// handleClick(){
// hashHistory.push(`blog/${this.props.url}`);
// }
handleClick(){
this.context.router.push(`blog/${this.props.url}`);
}
render(){
// console.log(this.context... |
examples/index.js | mrc535s/react-autocomplete | import React from 'react';
import ReactDOM from 'react-dom';
import AutoComplete from '../src/components/AutoComplete/AutoComplete'
const items = [{
name: 'Praveen',
key: '1234'
}, {
name: 'Mike',
key: '4453'
}, {
name: 'John',
key: '4454'
}, {
name: 'Sapnna',
key: '4456'
}, {
name: 'Srikanth',
... |
src/components/About.js | rapind/grokphoto | import React from 'react'
export default React.createClass({
render () {
return <h2>About</h2>
}
})
|
src/pages/build/Snapshot/Snapshot.js | chengjianhua/templated-operating-system | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import emptyFunction from 'fbjs/lib/emptyFunction';
export default class Snapshot extends Component {
static propTypes = {
onMounted: PropTypes.func,
};
static defaultProps = {
onMounted: emptyFunction,
};
canvasRef = re... |
src/svg-icons/notification/enhanced-encryption.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationEnhancedEncryption = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.... |
src/entry.js | OxideXiao/react-project-initial-pack | import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import App from './containers/routes';
render(
<App />,
document.getElementById('react-app')
); |
src/app/components/team/TeamTags/TeamTagsActions.js | meedan/check-web | import React from 'react';
import PropTypes from 'prop-types';
import { commitMutation, graphql } from 'react-relay/compat';
import { Store } from 'react-relay/classic';
import { FormattedMessage } from 'react-intl';
import IconMoreVert from '@material-ui/icons/MoreVert';
import IconButton from '@material-ui/core/IconB... |
src/svg-icons/social/public.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPublic = (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 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9... |
templates/KeychainComponentExample.js | juddey/ignite-keychain | // @flow
import React from 'react'
import { View, Text, TextInput, TouchableOpacity } from 'react-native'
import ExamplesRegistry from '../../../App/Services/ExamplesRegistry'
import * as Keychain from 'react-native-keychain'
const username = 'nachos'
const password = 'tacos'
const readStoredStuff = () => Keychain
... |
src/index.js | eGene/planet-escape | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/App'
import configureStore from './store/configureStore'
import initialState from './store/initialState'
import './styles/app.less'
const store = configureStore(initialState);
render(
... |
example/examples/ZIndexMarkers.js | j0ergo/react-native-maps | import React from 'react';
import {
Dimensions,
StyleSheet,
Text,
View,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.733858;
const LONGITUDE = -122.446549;
const MARKERS_LATITUDE_DE... |
src/components/activity_trend_department.js | xuan6/admin_dashboard_local_dev | import React from 'react';
import ReactDOM from 'react-dom';
var SimpleTooltipStyle = require('react-d3-tooltip').SimpleTooltip;
var BarGroupTooltip = require('react-d3-tooltip').BarGroupTooltip;
const ActivityTrendByDpt = ({data}) => {
//activity trend by departments
var generalChartData = data;
var width = 800... |
react_app/src/components/Settings/SettingsAttribute/SettingsAttribute.js | morpheyesh/TeenyURL | // =========================================
// SettingsAttribute.js
// ----
// Wrapper for an individual setting
// =========================================
// ---- External Dependencies ----
import React, { Component } from 'react';
// ---- Internal Dependencies ----
// ---- Styles ----
import styles from './Sett... |
src/components/List/UnorderedList.js | Bandwidth/shared-components | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Item from './ListItem';
import Ordered from './OrderedList';
const UnorderedList = styled.ul.withConfig({ displayName: 'UnorderedList' })`
margin: 0 0 1em;
padding: 0;
list-style: disc outside;
&:last... |
ui/components/ErrorComponent.js | yih-en/data-triangulation-tool | import React, { Component } from 'react';
var _ = require('lodash');
export default class ErrorComponent extends Component {
render() {
return(
<div className='error'>
{this.props.error.message}
{ _.map(this.props.error.backtrace, (el, key) => (
<div key={key}> {el[0]} </div>
... |
src/components/CreateProject/index.js | LamouchiMS/adintel | import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import faker from 'faker';
import Paper from 'material-ui/Paper';
import {browserHistory} from 'react-router';
import styles from './CreateProject.css';
import TextForm from '../../components/TextForm';
class CreateProject extends React.Compo... |
test/helpers/shallowRenderHelper.js | jiangjiyun/gallery-by-react | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/components/GlobalModals/modals/ManageHoursModal/ManageHoursModal.js | TheModevShop/craft-app | import React from 'react';
import _ from 'lodash';
import HoursGrid from 'components/HoursGrid/HoursGrid';
import * as resource from 'store/resource';
import './manage-hours-modal.less';
class ManageHoursModal extends React.Component {
constructor(...args) {
super(...args);
this.state = {};
}
render() {... |
modules/Lifecycle.js | nauzethc/react-router | import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method
* to a component that may be used to cancel a transition or prompt
* the user for confirmation.
*
* On standard transitions, routerWillLeave receives ... |
src/modules/search.js | jessy1092/react-semantify |
import React from 'react';
import filter from '../filter';
const stateArray = ['loading'];
const defaultClassName = 'ui search';
const componentName = 'Search';
const Basic = React.createClass({
render: function () {
const { props: { children, init, ...other } } = this
return (
<div {...... |
packages/core/src/components/StickyNode/StickyNode.js | appearhere/bloom | /**
* We don't actually need to do anything with the sticky node component,
* but having a reference to it beyond just the dependency in package.json
* seems like a good idea.
*
* Also means if we switch out which component we rely on, the import statement
* can stay pretty much unchanged.
*
* https://github.co... |
example/src/button.js | b6pzeusbc54tvhw5jgpyw8pwz2x6gs/rix-loader | import React from 'react';
import StyleSheet from 'react-inline';
import cx from 'classnames';
//require('requirish')._(module);
//var SuperButton = require('src/other/SuperButton');
//var appUtil = require('src/appUtil');
//import SuperButton from './src/other/SuperButton';
//import appUtil from './src/appUtil';
//a... |
lib/codemod/src/transforms/__testfixtures__/storiesof-to-csf/export-function.input.js | storybooks/react-storybook | /* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { storiesOf } from '@storybook/react';
import ComponentItem from './ComponentItem';
export function someHelper() {
return 5;
}
storiesOf('ComponentItem', module)
.addDecorator(storyFn => <div style={{ margin: '1rem' }}>{story... |
examples/IconPrefixesInput.js | jareth/react-materialize | import React from 'react';
import Input from '../src/Input';
import Row from '../src/Row';
import Icon from '../src/Icon';
export default
<Row>
<Input s={6} label="First Name" validate><Icon>account_circle</Icon></Input>
<Input s={6} label="Telephone" validate type='tel'><Icon>phone</Icon></Input>
</Row>;
|
src/components/PlaylistManager/Panel/ShufflePlaylistButton.js | welovekpop/uwave-web-welovekpop.club | import React from 'react';
import PropTypes from 'prop-types';
import compose from 'recompose/compose';
import withState from 'recompose/withState';
import withHandlers from 'recompose/withHandlers';
import { translate } from 'react-i18next';
import CircularProgress from '@material-ui/core/CircularProgress';
import Too... |
chrome/app/popup/index.js | xicombd/ipfs-chrome-station | import React from 'react'
import ReactDOM from 'react-dom'
import Root from '../../../app/popup/root'
ReactDOM.render(
<Root />,
document.querySelector('#root')
)
|
src/components/Main/VideoList.js | neyko5/BalistosNative | import React from 'react';
import PropTypes from 'prop-types';
import VideoListItem from './VideoListItem';
import { View, Text, StyleSheet, ScrollView } from 'react-native';
const VideoList = (props) => {
if (props.videos.empty) {
return <Text style={styles.emptyItem} >Playlist is empty. Please search and add a... |
docs/app/Examples/elements/Segment/Groups/SegmentExampleNestedSegments.js | koenvg/Semantic-UI-React | import React from 'react'
import { Segment } from 'semantic-ui-react'
const SegmentExampleNestedSegments = () => (
<Segment.Group>
<Segment>Top</Segment>
<Segment.Group>
<Segment>Nested Top</Segment>
<Segment>Nested Middle</Segment>
<Segment>Nested Bottom</Segment>
</Segment.Group>
... |
examples/expo/components/DrawerContent.js | aksonov/react-native-router-flux | import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, Text, View, ViewPropTypes } from 'react-native';
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',... |
src/containers/forms/FormActionContainer.js | PocketOfWeird/MediaGarden | import React from 'react'
import { connect } from 'react-redux'
import { formValueChange, formValueValidate, submitForm } from '../../actions'
import { isLoading } from '../../selectors'
import FormAction from '../../components/FormAction'
const mapStateToProps = state => ({
isLoading: isLoading(state)
})
const mak... |
css-modules-demo/demo02/index.js | zhangjunhd/react-examples | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(
<App/>,
document.body.appendChild(document.createElement('div'))
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.