path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
12_ReactJS Fundamentals/03_events_and_forms/src/index.js | akkirilov/SoftUniProject | 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();
|
frontend/src/components/common/hoc/withConditionalDisplay.js | unicef/un-partner-portal |
// eslint-disable-next-line
import React from 'react';
import R from 'ramda';
import { connect } from 'react-redux';
const mapStateToProps = conditions => (state) => {
const displayComponent = R.reduce((acc, next) => {
if (typeof next === 'function') return acc && next(state);
return acc && next;
}, true,... |
react/dashboard_example/src/server.js | webmaster444/webmaster444.github.io | import 'babel-polyfill';
import path from 'path';
import express from 'express';
import cookieParser from 'cookie-parser';
import bodyParser from 'body-parser';
import expressJwt from 'express-jwt';
// import expressGraphQL from 'express-graphql';
import jwt from 'jsonwebtoken';
import React from 'react';
import ReactD... |
node_modules/antd/es/table/SelectionCheckboxAll.js | ZSMingNB/react-news | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-run... |
webapp/app/components/CreateUser/Form/Buttons/index.js | EIP-SAM/SAM-Solution-Node-js | //
// Component email form in create user page
//
import React from 'react';
import { browserHistory } from 'react-router';
import { ButtonToolbar } from 'react-bootstrap';
import LinkContainerButton from 'components/Button';
import styles from 'components/CreateUser/styles.css';
/* eslint-disable react/prefer-statel... |
src/icons/FaceIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class FaceIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M18 23.5c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5zm12 0c-1.38 0-2.5 1.12-2... |
blueocean-material-icons/src/js/components/svg-icons/image/vignette.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageVignette = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"/>
</SvgIcon>
);
ImageVignette.displayName = '... |
client/scripts/src/app.js | lina/tictactoe | import React from 'react';
import ReactDOM from 'react-dom';
// Import components
import Board from './board.jsx';
// import css stylesheet
import './stylesheets/main.scss';
// render the loading screen
ReactDOM.render( <Board/>, document.getElementById('tic-tac-toe-view-placeholder'));
|
src/components/drupal/original/DrupalOriginal.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './DrupalOriginal.svg'
/** DrupalOriginal */
function DrupalOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'DrupalOriginal' + ' ' + c... |
src/components/footer/index.js | Tsarpf/babel-webpack-react-router-eslint-boilerplate | import React from 'react';
export default class Footer extends React.Component {
render() {
return (
<div>
<hr/>
<p> Footer that shows in every page </p>
</div>
)
}
}
|
app/javascript/mastodon/features/standalone/community_timeline/index.js | honpya/taketodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../../ui/containers/status_list_container';
import {
refreshCommunityTimeline,
expandCommunityTimeline,
} from '../../../actions/timelines';
import Column from '../../../components/... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/DefaultPropsUninitialized.js | samwgoldman/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
static defaultProps: DefaultProps;
props: Props;
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
static defaultProp... |
app/components/UserProfile.js | jmpressman/REACTO-platform | import React from 'react';
import { Jumbotron, Button, Card, CardImg, CardText, CardBlock,
CardTitle, CardSubtitle } from 'reactstrap';
import {connect} from 'react-redux';
const UserProfile = (props) => {
return (
<div className="col-lg-10">
<Jumbotron>
<h3 className="display-3">Welcome, {props.... |
client/src/app/components/forms/inputs/Clockpicker.js | zraees/sms-project | import React from 'react'
import 'script-loader!clockpicker/dist/bootstrap-clockpicker.min.js'
export default class Clockpicker extends React.Component {
componentDidMount() {
const element = $(this.refs.input);
const options = {
placement: 'top',
donetext: 'Done'
};
element.clockpicker(... |
src/components/common/Operations/OperationLog.js | ndxm/NDReactBoilerplate | import React from 'react';
import Styles from './OperationLogs.css';
import _ from 'underscore';
import DateUtils from '../../../utils/DateUtils';
import OptionsDomain from '../../../constants/OptionsDomain'
import OptionsStore from '../../../stores/OptionsStore'
var OperationLog = React.createClass({
propTypes: ... |
src/svg-icons/notification/sim-card-alert.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSimCardAlert = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"/>
</SvgIcon>
);
NotificationSimCard... |
frontend/src/index.js | tdv-casts/website | // @flow
import injectTapEventPlugin from 'react-tap-event-plugin';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom'
import App from './App';
import './index.css';
injectTapEventPlugin();
ReactDOM.render(
(
<BrowserRouter>
<App />
... |
src/index.js | worms618/React-Component-Generator | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
|
src/routes.js | aries-auto/ariesautomotive | import React from 'react';
import ga from 'react-ga';
import Router from 'react-routing/src/Router';
import App from './components/App';
import BecomeDealer from './components/BecomeDealer';
import Product from './components/Product';
import Category from './components/Category';
import CategoryTree from './components/... |
frontend/navigation/AppContainer.js | datoszs/czech-lawyers | import React from 'react';
import PropTypes from 'prop-types';
import Navigation from './Navigation';
import Sidebar from './Sidebar';
import Footer from './Footer';
import Redirect from './Redirect';
const AppContainer = ({children}) => (
<div>
<Navigation />
<div className="container">
... |
packages/components/src/Actions/ActionDropdown/Dropdown.stories.js | Talend/ui | import React from 'react';
import Immutable from 'immutable';
import { action } from '@storybook/addon-actions';
import ActionDropdown from './ActionDropdown.component';
import FilterBar from '../../FilterBar';
import Action from '../Action';
const myAction = {
id: 'context-dropdown-related-items',
label: 'related ... |
src/components/typography/H3/index.js | apedyashev/react-universal-jobs-aggregator | // libs
import React from 'react';
import {PropTypes} from 'prop-types';
import cn from 'classnames';
// other
import styles from './index.less';
export default function H3({children, className}) {
return (
<h3 className={cn(styles.root, className)}>
{children}
</h3>
);
}
H3.propTypes = {
children:... |
src/index.js | SaKKo/react-redux-todo-boilerplate | 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 './styles/styles.scss'; //Yep, that's right. You can import SASS/CSS files too! Webpack will run the associated loader and ... |
src/components/input/rich-text/index.js | KleeGroup/focus-components | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import RichTextEditor from 'react-rte';
// FIX ME cannot import RichTextEditor from 'react-rte/lib/RichTextEditor';
// Due to use of CSS modules
/**
* Rich text editor, for both edition and consult mode.
* See https://github.com/sstur/reac... |
client/android/app/src/pages/Email.js | blusclips/zonaster | import React, { Component } from 'react';
import {Image, StyleSheet} from 'react-native';
import { StackNavigator } from 'react-navigation';
import { Container, Content, Text, H1, H3, Button, Item, Input, Grid, Col} from 'native-base';
import general from '../styles/general';
import Icon from 'react-native-vector-icons... |
ReactNativeApp/react-native-starter-app/src/components/general/Placeholder.js | jjhyu/hackthe6ix2017 | /**
* Placeholder Scene
*
<Placeholder text={"Hello World"} />
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
// Consts and Libs
import { AppStyles } from '@theme/';
// ... |
blueocean-material-icons/src/js/components/svg-icons/image/add-to-photos.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageAddToPhotos = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
</SvgIcon>
);
ImageAddToPhotos.d... |
src/components/Badge/Badge.js | GetAmbassador/react-ions | import React from 'react'
import PropTypes from 'prop-types'
import style from './style.scss'
import classNames from 'classnames/bind'
import Icon from '../Icon'
const Badge = props => {
const cx = classNames.bind(style)
const iconPlusText = (props.icon && props.text) ? 'padded' : null
const iconSize = props.siz... |
frontend/containers/board.js | mgi166/usi-front | import React from 'react';
import { connect } from 'react-redux';
import board from '../components/board';
const mapStateToProps = (state) => {
return { board: state.shogi.board.board, open: state.promoteModal.open };
};
const Board = connect(
mapStateToProps
)(board);
export default Board;
|
src/pages/amissima.js | vitorbarbosa19/ziro-online | import React from 'react'
import BrandGallery from '../components/BrandGallery'
export default () => (
<BrandGallery brand='Amissima' />
)
|
src/Loader/Loader.driver.js | nirhart/wix-style-react | import React from 'react';
import ReactDOM from 'react-dom';
import Loader from '../Loader';
const loaderDriverFactory = ({element, wrapper}) => {
const isClassExists = (element, className) => !!element && element.className.indexOf(className) !== -1;
const text = element.childNodes[1];
return {
exists: () =... |
test/test_helper.js | RegOpz/RegOpzWebApp | 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... |
src/components/HLayout.js | dazhifu/react-touch-ui | import React from 'react';
import { View } from "./View.js"
import './Layout.scss'
import classnames from 'classnames';
export class HLayout extends View {
static propTypes = {
/*
* 如果一条轴线排不下,如何换行
* wrap 换行,第一行在上方
* nowrap 不换行
* wrap-reverse 换行,第一... |
cmd/manabu-server/ui/app/Components/Multiply.js | nii236/manabu | import React, { Component } from 'react';
import axios from 'axios';
export default class Operands extends Component {
constructor(props) {
super(props);
this.state = {
left: 0,
right: 0,
answer: 'Something'
};
this.handleChange = this.handleChange.bind(this);
this.handleSubmit... |
client/app/scripts/components/node-details/node-details-generic-table.js | kinvolk/scope | import React from 'react';
import sortBy from 'lodash/sortBy';
import { Map as makeMap } from 'immutable';
import { NODE_DETAILS_DATA_ROWS_DEFAULT_LIMIT } from '../../constants/limits';
import {
isNumeric,
getTableColumnsStyles,
genericTableEntryKey
} from '../../utils/node-details-utils';
import NodeDetailsTab... |
src/components/Store.js | dogsGhost/storefronts | import React from 'react';
const Store = (props) => {
let classes = 'store';
if (props.isOccupied) classes += ' isOccupied';
return (
<div
className={classes}
onClick={(e) => {
let tar = e.target;
if (tar.classList.length) {
tar.classList.toggle('active');
} e... |
src/App.js | muhammadghazali/mpok-doro-timer | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welco... |
src/modules/Talk/routes.js | prjctrft/mantenuto | import React from 'react';
import { Route } from 'react-router';
import ConnectTalkController from './TalkController';
export default (
<Route path='talk' component={ConnectTalkController} />
);
|
5.ParentChildCommunication/app.js | vishaljadav94/ReactBasic | import React from 'react';
import ReactDom from 'react-dom';
import Welcome from './src/welcome';
import Header from './src/header';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
headerTitle: "Welcome to React"
}
}
render() {... |
pages/example-css-modules/css-modules.js | conversataal/conversataal.github.io | import React from 'react'
import styles from './example.module.css'
import Helmet from 'react-helmet'
import { config } from 'config'
export default class PostCSS extends React.Component {
render () {
return (
<div className="container">
<Helmet
title={`${config.siteTitle} | Hi PostCSSy f... |
src/components/hello-world/index.js | christiannaths/webpack-react-boilerplate | import React from 'react';
import styles from './index.scss';
export default class HelloWorld extends React.Component {
constructor(props){
super(props)
}
render(){
return (
<div className='hello-world'>
<p>Hello world!</p>
</div>
);
}
}
|
src/Label.js | esbenp/react-native-clean-form | import React from 'react'
import { Text, View, Platform } from 'react-native'
import PropTypes from 'prop-types'
import styled from 'styled-components/native'
import defaultTheme from './Theme'
const LabelWrapper = styled.View`
flex: ${props => props.inlineLabel ? 0.5 : 1};
flex-direction: ${props => props.inlineL... |
src/App.js | brookslyrette/reactit | import React from 'react';
import logo from './logo.svg';
import './App.css';
import { BrowserRouter, Route, Link } from 'react-router-dom';
import FrontPageContainer from './containers/FrontPageContainer.js';
import SubredditPageContainer from './containers/SubredditPageContainer.js';
import DefaultRedditsContainer f... |
src/containers/flightgenerator/Entity.js | dataloom/gallery | import React from 'react';
import PropTypes from 'prop-types';
import Select from 'react-select';
import { Button } from 'react-bootstrap';
import InlineEditableControl from '../../components/controls/InlineEditableControl';
import styles from './styles.module.css';
const timeZonesMap = {
'UTC (Universal Coordinate... |
src/PageItem.js | aparticka/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import SafeAnchor from './SafeAnchor';
const PageItem = React.createClass({
propTypes: {
href: React.PropTypes.string,
target: React.PropTypes.string,
title: React.PropTypes.string,
disabled: React.PropTypes.bool,
previous: React.Pr... |
src/TPA/TextLink/TextLink.js | skyiea/wix-style-react | import React from 'react';
import {string} from 'prop-types';
import classNames from 'classnames';
import WixComponent from '../../BaseComponents/WixComponent';
import tpaStyleInjector from '../TpaStyleInjector';
import omit from 'omit';
let styles = {locals: {}};
try {
styles = require('!css-loader?modules&camelCas... |
src/parser/shared/modules/spells/bfa/essences/BloodOfTheEnemy.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS/index';
import SpellLink from 'common/SpellLink';
import { formatNumber } from 'common/format';
import HIT_TYPES from 'game/HIT_TYPES';
import STATISTIC_CATEGORY from 'interface/others/STATISTIC_CATEGORY';
import ItemStatistic from 'interface/statistics/Ite... |
docs/app/components/Logo/Logo.js | react-fabric/react-fabric | /* eslint-disable max-len */
import React from 'react'
import cssm from 'react-css-modules'
import paths from './paths.js'
import style from './Logo.scss'
const Logo = ({ fill, ...props }) => (
<svg {...props} styleName="logo" viewBox="0 0 256 233">
<g stroke="none" fill={fill} fillRule="evenodd">
<path ... |
frontend/src/Settings/DownloadClients/DownloadClients/EditDownloadClientModalContentConnector.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { saveDownloadClient, setDownloadClientFieldValue, setDownloadClientValue, testDownloadClient } from 'Store/Actions/settingsActions';
import createProvid... |
frontend/component/Signup.js | plusse7en/practice-node-project | import React from 'react';
import jQuery from 'jquery';
import {signup} from '../lib/client';
import {redirectURL} from '../lib/utils';
export default class Signup extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleChange(name, e) {
this.state[name] = e.target.val... |
fluxible-router/components/Nav.js | jeffreywescott/flux-examples | /**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
import React from 'react';
import {NavLink} from 'fluxible-router';
class Nav extends React.Component {
render() {
return (
<ul className="pure-menu pure-menu-op... |
packages/benchmarks/src/app/Benchmark/index.js | css-components/styled-components | /**
* The MIT License (MIT)
* Copyright (c) 2017 Paul Armstrong
* https://github.com/paularmstrong/react-component-benchmark
*/
/* global $Values */
/**
* @flow
*/
import * as Timing from './timing';
import React, { Component } from 'react';
import { getMean, getMedian, getStdDev } from './math';
import type { ... |
turismo_client/src/containers/userBoardContainer.js | leiverandres/turismo-risaralda | import React, { Component } from 'react';
import {
Grid,
Message,
Card,
Label,
Header,
Icon,
Dropdown
} from 'semantic-ui-react';
import requests from '../utils/requests';
import ListItemsWithPagination from '../components/listItemsWithPagination';
import EventInfoModal from '../components/eventInfoModal... |
src/app2.js | vlasn/mets | /**
* Created by clstrfvck on 19/04/2017.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, combineReducers } from 'redux'
import { Provider } from 'react-redux'
import { Router, Route, browserHistory } from 'react-router'
import { syncHistoryWithStore, routerReducer } from 'react-ro... |
node_modules/native-base/Components/Widgets/Icon.js | mk007sg/threeSeaShells | /* @flow */
'use strict';
import React from 'react';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import variables from '../Themes/light';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Entypo from 'react-native-vector-icons/En... |
src/routes/admin/index.js | ziedAb/PVMourakiboun | /**
* 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 Layout from '../../co... |
src/MenuItem.js | yuche/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import SafeAnchor from './SafeAnchor';
const MenuItem = React.createClass({
propTypes: {
header: React.PropTypes.bool,
divider: React.PropTypes.bool,
href: React.PropTypes.string,
title: React.PropTypes.string,
target: ... |
src/component/searchTab/SearchTab.js | BristolPound/cyclos-mobile-3-TownPound | import React from 'react'
import { View, Dimensions } from 'react-native'
import _ from 'lodash'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import BackgroundMap from './BackgroundMap'
import ComponentList from './ComponentList'
import BusinessListItem, { SelectedBusiness } from './... |
app/javascript/mastodon/features/ui/components/modal_root.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
import Base from 'mastodon/components/modal_root';
import BundleContainer from '../containers/bundle_container';
import BundleModalError from './bundle_modal_error';
import ModalLoading from './m... |
app/javascript/mastodon/components/animated_number.js | cobodo/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber } from 'react-intl';
import TransitionMotion from 'react-motion/lib/TransitionMotion';
import spring from 'react-motion/lib/spring';
import { reduceMotion } from 'mastodon/initial_state';
const obfuscatedCount = count => {
if (co... |
js/jqwidgets/demos/react/app/docking/keyboardnavigation/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDocking from '../../../jqwidgets-react/react_jqxdocking.js';
class App extends React.Component {
componentDidMount() {
this.refs.myDocking.showAllCollapseButtons();
this.refs.myDocking.focus();
}
render() {
retu... |
app/containers/AdminRelaisCommandes/components/ListeAcheteursItem.js | Proxiweb/react-boilerplate | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { ListItem } from 'material-ui/List';
import round from 'lodash/round';
import PastilleIcon from 'material-ui/svg-icons/image/brightness-1';
import DoneIcon from 'material-ui/svg-icons/action/done... |
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js | department-of-veterans-affairs/vets-website | // Node modules.
import React from 'react';
import PropTypes from 'prop-types';
// Relative imports.
import CernerCallToAction from '../../../components/CernerCallToAction';
import MoreInfoAboutBenefits from '../../../components/MoreInfoAboutBenefits';
import { appointmentsToolLink, getCernerURL } from 'platform/utilit... |
src/packages/@ncigdc/components/TabbedLinks.js | NCI-GDC/portal-ui | import React from 'react';
import { get } from 'lodash';
import LocationSubscriber from '@ncigdc/components/LocationSubscriber';
import Tabs from '@ncigdc/uikit/Tabs';
import Link from '@ncigdc/components/Links/Link';
type TTabbedLinksProps = {
defaultIndex?: number,
links: Array<Object>,
queryParam: string,
... |
app/javascript/mastodon/features/direct_timeline/components/conversation.js | TheInventrix/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import StatusContainer from '../../../containers/status_container';
export default class Conversation extends ImmutablePureComp... |
examples/todos/src/containers/AddTodo.js | bvasko/redux | 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(addTodo(input.v... |
_deprecated/src/components/About.js | paigekehoe/paigekehoe.github.io | import React from 'react';
import Interactive from 'react-interactive';
import { Switch, Route, Link } from 'react-router-dom';
import ExampleTwoDeepComponent from './ExampleTwoDeepComponent';
import PageNotFound from './PageNotFound';
import s from '../styles/exampleComponent.style';
const ExamplePageText = () => (
... |
03-mybooks/src/index.js | iproduct/course-node-express-react | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register()... |
client/admin/info/InformationPage.stories.js | iiet/iiet-chat | import { action } from '@storybook/addon-actions';
import { boolean, object } from '@storybook/addon-knobs/react';
import React from 'react';
import { dummyDate } from '../../../.storybook/helpers';
import { InformationPage } from './InformationPage';
export default {
title: 'admin/info/InformationPage',
component:... |
examples/official-storybook/stories/addon-toolbars.stories.js | storybooks/storybook | import React from 'react';
import { styled } from '@storybook/theming';
export default {
title: 'Addons/Toolbars',
parameters: {
layout: 'centered',
},
};
const getCaptionForLocale = (locale) => {
switch (locale) {
case 'es':
return 'Hola!';
case 'fr':
return 'Bonjour!';
case 'zh':... |
node_modules/react-icons/fa/jsfiddle.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const FaJsfiddle = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m34.9 17.6q2.2 0.9 3.5 2.8t1.4 4.3q0 3.2-2.3 5.5t-5.6 2.2q0 0-0.2 0t-0.2 0h-23.6q-3.3-0.2-5.6-2.4t-2.3-5.5q0-2.1 1.1-3.9t2.8-2.9q-0.2-0.7-0.2-1.6 0-2.2 1.6-3.8t3.8-1... |
frontend/src/components/select-editor/select-editor.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { gettext } from '../../utils/constants';
import Select from 'react-select';
import '../../css/select-editor.css';
const propTypes = {
isTextMode: PropTypes.bool.isRequired, // there will be two mode. first: text and select. second: just select
... |
app/javascript/mastodon/features/community_timeline/index.js | yukimochi/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
UI/Buttons/ButtonCheck.js | Datasilk/Dedicate | import React from 'react';
import { View, TouchableOpacity} from 'react-native';
import {Path} from 'react-native-svg';
import SvgIcon from 'ui/SvgIcon';
import AppStyles from 'dedicate/AppStyles';
export default class ButtonCheck extends React.Component {
constructor(props){
super(props);
}
rende... |
src/components/AlertContainer.js | ravasthi/yaras | import PropTypes from 'prop-types';
import React from 'react';
/**
* A container for one or more `Alert` components.
*
* @param {any} props
*/
function AlertContainer({ children, className }) {
const classNames = `alerts ${className}`;
return (
<ul className={classNames}>
{children}
</ul>
);
}... |
packages/material-ui-styles/src/withTheme/withTheme.js | lgollut/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { chainPropTypes, getDisplayName } from '@material-ui/utils';
import useTheme from '../useTheme';
export function withThemeCreator(options = {}) {
const { defaultTheme } = options;
con... |
src/components/comment-list.js | josebigio/PodCast | import React from 'react';
import Comment from './comment'
const CommentList = ({comments, isLoading})=>{
console.log('COMMENT LIST. IS LOADING',isLoading);
return(
<ul className="list-group comment-list">
{comments && comments.map((comment,i)=>{
return <Comment key={i} comm... |
src/components/SponsorsItem/SponsorsItem.js | ksevezich/DayOfBlueprint | import React from 'react'
import classes from './SponsorsItem.scss'
const determineSize = (size) => {
switch (size) {
case 3:
return {'maxWidth': '225px', 'maxHeight': '150px'}
case 2:
return {'maxWidth': '150px'}
case 1:
return {'maxWidth': '100px'}
default:
return {'maxWidth... |
src/student/components/postovi/popuni.js | zeljkoX/e-learning | import React from 'react';
import CardHeader from 'material-ui/lib/card/card-header';
import CardText from 'material-ui/lib/card/card-text';
import CardActions from 'material-ui/lib/card/card-actions';
import Card from 'material-ui/lib/card/card';
import Avatar from 'material-ui/lib/avatar';
import FlatButton from 'mat... |
src/components/Tabset/ButtonIcon.js | xander-salesforce/lcc-react-quickstart-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
// require("../../../node_modules/@salesforce-ux/design-system/assets/icons/standard-sprite/svg/symbols.svg");
require("../../../node_modules/@salesforce-ux/design-system/assets/icons/utility-sprite/svg/symbols.svg");
class ButtonIcon exten... |
pnpm-cached/.pnpm-store/1/registry.npmjs.org/react-bootstrap/0.31.0/es/PageHeader.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 ... |
demo01/src/App.js | lxlneo/reactdemo | import React, { Component } from 'react';
import './App.css';
import Header from './components/header';
import Body from './components/body';
class App extends Component {
render() {
return (
<div className="App">
<Header/>
<Body/>
</div>
);
}
}
export default App;
|
modules/gui/src/widget/confirm.js | openforis/sepal | import {Panel} from 'widget/panel/panel'
import {msg} from 'translate'
import PropTypes from 'prop-types'
import React from 'react'
import styles from './confirm.module.css'
export default class Confirm extends React.Component {
render() {
const {title, message, label, onConfirm, onCancel, children} = this... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.js | IamJoseph/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load({ id = 0, ...rest }) {
return [
{ id:... |
examples/js/selection/click-to-select-table.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
node_modules/@material-ui/core/esm/Button/Button.js | pcclarke/civ-techs | import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import { fade } from '../styles/colorManipu... |
src/views/AppContext.js | physiii/home-gateway | import React from 'react';
import PropTypes from 'prop-types';
import PureComponent from './components/PureComponent.js';
const Context = React.createContext(),
NavigationScreenContext = React.createContext(),
navigationScreenActions = new Map(),
navigationScreenBackActions = new Map();
class AppContext extends Re... |
src/app/components/Overlay/index.js | nhardy/web-scaffold | // @flow
import React, { Component } from 'react';
import cx from 'classnames';
import styles from './styles.styl';
type Props = {
className?: string,
};
const dismissEvents = ['click', 'touchstart'];
export default class Overlay extends Component<Props, void> {
static defaultProps = {
className: undefine... |
src/icons/Umbrella.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Umbrella extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<g>
<path d="M376.2,288c0,0.1,0,0.2,0,0.4C376.2,288.2,376.2,288.1,376.2,288L376.2,288z"></path>
<path d="M136.2,288c0,0.... |
src/Label.js | apisandipas/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
src/svg-icons/image/control-point-duplicate.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPointDuplicate = (props) => (
<SvgIcon {...props}>
<path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 ... |
src/components/Controls.js | tobice/flux-lumines | import React from 'react';
import PureComponent from './PureComponent.js';
export default class Controls extends PureComponent {
render() {
return (
<g className="lumines-controls">
<text x={-2} className="lumines-control-legend">Pause/Resume</text>
<text x={2} c... |
src1/layouts/CoreLayout.js | Cron-J/CSV-RE | import React from 'react';
import 'styles/core.scss';
import Navigation from 'containers/Navigation';
import Message from '../common/messageComponent/view/Message.react';
export default class CoreLayout extends React.Component {
static propTypes = {
children : React.PropTypes.element
}
constructor () {
... |
example/App.js | backgroundColor/ag-grid-addons | import React from 'react'
// import TopChangePage from '../lib/TopPageChange.js'
import AgTable from '../lib/AgTable.js'
// import ColDefs from '../lib/ColDefs.js'
export default class App extends React.Component {
render () {
const colDefs = [{
headerName: '序号', width: 40, cellRenderer: function (params) ... |
fields/components/DateInput.js | michaelerobertsjr/keystone | import moment from 'moment';
import DayPicker from 'react-day-picker';
import React from 'react';
import { findDOMNode } from 'react-dom';
import Popout from '../../admin/client/App/shared/Popout';
import { FormInput } from 'elemental';
let lastId = 0;
module.exports = React.createClass({
displayName: 'DateInput',
... |
client/Slides/FlappyDemoSlide.js | Dean177/jumpy-bird-react-demo | import '!style!css!less!../resources/styles/JumpyBird.less';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import FlappyBirdGame from '../FlappyBird/FlappyBirdGame';
import GameDetails from '../FlappyBird/GameDetails';
@connect(state => state)
class FlappyDemoSlide extends Component ... |
webapp/app/components/DashboardByUser/HeaderPage/Button/index.js | EIP-SAM/SAM-Solution-Server | //
// Button header page in dashboard by user page
//
import React from 'react';
import { ButtonToolbar } from 'react-bootstrap';
import LinkContainerButton from 'components/Button';
import RebootButtonModal from 'containers/DashboardByUser/HeaderPage/Button/ModalRebootUser';
import styles from './styles.css';
/* esl... |
src/client/components/error/error.js | adeperio/base | 'use strict';
import './error.less';
import React from 'react';
export default React.createClass({
propTypes: { },
render: function() {
var homeUrl = '/';
return (
<div className={'error'}>
<div className="error-box">
<h1>These arent the droids you are looking for</h1>
... |
src/Parser/Paladin/Holy/Modules/Talents/AuraOfMercy.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatNumber } from 'common/format';
import Wrapper from 'common/Wrapper';
import Analyzer from 'Parser/Core/Analyzer';
import AbilityTracker from 'Parser/Core/Mo... |
packages/react-instantsearch-dom/src/widgets/RatingMenu.js | algolia/react-instantsearch | import React from 'react';
import { connectRange } from 'react-instantsearch-core';
import PanelCallbackHandler from '../components/PanelCallbackHandler';
import RatingMenu from '../components/RatingMenu';
/**
* RatingMenu lets the user refine search results by clicking on stars.
*
* The stars are based on the sele... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.