path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
examples/counter/containers/App.js | konce/redux-devtools | import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import thunk from 'redux-... |
components/scenes/intro.js | dbow/89-steps | import React from 'react';
class Intro extends React.Component {
render() {
return (
<div>
<h2>Intro</h2>
<p>Welcome to the site!</p>
</div>
);
}
}
export default Intro;
|
docs/src/app/components/pages/components/DatePicker/ExampleControlled.js | hai-cea/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
/**
* `DatePicker` can be implemented as a controlled input,
* where `value` is handled by state in the parent component.
*/
export default class DatePickerExampleControlled extends React.Component {
constructor(props) {
super(props)... |
console-ui/src/pages/AuthorityControl/UserManagement/UserManagement.js | alibaba/nacos | /*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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/LICENSE-2.0
*
* Unless required by applica... |
src/interface/report/Results/Timeline/Cooldowns.js | fyruna/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import Abilities from 'parser/core/modules/Abilities';
import './Cooldowns.scss';
import Lane from './Lane';
class Cooldowns extends React.PureComponent {
static propTypes = {
start: PropTypes.number.isRequired,
end: PropTypes.number.isRequired... |
packages/icons/src/md/action/CreditCard.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdCreditCard(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40 8c2.21 0 4 1.79 4 4v24c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4l.02-24c0-2.21 1.77-4 3.98-4h32zm0 28V24H8v12h32zm0-20v-4H8v4h32z" />
</IconB... |
src/mui/detail/Edit.spec.js | RestUI/rest-ui | import React from 'react';
import assert from 'assert';
import { shallow } from 'enzyme';
import { Edit } from './Edit';
import TextInput from '../input/TextInput';
import SimpleForm from '../form/SimpleForm';
describe('<Edit />', () => {
const defaultProps = {
data: {},
crudGetOne: () => {},
... |
Java/Uni-Ruse/Web Components - Spring Boot & React (Master's Degree)/forum_frontend/src/components/Home.js | dvt32/cpp-journey | import React from 'react'
import Login from './Users/Login'
const Home = function (props) {
return (
<div>
<Login {...props} />
</div>
)
}
export default Home
|
pages/error/index.js | rauchs-jewelry/rauchs-jewelry-website | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
examples/forms-bootstrap/src/components/forms/EmptyView.js | lore/lore-forms | import React from 'react';
import createReactClass from 'create-react-class';
export default createReactClass({
displayName: 'EmptyView',
render: function() {
return (
<div>
<h3>Please select a tweet</h3>
</div>
);
}
});
|
imports/ui/layouts/App.js | lizihan021/SAA-Website | import React from 'react';
import PropTypes from 'prop-types';
import { Grid } from 'react-bootstrap';
import AppNavigation from '../components/AppNavigation';
import Footer from '../components/Footer';
const realChildren = children => ((children.props.route.name == "index" ||
children.props.route.name == "h... |
src/i18n.js | netliferesearch/ndla-frontend | /**
* Copyright (c) 2016-present, NDLA.
*
* This source code is licensed under the GPLv3 license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import nb from './phrases/phrases-nb';
import en from './phrases/phrases-en'... |
modules/Redirect.js | brownbathrobe/react-router | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL path a client should b... |
web/src/components/Root.js | undemaduc/undemaduc | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import routes from '../routes';
import { Router } from 'react-router';
export default class Root extends Component {
render() {
const { store, history } = this.props;
return (
<Provider store={... |
cheesecakes/plugins/settings-manager/admin/src/components/HeaderNav/index.js | strapi/strapi-examples | /**
*
* HeaderNav
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';
import { join, map, take } from 'lodash';
import EditForm from 'components/EditForm';
import List from 'components/List';
import { darken } from '../../utils/colors';
import styles from './... |
tosort/2016/jspm/lib_react_004_x.js | Offirmo/web-tech-experiments | import React from 'react';
import ReactDOM from 'react-dom';
// https://facebook.github.io/react/docs/reusable-components.html
class CoolComponent extends React.Component {
constructor (props) {
console.info('~~ constructor', arguments)
// TODO define initial state ?
super(props) // <-- really needed ?
}
//... |
src/components/Collection/Entries/EntriesSearch.js | Aloomaio/netlify-cms | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { selectSearchedEntries } from 'Reducers';
import {
searchEntries as actionSearchEntries,
clearSearch as actionClearSearch
} from 'Actions/search';... |
step6-serviceapi/app/js/App.js | jintoppy/react-training | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, hashHistory } from 'react-router';
import routes from './config/routes';
ReactDOM.render(
<Router history={hashHistory}>
{ routes }
</Router>,
document.getElementById('app')
);
|
src/svg-icons/maps/local-printshop.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
web/test/portal/components/FormCheckbox.js | trendmicro/serverless-survey-forms | import '../../helpers/env';
import DomMock from '../../helpers/dom-mock';
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-dom/test-utils';
import Checkbox from '../../../portal/src/components/Form/Checkbox';
import Question from '../../../portal/src/components/Form/Question';
DomMo... |
app/javascript/flavours/glitch/features/ui/components/column_link.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Icon from 'flavours/glitch/components/icon';
const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badg... |
client/components/basic/burger/BurgerBadge.js | Sing-Li/Rocket.Chat | import { Badge } from '@rocket.chat/fuselage';
import React from 'react';
function BurgerBadge({ children }) {
return <Badge
position='absolute'
insetInlineEnd='neg-x8'
insetBlockStart='neg-x4'
zIndex='3'
variant='danger'
children={children}
/>;
}
export default BurgerBadge;
|
scripts/TaskList.js | n1k0/atelier-djangocong-2015 | import React from 'react';
import Task from './Task';
export default class TaskList extends React.Component {
render() {
return (
<ul className="list-group">{
this.props.tasks.map((task, key) => {
return <Task key={key} flux={this.props.flux} task={task} />;
})
}</ul>
);... |
src/frontend/components/navbar/Search.js | ErdMutter92/Project-Atlantis | import React from 'react';
var Search = React.createClass({
render: function () {
return (
<Input type="text" placeholder="Search"/>
);
}
});
export default Search;
|
src/components/pages/Account/ResetConfirm.js | ESTEBANMURUZABAL/bananaStore | /**
* Imports
*/
import React from 'react';
import connectToStores from 'fluxible-addons-react/connectToStores';
import {FormattedMessage} from 'react-intl';
// Flux
import IntlStore from '../../../stores/Application/IntlStore';
import ResetStore from '../../../stores/Account/ResetStore';
import resetConfirm from '... |
client/components/PokemonList.js | bionikspoon/playing-with-redux---react-redux-pokedex | import React from 'react';
import PokemonItem from 'components/PokemonItem';
export default class PokemonList extends React.Component {
static propTypes = {
pokemon: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
caughtPokemon: React.PropTypes.array.isRequired,
actions: React.PropTypes.objec... |
src/svg-icons/editor/attach-money.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorAttachMoney = (props) => (
<SvgIcon {...props}>
<path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.... |
src/routes/not-found/index.js | ACPK/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 Layout from '../../co... |
src/components/Layout/Layout.js | tomzaoral/tomzaoral.github.io | import React, { Component } from 'react';
import { Router, Route, Link } from 'react-router';
import Header from '../Header/Header';
import About from '../About/About';
import Footer from '../Footer/Footer';
export default class Layout extends Component {
constructor(props) {
super(props)
}
render() {
... |
src/app/app.js | alexboev/hnpwa | //import 'typeface-roboto'
import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter as Router, Route, Switch, Link, Redirect } from 'react-router-dom'
import { ListPageType } from 'consts'
import NavBar from 'components/navbar'
import ListPage from 'components/list_page'
import ItemPage from 'c... |
_theme/template/Content/CodePreview.js | ElemeFE/react-amap | import React from 'react';
import { Icon, Modal, Tooltip } from 'antd';
const noop = () => {};
const copySupport = document.queryCommandSupported('copy');
if (copySupport) {
document.addEventListener('copy', function(e) {
if (window.__react_amap_code) {
const cd = e.clipboardData;
cd.setData('text/pl... |
app/components/Lobby/Lobby.js | Tetraib/player.rauks.org | import React from 'react'
import { Link } from 'react-router'
import { List, ListItem } from 'material-ui/List'
import { Tabs, Tab } from 'material-ui/Tabs'
const Lobby = (props) => {
return (
<div>
<Tabs
value='a' >
<Tab
value='a'
label='Actives' >
<List>
<L... |
src/Plupload.js | lemonCMS/react-plupload | import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import BrowseButton from './BrowseButton';
import UploadButton from './UploadButton';
let count = 0;
const EVENTS = [
'PostInit', 'Browse', 'Refresh', 'StateChanged', 'QueueChanged', 'OptionChanged',
'BeforeUpload', 'Up... |
src/store_enhancers/devTools.js | vasanthk/redux-friendlist-demo | import React from 'react';
import { createStore as initialCreateStore, compose } from 'redux';
export let createStore = initialCreateStore;
if (__DEV__) {
createStore = compose(
require('redux-devtools').devTools(),
require('redux-devtools').persistState(
window.location.href.match(/[?&]debug_session=... |
docs/src/components/sidebar.js | tapjs/node-tap | import React from 'react';
import styled from 'styled-components';
import DocLinks from './DocLinks';
import {theme} from '../theme';
const Container = styled.div`
background-color: ${theme.colors.lightGrey};
flex: 0 0 250px;
overflow-y: scroll;
height: calc(100vh - 68px);
top: 68px;
position: sticky;
pa... |
src/components/Menu/ControlledMenu.js | propertybase/react-lds | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import omit from 'lodash-es/omit';
import { getUniqueHash } from '../../utils';
import MenuItem from './MenuItem';
const propTypes = {
/**
* The button that triggers the dropdown menu
*/
button: PropTyp... |
app/components/genericComponents/Form/index.js | romainquellec/cuistot | /**
*
* Form
*
*/
import React from 'react';
function Form(props) {
return <form {...props} />;
}
Form.propTypes = {};
export default Form;
|
src/components/appHeader.js | owstat/owstat | import React from 'react'
import { ipcRenderer } from 'electron'
import { FadeIn, Zoom } from 'animate-components'
import AppWindowControls from './appWindowControls'
const HeaderName = {
Overwatch: {
text_enUS: 'Overwatch',
text_kr: '초과 시청'
},
Stat: {
text_enUS: 'Stat',
text_kr: '합계'
}
}
fun... |
app/containers/HomePage/injectHomePage.js | carney520/lg-react-boilerplate | /**
* 页面装饰器
* 我们页面展示组件只负责展示逻辑,这样有利于业务逻辑共享和维护
* @flow
*/
import React from 'react'
import { connect } from 'react-redux'
import {
increment,
decrement,
} from './actions'
import {
selectCount,
} from './selectors'
/**
* 注入容器
* @param {ReactComponent} Component 装饰的组件
* @param {Object} opti... |
docs/client.js | kwnccc/react-bootstrap | import 'bootstrap/less/bootstrap.less';
import './assets/docs.css';
import './assets/style.css';
import './assets/carousel.png';
import './assets/logo.png';
import './assets/favicon.ico';
import './assets/thumbnail.png';
import './assets/thumbnaildiv.png';
import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemir... |
examples/real-world/src/root/Root.dev.js | ioof-holdings/redux-dynamic-reducer | import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import routes from './routes'
import DevTools from './containers/DevTools'
import { Router } from 'react-router'
const Root = ({ store, history }) => (
<Provider store={store}>
<div>
<Router history={history... |
components/animals/kajmanekTrpaslici.adult.js | marxsk/zobro | import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../images/animals/kajmanekTrpaslici/... |
pollard/components/SearchInput.js | spncrlkt/pollard | import React, { Component } from 'react';
export default class SearchInput extends Component {
render() {
const {
type,
value,
onKeyPress,
onChange,
} = this.props;
const id = type + 'SearchInput';
return (
<div className="col-xs-12 col-sm-3">
<input
... |
src/index.js | soltran/sample-redux | // Set up your application entry point here...
/* eslint-disable import/default */
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStor... |
modules/dreamview/frontend/src/components/Dreamview.js | xiaoxq/apollo | import React from 'react';
import { inject, observer } from 'mobx-react';
import SplitPane from 'react-split-pane';
import Header from 'components/Header';
import MainView from 'components/Layouts/MainView';
import ToolView from 'components/Layouts/ToolView';
import MonitorPanel from 'components/Layouts/MonitorPanel';... |
client/components/operations/sync-button.js | ZeHiro/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { translate as $t, formatDate } from '../../helpers';
import { actions, get } from '../../store';
const Export = connect(
(state, props) => {
let access = get.accessById(state, props.account.access... |
packages/material/src/components/Button.js | wq/wq.app | import React from 'react';
import MuiButton from '@material-ui/core/Button';
import { useIcon } from '@wq/react';
import PropTypes from 'prop-types';
export default function Button({ icon, ...rest }) {
const Icon = useIcon(icon),
startIcon = Icon ? <Icon /> : null;
return <MuiButton startIcon={startIco... |
server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info 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, o... |
packages/icons/src/md/image/Looks3.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdLooks3(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M38 6c2.21 0 4 1.79 4 4v28c0 2.21-1.79 4-4 4H10c-2.21 0-4-1.79-4-4V10c0-2.21 1.79-4 4-4h28zm-8 15v-3c0-2.21-1.79-4-4-4h-8v4h8v4h-4v4h4v4h-8v4h8c2.21 0... |
src/DatePicker/DateDisplay.spec.js | verdan/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import getMuiTheme from '../styles/getMuiTheme';
import {dateTimeFormat} from './dateUtils';
import DateDisplay from './DateDisplay';
describe('<DateDisplay />', () => {
const muiTheme = getMuiTheme();
c... |
geonode/monitoring/frontend/src/components/cels/errors/index.js | mcldev/geonode | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import HoverPaper from '../../atoms/hover-paper';
import actions from '../../organisms/error-list/actions';
import styles from './styles';
const mapStateToProps = (state) => ({
errorList: state.errorList.response,
... |
modules/core/client/components/Map/MapStyleButton.js | Trustroots/trustroots | // External dependencies
import classnames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
// Internal dependencies
import MapIcon from './MapIcon';
export default function MapStyleButton({
disabled,
iconStyle = '',
label,
onClick,
selectedStyle,
styleName,
}) {
return ... |
app/components/LineChart.js | 7kfpun/AudienceNetworkReactNative | import React from 'react';
import {
Dimensions,
} from 'react-native';
import moment from 'moment-timezone';
import { StockLine } from 'react-native-pathjs-charts';
moment.tz.setDefault('America/Los_Angeles');
const window = Dimensions.get('window');
const LineChart = (props) => {
const length = props.data.len... |
src/routes/Character/components/CharacterTitle/CharacterTitle.js | warcraftlfg/warcrafthub-client | import React from 'react'
import classNames from 'classnames'
import './CharacterTitle.scss'
import horde from './assets/horde.png'
import alliance from './assets/alliance.png'
import { Media } from 'react-bootstrap'
export const CharacterTitle = (props) => (
<div className='character-title'>
<div className='con... |
step03/App/src/components/Questions/index.js | grokbot/intro-to-react-native | import React, { Component } from 'react';
import { Text, View, ScrollView, TouchableHighlight } from 'react-native';
import { Theme } from '../../theme';
import Results from '../Results';
export default class Questions extends Component {
renderChoices(choices, step) {
let newStep = step + 1;
let Component = Ques... |
packages/react-server-website/pages/docs.js | redfin/react-server | import React from 'react';
import {join} from "path";
import {RootContainer} from "react-server";
import Repo from "../lib/repo";
import DocTitle from "../components/page-title";
import DocBody from "../components/doc-body";
import DocContents from "../components/doc-contents";
import DataBundleCacheManager from '../m... |
examples/src/components/CustomComponents.js | mcls/react-select | import React from 'react';
import Select from 'react-select';
import Gravatar from 'react-gravatar';
const USERS = require('../data/users');
const GRAVATAR_SIZE = 15;
const GravatarOption = React.createClass({
propTypes: {
children: React.PropTypes.node,
className: React.PropTypes.string,
isDisabled: React.Pro... |
app/components/ReOrder/DeliveryLocation.js | theterra/newsb | import React from 'react';
import './ReSearch.css';
let searchBox;
export default class DeliveryLocation extends React.Component { //eslint-disable-line
constructor(props) {
super(props);
this.geolocate = this.geolocate.bind(this);
this.initAutocomplete = this.initAutocomplete.bind(this);
... |
src/components/app.js | Szalbik/reacttodos | import React, { Component } from 'react';
import AddTodoForm from './add_todo_form';
import TodoList from './todo_list';
export default class App extends Component {
render() {
return (
<div>
<AddTodoForm />
<TodoList />
</div>
);
}
}
|
src/components/Home/app.js | pritchardtw/ReactPersonalSite | import React, { Component } from 'react';
import HomeSection from './homesection';
import AboutSection from './aboutsection';
import ProjectsSection from './projectssection';
import ContactSection from './contactsection';
import Break from './break';
export default class App extends Component {
componentDidMount ()... |
src/svg-icons/communication/stay-primary-landscape.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationStayPrimaryLandscape = (props) => (
<SvgIcon {...props}>
<path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/>
</SvgIcon>
);
Communicat... |
src/components/nav/nav.js | darcyclarke/react-insta-feed | import React from 'react'
import styles from './nav.styles'
import r from 'r-dom'
class Nav extends React.Component {
constructor (props) {
super(props)
}
render () {
return (
r.nav({ className: 'nav' }, [])
)
}
}
export default Nav
|
react-components/src/library/components/shared/modal-dialog.js | concord-consortium/rigse | import React from 'react'
import Modal from './modal'
import css from './modal-dialog.scss'
export default class ModalDialog extends React.Component {
render () {
const { title, children } = this.props
return (
<Modal>
<div className={css.dialog}>
<div className={css.title}>{title}... |
app/javascript/mastodon/features/lists/index.js | 5thfloor/ichiji-social | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../compo... |
ajax/libs/react-instantsearch/4.1.1/Dom.js | tholu/cdnjs | /*! ReactInstantSearch 4.1.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.... |
examples/LinkingExample/__tests__/index.android.js | half-shell/react-navigation | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
Public/patternlab/node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | docmak/TYPO3Styleguide-Landingpage | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
src/Parser/Hunter/BeastMastery/Modules/Talents/AMurderOfCrows.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Combatants from 'Parser/Core/Modules/Combatants';
import Analyzer from 'Parser/Core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellUsable from 'Parser/Core/Modules/SpellUsable';
import SPECS from 'common/SPECS';
import StatisticBox from 'Main/StatisticBox';
import SpellIco... |
examples/js/column-filter/number-filter-with-default-value.js | dana2208/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,
... |
src/components/ui/ListItem.js | OlivierVillequey/hackathon | /**
* List Items
*
<ListItem title={'Hello World'} />
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ListItem } from 'react-native-elements';
// Consts and Libs
import { AppColors, A... |
lib/index.js | dylanavery720/shoot-the-breeze | import React from 'react';
import Application from './components/Application';
import firebase from './firebase';
require('./reset.scss');
require('./style.scss');
|
src/components/Post/Comments/Comments.js | Amine-H/Amine-H.github.io | // @flow strict
import React from 'react';
import ReactDisqusComments from 'react-disqus-comments';
import { useSiteMetadata } from '../../../hooks';
type Props = {
postTitle: string,
postSlug: string
};
const Comments = ({ postTitle, postSlug }: Props) => {
const { url, disqusShortname } = useSiteMetadata();
... |
src/renderServer.js | stoffern/koa-universal-relay-router | import React from 'react'
import Relay from 'react-relay'
import Helmet from 'react-helmet'
import {match} from 'react-router'
import ReactDOMServer from 'react-dom/server'
import IsomorphicRouter from 'isomorphic-relay-router'
export default (options) => {
// Validate options
if (!options.routes) throw ... |
local-cli/templates/HelloNavigation/views/chat/ChatScreen.js | dikaiosune/react-native | import React, { Component } from 'react';
import {
ActivityIndicator,
Button,
FlatList,
StyleSheet,
Text,
TextInput,
View,
} from 'react-native';
import KeyboardSpacer from '../../components/KeyboardSpacer';
import Backend from '../../lib/Backend';
export default class ChatScreen extends Component {
s... |
src/containers/NotFound/NotFound.js | TackleboxBeta/betabox-seed | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
app/components/ListItem/index.js | ScoutingIJsselgroep/Jotihunt | import React from 'react';
import Item from './Item';
import Wrapper from './Wrapper';
function ListItem(props) {
return (
<Wrapper>
<Item>
{props.item}
</Item>
</Wrapper>
);
}
ListItem.propTypes = {
item: React.PropTypes.any,
};
export default ListItem;
|
src/svg-icons/device/signal-wifi-3-bar.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.0... |
example/CustomView.js | ianlin/react-native-gifted-messenger | import PropTypes from 'prop-types';
import React from 'react';
import {
Linking,
Platform,
StyleSheet,
TouchableOpacity,
ViewPropTypes,
} from 'react-native';
import MapView from 'react-native-maps';
export default class CustomView extends React.Component {
render() {
if (this.props.currentMessage.loca... |
examples/js/sort/disable-sort-indicator-table.js | pvoznyuk/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,
... |
test/integration/css-fixtures/bad-custom-configuration-arr-6/pages/_app.js | zeit/next.js | import React from 'react'
import App from 'next/app'
import '../styles/global.css'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
src/components/Post/Post.js | wpioneer/gatsby-starter-lumen | // @flow strict
import React from 'react';
import { Link } from 'gatsby';
import Author from './Author';
import Comments from './Comments';
import Content from './Content';
import Meta from './Meta';
import Tags from './Tags';
import styles from './Post.module.scss';
import type { Node } from '../../types';
type Props... |
internals/templates/appContainer.js | PeterKow/clientAurity | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*/
import React from 'react';
function App(props) {
return (
<div>
{ props.children }
</div>
);
}
export default App;
|
examples/async/containers/Root.js | Lucifier129/redux | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from '../store/configureStore';
import AsyncApp from './AsyncApp';
const store = configureStore();
export default class Root extends Component {
render() {
return (
<Provider store={store}>
{() ... |
blueocean-material-icons/src/js/components/svg-icons/action/find-in-page.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionFindInPage = (props) => (
<SvgIcon {...props}>
<path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83... |
stories/babylonjs/Textures/fresnelparameters.stories.js | brianzinn/react-babylonJS | import React from 'react'
import { Engine, Scene, Skybox } from '../../../dist/react-babylonjs'
import { Vector3, Color3 } from '@babylonjs/core/Maths/math'
import '../../style.css'
import { FresnelParameters } from '@babylonjs/core'
export default { title: 'Textures' };
/**
* Insipration Playground: https://www.bab... |
src/components/Header.js | markgreenburg/acquisitiontracker | // @flow
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { changeTab } from '../actions/index';
/**
* React component that displays the page header and navigation
*/
class Header extends Component {
constructor(props) {
super(props);
... |
src/ModalBody.js | glenjamin/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { elementType } from 'prop-types-extra';
import { createBootstrapComponent } from './ThemeProvider';
class ModalBody extends React.Component {
static propTypes = {
bsPrefix: PropTypes.string,
as: eleme... |
src/components/HeaderToolbar/index.js | afoninsky/cerebral-bolierplate | import React from 'react'
// import {Decorator as Cerebral} from 'cerebral-react';
import Toolbar from 'material-ui/lib/toolbar/toolbar'
import ToolbarSeparator from 'material-ui/lib/toolbar/toolbar-separator'
import ToolbarGroup from 'material-ui/lib/toolbar/toolbar-group'
import SphereSelectControl from '../SphereS... |
src/components/chips/ChipContact.js | isogon/material-components | import React from 'react'
import PropTypes from 'prop-types'
import { ChipContactImg, ChipContactSpan } from './Chip.style'
export default function ChipContact({ text, src, ...props }) {
return src ? (
<ChipContactImg src={src} {...props} />
) : (
<ChipContactSpan {...props}>{text}</ChipContactSpan>
)
}... |
app/client.js | jonathannen/canary-react | // (C) Copyright Jon Williams 2015 - See LICENSE file
//
// Client bootstraps the JavaScript that is delivered to the browser via
// app.js. It's the representation of the React router and components
// for the client side.
import React from 'react'
import { render } from 'react-dom'
import { Router, browserHistory } ... |
monitor/health.js | buckie/juno | import React from 'react';
import d3 from 'd3';
const width = 500;
const height = 40;
function clusterStatus(data) {
const cluster = data.juno.cluster;
return {
quorum: cluster.quorum_size.val,
avail: cluster.available_size.val,
size: cluster.size.val,
term: data.juno.consensus.term.val,
};
}
e... |
priv/phoenix_reactor.js | jacek-adamek/phoenix_reactor | import React from 'react'
import ReactDOM from 'react-dom'
const instantiateComponent = (container) => {
const componentName = container.getAttribute('data-react-component')
const reactClass = window.reactComponents && window.reactComponents[componentName]
if (reactClass != null) {
const propsJson = containe... |
examples/IconSizes.js | react-materialize/react-materialize | import React from 'react';
import Section from '../src/Section';
import Icon from '../src/Icon';
import Row from '../src/Row';
import Col from '../src/Col';
export default
<Section>
<Row className='center'>
<Col s={3}>
<Icon tiny>insert_chart</Icon>
<p>tiny</p>
</Col>
<Col s={3}>
<Icon ... |
lib/DevTools.js | knopjesmuseum/resilient-network-simulator | import React from 'react';
// Exported from redux-devtools
import { createDevTools } from 'redux-devtools';
// Monitors are separate packages, and you can make a custom one
import LogMonitor from 'redux-devtools-log-monitor';
import SliderMonitor from 'redux-devtools-slider-monitor';
import DockMonitor from 'redux-de... |
src/components/picker/picker_group.js | n7best/react-weui | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from '../../utils/classnames';
class PickerGroup extends Component {
static propTypes = {
height: PropTypes.number,
itemHeight: PropTypes.number,
indicatorTop: PropTypes.number,
indicator... |
tests/components/Header/Header.spec.js | johanzhou8/ConvertCSV | import React from 'react';
import { Header } from 'components/Header/Header';
import { IndexLink, Link } from 'react-router';
import { shallow } from 'enzyme';
describe('(Component) Header', () => {
let _wrapper;
beforeEach(() => {
_wrapper = shallow(<Header />);
});
it('Renders a welcome mes... |
Realization/frontend/czechidm-core/src/content/audit/event/EntityEvents.js | bcvsolutions/CzechIdMng | import React from 'react';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
//
import * as Basic from '../../../components/basic';
import { EntityEventManager, DataManager, SecurityManager } from '../../../redux';
import SearchParameters from '../../../domain/SearchParameters';
import EntityEve... |
app/javascript/mastodon/features/account/components/header.js | dunn/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
import ImmutablePureComponent from 'react-immutable-pure-component';
impo... |
src/views/dictionary/nound/NoundPanel.js | bostontrader/senmaker | // @flow
import React from 'react'
import NoundTable from './NoundTable'
import NoundAEForm from './addedit/NoundAEForm'
import NoundActions from '../../../data/dictionary/nound/NoundActions'
/*
The NoundPanel is responsible for displaying everything about our list of nound. Such
the table of Nound, and the add o... |
src/pages/expenses.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import ExpensesWithData from '../apps/expenses/components/ExpensesWithData';
import ExpensesStatsWithData from '../apps/expenses/components/ExpensesStatsWithData';
import Header from '../components/Header';
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.