path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/parser/paladin/protection/CONFIG.js | sMteX/WoWAnalyzer | import React from 'react';
import { emallson } from 'CONTRIBUTORS';
import SPECS from 'game/SPECS';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { TooltipElement } from 'common/Tooltip';
import retryingPromise from 'common/retryingPromise';
import Warning from 'interface/common/... |
__tests__/advanced.js | CarlRosell/glamorous-website | import React from 'react'
import {mount} from 'enzyme'
import {matcher, serializer} from 'jest-glamor-react'
import Advanced from '../pages/advanced'
expect.addSnapshotSerializer(serializer)
expect.extend(matcher)
test('renders', () => {
expect(() => mount(<Advanced />)).not.toThrow()
})
|
tests/Rules-isExisty-spec.js | aesopwolf/formsy | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Formsy from './..';
import { InputFactory } from './utils/TestInput';
const TestInput = InputFactory({
render() {
return <input value={this.getValue()} readOnly/>;
}
});
const TestForm = React.createClass({
render() {
re... |
client/views/setupWizard/SideBar.stories.js | Sing-Li/Rocket.Chat | import { select } from '@storybook/addon-knobs';
import React from 'react';
import SideBar from './SideBar';
export default {
title: 'views/setupWizard/SideBar',
component: SideBar,
};
export const _default = () =>
<SideBar
logoSrc='https://open.rocket.chat/images/logo/logo.svg'
steps={[
{
step: 1,
... |
app/javascript/mastodon/features/ui/util/reduced_motion.js | pso2club/mastodon | // Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
import React from 'react';
import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
const stylesToKeep = ['opacity', 'backgroundOpacity'];
const extractValue = (value) =>... |
frontend/src/components/eois/details/applications/applicationSummary/applicationSummaryHeader.js | unicef/un-partner-portal | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import R from 'ramda';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import Grid from 'material-ui/Grid';
import Button from 'material-ui/Button';
import Typography from 'material-ui/Typography';
import He... |
src/client/components/hoc/AdressBar/withHistory.hoc.js | DBCDK/content-first | import React from 'react';
import {connect} from 'react-redux';
import {
HISTORY_PUSH,
HISTORY_PUSH_FORCE_REFRESH,
HISTORY_REPLACE
} from '../../../redux/middleware';
/**
* A HOC that enhance the wrapped component with a number of reducers
* with which the History can be accessed
*
* @param {React.Component}... |
src/decorators/requireVerifiedEmail.js | orionsoft/parts | import React from 'react'
import autobind from 'autobind-decorator'
import PropTypes from 'prop-types'
import Button from '../components/Button'
import isPlainObject from 'lodash/isPlainObject'
const styles = {
container: {
textAlign: 'center',
padding: 20
},
notAllowed: {
fontSize: 20,
fontWeigh... |
react-youtube-adaptive-loading/src/containers/Comments/Comments.js | GoogleChromeLabs/adaptive-loading | import React from 'react';
import {CommentsHeader} from "./CommentsHeader/CommentsHeader";
import {Comment} from './Comment/Comment';
import {AddComment} from './AddComment/AddComment';
export class Comments extends React.Component {
render() {
if (!this.props.comments) {
return <div/>;
}
const co... |
src/parser/hunter/shared/modules/talents/AMurderOfCrows.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import SpellUsable from 'parser/shared/modules/SpellUsable';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import Abilities from 'parser/core/modules/Abilities';
import TalentStatisticBox from '... |
__tests__/App.js | jbkuczma/NBAreact | import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<App />
);
});
|
src/routes/topicPage/index.js | xugy0926/shuoriyu | import React from 'react';
import TopicPage from './TopicPage';
import fetch from '../../core/fetch';
import { host } from '../../config';
import * as topicService from '../../services/topicService';
export default {
path: '/topic/:tid',
async action(context, {tid}) {
return <TopicPage topicId={tid}/>;
},
... |
src/Router.js | thethirddan/pocket_axe | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... |
js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.spec.js | BSDStudios/parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
src/IncredibleOffers/IncredibleOfferContainer.js | mamal72/dgkala-web | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { GridLoader } from 'halogen';
import IncredibleOffers from './IncredibleOffers';
const mapStateToProps = (state, props) => {
return {
offers: state.incredibleOffers.data,
errors: state.incredibleOffers.errors,
isLoa... |
src/icons/Close.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Close extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M443.6,387.1L312.4,255.4l131.5-130c5.4-5.4,5.4-14.2,0-19.6l-37.4-37.6c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4
L256,197.8... |
src/containers/weather_list.js | nobodyislame/weatherApp | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Chart from '../components/chart';
import GoogleMap from '../components/google_map';
class WeatherList extends Component{
renderWeather(cityData){
const name = cityData.city.name;
const temperatures = cityData.list.map(wea... |
app/javascript/mastodon/features/picture_in_picture/components/footer.js | ashfurrow/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from 'mastodon/components/icon_button';
import classNames from 'classna... |
packages/dante2/src/editor/components/blocks/embed.js | michelson/Dante |
import React from 'react'
import axios from "axios"
import { updateDataOfBlock, addNewBlockAt , resetBlockWithType} from '../../model/index.js'
import { EditorBlock } from 'draft-js'
import {embed} from '../icons'
export default class EmbedBlock extends React.Component {
constructor(props) {
super(props)
t... |
node_modules/semantic-ui-react/dist/es/views/Item/ItemMeta.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { childrenUtils, createShorthandFactory, customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* An item can contain content metadata.
*... |
src/components/Tabs/components/ScrollableTabBar.js | zhangjianguo1500/f01 | import React from 'react';
import ScrollableTabBarMixin from './ScrollableTabBarMixin';
import TabBarMixin from './TabBarMixin';
const ScrollableTabBar = React.createClass({
mixins: [TabBarMixin, ScrollableTabBarMixin],
render() {
const inkBarNode = this.getInkBarNode();
const tabs = this.getTabs();
co... |
src/javascripts/container.js | bensmithett/webpack-css-example | import React from 'react'
import Header from 'javascripts/header'
import Footer from 'javascripts/footer'
import 'stylesheets/modules/container'
const Container = React.createClass({
render () {
return (
<div className='container'>
<Header />
<Footer />
</div>
)
}
})
export de... |
src/routes/nba/index.js | kyleaclark/ballcruncher | /**
* 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 React from 'react';
import Layout from '../../compo... |
src/server.js | vk92kokil/My-react-boilerplate | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
/* eslint-disable */
import 'babel/polyfill';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
import express from 'express';
import React from 'react';
import './core/Dispatcher';
import './stores/AppStore';
import db from '.... |
client/src/components/ElementActions/ArchiveAction.js | dnadesign/silverstripe-elemental | /* global window */
import React from 'react';
import { compose } from 'redux';
import AbstractAction from 'components/ElementActions/AbstractAction';
import archiveBlockMutation from 'state/editor/archiveBlockMutation';
import i18n from 'i18n';
/**
* Adds the elemental menu action to archive a block of any state
*/... |
src/browser/home/HomePage.react.js | vacuumlabs/este | import Component from 'react-pure-render/component';
import Helmet from 'react-helmet';
import React from 'react';
import linksMessages from '../../common/app/linksMessages';
import { FormattedHTMLMessage, defineMessages, injectIntl, intlShape } from 'react-intl';
const messages = defineMessages({
intro: {
defau... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js | Antontsyk/react_vk | import React from 'react'
function load(name) {
return [
{ id: 1, name: `${name}1` },
{ id: 2, name: `${name}2` },
{ id: 3, name: `${name}3` },
{ id: 4, name: `${name}4` }
];
}
export default class extends React.Component {
constructor(props) {
super(props);
this.done = () => {};
th... |
src/shared/components/linkButton/linkButton.js | tskuse/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Link as ScrollLink, Events as ScrollEvent } from 'react-scroll';
import ReactGA from 'react-ga';
import styles from './linkButton.css';
const LinkButton = ({
link,
text,
theme,
scrollLink,
isExter... |
js/App/Components/Schedule/Summary.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
node_modules/react-native/local-cli/templates/HelloNavigation/views/chat/ChatListScreen.js | odapplications/WebView-with-Lower-Tab-Menu | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Image,
ListView,
Platform,
StyleSheet,
View,
} from 'react-native';
import ListItem from '../../components/ListItem';
import Backend from '../../lib/Backend';
export default class ChatListScreen extends Component {
stat... |
src/svg-icons/image/panorama-horizontal.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaHorizontal = (props) => (
<SvgIcon {...props}>
<path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C... |
examples/src/homeRoute.js | HBM/md-components |
import React from 'react'
import {Icon} from 'md-components'
export default class HomeRoute extends React.Component {
render () {
return (
<div className='Home'>
<div className='Hero'>
<div className='Hero-logo'>
<h1>
<span>md</span>
<span>componen... |
pootle/static/js/admin/general/staticpages.js | Finntack/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import ReactDOM from 'react-dom... |
frontend/src/components/TransactionEmptyState.js | OpenCollective/opencollective-website | import React from 'react';
export default ({i18n}) => {
return (
<div className='center'>
<div className='Collective-emptyState-image flex items-center justify-center'>
<img width='134' height='120'
src='/public/images/collectives/activities-empty-state-image.jpg'
srcSet='/publi... |
src/main.js | nchathu2014/todo-redux | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(
<App/>,
document.getElementById('container')
);
|
src/components/term.js | RexSkz/drone-ui | import React from 'react';
import Status from './status';
import TermRow from './term_row';
import './term.less';
export default
class Term extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
const {proc, open} = this.pro... |
src/containers/protected/agencies_edit.js | hisarkaya/polinsur | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { reduxForm } from 'redux-form';
import { fetchAgency, updateAgency, setNavigation } from '../actions';
import localization from '../helpers/localization';
import Content from '../components/templates/content';
import ContentHeader ... |
docs/src/examples/elements/Image/States/ImageExampleHidden.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Image } from 'semantic-ui-react'
const ImageExampleHidden = () => (
<Image src='/images/wireframe/image.png' size='small' hidden />
)
export default ImageExampleHidden
|
packages/app/app/components/Dashboard/BestNewMusicTab/BestNewMusicMenu/index.js | nukeop/nuclear | import React from 'react';
import PropTypes from 'prop-types';
import { Menu } from 'semantic-ui-react';
import { useTranslation } from 'react-i18next';
import BestNewMusicCardContainer from '../../../../containers/BestNewMusicCardContainer';
import BestNewMusicCard, { bestNewItemShape } from './BestNewMusicCard';
im... |
src/svg-icons/hardware/dock.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareDock = (props) => (
<SvgIcon {...props}>
<path d="M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z"/>
</SvgIcon>
);
HardwareDock = ... |
src/client/index.js | avantgrogg/avantcasts | import React from 'react';
import { generateStore } from './store';
import { Provider } from 'react-redux';
import { render } from 'react-dom';
import $ from 'jquery';
import "babel-polyfill";
import '../scss/main.scss';
import 'bulma';
import { Route, BrowserRouter as Router, browserHistory } from 'react-router-dom';... |
examples/05 Customize/Drop Effects/Container.js | numso/react-dnd | import React, { Component } from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
import SourceBox from './SourceBox';
import TargetBox from './TargetBox';
@DragDropContext(HTML5Backend)
export default class Container extends Component {
render() {
... |
src/GovernmentMemberModal.js | escabc/members-search-app | import React from 'react'
import Modal from 'react-modal'
import ModalSection from './ModalSection'
import CorporateAvatar from './CorporateAvatar'
import Button from './Button'
import MemberName from './MemberName'
import MemberDetailsItem from './MemberDetailsItem'
import theme from './theme'
const styles = {
ro... |
src/svg-icons/editor/multiline-chart.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorMultilineChart = (props) => (
<SvgIcon {...props}>
<path d="M22 6.92l-1.41-1.41-2.85 3.21C15.68 6.4 12.83 5 9.61 5 6.72 5 4.07 6.16 2 8l1.42 1.42C5.12 7.93 7.27 7 9.61 7c2.74 0 5.09 1.26 6.77 3.24l-2.88 3... |
components/NormalLayout.js | isogon/styled-mdl-website | import React from 'react'
import styled from 'styled-components'
import Layout from './Layout'
const Content = styled.div`
display: flex;
flex-grow: 1;
flex-direction: column;
margin: 74px auto 60px;
padding-left: 24px;
padding-right: 24px;
@media (min-width: 1032px) {
padding-left: 90px;
paddin... |
src/Checkbox.js | networknt/react-schema-form | /**
* Created by steve on 20/09/15.
*/
import React from 'react'
import Checkbox from '@mui/material/Checkbox'
import FormGroup from '@mui/material/FormGroup'
import FormControlLabel from '@mui/material/FormControlLabel'
import ComposedComponent from './ComposedComponent'
function FormCheckbox(props) {
const {
... |
packages/react-dom/src/shared/checkReact.js | rricard/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import invariant from 'shared/invariant';
invariant(
React,
'ReactDOM was loaded befor... |
test/specs/addons/Portal/Portal-test.js | clemensw/stardust | import _ from 'lodash'
import React from 'react'
import { unmountComponentAtNode } from 'react-dom'
import { domEvent, sandbox } from 'test/utils'
import Portal from 'src/addons/Portal/Portal'
let attachTo
let wrapper
const wrapperMount = (node, opts) => {
wrapper = mount(node, opts)
return wrapper
}
const nati... |
src/svg-icons/maps/local-phone.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPhone = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-... |
packages/react-scripts/template/src/index.js | sigmacomputing/create-react-app | 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();
|
js/rendererjs/pluginapi.js | NebulousLabs/Sia-UI | // pluginapi.js: Sia-UI plugin API interface exposed to all plugins.
// This is injected into every plugin's global namespace.
import * as Siad from 'sia.js'
import { remote } from 'electron'
import React from 'react'
import DisabledPlugin from './disabledplugin.js'
import Path from 'path'
const dialog = remote.dialog... |
app/components/Footer.js | madeleinehuish/awesomeVideoApp | import React from 'react';
const Footer = () => {
return (
<div style={styles.footer}>
<div className="container">
<p style={styles.footerText}> © MH & CK</p>
</div>
</div>
)
};
export default Footer;
const styles = {
footer: {
backgroundColor: '#4C4E60'
},
footerText: ... |
docs/src/pages/ParallaxPage.js | chris-gooley/react-materialize | import React from 'react';
import Row from 'Row';
import Col from 'Col';
import ReactPlayground from './ReactPlayground';
import PropTable from './PropTable';
import Samples from './Samples';
import parallax from '../../../examples/Parallax';
import parallaxCode from '!raw-loader!Parallax';
const ParallaxPage = () => ... |
src/parser/warlock/demonology/modules/talents/InnerDemons.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatThousands } from 'common/format';
import StatisticListBoxItem from 'interface/others/StatisticListBoxItem';
import DemoPets from '../pets/DemoPets';
im... |
content/gocms/src/admin/containers/adminPages/dashboardPage/dashboardPage.container.js | gocms-io/gocms | 'use strict';
import React from 'react';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
import {connect} from 'react-redux'
class DashboardPage extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentWillMount() {
... |
app/components/ContentBlock/index.js | rapicastillo/beautifulrising-client | /**
*
* ContentBlock
*
*/
import React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import { injectIntl } from 'react-intl';
const LatinContentTheme = `
font-size: 14px;
line-height: 22px;
text-align: left;
`;
const ArabicContentTheme = `
font-size: 13px;
line-height: 24px;
te... |
js-old/src/ui/LanguageSelector/langugeSelector.spec.js | destenson/ethcore--parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
src/render-native/html/__tests__/HtmlNodeTag-test.js | kunall17/zulip-mobile | import React from 'react';
import ReactTestRenderer from 'react-test-renderer';
import { Provider } from 'react-redux';
import store from '../../../boot/store';
import HtmlNodeTag from '../HtmlNodeTag';
describe('HtmlNodeTag', () => {
test('renders a View component', () => {
const rendered = ReactTestRenderer.c... |
src/reducers/tweet.js | philly-d/chirp-for-twitter | import React from 'react'
import { combineReducers } from 'redux'
import twitterText from 'twitter-text'
import _ from 'underscore'
import { getAutocompleteTerm } from './autocomplete'
import {
CompositeDecorator,
ContentState,
Editor,
EditorState,
getDefaultKeyBinding,
KeyBindingUtil,
Selec... |
web/src/components/Calendar/DateContentRow.js | AcrylicInc/totalblu | import cn from 'classnames';
import getHeight from 'dom-helpers/query/height';
import qsa from 'dom-helpers/query/querySelectorAll';
import PropTypes from 'prop-types';
import React from 'react';
import { findDOMNode } from 'react-dom';
import dates from './utils/dates';
import { accessor, elementType } from './utils/... |
examples/with-shallow-routing/pages/index.js | callumlocke/next.js | import React from 'react'
import Link from 'next/link'
import Router from 'next/router'
import { format } from 'url'
let counter = 1
export default class Index extends React.Component {
static getInitialProps ({ res }) {
if (res) {
return { initialPropsCounter: 1 }
}
counter++
return {
... |
src/components/itemHolder/index.js | ShinyLeee/React-PhotoSwipe | /* eslint-disable no-param-reassign */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import AnimationBox from './components/animationBox';
import EnhancedWrapper from './styled';
import {
PAN_FRICTION_LEVEL,
ZOOM_FRICTION_LEVEL,
BOUNCE_BACK_DURATION,
DIRECTION_VERT,
DIRECTION_U... |
app/containers/Signin.js | Block-and-Frame/block-and-frame | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import axios from 'axios';
import authHelpers from '../utils/authHelpers';
import SigninForm from '../components/auth/SigninForm';
class Signin extends Component {
constructor(props) {
super(props);
this.state... |
app/containers/Root.js | caiizilaz/exchange-rate | // @flow
import React from 'react';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import Routes from '../routes';
type RootType = {
store: {},
history: {}
};
export default function Root({ store, history }: RootType) {
return (
<Provider store={store}>
<... |
components/ListItemProduct.js | NigelEarle/SSR-shopping | import React from 'react';
import Link from 'next/link';
const SingleProduct = ({
id,
title,
description,
inventory,
price
}) => (
<div>
<Link prefetch as={`/product/${id}`} href={`/product?id=${id}`}>
<a>
<div>
<h3>{title}</h3>
</div>
</a>
</Link>
</div>
);
... |
src/Menu/MenuItem.js | boldr/boldr-ui | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import BoldrComponent from '../util/BoldrComponent';
class MenuItem extends BoldrComponent {
static propTypes = {
icon: PropTypes.node,
text: PropTypes.string,
onClick: PropTypes.func,
};
render() {
... |
src/components/DashboardBackground/DashboardBackground.js | Zoomdata/nhtsa-dashboard | import React from 'react';
import H2Header from '../H2Header/H2Header';
import GridContainer from '../GridContainer/GridContainer';
import CloseHood from '../CloseHood/CloseHood';
const DashboardBackground = () => {
return (
<div className="dashboard-background">
<H2Header />
<GridContainer />
... |
docs/components/Homepage/Platforms/index.js | jribeiro/storybook | import React from 'react';
import './style.css';
const Platform = () =>
<div id="platform" className="row">
<div className="col-md-12">
<h3 className="built-for">Built for</h3>
<p className="platforms">
<a
href="https://github.com/storybooks/storybook/tree/master/app/react"
... |
packages/react-instantsearch-core/src/connectors/connectStateResults.js | algolia/react-instantsearch | import createConnector from '../core/createConnector';
import { getResults } from '../core/indexUtils';
/**
* The `connectStateResults` connector provides a way to access the `searchState` and the `searchResults`
* of InstantSearch.
* For instance this connector allows you to create results/noResults or query/noQue... |
20161216/cnode/index.ios.js | fengnovo/react-native | // import React from 'react';
// import { AppRegistry } from 'react-native';
// import Root from './app/app.js';
// AppRegistry.registerComponent('cnode', ()=>Root);
require('./app/main'); |
app/components/Avatar/index.js | brentvatne/react-conf-app | // @flow
import React from 'react';
import { Image, Platform, View } from 'react-native';
import theme from '../../theme';
type Props = {
size?: number,
source: string,
style: Object | null | Array<Object | null>,
};
export default class Avatar extends React.Component {
render() {
let { size, source, sty... |
src/icons/IosInfiniteOutline.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosInfiniteOutline extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M451.229,188.098C432.682,169.967,407.95,160,381.585,160c-26.363,0-51.095,9.967-69.642,28.098l-42.229,41.1... |
components/ui/SearchSelect.js | resource-watch/resource-watch | import React from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';
// Components
import Icon from 'components/ui/icon';
export default class SearchSelect extends React.Component {
constructor(props) {
super(props);
this.state = {
selectedItem: props.options ? props.op... |
src/routes/register/Register.js | Frenzzy/react-starter-kit | /**
* 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-... |
node_modules/semantic-ui-react/src/elements/Button/ButtonGroup.js | mowbell/clickdelivery-fed-test | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useKeyOnly,
useValueAndKey,
useWidthProp,
} from '../../lib'
/**
* Buttons can be grouped.
*/
function ButtonGroup(props) {
const {
a... |
src/js/components/header/Index.spec.js | FBDevCLagos/fb-group-stat | import expect from 'expect';
import React from 'react';
import { mount, shallow } from 'enzyme';
import { Header } from './Index';
const setup = () => {
return mount(<Header />)
}
describe('Header Component', () => {
let wrapper;
beforeEach(() => {
wrapper = setup();
});
it('renders the navbar comonen... |
docs/src/app/layout/Main.js | GetAmbassador/react-ions | import React from 'react'
const Main = props => {
return (
<section role='main'>
{props.children}
</section>
)
}
export default Main
|
react/Pill/Pill.js | seek-oss/seek-style-guide | // @flow
import styles from './Pill.less';
import React, { Component } from 'react';
import classnames from 'classnames';
import Text from '../Text/Text';
import CrossIcon from '../CrossIcon/CrossIcon';
import ScreenReaderOnly from '../ScreenReaderOnly/ScreenReaderOnly';
type Props = {
children?: React$Node,
butto... |
specs/helper.js | dminuoso/react-modal | // The following eslint overrides should be removed when refactoring can occur
/* eslint react/no-render-return-value: "warn" */
import React from 'react';
import ReactDOM from 'react-dom';
import Modal from '../lib/components/Modal';
const divStack = [];
export function renderModal (props, children, callback) {
c... |
reactjs/src/cr_vars.js | astro44/FreeDraw | import React from 'react';
//import registerServiceWorker from './registerServiceWorker';
class var_Manager {
constructor(){
if(! var_Manager.instance){
this._data = {};
var_Manager.instance = this;
}
return var_Manager.instance;
}
add(key, value) {
this._data[key]=value
//... |
src/components/player.js | romainberger/react-switch | import React from 'react'
export default class Player extends React.Component {
getUrl() {
var url = `http://dailymotion.com/embed/video/${this.props.id}`
if (this.props.autoplay) {
url += '?autoplay=1'
}
if (this.props.start) {
url += (this.props.autoplay ? '&' : '?') + `start=${this.p... |
packages/demo/stories/sticky-list.js | zzarcon/skatepark.js | import React from 'react';
import {
storiesOf
} from '@kadira/storybook';
import 'skateparkjs-sticky-list';
import options from './defaultStoryOptions';
storiesOf('Sticky List', module)
.addWithInfo('Default options', () => {
const data = [{
name: 'Cars',
items: ['BWV', 'Mercedes', 'Ferrari', 'Audi... |
src/svg-icons/notification/airline-seat-legroom-extra.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomExtra = (props) => (
<SvgIcon {...props}>
<path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.... |
app/javascript/mastodon/features/ui/index.js | pinfort/mastodon | import classNames from 'classnames';
import React from 'react';
import { HotKeys } from 'react-hotkeys';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import NotificationsContai... |
TODO/app/containers/AddTodo.js | kosl90/Redux-Study | import React from 'react'
import { connect } from 'react-redux'
import { addTodo } from '../actions'
let AddTodo = ({ dispatch }) => {
let input
return (
<div>
<form onSubmit={e => {
e.preventDefault()
if (!input.value.trim()) {
return
}
dispatch(a... |
src/compose.js | kadirahq/react-komposer | import React from 'react';
import shallowEqual from 'shallowequal';
import pick from 'lodash.pick';
import { mayBeStubbed } from 'react-stubber';
import { inheritStatics } from './utils';
export default function compose(dataLoader, options = {}) {
return function (Child) {
const {
errorHandler = (err) => {... |
src/index.js | vkarpov15/shidoshi | import { Provider } from 'react-redux';
import ReactDOM from 'react-dom';
import React from 'react';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import App from './components/App';
import Article from './components/Article';
import Editor from './components/Editor';
import Home from './compo... |
test/browser/es6-module-exports-spec.js | staticinstance/material-ui | import React from 'react';
import TestUtils from 'react-addons-test-utils';
const Divider = require('divider');
const ActionAccessibility = require('svg-icons').ActionAccessibility;
import ImportGetMuiTheme from 'styles/getMuiTheme';
const RequireGetMuiTheme = require('styles/getMuiTheme');
import ImportColorManipul... |
app/javascript/mastodon/features/community_timeline/index.js | riku6460/chikuwagoddon | 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/admin/components/SchemaForm/BooleanField.js | u-wave/web | import React from 'react';
import PropTypes from 'prop-types';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormHelperText from '@mui/material/FormHelperText';
import Checkbox from '@mui/material/Checkbox';
function BooleanField({ schema, value, onChange }) {
return (
<>
<FormContr... |
classic/src/scenes/mailboxes/src/Scenes/CommandPaletteScene/CommandPaletteSearchItemCommandSuggestion.js | wavebox/waveboxapp | import React from 'react'
import PropTypes from 'prop-types'
import shallowCompare from 'react-addons-shallow-compare'
import CommandPaletteSearchItem from './CommandPaletteSearchItem'
import { withStyles } from '@material-ui/core/styles'
import grey from '@material-ui/core/colors/grey'
const styles = {
helper: {
... |
src/test/account.js | jperez10/RobinHoodAutoTrader | import React, { Component } from 'react';
class Account extends Component {
render() {
//console.log("pineapple")
console.log("this.props.Account",this.props.Account);
if(this.props.Account === undefined){
return (
<div className="account">
Please update Acco... |
app/views/calculator.js | 7kfpun/BitcoinReactNative | import React from 'react';
import {
ListView,
NetInfo,
Platform,
StyleSheet,
Text,
TouchableHighlight,
TouchableOpacity,
View,
} from 'react-native';
// 3rd party libraries
import { Actions } from 'react-native-router-flux';
import { ifIphoneX } from 'react-native-iphone-x-helper';
import GoogleAnalyti... |
web/src/content/work/Books.js | ajmalafif/ajmalafif.com | import React from 'react'
import tw, { css, theme } from 'twin.macro'
export const Books = () => {
return (
<div className="books">
<div tw="mt-8 md:mt-16 w-full flex flex-row overflow-hidden space-x-4 md:space-x-16">
<div
tw=" m-0 px-6 py-4 md:p-8 md:pb-4 rounded w-40 h-48 md:h-72 md:w-5... |
client/intl/ismorphicIntlProvider.js | jkettmann/universal-react-relay-starter-kit | import React from 'react'
import { IntlProvider, addLocaleData } from 'react-intl'
import en from 'react-intl/locale-data/en'
import de from 'react-intl/locale-data/de'
import localeData from './locales/data.json'
addLocaleData([...en, ...de])
const withIntl = (children, locale) => {
const messages = localeData[lo... |
src/svg-icons/maps/rate-review.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsRateReview = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 14v-2.47l6.88-6.88c.2-.2.51-.2.71 0l1.77 1.77c.2.2.2.51 0 .71L8.47 14H6zm1... |
app/javascript/mastodon/components/common_counter.js | im-in-space/mastodon | // @ts-check
import React from 'react';
import { FormattedMessage } from 'react-intl';
/**
* Returns custom renderer for one of the common counter types
*
* @param {"statuses" | "following" | "followers"} counterType
* Type of the counter
* @param {boolean} isBold Whether display number must be displayed in bold
... |
cypress/app/src/components/ValidationTest.js | darrikonn/react-chloroform | import React from 'react';
import {
Button,
Form,
Input,
Select,
TextArea,
} from 'react-chloroform';
function ValidationTest() {
const attachCypressOrConsoleLog = model => {
if (window.Cypress) {
window.model = model;
} else {
console.log(model);
}
};
return (
<div>
... |
src/components/button/button.spec.js | psenger/ReactJS-Rapid-Prototype-Template | import { shallow } from 'enzyme';
import React from 'react';
import Button from './button';
describe('COMPONENT:', () => {
describe('Button', () => {
it('should produce one button', () => {
const onClick = jest.fn();
const component = shallow(
<Button value={123} onClickHandler={onClick} />
... |
client/modules/core/components/top_nav_bar/top_nav_bar.js | bompi88/grand-view | // //////////////////////////////////////////////////////////////////////////////
// TopNavbar SCSS Styles
// //////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Concept
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file exc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.