path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/shared/Page.js | Brandon-J-Campbell/codemash | import React from 'react';
import classNames from 'classnames';
import ThemeContext from '../theme/context';
import styles from './Page.css';
export default function Page({ children }) {
return (
<ThemeContext.Consumer>
{({ theme }) => (
<div className={classNames(styles.page, styles[theme])}>
... |
Circle.js | oblador/react-native-progress | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Animated, StyleSheet, Text, View } from 'react-native';
import { Svg } from 'react-native-svg';
import Arc from './Shapes/Arc';
import withAnimation from './withAnimation';
const CIRCLE = Math.PI * 2;
const AnimatedSvg = Animated.... |
src/components/Certificate.js | gndx/gresume-react | import React from 'react';
const Certificate = (props) => {
const myCertificates = (
<div>
{props.certificate.map((cert) =>
<div className='item' key={cert.name}>
<h3>{cert.name} @ {cert.institution} <span>{cert.date}</span></h3>
<p>{cert.description}</p>
</div>
)}... |
src/shared/components/schoolCard/schoolCard.js | tal87/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
import OutboundLink from 'shared/components/outboundLink/outboundLink';
import styles from './schoolCard.css';
const SchoolCard = ({
alt,
GI,
fullTime,
hardware,
link,
logo,
schoolAddress,
schoolCity,
schoolName,
schoolState,
}) => (
... |
app/javascript/mastodon/features/explore/components/story.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Blurhash from 'mastodon/components/blurhash';
import { accountsCountRenderer } from 'mastodon/components/hashtag';
import ShortNumber from 'mastodon/components/short_number';
import Skeleton from 'mastodon/components/skeleton';
import classNames from... |
src/Parser/Paladin/Holy/Modules/Talents/CrusadersMight.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SpellUsable from 'Parser/Core/Modules/SpellUsable';
import StatisticBox, { STATISTIC_ORDER } from 'Main... |
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/NavItem.js | JamieMason/npm-cache-benchmark | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/Table.js | cgvarela/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Table = React.createClass({
propTypes: {
striped: React.PropTypes.bool,
bordered: React.PropTypes.bool,
condensed: React.PropTypes.bool,
hover: React.PropTypes.bool,
responsive: React.PropTypes.bool
},
getDefaultProps() {
... |
src/client.js | krolow/react-redux-universal-hot-example | /* global __DEVTOOLS__ */
import 'babel/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import Location from 'react-router/lib/Location';
import createStore from './redux/create';
import ApiClient from './ApiClient';
import universalRouter from './universalRouter';
co... |
app/js/components/SearchBar.js | azazi-sa/dakiya | import React from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
// actions
import { fetchPackages } from '../actions/packages';
function dispatchActionToProps(dispatch) {
return {
fetchPackages: bindActionCreators(fetchPackages, d... |
docs/src/examples/collections/Table/Variations/TableExampleSelectableInvertedRow.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleSelectableInvertedRow = () => (
<Table celled inverted selectable>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell... |
blueocean-material-icons/src/js/components/svg-icons/maps/satellite.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const MapsSatellite = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.99h3C8 6.65 6.66 8 5 8V4.99zM5 12v-2c2.76 0 5-2.25 5-5.01h2C12 8.86 8.87 12 5 12zm0 6l3.5-4.5 2.5 3.01L... |
src/components/ShareExperience/common/TypeFormFooter.js | goodjoblife/GoodJobShare | import React from 'react';
import styles from './TypeFormFooter.module.css';
const TypeFormFooter = () => (
<div className={styles.footer}>
完成可解鎖全站 2 萬筆資訊 <span className={styles.unlockDuration}></span>
</div>
);
export default TypeFormFooter;
|
src/components/PortionManipulator/PortionManipulator.js | sars/appetini-front | import Button from 'components/Button/Button';
import { FormattedPlural } from 'react-intl';
import styles from './styles.scss';
import React from 'react';
export const PortionManipulator = ({availableCount, amount, onChangeAmount}) => {
return (
<div className={styles.amountContainer}>
<Button className={... |
src/parser/priest/holy/CHANGELOG.js | sMteX/WoWAnalyzer | import React from 'react';
import { Khadaj, niseko, Yajinni, Zerotorescue } from 'CONTRIBUTORS';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
export default [
{
date: new Date('2019-04-09'),
changes: <>Adding Holy Nova card and updating spreadsheet</>,
contributors: [Kha... |
tests/format/flow-repo/react_modules/es6class-proptypes-callsite.js | prettier/prettier | /* @flow */
import React from 'react';
import Hello from './es6class-proptypes-module';
class HelloLocal extends React.Component<void, {name: string}, void> {
defaultProps = {};
propTypes = {
name: React.PropTypes.string.isRequired,
};
render(): React.Element<*> {
return <div>{this.props.name}</div>;
... |
src/templates/post.js | mccannsean421/mccannsean421.github.io | import React from 'react';
import Helmet from 'react-helmet';
export default function Template({data}) {
const {markdownRemark: post} = data; //Retieving post from data.markdownRemark
return (
<div>
<div className="content-container">
<h1>{post.frontmatter.title}</h1>
<div dangerouslySetInnerHTML={{__h... |
app/components/Toggle/index.js | alexsmartman/weather-react | /**
*
* LocaleToggle
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = (<option>--</option>);
// If we have items, render them
if (props.values) {
content = props.values.map(... |
app/react-icons/fa/venus-double.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaVenusDouble extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m40 11.8q0.2 3.5-1.2 6.5t-4.2 5-6 2.3v5.8h5q0.3 0 0.5 0.2t0.2 0.5v1.5q0 ... |
src/js/pages/FAQ.js | hadnazzar/ModernBusinessBootstrap-ReactComponent | import React from 'react';
import AccordionPanel from '../components/AccordionPanel';
import Subheading from '../components/Subheading';
export default class Layout extends React.Component {
constructor() {
super();
this.state = {
title:"Welcome to Momoware!",
};
}
changeTitle(t... |
src/svg-icons/action/swap-vertical-circle.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSwapVerticalCircle = (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 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"/>
... |
react-redux-tutorial/input-redux/src/index.js | react-scott/react-learn | import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './App'
import inputApp from './reducers'
let store = createStore(inputApp);
render(
<Provider store={store}>
<App />
</Provider>,
document.querySelector("#... |
src/forms/NewConversationComposeForm/ReceiverSearchForm.js | llukasxx/school-organizer-front | import React from 'react'
export class ReceiverSearch extends React.Component {
constructor(props) {
super(props)
}
render() {
const { activeTab, query } = this.props
let placeholder;
switch(activeTab) {
case 'students':
placeholder = "Student name"
break;
case 'teache... |
app/javascript/components/collections/landing/SearchResults.js | avalonmediasystem/avalon | /*
* Copyright 2011-2022, The Trustees of Indiana University and Northwestern
* University. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENS... |
server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumb.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
app/javascript/mastodon/components/attachment_list.js | alarky/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
const filename = url => url.split('/').pop().split('#')[0].split('?')[0];
export default class AttachmentList extends ImmutablePureComponent {
static propTypes... |
app/javascript/mastodon/features/explore/results.js | maa123/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { expandSearch } from 'mastodon/actions/search';
import Account from 'mastodon/containers/account_contai... |
src/components/component_navbar.js | paschalidi/shopping-cart-reactjs-redux | import React, { Component } from 'react';
import { connect } from 'react-redux'
class NavigationBar extends Component {
render() {
return (
<div className="component-navbar">
<div className="navigation-bar">
<nav className="navbar navbar-default">
<div className="container-flu... |
react/features/calendar-sync/components/CalendarList.web.js | jitsi/jitsi-meet | // @flow
import Spinner from '@atlaskit/spinner';
import React from 'react';
import {
createCalendarClickedEvent,
sendAnalytics
} from '../../analytics';
import { translate } from '../../base/i18n';
import { Icon, IconPlusCalendar } from '../../base/icons';
import { AbstractPage } from '../../base/react';
imp... |
src/svg-icons/action/add-shopping-cart.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAddShoppingCart = (props) => (
<SvgIcon {...props}>
<path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-... |
src/components/RootHomeComponent.js | Neitsch/pd-tournament | import React from 'react';
import Relay from 'react-relay';
class RootHomeComponent extends React.Component {
static propTypes = {
viewer: React.PropTypes.any,
}
constructor(props) {
super(props);
this.state = {
loggedIn: false,
};
}
render() {
if (this.state.loggedIn) {
retur... |
src/svg-icons/image/crop-rotate.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCropRotate = (props) => (
<SvgIcon {...props}>
<path d="M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81... |
src/filters/Number.js | opensourcegeek/react-bootstrap-table | import React from 'react';
import classSet from 'classnames';
import Const from '../Const';
const legalComparators = ["=", ">", ">=", "<", "<=", "!="];
class NumberFilter extends React.Component {
constructor(props) {
super(props);
this.numberComparators = this.props.numberComparators || legalComp... |
src/propTypes/EdgeInsetsPropType.js | omeid/react-native-mock | /**
* https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/EdgeInsetsPropType.js
*/
import React from 'react';
const { PropTypes } = React;
var EdgeInsetsPropType = PropTypes.shape({
top: PropTypes.number,
left: PropTypes.number,
bottom: PropTypes.number,
right: PropTypes.number,
});
m... |
src/components/import/ImportMandatoryField.js | secretin/secretin-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Input from 'components/utilities/Input';
class ImportMandatoryField extends Component {
static propTypes = {
field: PropTypes.object,
onChange: PropTypes.func,
};
constructor(props) {
super(props);
this.handleCh... |
app/javascript/mastodon/features/ui/components/column_subheading.js | tateisu/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
|
node_modules/node_modules/recharts/demo/component/RadialBarChart.js | SerendpityZOEY/Fixr-RelevantCodeSearch | import React from 'react';
import { RadialBarChart, RadialBar, Cell, Legend, Tooltip, ResponsiveContainer } from 'recharts';
import { changeNumberOfData } from './utils';
import { scaleOrdinal, schemeCategory10 } from 'd3-scale';
const colors = scaleOrdinal(schemeCategory10).range();
const data = [
{ name: '18-24',... |
src/app.js | richard-leagh/evolution-calc | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import Header from './components/Header';
import PokeStore from './stores/PokeStore';
import VisibleCurrentInfo from './containers/VisibleCurrentInfo';
import VisibleEvolveInfo from './containers/VisibleEvolveInfo';
imp... |
src/containers/weather/searchbar.js | MeKyleH/ReactPortfolioStuff | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: '' };
this.onInputChange = this.onInpu... |
src/components/examples/exampleImg.js | Jguardado/ComponentBase | import React, { Component } from 'react';
export default class Picture extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className='center'>
<legend className='headingtext'>Example Picture</legend>
<img className='picture' src='/src/images/myFace-mi... |
Libraries/Components/WebView/WebView.ios.js | thotegowda/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/components/video-detail.js | hectorcoronado/react-youtube-videoplayer | import React from 'react';
/*
Like in VideoListItem, we can destructure the props object by passing in {video} as an argument
to this functional component, thereby automatically declaring a variable with the same name that
gives us access to props.video.
*/
const VideoDetail = ({video}) => {
// Check if we haven't ... |
examples/huge-apps/routes/Course/components/Nav.js | davertron/react-router | import React from 'react';
import { Link } from 'react-router';
import AnnouncementsRoute from '../routes/Announcements';
import AssignmentsRoute from '../routes/Assignments';
import GradesRoute from '../routes/Grades';
const styles = {};
styles.nav = {
borderBottom: '1px solid #aaa'
};
styles.link = {
display: ... |
examples/js/cell-edit/custom-cell-edit-table.js | powerhome/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-alert: 0 */
/* eslint guard-for-in: 0 */
/* eslint no-unused-vars: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
const currencies = [ 'USD', 'GBP', 'EUR' ];
const regions = [ 'North', 'South', 'East... |
src/javascript/components/Footer.js | Yanagiya/SOS_HAKATHON_TEMLATE | import React, { Component } from 'react';
const styles = {
layout: {
height: '100px'
},
footerText: {
textAlign: 'right',
padding: '40px 0',
fontSize: '10px'
}
};
export default class Footer extends Component {
render() {
return (
<div style={styles.layout}>
<div style... |
frontend/js/components/ecosystems/SurveyCreatorCandidates.js | wbprice/okcandidate-platform | 'use strict';
import React, { Component } from 'react';
import Card from './../atoms/Card';
class SurveyCreatorCandidates extends Component {
render() {
return (
<Card>
<pre>SurveyCreatorCandidates</pre>
</Card>
);
}
}
SurveyCreatorCandidates.propTypes... |
app/javascript/mastodon/features/ui/components/block_modal.js | lindwurm/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../../../selectors';
import Button from '../../../components/button';
import { closeModal } from '../../../actions/modal';
impo... |
src/renderer/react.js | yoo2001818/resumegen | import React from 'react';
import Helmet from 'react-helmet';
import { renderToStaticMarkup } from 'react-dom/server';
import serialize from 'serialize-javascript';
import App from '../client/component/app';
export default function renderReact(link, metadata, files, publicPath,
assetsByChunkName, footer
) {
retu... |
src/containers/Home.js | matapang/virtualraceph2 | import React, { Component } from 'react';
import { withRouter, Link } from 'react-router-dom';
import AppLayout from '../components/AppLayout';
import Dashboard from './Dashboard';
import {
PageHeader,
ListGroup,
ListGroupItem,
} from 'react-bootstrap';
import { invokeApig } from '../libs/awsLib';
import './Home.... |
src/svg-icons/action/http.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttp = (props) => (
<SvgIcon {...props}>
<path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-... |
src/svg-icons/notification/power.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPower = (props) => (
<SvgIcon {...props}>
<path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"/>
</SvgIcon>
);
NotificationPower = pu... |
node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import warning from 'warning';
import withStyles from '../styles/withStyles';
import { lig... |
github-battle-es6/app/components/Nav.js | josedab/react-exercises | import React from 'react';
import {NavLink} from 'react-router-dom';
function Nav(){
return (
<ul className='nav'>
<li>
<NavLink exact activeClassName='active' to='/'>
Home
</NavLink>
</li>
<li>
<NavLink activeClassName='active' to='/battle'>
Battle
... |
examples/with-global-stylesheet/pages/index.js | nikvm/next.js | import React from 'react'
import stylesheet from './style.scss'
// or, if you work with plain css
// import stylesheet from './style.css'
export default () =>
<div>
<style dangerouslySetInnerHTML={{ __html: stylesheet }} />
<p>ciao</p>
</div>
|
modules/Link.js | stshort/react-router | import React from 'react'
import invariant from 'invariant'
import { routerShape } from './PropTypes'
import { ContextSubscriber } from './ContextUtils'
const { bool, object, string, func, oneOfType } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {... |
src/Routes.js | gramulos/EpsilonGroups | import React from 'react';
import { ReactRouter, Router, Route, Link } from 'react-router';
import cTemplate from './pages/client/Template';
import cProducts from './pages/client/Products';
import cProductDetails from './pages/client/ProductDetails';
import cServices from './pages/client/Services';
import c3DPrinter f... |
src/svg-icons/maps/local-phone.js | mtsandeep/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-... |
lib/components/content/ListBlock.js | limscoder/react-present | import React from 'react';
import PropTypes from 'prop-types';
export default class ListBlock extends React.Component {
static propTypes = {
items: PropTypes.arrayOf(PropTypes.node),
title: PropTypes.node
};
render() {
let items = this.props.items || [];
items = items.concat(this.props.children ... |
client/src/components/App.js | alexandernanberg/luncha | import React from 'react'
import { Provider } from 'mobx-react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom/es'
import Helmet from 'react-helmet'
import styled from 'styled-components'
import Header from './Header'
import Footer from './Footer'
import routes from '../routes'
import ScrollTo... |
app/javascript/mastodon/features/picture_in_picture/components/header.js | gol-cha/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 { Link } from 'react-rou... |
src/lib/validation.js | terakilobyte/socketreact | /*
Simple serial "one by one" sync/async promises based validation.
*/
import Promise from 'bluebird';
import React from 'react';
import validator from 'validator';
export class ValidationError extends Error {
constructor(message: string, prop: string) {
super();
this.message = message;
this.prop = pro... |
app/assets/javascripts/src/components/sessions/loginPage.js | talum/creamery | import React from 'react'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import { connect } from 'react-redux'
import Form from '../sharedComponents/Form'
import InputField from '../sharedComponents/InputField'
import SubmitButton from '../sharedComponents/SubmitButton'
import { debounce } fro... |
src/client/home/index.react.js | laxplaer/este | import Component from '../components/component.react';
import DocumentTitle from 'react-document-title';
import React from 'react';
import {FormattedHTMLMessage} from 'react-intl';
import {Link} from 'react-router';
export default class HomeIndex extends Component {
static propTypes = {
msg: React.PropTypes.obj... |
packages/core/admin/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js | wistityhq/strapi | import React from 'react';
import PropTypes from 'prop-types';
import { FieldLabel } from '@strapi/design-system/Field';
import { Stack } from '@strapi/design-system/Stack';
import { Typography } from '@strapi/design-system/Typography';
import { useFormikContext } from 'formik';
import { useIntl } from 'react-intl';
im... |
src/Survey/Complex/Default/Samples/Taxon.js | NERC-CEH/irecord-app | import React from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import AppHeader from 'Components/Header';
import TaxonSearch, { TaxonSearchFilters } from 'Components/TaxonSearch';
import Sample from 'sample';
import Occurrence from 'occurrence';
import surveyConfig from 'common/co... |
examples/wms/wmspopup.js | boundlessgeo/sdk | import React from 'react';
import SdkPopup from '@boundlessgeo/sdk/components/map/popup';
/**
* Show the WMS GetFeatureInfo feature in a popup.
*/
export default class WMSPopup extends SdkPopup {
render() {
const content = [];
for (let i = 0, ii = this.props.features.length; i < ii; ++i) {
const feat... |
dev/dispenseApp/pages/requestCode.js | Thr1ve/Dispense | import React from 'react'
import RequestCodeForm from '../../components/atoms/requestCodeForm.js'
import Mui from 'material-ui'
import {r, DefaultMixin, QueryRequest} from 'react-rethinkdb'
let { Paper } = Mui
let requestCode = React.createClass({
mixins: [DefaultMixin],
contextTypes: {
router: React.PropT... |
admin/client/App/components/Navigation/Secondary/index.js | helloworld3q3q/keystone | /**
* The secondary navigation links to inidvidual lists of a section
*/
import React from 'react';
import { connect } from 'react-redux';
import { Container } from 'elemental';
import { FormattedMessage } from 'react-intl';
import {
setActiveList,
} from '../../../screens/List/actions/active';
import SecondaryNav... |
client/modules/core/components/.stories/newpost.js | hacksong2016/angel | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import NewPost from '../newpost';
storiesOf('core.NewPost', module)
.add('default view', () => {
return (
<NewPost create={action('create post')} />
);
})
.add('with error', () => {
const error = 'This is the erro... |
react/features/welcome/components/LocalVideoTrackUnderlay.native.js | bgrozev/jitsi-meet | // @flow
import React, { Component } from 'react';
import { View } from 'react-native';
import { VideoTrack } from '../../base/media';
import { TintedView } from '../../base/react';
import { connect } from '../../base/redux';
import { getLocalVideoTrack } from '../../base/tracks';
import styles from './styles';
/**... |
src/react.js | rwillrich/redux | import React from 'react';
import createAll from './components/createAll';
export const { Provider, Connector, provide, connect } = createAll(React);
|
docs/app/Examples/collections/Table/Variations/TableExampleInvertedColors.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const colors = [
'red', 'orange', 'yellow', 'olive', 'green', 'teal', 'blue', 'violet', 'purple', 'pink', 'brown', 'grey', 'black',
]
const TableExampleInvertedColors = () => (
<div>
{colors.map(color => (
<Table color={color} key={colo... |
src/routes/UIElement/layer/index.js | zhangjingge/sse-antd-admin | import React from 'react'
import { layer } from '../../../components'
import { Table, Row, Col, Button, Card } from 'antd'
let Enum = {
default: 1,
}
const IcoPage = () => {
const handleButtonClick = (key) => {
if (key === Enum.default) {
layer.open({
title: '默认弹层',
content: <div style={... |
8-css-inline/src/AddTodo.js | mariusz-malinowski/tutorial-react | import React, { Component } from 'react';
import {connect} from 'react-redux';
import {enterTodoName, addTodo} from './actions';
class AddTodo extends Component {
onFormSubmit = (evt) => {
evt.preventDefault();
this.props.dispatch(addTodo());
}
render() {
return (
<form onSubmit={this.onFormSu... |
src/client/react/index.js | nloomans/rooster.hetmml.nl | /**
* Copyright (C) 2018 Noah Loomans
*
* This file is part of rooster.hetmml.nl.
*
* rooster.hetmml.nl 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 op... |
cloudapp/src/app/WeatherData.js | jbrichau/PoolBuddy | import React from 'react';
import request from 'superagent';
import { TimeSeries } from 'pondjs';
import { Resizable, Charts, ChartContainer, ChartRow, YAxis, ValueAxis, LineChart, styler } from "react-timeseries-charts";
class WeatherData extends React.Component {
constructor(props) {
super(props);
this.sta... |
blueocean-material-icons/src/js/components/svg-icons/action/lock-outline.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionLockOutline = (props) => (
<SvgIcon {...props}>
<path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-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... |
src/index.js | dbaronov/weather-widget-react-noredux | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import Header from './components/header';
import NotificationBar from './components/notification_bar';
import SearchBar from './components/search_bar';
import SummaryTitle from './components/summary_title';
import Su... |
client/components/layout/index.js | ShannChiang/meteor-react-redux-base | import React from 'react';
import Nav from '../../containers/layout/nav';
import Footer from './footer';
export default (props) => (
<div className="landing-page">
<Nav />
{props.children}
{/*<Footer />*/}
</div>
);
|
test/test_helper.js | martinpeck/yt-react-app | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
app/javascript/mastodon/features/blocks/index.js | tootsuite/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import PropType... |
app/javascript/mastodon/features/standalone/public_timeline/index.js | anon5r/mastonon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../../ui/containers/status_list_container';
import { expandPublicTimeline } from '../../../actions/timelines';
import Column from '../../../components/column';
import ColumnHeader from ... |
packages/idyll-docs/pages/docs/components/npm.js | idyll-lang/idyll | import React from 'react';
import Link from 'next/link';
import markdown from 'markdown-in-js';
import Layout from '../../../components/layout';
const Content = () => markdown`
# Installing Components from NPM
Additional components can be installed via [npm](https://npmjs.com).
## Suggested Components
- [Apparatus]... |
src/components/GlyphButton.js | gearz-lab/react-metaform | import React from 'react';
import Button from 'react-bootstrap/lib/Button.js';
import Glyphicon from 'react-bootstrap/lib/Glyphicon.js';
let GlyphButton = React.createClass({
propTypes: {
bsStyle: React.PropTypes.string,
bsSize: React.PropTypes.string,
text: React.PropTypes.string,
... |
wordpuzzle/src/layout/reply-and-response.js | prabakaranrvp/CodeGame | import React from 'react';
import { DIFFICULTY_MAP } from '../constants.js'
export default class ReplyAndResponse extends React.Component {
render() {
return this.props.won? this.renderWonMessage() : this.renderInputContainer();
}
renderInputContainer() {
let chances = this.props.chances - this.props.g... |
6.webpack/message/index.js | zhufengnodejs/201608node | require('bootstrap/dist/css/bootstrap.css');
import MessageBox from './components/MessageBox.js';
import React from 'react';
import ReactDOM from 'react-dom';
//此DB模块是用来对消息进行查询 添加 和删除的
//数据存储手段是多样化的,有可能 是localStorage http接口
import http from './http.js';
//db.list;列出所有的消息
//db.add;添加一个消息,返回最新的消息数组
//db.remove;删除一个消息,返回最... |
app/containers/SwaggerPage/index.js | interra/data-generate | /*
* SwaggerPage
*
* List all the features
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redu... |
ui/src/components/IconButton/IconButton.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { compose, setPropTypes, defaultProps } from 'recompose';
import styled from 'styled-components';
const Button = styled.button`
width: 33px;
margin: 0 1px;
`;
const enhanceIconButton = compose(
setPropType... |
examples/real-world/containers/Root.js | af/redux | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from '../store/configureStore';
import App from './App';
import UserPage from './UserPage';
import RepoPage from './RepoPage';
const store = configureStore();
export de... |
app/containers/BrowseHeader/index.js | ReelTalkers/reeltalk-web | /**
*
* BrowseHeader
*
*/
import React from 'react'
import Relay from 'react-relay'
import UniversalSearch from 'containers/UniversalSearch'
import Header from 'components/Header'
import Logo from 'components/Logo'
import styles from './styles.css'
function BrowseHeader(props) {
return (
<div className={style... |
packages/wix-style-react/src/ContactItemBuilder/docs/index.js | wix/wix-style-react | import React from 'react';
import { storiesOf } from '@storybook/react';
import Markdown from 'wix-storybook-utils/Markdown';
import TabbedView from 'wix-storybook-utils/TabbedView';
import CodeExample from 'wix-storybook-utils/CodeExample';
import Readme from './README.md';
import Example from './Example';
import E... |
src/routes/main/landing/index.js | labzero/lunch | /**
* 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 LayoutContainer from ... |
app/src/Menu.js | struz/smash-move-viewer | import React, { Component } from 'react';
import ReactGA from 'react-ga';
ReactGA.initialize('UA-107697636-1');
class Menu extends Component {
constructor(props) {
super(props);
this.state = {
moveViewerLink: this.props.moveViewerLink
};
this.handleChange = this.handleChange.bind(this);
}
... |
styleguide/screens/Patterns/Markdown/Markdown.js | NGMarmaduke/bloom | import React from 'react';
import cx from 'classnames';
import dedent from 'dedent';
import Markdown from '../../../../components/Markdown/Markdown';
import Specimen from '../../../components/Specimen/Specimen';
import { H, T, C } from '../../../components/Scaffold/Scaffold';
import css from './Markdown.css';
import ... |
examples/star-wars/js/app.js | gabelevi/relay | /**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... |
src/App.js | anthonydelgado/codehero-react | import React from 'react';
import './App.css';
import firebase from 'firebase'
import { connect } from 'react-firebase'
import AceEditor from 'react-ace';
import 'brace/mode/javascript';
import 'brace/theme/ambiance';
import firebase_config_url from './config';
firebase.initializeApp({
databaseURL: firebase_co... |
src/js/components/icons/base/DocumentVideo.js | linde12/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... |
src/components/Icon.js | joshforisha/fred-talks | import PropTypes from 'prop-types';
import React from 'react';
import feather from 'feather-icons';
import styled from 'styled-components';
const Icon_ = styled.span`
display: inline-block;
height: 1.5em;
line-height: 1;
width: 1.5em;
> svg {
height: 1.5em;
padding: 0.25rem;
width: 1.5em;
}
`;... |
src/icons/AndroidLock.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class AndroidLock extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<g>
<path d="M376,186h-20v-40c0-55-45-100-100-100S156,91,156,146v40h-20c-22.002,0-40,17.998-40,40v200c0,22.002,17.998,4... |
tests/flow/react/createElementRequiredProp_string.js | Pajn/prettier | // @flow
import React from 'react';
class Bar extends React.Component {
props: {
test: number,
};
render() {
return (
<div>
{this.props.test}
</div>
)
}
}
class Foo extends React.Component {
render() {
const Cmp = Math.random() < 0.5 ? 'div' : Bar;
return (<Cmp/>);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.