path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
docs/src/app/components/pages/components/DropDownMenu/ExampleSimple.js | ArcanisCz/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const styles = {
customWidth: {
width: 200,
},
};
export default class DropDownMenuSimpleExample extends React.Component {
constructor(props) {
super(props);
this.state = {va... |
src/img/GrommetHero.js | grommet/grommet-docs | import React from 'react';
export default () => (
<svg className='logo grommet-hero' version="1.1" width="848" height="172"
viewBox="0 0 848 172">
<g fill="none">
<path className='logo' stroke="#865CD6" strokeWidth="11" d="M185,79 C185,52.490332 206.490332,31 233,31 C259.509668,31 281,52.490332 281,79 ... |
src/routes.js | mikeyhogarth/nasteroids | import React from 'react';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import App from './components/app/app.component';
import Asteroids from './components/asteroids/asteroids.component';
import Asteroid from './components/asteroid/asteroid.component';
import About from './components/about/... |
react/react-hn2/src/index.js | weaponhe/weaponhe.github.io | import React from 'react'
import ReactDOM from 'react-dom'
import {
BrowserRouter as Router
} from 'react-router-dom'
import App from './App'
ReactDOM.render((
<Router>
<App/>
</Router>
), document.getElementById('root')) |
src/components/previewTest/PreviewTest-View.js | nikolay-is/jsappproject | import React from 'react';
class PreviewQuestion extends React.Component {
render() {
if (!this.props.isLoggedIn) this.context.router.push('/');
const correctIdx = Number(this.props.correctAnswer && this.props.correctAnswer.slice(-1) - 1);
const givenIdx = Number(this.props.givenAnswer && this.props.giv... |
src/components/WordCloudChart.js | uooo/webpack-echarts-starter-kit | import React from 'react';
import echarts from 'echarts/echarts';
import 'echarts/chart/wordCloud';
function createRandomItemStyle() {
return {
normal: {
color: 'rgb(' + [
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160)
].join(... |
src/routes.js | Cheapass/cheapass | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... |
client/modules/App/components/Footer/Footer.js | SwanCourses/example-app | import React from 'react';
import { FormattedMessage } from 'react-intl';
// Import Style
import styles from './Footer.css';
// Import Images
import bg from '../../header-bk.png';
export function Footer() {
return (
<div style={{ background: `#FFF url(${bg}) center` }} className={styles.footer}>
<p>©... |
node_modules/react-bootstrap/es/MediaBody.js | Technaesthetic/ua-tools | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/framework/common/router/create-routes.js | foobarhq/reworkjs | // @flow
import React from 'react';
import { Route } from 'react-router-dom';
import { getDefault } from '../../../shared/util/ModuleUtil';
import logger from '../../../shared/logger';
// eslint-disable-next-line import/no-unresolved
import routeModules from 'val-loader!./_find-routes';
// TODO: expose @withQueryPara... |
src/icons/StrokeIdea.js | ipfs/webui | import React from 'react'
const StrokeIdea = props => (
<svg viewBox='0 0 100 100' {...props}>
<path d='M69.9 32.2A23 23 0 0 0 57.44 18a23.62 23.62 0 0 0-19.69 0 23 23 0 0 0-12.48 14.22 20.63 20.63 0 0 0 2.4 17.23l.45.71c1.24 1.94 2.52 3.94 3.73 5.94a21.3 21.3 0 0 1 3.32 10c.11 1.77.1 3.59.08 5.45a8.43 8.43 0 0 ... |
src/frontend/components/Dashboard.js | al3x/ground-control | import React from 'react';
import Relay from 'react-relay';
import {Styles} from 'material-ui';
import TopNav from './TopNav';
import {BernieTheme} from './styles/bernie-theme';
import {BernieColors} from './styles/bernie-css';
@Styles.ThemeDecorator(Styles.ThemeManager.getMuiTheme(BernieTheme))
class Dashboard extend... |
client/components/Projectlist.js | greenfox-academy/lufthansa_project | 'use strict';
import React from 'react';
import {Link} from 'react-router';
var ProjectList = React.createClass({
renderName: 'ProjectList',
render: function(response) {
var createRows = function (project) {
return (<tr key={project.lastBuild.buildId}>
<td className="projectName"><Link to={"... |
app/components/ToggleOption/index.js | belongapp/belong | /**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{intl.formatMessage(message)}
</option>
);
ToggleOption.propTypes = {
value: React.PropTypes.string.isRequired,
message: Rea... |
src/PaginationButton.js | nickuraltsev/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import createSelectedEvent from './utils/createSelectedEvent';
import CustomPropTypes from './utils/CustomPropTypes';
const PaginationButton = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
... |
src/templates/not-found-template.js | wpioneer/gatsby-starter-lumen | // @flow strict
import React from 'react';
import Sidebar from '../components/Sidebar';
import Layout from '../components/Layout';
import Page from '../components/Page';
import { useSiteMetadata } from '../hooks';
const NotFoundTemplate = () => {
const { title, subtitle } = useSiteMetadata();
return (
<Layout... |
Libraries/Components/WebView/WebView.ios.js | esauter5/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
sub-packs/themes/zealder-default-theme/src/components/BurgerMenu.js | Zealder/zealder-cms | // @flow
import React from 'react';
// we really want to use "elastic" but it didn't work in IE11
// we could allow caller to pass Menu format as prop in future
import { slide as Menu } from 'react-burger-menu';
export default class BurgerMenu extends React.Component {
render() {
return (
<div className="... |
src/entypo/AlignLeft.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--AlignLeft';
let EntypoAlignLeft = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M6,10l3,3v-2h8V9H9V7L6,10z M4,2C3.447,2,3,2.047,3,2.6V17.4C3,17.951,3.447,18,4,18c0.552,0,1-0.0... |
src/components/header.js | psatyajeet/personal-site | import { Link } from 'gatsby'
import PropTypes from 'prop-types'
import React from 'react'
const Header = ({ siteTitle }) => (
<div
style={{
background: `rebeccapurple`,
marginBottom: `1.45rem`,
}}
>
<div
style={{
margin: `0 auto`,
maxWidth: 960,
padding: `1.45... |
app/components/InputComponent.js | tjinauyeung/customization-requests-app | import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
class InputComponent extends React.Component {
shouldComponentUpdate() {
return false;
}
handleKeyPress(event) {
this.props.minimizeForm();
let inputValue = ReactDOM.findDOMNode(this.refs.input).value.toLowerCase();... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js | Clearcover/web-build | /**
* 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(users) {
return [
{ id: 1, name: '1' ... |
src/parser/druid/restoration/modules/talents/Photosynthesis.js | sMteX/WoWAnalyzer | import React from 'react';
import StatisticBox from 'interface/others/StatisticBox';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import Combatants from 'parser/shared/modules/Combatants';... |
services/client/public/js/auth/register.js | cpg1111/demo-maestro-app | 'use strict';
import React from 'react'
export class Register extends React.Components {
constructor(props){
super(props);
this.state = {};
}
render(){
return (
<div>
<form>
<input type="text" name="name" placeholder="name"/>
... |
examples/full-example/src/isomorphic/variations/bucket_D/components/dropdown.js | yahoo/mendel | /* Copyright 2015, Yahoo Inc.
Copyrights licensed under the MIT License.
See the accompanying LICENSE file for terms. */
import React from 'react';
class Dropdown extends React.Component {
render() {
return (
<ul className="dropdown bucket_D">
<li>Option D one</li>
... |
client/src/components/formHelpers/Form.js | HKuz/FreeCodeCamp | import React from 'react';
import PropTypes from 'prop-types';
import { reduxForm } from 'redux-form';
import { FormFields, BlockSaveButton, BlockSaveWrapper } from './';
const propTypes = {
buttonText: PropTypes.string,
enableSubmit: PropTypes.bool,
errors: PropTypes.object,
fields: PropTypes.objectOf(
P... |
app/components/DownloadedGames/UserGameList.js | cdiezmoran/playgrounds-desktop | // @flow
import React, { Component } from 'react';
import type { UserGame } from '../../utils/globalTypes';
import UserGameListItem from './UserGameListItem';
class UserGameList extends Component {
props: {
games: UserGame[]
}
render() {
const { games } = this.props;
const items = games.map((game)... |
src/components/Product/ProductList.js | lawenliu/ReactDemo | import React from 'react'
import { Link } from 'react-router'
import classes from 'styles/Product.less'
const ProductList = React.createClass({
propTypes: {
products: React.PropTypes.object.isRequired
},
getInitialState () {
return { page: 0 }
},
render () {
const productListMarkup = this.props... |
modules/Navigation.js | wmyers/react-router | import React from 'react';
var { object } = React.PropTypes;
/**
* A mixin for components that modify the URL.
*
* Example:
*
* import { Navigation } from 'react-router';
*
* var MyLink = React.createClass({
* mixins: [ Navigation ],
* handleClick(event) {
* event.preventDefault();
* ... |
components/travelers-svg.js | WanderlandTravelers/wanderlandtravelers.github.io | import React from 'react'
export default class TravelersSVG extends React.Component {
render () {
return (
<svg id="travelers" viewBox="0 0 154.63471 38.800361">
<path
d="m 27.791579,5.3452446 c -1.666669,0 -3.28125,0.039062 -4.84375,0.1171874 -1.5625,0.078125 -3.027344,0.2213542 -4.3945... |
react-flux-mui/js/material-ui/src/svg-icons/av/replay-10.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay10 = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.1 11H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.... |
docs-ui/components/confirmDelete.stories.js | mvaled/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
import {action} from '@storybook/addon-actions';
import ConfirmDelete from 'app/components/confirmDelete';
import Button from 'app/components/button';
storiesOf('UI|Confirm', module).add(
'ConfirmD... |
src/website/app/demos/Flex/common/DemoFlex.js | mineral-ui/mineral-ui | /* @flow */
import styled from '@emotion/styled';
import React from 'react';
import _Flex from '../../../../../library/Flex';
import type { StyledComponent } from '@emotion/styled-base/src/utils';
type Props = {
gutterWidth?: number | string,
theme: Object
};
export const containerStyles = ({ theme }: Props) => (... |
client/modules/App/__tests__/Components/Footer.spec.js | leranf/hotwireCarRentalSearch | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import { Footer } from '../../components/Footer/Footer';
test('renders the footer properly', t => {
const wrapper = shallow(
<Footer />
);
t.is(wrapper.find('p').length, 2);
t.is(wrapper.find('p').first().text(), '© 2016 ... |
app/components/ListItem/index.js | c-dagostino/react-boilerplate-example | 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;
|
frontend/app/js/components/login/index.js | serverboards/serverboards | import React from 'react';
import ResetPassword from './reset_password'
import SetPassword from './set_password'
import rpc from 'app/rpc'
import 'sass/login.sass'
import {i18n} from 'app/utils/i18n'
import {merge} from 'app/utils'
import PropTypes from 'prop-types'
import Flash from 'app/flash'
const white_logo=requi... |
app/javascript/components/table/TableActions.js | Vizzuality/forest-atlas-landscape-cms | import React from 'react';
import PropTypes from 'prop-types';
const TableActions = ({ data, action, onClickAction }) => {
if (action === 'toggle' && 'enable' in data && 'enabled' in data && data.enable.value !== null) {
return (
<td key={action}>
<span className="row-content">
<button
... |
app/components/CustomInput.js | dancon/react-usage | import React from 'react';
// React refs
class CustomInput extends React.Component{
constructor(props){
super(props);
this.focus = this.focus.bind(this);
}
focus(){
this.textInput.focus();
}
render(){
return (
<div>
<input type="text" ref={(input) => {
... |
app/components/TriggerHttpForm/item.js | fission/fission-ui | /**
*
* TriggerHttpItemForm
*
*/
import React from 'react';
import ReactTooltip from 'react-tooltip';
import { FormattedMessage } from 'react-intl';
import commonMessages from 'messages';
// import styled from 'styled-components';
class Item extends React.Component { // eslint-disable-line react/prefer-stateless-fun... |
src/svg-icons/image/filter-9-plus.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter9Plus = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1... |
app/components/Vesting/CancelPowerDownPrompt.js | soosgit/vessel | // @flow
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Message, Modal, Segment } from 'semantic-ui-react';
import { Form } from 'formsy-semantic-ui-react'
import * as KeysActions from '../../actions/keys';
class CancelPowerDownPro... |
src/app.js | peteruithoven/cssmodules-react-jspm-experiment | import React from 'react';
import Button from './components/button.js';
import './global.css!';
export default class App extends React.Component {
render () {
return (
<div>
<h2>JSPM, React and CSS modules experiment</h2>
<Button />
<Button mode='disabled'/>
... |
app/containers/LanguageProvider/index.js | KyleAWang/react-boilerplate | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
blueprints/dumb/files/__root__/components/__name__/__name__.js | availabs/kauffman-atlas | import React from 'react'
type Props = {
};
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
export default <%= pascalEntityName %>
|
src/components/menu.js | b33rTiger/bookshop | "use strict";
import React from 'react';
import {Nav, NavItem, Navbar, Badge} from 'react-bootstrap';
class Menu extends React.Component{
render(){
return (
<Navbar inverse fixedTop>
<Navbar.Header>
<Navbar.Brand>
<a href="/">React-Bootstrap</a>
</Navbar.Brand>
... |
docs/app/Examples/modules/Dropdown/Usage/DropdownExampleMultipleCustomLabel.js | koenvg/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const options = [
{ key: 1, text: 'One', value: 1 },
{ key: 2, text: 'Two', value: 2 },
{ key: 3, text: 'Three', value: 3 },
]
const renderLabel = (label, index, props) => ({
color: 'blue',
content: `Customized label - ${label.text}`,
... |
src/DataViewer/index.js | Aprillion/data_viewer | import React from 'react'
import Table from './Table'
import {useTable} from './dataService'
const DataViewer = ({data, standardize, deleteOnServer}) => {
const tableProps = useTable(data, standardize, deleteOnServer)
return (
<div className="DataViewer">
<Table {...tableProps} />
</div>
)
}
expo... |
demos/forms-demo/src/components/PrettyPrint/index.js | bdjnk/cerebral | import React from 'react'
import {connect} from 'cerebral/react'
import {state, props} from 'cerebral/tags'
import {isValidForm, getInvalidFormFields, formToJSON} from 'cerebral-forms'
import {css} from 'aphrodite'
import syntaxHighlight from '../../helpers/syntaxHighlight'
import styles from './styles'
export default... |
src/components/Checkbox/Checkbox.js | joshblack/carbon-components-react | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import { settings } from 'carbon-componen... |
app/app.js | brietsparks/curr__ui-rbp-apollo-cvb | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { applyRouterMiddleware, Router, brows... |
src/containers/Message.js | bmarshall511/twitscreen | // Import node dependencies
import React, { Component } from 'react';
class Message extends Component {
render() {
const { messages } = this.props;
return (
<div className="modal">
<h2>Something {"isn't"} right. Twitterverse {"isn't"} responding!</h2>
<p><b>{"Don't"} panic!</b> {"It's"... |
src/chat/ui/room/MessageImage.js | elarasu/roverz-chat | import React from 'react';
import {
StyleSheet,
View,
TouchableOpacity,
Image,
ActivityIndicator,
Keyboard,
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import { CachedImage } from 'react-native-img-cache';
import { Icon } from 'react-native-elements';
import AudioPlay from './... |
pkg/interface/chat/src/js/components/lib/channel-item.js | ngzax/urbit | import React, { Component } from 'react';
export class ChannelItem extends Component {
constructor(props) {
super(props);
}
onClick() {
const { props } = this;
props.history.push('/~chat/room' + props.box);
}
render() {
const { props, state } = this;
let unreadElem = !!props.unread ? ... |
stories/progress.stories.js | isogon/styled-mdl | import React from 'react'
import { storiesOf } from '@storybook/react'
import wrapStory from './decorators/wrapStory'
import Progress from '../src/components/progress/demos/Progress.js'
import ProgressIndeterminate from '../src/components/progress/demos/ProgressIndeterminate.js'
storiesOf('Progress', module)
.addDe... |
src/InputBase.js | xuorig/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import FormGroup from './FormGroup';
import Glyphicon from './Glyphicon';
class InputBase extends React.Component {
getInputDOMNode() {
return React.findDOMNode(this.refs.input);
}
getValue() {
if (this.props.type === 'static') {
retu... |
frontend/src/Artist/History/ArtistHistoryRow.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import HistoryDetailsConnector from 'Activity/History/Details/HistoryDetailsConnector';
import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell';
import TrackQuality from 'Album/TrackQuality';
import Icon from 'Components/Icon... |
demo/snippets/demo1/00_shell.js | simonswiss/react-music | import React, { Component } from 'react';
/* ################################## */
/* ##### react-music components ##### */
/* ################################## */
import { Analyser, Song, Sequencer, Sampler, Synth } from '../src';
import Visualization from './visualization';
import './index.css';
export default ... |
example/index.js | TAPP-TV/react-cropperjs | import React from 'react';
import ReactDOM from 'react-dom';
import CropperJS from '../dist/react-cropper';
class Demo extends React.Component {
constructor() {
super();
this.state = {
defaultSrc: 'http://i.imgur.com/n483ZwJ.jpg',
src: 'http://i.imgur.com/n483ZwJ.jpg', // tapptv imag... |
src/icons/MinusRound.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class MinusRound extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M417.4,224H94.6C77.7,224,64,238.3,64,256c0,17.7,13.7,32,30.6,32h322.8c16.9,0,30.6-14.3,30.6-32
C448,238.3,434.3,224,4... |
client/routes/Items/components/ItemInForm.js | patzj/ims | import React from 'react';
import { connect } from 'react-redux';
import { itemIn } from '../../../actions/items-action';
let ItemInForm = ({currentItem, itemIn, handleInt}) => {
return (
<form className="form-horizontal" method="post" action="#" onSubmit={e => itemIn(currentItem.code, e)}>
<di... |
src/js/components/VoteButtons.js | liveplant/liveplant.io | import React from 'react';
import VoteActions from '../actions/VoteActions';
export default class VoteButtons extends React.Component {
vote(action) {
VoteActions.incrementVote(action);
}
render() {
var buttons = this.props.votes.map((option, key) => {
return (
<button type="button"
... |
src/index.js | pixel-glyph/better-reads | import React from 'react';
import { render } from 'react-dom';
import {
BrowserRouter as Router,
Route
} from 'react-router-dom';
import App from './components/App';
import registerServiceWorker from './registerServiceWorker';
import './styles/css/style.css';
const Root = () => {
return (
<Router>
<d... |
src/app/components/content-blocks/ProjectsGrid/Item.js | honzachalupa/portfolio2017 | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import logger from './../../../modules/logger';
import getClassList from './../../../modules/class-list';
export default class Item extends Component {
render() {
const { id, name, description, previewImage, company } = this... |
analysis/rogue/src/FinisherTracker.js | yajinni/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import { t } from '@lingui/macro';
import Events from 'parser/core/Events';
import Combo... |
src/components/common/SimpleEditor/Schema/Blocks/CommentNode.js | anztrax/simple-image-server-frontend | import React from 'react';
export default class CommentNode extends React.Component{
static get nodeType(){
return 'comment';
}
constructor(props){
super(props);
}
render(){
const { data } = this.props.node;
const comment = data.get('comment');
return (
<span style={{ borderBottom... |
nlyyAPP/component/药物管理/仓库/分配方案/MLZgjhqdfpQD.js | a497500306/nlyy_APP | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Navigator,
TextInput,
ActivityIndicator,
Alert,
ListView,
} from 'react-native';
var... |
app/javascript/mastodon/features/ui/components/report_modal.js | imas/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports';
import { expandAccountTimeline } from '../../../actions/timelines';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-pro... |
src/scripts/Loader.js | Ribeiro/yoda | 'use strict';
import React from 'react';
import Join from 'react/lib/joinClasses';
export default React.createClass({
getDefaultProps() {
return {
size: 32,
stroke: 6,
direction: 'col',
message: 'Loading...'
};
},
renderSpinner(props) {
let spinClass = Join('spinner-containe... |
analysis/paladinprotection/src/modules/features/WordOfGloryTiming.js | yajinni/WoWAnalyzer | import React from 'react';
import SelfHealTimingGraph from 'parser/shared/modules/features/SelfHealTimingGraph';
import SPELLS from 'common/SPELLS';
class WordOfGloryTiming extends SelfHealTimingGraph {
constructor(...args) {
super(...args);
this.selfHealSpell = SPELLS.WORD_OF_GLORY;
this.tabTitle = "S... |
src/index.js | jperocho/webpack-react-boilerplate | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
const css = require('./app.scss');
// Components
import MainNav from './components/main-nav';
import Routes from './routes';
class App extends Component {
render() {
return (
<Bro... |
client/extensions/woocommerce/components/list/list-item/index.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import classNames from 'classnames';
const ListItem = ( { children, className } ) => {
return <li className={ classNames( 'list-item', className ) }>{ children }</li>;
};
export default ListItem;
|
src/components/examples/Clock.js | heartziq/Allimnee | import React, { Component } from 'react';
class Clock extends Component {
constructor(props) {
super(props);
this.state = { date: new Date() };
this.color = [
"#ff5733",
"#900C3F",
"#33ceff",
" #f333ff ",
"#34b636",
" #e24faf ",
" #e24fa4 ",
" #32a065 ",
... |
node_modules/@material-ui/core/es/TablePagination/TablePaginationActions.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
import KeyboardArrowRight from '... |
react-advanced-boilerplate/app/components/twitter/Trend.js | rwachtler/react-twitstats | import React from 'react';
import {shouldPureComponentUpdate} from 'react-pure-render';
import {connect} from 'react-redux';
import cookie from 'react-cookie';
class Trend extends React.Component {
shouldComponentUpdate = shouldPureComponentUpdate;
constructor(props) {
super(props);
}
componen... |
src/components/Footer/bottom-footer.js | chanceeakin/portfolio-material | import React from 'react';
const BottomFooter = () => (
<div className="md-cell--12 footer-bottom">
<p className="md-text-center">Copyright © Chance Eakin 2016</p>
</div>
);
export default BottomFooter;
|
client/src/react/weather/ForecastDay.js | charlesj/Apollo | import React from 'react'
import moment from 'moment'
import PropTypes from 'prop-types'
import DarkSkyIconMap from './DarkSkyIconMapping'
import PrecipDisplay from './PrecipDisplay'
import WeatherIcon from './WeatherIcon'
function ForecastDay(props) {
var date = moment.unix(props.f.time)
return (
<div classNa... |
016/src/components/app.js | StephenGrider/RallyCodingWeekly | import React, { Component } from 'react';
import GoogleMap from './google_map';
export default class App extends Component {
constructor(props) {
super(props);
this.state = { lat: -34.397, lng: 150.644 };
}
render() {
return (
<div style={{height: '100%'}}>
Map me!
<button onC... |
src/svg-icons/action/pan-tool.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPanTool = (props) => (
<SvgIcon {...props}>
<path d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4... |
src/components/stack-selector/StackSelector.js | yuri/notality | import React from 'react';
import NewStackModal from './NewStackModal';
import StackButton from './StackButton';
import Button from '../ui/Button';
function getStackValue(stacks, id, value) {
return stacks.getIn(['byId', id]).toJS()[value];
}
const StackSelector = ({ stacks, handlers}) => (
<div
className="co... |
client/src/components/Leagues/LeagueItem.js | BenDiuguid/fantasy-fifa | import React from 'react';
import Link from '../styles/Link';
import { compose, withHandlers } from 'recompose';
import { graphql } from 'react-apollo';
import styled from 'styled-components';
import { loader } from 'graphql.macro';
import LeagueJoinButton from './LeagueJoinButton';
import UserQuery from '../UserQuery'... |
src/components/dev/DevHud.js | codeforboston/cliff-effects | import React, { Component } from 'react';
import {
Menu,
Checkbox,
Button,
Dropdown,
} from 'semantic-ui-react';
// PROJECT COMPONENTS
import { HeadingWithDetail } from '../details';
// Dev components
import { CustomClient } from '../CustomClient';
// DATA
import { getLocalizationData } from '../../localizati... |
src/svg-icons/action/flip-to-front.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFlipToFront = (props) => (
<SvgIcon {...props}>
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c... |
docs/src/pages/demos/buttons/RaisedButtons.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
const styles = theme => ({
button: {
margin: theme.spacing.unit,
},
input: {
display: 'none',
},
});
function RaisedButtons(props) {
const { classe... |
js/jqwidgets/demos/react/app/treegrid/datagrouping/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTreeGrid from '../../../jqwidgets-react/react_jqxtreegrid.js';
class App extends React.Component {
componentDidMount() {
setTimeout(() => {
this.refs.myTreeGrid.expandRow(0);
})
}
render () {
// prep... |
app/components/home.js | yaolei/Samoyed | import React from 'react';
import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import {grey600} from 'material-ui/styles/colors';
import RaisedButton from 'material-ui/RaisedButton';
import getMuiTheme from 'material-ui/styles/ge... |
modules/RouteContext.js | samidarko/react-router | import React from 'react'
const { object } = React.PropTypes
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent transitions.
*/
const RouteContext = {
prop... |
src/views/uploadview.react.js | Cron-J/CSV-REE | import React from 'react';
import Fileuploader from './fileuploader.react';
class UploadView extends React.Component {
constructor(props) {
super(props);
}
componentWillReceiveProps(nextProps) {
this.props = nextProps;
}
onupload = (file) => {
if (this.props.onDataSubmit) {
this.props.onD... |
src/routes/Mixer/components/Mixer.js | rkram5424/BentoBeats | import React from 'react'
export const HomeView = () => (
<div>
<h4>Mixer!</h4>
</div>
)
export default HomeView
|
src/app/containers/ButtonBar.js | lmcjt37/kulor-reactify | import React from 'react';
import Button from '../components/Button';
import ColourHelper from '../helper/colourHelper';
import themedButton from '../theme/themedButton';
export default class ButtonBar extends React.Component {
constructor(props) {
super(props);
}
handleClick(name) {
swit... |
app/extensions/safe/auth-web-app/components/app_list_item.js | joshuef/peruse | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Translate } from 'react-redux-i18n';
export default class ListItem extends Component {
static propTypes = {
data: PropTypes.shape({}),
isDefault: PropTypes.bool,
loading: PropTypes.bool,
revokeApp: PropTypes.func
... |
docs/src/app/components/pages/components/IconMenu/ExampleScrollable.js | ArcanisCz/material-ui | import React from 'react';
import IconMenu from 'material-ui/IconMenu';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton';
import MapsPlace from 'material-ui/svg-icons/maps/place';
/**
* The `maxHeight` property limits the height of the menu, above which it will be scrollabl... |
examples/todomvc/index.js | pauldijou/redux-act | import 'babel-polyfill'
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 'todomvc-app-css/index.css'
const store = configureStore()
render(
<Provider store={store}>
<A... |
src/components/polls_index.js | kaloudiyi/VotePlexClient | import _ from 'lodash';
import React, { Component } from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
import PropTypes from 'prop-types';
import PollDetail from './poll_detail';
import PollList from './poll_list';
import Auth from '../Auth/Auth';
class PollsIndex extends Component {
constructor() {
... |
src/client/app/app.react.js | jaegerpicker/GLDice | import './app.styl';
import Component from '../components/component.react';
import Footer from './footer.react';
import Header from './header.react';
import React from 'react';
import {RouteHandler} from 'react-router';
import {appState} from '../state';
import {measureRender} from '../console';
// All stores must be ... |
examples/SSR/src/index.js | gaearon/react-hot-loader | import 'babel-polyfill';
import React from 'react';
import { hydrate } from 'react-dom';
import App from './App';
//const root = document.createElement('div')
//document.body.appendChild(root)
const root = document.getElementById('root');
hydrate(<App />, root);
|
frontend/src/components/layout/logout.js | unicef/un-partner-portal | import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { browserHistory as history } from 'react-router';
import Paper from 'material-ui/Paper';
import { withStyles } from 'material-ui/styles';
import SignOut from 'material-ui-icons/PowerSettingsNew';... |
app/javascript/mastodon/features/ui/components/link_footer.js | imas/mastodon | import { connect } from 'react-redux';
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom';
import { invitesEnabled, version, repository, source_url } from 'mastodon/initial_state';
import { log... |
views/components/AppointmentsViewUi.js | gvaldambrini/madam | import React from 'react';
import { Link } from 'react-router';
import AppointmentsTableUi from './AppointmentsTableUi';
// The main appointments presentational component, which includes the related table.
export default React.createClass({
propTypes: {
name: React.PropTypes.string,
surname: React.PropType... |
app/assets/javascripts/react/decorators/WorkflowCommonPermissions.js | Madek/madek-webapp | import React from 'react'
import f from 'lodash'
import cx from 'classnames'
import TagCloud from '../ui-components/TagCloud.cjsx'
import t from '../../lib/i18n-translate'
import labelize from '../../lib/labelize'
export default class WorkflowCommonPermissions extends React.Component {
render() {
const { respons... |
app/javascript/mastodon/components/dropdown_menu.js | koba-lab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import IconButton from './icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.