path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/main/resources/static/bower_components/jqwidgets/demos/react/app/window/defaultfunctionality/app.js | dhawal9035/WebPLP | import React from 'react';
import ReactDOM from 'react-dom';
import JqxWindow from '../../../jqwidgets-react/react_jqxwindow.js';
import JqxTabs from '../../../jqwidgets-react/react_jqxtabs.js';
import JqxCheckBox from '../../../jqwidgets-react/react_jqxcheckbox.js';
import JqxButton from '../../../jqwidgets-react/rea... |
Veo/node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/actual.js | JGMorgan/Veo | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
dispatch/static/manager/src/js/components/PageEditor/tabs/BasicFieldsTab.js | ubyssey/dispatch | import React from 'react'
import { TextInput, TextAreaInput } from '../../inputs'
import * as Form from '../../Form'
export default function BasicFieldsTab(props) {
return (
<div className='c-article-sidebar__panel'>
<Form.Input
label='Slug'
error={props.errors.slug}>
<TextInput... |
src/Panel.js | escabc/members-search-app | import React from 'react'
import theme from './theme'
const styles = {
root: {
borderRadius: 2,
border: 'solid 1px #E7ECF1',
},
header: {
padding: '20px 40px',
borderBottom: 'solid 1px #E7ECF1',
},
title: {
fontSize: 18,
color: theme.colors.grey.darker,
},
}
const Panel = ({ title... |
src/components/common/Block.js | jaggerwang/zqc-app-demo | /**
* 在球场
* zaiqiuchang.com
*/
import React from 'react'
import {StyleSheet, View, TouchableOpacity} from 'react-native'
import {COLOR} from '../../config'
export default ({children, containerStyle, onPress}) => {
if (onPress) {
return (
<TouchableOpacity
onPress={onPress}
style={[styl... |
docs/src/app/components/pages/components/Dialog/ExampleSimple.js | w01fgang/material-ui | import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
/**
* Dialog with action buttons. The actions are passed in as an array of React objects,
* in this example [FlatButtons](/#/components/flat-button... |
src/blog/test-article-one.js | nsipplswezey/react-static-boilerplate | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React from 'react';
export default class {
render() {
return (
<div>
<h1>Test Article 1</h1>
<p>Coming soon.</p>
</div>
)... |
src/client.js | stevoland/bill-test | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import Location from 'react-router/lib/Location';
import queryString from 'query-string';
import cre... |
examples/huge-apps/components/GlobalNav.js | chf2/react-router | import React from 'react'
import { Link } from 'react-router'
const dark = 'hsl(200, 20%, 20%)'
const light = '#fff'
const styles = {}
styles.wrapper = {
padding: '10px 20px',
overflow: 'hidden',
background: dark,
color: light
}
styles.link = {
padding: 11,
color: light,
fontWeight: 200
}
styles.activ... |
demo/src/PaletteTable.js | kiloe/ui | import React from 'react';
import View from '../../package/View';
import UI from '../../package/index';
UI.registerCSS({
'.palette-table': {
},
'.palette-table .color-group': {
margin: '15px',
},
'.palette-table .color-header': {
marginBottom: '5px',
},
'.palette-table .color-header .name': {
... |
packages/benchmarks/src/implementations/react-native-web/Tweet/TweetText.js | css-components/styled-components | import AppText from './AppText';
import React from 'react';
import TweetTextPart from './TweetTextPart';
import { array, number, string } from 'prop-types';
class TweetText extends React.Component {
static displayName = 'TweetText';
static propTypes = {
displayMode: TweetTextPart.propTypes.displayMode,
la... |
node_modules/react-navigation/lib-rn/navigators/createNavigator.js | gunaangs/Feedonymous | import React from 'react';
var babelPluginFlowReactPropTypes_proptype_NavigationRouteConfigMap = require('../TypeDefinition').babelPluginFlowReactPropTypes_proptype_NavigationRouteConfigMap || require('prop-types').any;
var babelPluginFlowReactPropTypes_proptype_NavigationNavigatorProps = require('../TypeDefinition')... |
src/svg-icons/notification/sms.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSms = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/>
</SvgIcon>
);
NotificationSm... |
src/components/Counter.js | rpowelll/universal-react-boilerplate | /* @flow */
import React from 'react'
export type Props = {
count: number,
onIncrement?: () => void,
onDecrement?: () => void,
onReset?: () => void
}
const Counter = ({ count, onIncrement, onDecrement, onReset }: Props) => (
<div>
<p className='count'>Counter: {count}</p>
{onIncrement && <button onC... |
es6/auto-complete/AutoComplete.js | yurizhang/ishow | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
analysis/demonhuntervengeance/src/CHANGELOG.js | yajinni/WoWAnalyzer | import React from 'react';
import { Yajinni, Zeboot, LeoZhekov, TurianSniper, Geeii, Makhai } from 'CONTRIBUTORS';
import { change, date } from 'common/changelog';
import { SpellLink } from 'interface';
import SPELLS from 'common/SPELLS';
export default [
change(date(2021, 1, 20), <> Added <SpellLink id={SPELLS.ELY... |
app/app.js | emiprandi/toggl | import React from 'react';
import ReactDOM from 'react-dom';
import Api from './services/api';
import DB from './services/db';
const api = new Api();
const db = new DB();
import Login from './components/Login';
import Loading from './components/Loading';
import Entries from './components/Entries';
import Timer from '... |
src/components/About.js | akhatri/portfolio-website | import React, { Component } from 'react';
import skills from '../data/skills';
class About extends Component {
constructor() {
super();
console.log(skills);
this.state = {
skills: skills,
animateTile: false
}
}
clickHandler = () => {
this.setState({
animateTile: !this... |
front/events/components/listPage.js | RalphSleigh/bookings | import React from 'react'
import {connect} from 'react-redux'
import {Link, NavLink} from 'react-router-dom'
import {push} from 'react-router-redux'
import ReactMarkdown from 'react-markdown'
import Moment from 'moment'
import {getEvents} from '../actions.js'
import {
showEditLink,
showCreateLink,
showBook... |
docs/src/app/components/pages/components/Toggle/ExampleSimple.js | rhaedes/material-ui | import React from 'react';
import Toggle from 'material-ui/Toggle';
const styles = {
block: {
maxWidth: 250,
},
toggle: {
marginBottom: 16,
},
};
const ToggleExampleSimple = () => (
<div style={styles.block}>
<Toggle
label="Simple"
style={styles.toggle}
/>
<Toggle
label... |
app/components/nav/Nav.js | phillydorn/CAProject2 |
import React from 'react';
import { Link } from 'react-router';
class Nav extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<nav>
<div className="site-header">
<h1>Bracket Draft</h1>
</div>
<ul>
<li... |
app/components/Login/Login.js | jasonf7/gordon-restaurant | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import TextField from 'material-ui/TextField';
import Paper from 'material-ui/Paper';
import RaisedButton from 'material-ui/RaisedButton';
import GroupAdd from 'material-ui/svg-icons/social/group-add';
import ArrowForward from 'mat... |
src/components/common/svg-icons/places/business-center.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesBusinessCenter = (props) => (
<SvgIcon {...props}>
<path d="M10 16v-1H3.01L3 19c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2v-4h-7v1h-4zm10-9h-4.01V5l-2-2h-4l-2 2v2H4c-1.1 0-2 .9-2 2v3c0 1.11.89 2 2 2h6v-2h4v2h6c1... |
src/svg-icons/action/swap-horiz.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSwapHoriz = (props) => (
<SvgIcon {...props}>
<path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"/>
</SvgIcon>
);
ActionSwapHoriz = pure(ActionSwapHoriz);
ActionSwapHoriz.d... |
src/routes/index.js | aredmon/new-plotting-dashboard | import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to file... |
frontend/js/components/ecosystems/MethodologyPrompt.js | ttavenner/okcandidate-platform | 'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Card from './../atoms/Card';
class MethodologyPrompt extends Component {
render() {
return (
<Card
title="Methodology"
actions={
<button
... |
src/Parser/DeathKnight/Shared/Items/ColdHeart.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
//import getDamageBonus from 'Parser/DeathKnight/Shared/getDamageBonus';
import ItemDamageDone from 'Main/ItemDamageDone... |
examples/DropdownBasic.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Button from '../src/Button';
import Dropdown from '../src/Dropdown';
import NavItem from '../src/NavItem';
export default
<Dropdown trigger={
<Button>Drop me!</Button>
}>
<NavItem>one</NavItem>
<NavItem>two</NavItem>
<NavItem divider />
<NavItem>three</NavItem>
</Dropdow... |
src/main.js | annxingyuan/chatscan | /**
* App entry point
*/
// Polyfill
import 'babel-polyfill';
// Libraries
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
// Routes
import Routes from './common/components/Routes';
// Base styling
import './common/base.css';
// ID of the DOM e... |
fields/types/date/DateField.js | matthieugayon/keystone | import DateInput from '../../components/DateInput';
import Field from '../Field';
import moment from 'moment';
import React from 'react';
import { Button, InputGroup, FormInput } from 'elemental';
/*
TODO: Implement yearRange Prop, or deprecate for max / min values (better)
*/
const DEFAULT_INPUT_FORMAT = 'YYYY-MM-DD... |
techCurriculum/ui/solutions/6.1/src/index.js | jennybkim/engineeringessentials | /**
* Copyright 2017 Goldman Sachs.
* 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 applicable law or agreed to in writ... |
src/svg-icons/image/assistant-photo.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAssistantPhoto = (props) => (
<SvgIcon {...props}>
<path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/>
</SvgIcon>
);
ImageAssistantPhoto = pure(ImageAssistantPhoto);
ImageAssistantPhoto.displayName = 'Image... |
src/lib/components/datePicker/DatePicker.js | lighter-cd/ezui_react_one | /**
* @module DatePicker Component
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import DatePickerItem from './DatePickerItem.js';
import PureRender from './pureRender.js';
import { convertDate, nextDate } from './time.js';
/**
* Class DatePicker Component Class
* @extends Compo... |
client/page/search-replace/actions/replace.js | johngodley/search-regex | /**
* External dependencies
*/
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import classnames from 'classnames';
import { useSelector, useDispatch } from 'react-redux';
/**
* Internal dependencies
*/
import { isLocked, hasTags, getDefaultPresetValues } from 'state/preset/selector';
i... |
src/index.js | mesmerismo/react-boilerplate | import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import Root from './components/Root'
const rootEl = document.getElementById('root')
render(
<Root />,
rootEl
)
// If hot loader is enabled, enable it on the whole root component
if (module.hot) {
module.... |
src/templates/post.js | kvchen/kvchen.github.io | // @flow
import Layout from '../components/layout';
import type { PostQuery } from '../codegen/graphql/PostQuery';
import React from 'react';
import { graphql } from 'gatsby';
type Props = {
data: PostQuery,
};
export default function Post({ data }: Props) {
const markdownRemark = data?.markdownRemark;
const f... |
src/give/ThankYou.js | NewSpring/Apollos | import React from 'react';
import Header from '@ui/Header';
import BackgroundView from '@ui/BackgroundView';
export default function Dashboard() {
return (
<BackgroundView>
<Header titleText="Give Dashboard" />
</BackgroundView>
);
}
|
src/components/Login/Signup.js | Angular-Toast/habitat | import React, { Component } from 'react';
import{ StyleSheet, View, Image, Text, TouchableOpacity, AsyncStorage } from 'react-native';
import SignupForm from './SignupForm';
import { onSignIn } from '../auth.js';
import axios from 'axios';
export default class Signup extends Component {
constructor(props) {
sup... |
src/views/icons/flags/Flags.js | mrholek/CoreUI-React | import React from 'react'
import { CCard, CCardBody, CCardHeader, CRow } from '@coreui/react'
import { getIconsView } from '../brands/Brands.js'
import { flagSet } from '@coreui/icons'
import { DocsCallout } from 'src/components'
const CoreUIIcons = () => {
return (
<>
<DocsCallout
name="CoreUI Fla... |
src/components/App.js | billdevcode/spaceship-emporium | import React from 'react'
import { browserHistory, Router } from 'react-router'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
import sampleData from 'sampleData/spaceships.json'
import { initialData } from '../modules/spaceshipsDataReducer'
class App extends React.Component {
static propT... |
app/imports/ui/client/components/UserStories/index.js | valcol/ScrumNinja | import React, { Component } from 'react';
import { Session } from 'meteor/session';
import { createContainer } from 'meteor/react-meteor-data';
import { Collections } from '../../../../api/common/collections.js';
import {Meteor} from 'meteor/meteor';
import UserStoriesList from './UserStoriesList.js';
import Feedback... |
packages/material-ui/src/Toolbar/Toolbar.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
export const styles = theme => ({
root: {
...theme.mixins.toolbar,
position: 'relative',
display: 'flex',
alignItems: 'center',
},
gutters: theme.mixi... |
components/modal/src/story.js | fi11/uikit | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { TeleportContext } from '@uikit/teleport';
import Overlay from '@uikit/overlay';
import Modal from './index';
import StateProvider from '@uikit/state-provider';
const CustomModal = ({ ch... |
app/components/profile/profilePage/Profile.js | JoeKarlsson1/post-stream | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { fetchUserPosts } from '../../../actions/profile/profileActions';
import { getUserProfile } from '../../../actions/user/userActions';
import PostList from './postList/PostList';
import ProfileDetails from './P... |
src/tab/tab-aside.js | ricsv/react-leonardo-ui | import React from 'react';
const TabAside = (props) => <div className="lui-tab__aside">{props.children}</div>;
export default TabAside;
|
js/components/footer/index.js | ChiragHindocha/stay_fit |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Text, Left, Body, Right, List, ListItem } from 'native-base';
import { Actions } from 'react-native-router-flux';
... |
src/components/views/dialogs/ShareDialog.js | aperezdc/matrix-react-sdk | /*
Copyright 2018 New Vector 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 applicable law or agreed to in writing, software
... |
src/config/routes.js | derappelt/React.js-Template | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute} from 'react-router';
import Main from '../components/main.jsx';
import Hello from '../components/hello.jsx';
import World from '../components/world.jsx';
const NotFound = (
<h1>404.. This page is not found!</h1>
);
var... |
src/svg-icons/social/group.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroup = (props) => (
<SvgIcon {...props}>
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.3... |
src/CarouselItem.js | rapilabs/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import TransitionEvents from './utils/TransitionEvents';
const CarouselItem = React.createClass({
propTypes: {
direction: React.PropTypes.oneOf(['prev', 'next']),
onAnimateOutEnd: React.PropTypes.func,
active: React.PropTypes.bool,
anima... |
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... |
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"... |
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... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.