path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
public/js/cat_source/es6/components/segments/SegmentCommentsContainer.js | matecat/MateCat | /**
* React Component for the warnings.
*/
import React from 'react'
import _ from 'lodash'
import CommentsStore from '../../stores/CommentsStore'
import CommentsActions from '../../actions/CommentsActions'
import CommentsConstants from '../../constants/CommentsConstants'
import SegmentActions from '../../actions/S... |
src/svg-icons/file/create-new-folder.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCreateNewFolder = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"/>
</Svg... |
src/components/Why.js | jubianchi/semver-check | import React from 'react';
import PropTypes from 'prop-types';
import Quote from './Quote';
const Why = props => (
<div className={`row ${props.className}`}>
<div className="col-12">
<h2>SEMVER CHECKER... WHY?</h2>
<Quote author="semver.org" source="//semver.org/">
... |
src/modules/Externals/routes.js | dannegm/danielgarcia | import React from 'react';
import { Redirect } from 'react-router-dom';
const exact = true;
const routes = [
{
name: 'external.nyungerland',
path: '/nyungerland',
component: () => <Redirect to='https://nyungerland.net/' />,
exact,
},
];
export default routes;
|
src/modules/timeProgress/TimeProgressRenderer.native.js | kuzzmi/rmndrz | import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default (props, state) =>
<View style={ styles.component }>
<Text style={ styles.text }>
TimeProgress Component
</Text>
</View>;
const styles = StyleSheet.create({
component: {... |
node_modules/react-bootstrap/es/SplitToggle.js | Technaesthetic/ua-tools | import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import DropdownToggle fr... |
app/javascript/mastodon/features/account/components/header.js | imas/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/svg-icons/notification/live-tv.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationLiveTv = (props) => (
<SvgIcon {...props}>
<path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8... |
app/routes.js | jschlot/swarm | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './modules/core/App';
import Gameview from './modules/gameview';
export default (
<Route path="/" component={App}>
<IndexRoute component={Gameview} />
</Route>
);
|
lib/ui/src/modules/ui/components/stories_panel/stories_tree/tree_decorators_utils.js | rhalff/storybook | import React from 'react';
function getParts(name, highlight) {
const nameParts = [];
let last = 0;
highlight.forEach(([start, end]) => {
if (last < start) {
nameParts.push({
strong: false,
text: name.substring(last, start),
});
}
nameParts.push({
strong: true,
... |
src/components/Footer/Footer.js | balmbees/overwatch | import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Footer.css';
function Footer() {
return (
<div className={s.root}>
<div className={s.container}>
<span className={s.text}>© Vingle Inc</span>
</div>
</div>
);
}
export default w... |
docs/layouts/CoreLayout/CoreLayout.js | shengnian/shengnian-ui | import React from 'react'
// import Header from '../../components/Header'
import './CoreLayout.scss'
import '../../styles/core.scss'
import Navbar from '../../components/Navbar'
export const CoreLayout = ({ children }) => (
<div className='out-wrapper'>
<Navbar />
<div className='row-fluid'>
{children... |
src/index.js | timthesinner/react-vdom | //Copyright (c) 2016 TimTheSinner All Rights Reserved.
'use strict';
/**
* Copyright (c) 2016 TimTheSinner All Rights Reserved.
*
* 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... |
src/components/lists/AddressListItem.js | whphhg/vcash-ui | import React from 'react'
import { observer } from 'mobx-react'
const AddressListItem = observer(props => {
const addr = props.wallet.addr.get(props.search.addr[props.index])
return (
<div
className={
'list-item' +
(props.index % 2 === 0 ? ' even' : '') +
(props.wallet.viewing.add... |
app/javascript/mastodon/features/following/index.js | summoners-riftodon/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import LoadingIndicator from '../../components/loading... |
common/components/Shell/Spinner.js | kherrick/postpress | import React from 'react'
const Spinner = () => {
return (
<div>
<img src="/spinner.gif" />
</div>
)
}
export default Spinner
|
src/svg-icons/content/unarchive.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentUnarchive = (props) => (
<SvgIcon {...props}>
<path d="M20.55 5.22l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.4... |
fields/types/money/MoneyField.js | woody0907/keystone | import Field from '../Field';
import React from 'react';
import { FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'MoneyField',
valueChanged (event) {
var newValue = event.target.value.replace(/[^\d\s\,\.\$€£¥]/g, '');
if (newValue === this.props.value) return;
this.props.onChange(... |
src/components/BlockMenu.js | vigetlabs/colonel-kurtz | import Animator from './Animator'
import FocusTrap from 'react-focus-trap'
import Handle from './MenuHandle'
import Item from './MenuItem'
import React from 'react'
import menuItems from '../config/menu'
const defaultProps = {
items: []
}
export default class BlockMenu extends React.Component {
getMenuItem(item) ... |
client/src/components/Ping/Ping.js | patferguson/solitaire-react | import React, { Component } from 'react';
import APIClient from '../../api/APIClient';
import _ from 'lodash';
import AsyncButton from '../AsyncButton';
class Ping extends Component {
constructor(props) {
super(props)
// Explicitely set initial state
this.state = {
message: "",
isSendingPin... |
Paths/React/05.Building Scalable React Apps/5-react-boilerplate-building-scalable-apps-m5-exercise-files/After/app/components/AppBar/index.js | phiratio/Pluralsight-materials | /**
*
* AppBar
*
*/
import React from 'react';
import FontAwesome from 'react-fontawesome';
import styles from './styles.css';
function AppBar({ toggleDrawer }) {
return (
<div className={styles.appBar}>
<div
className={styles.iconButton}
onClick={toggleDrawer}
>
<FontAwesom... |
docs/src/app/components/pages/components/RadioButton/ExampleSimple.js | pradel/material-ui | import React from 'react';
import {RadioButton, RadioButtonGroup} from 'material-ui/RadioButton';
import ActionFavorite from 'material-ui/svg-icons/action/favorite';
import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border';
const styles = {
block: {
maxWidth: 250,
},
radioButton: {
... |
src/React/Widgets/PieceWiseFunctionEditorWidget/example/index.js | Kitware/paraviewweb | import 'normalize.css';
import React from 'react';
import ReactDOM from 'react-dom';
import PieceWiseFunctionEditorWidget from 'paraviewweb/src/React/Widgets/PieceWiseFunctionEditorWidget';
const container = document.querySelector('.content');
container.style.height = '50%';
container.style.width = '50%';
class Pi... |
src/icons/GraphicEqIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class GraphicEqIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M14 36h4V12h-4v24zm8 8h4V4h-4v40zM6 28h4v-8H6v8zm24 8h4V12h-4v24zm8-16v8h4v-8h-4z"/></svg>;}
}; |
react/react-svg/src/components/Main.js | yuanzhaokang/myAwesomeSimpleDemo | require('normalize.css/normalize.css');
require('styles/App.css');
import Circle from './circle/Circle';
import React from 'react';
let yeomanImage = require('../images/yeoman.png');
class AppComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
"obj": [{ 'x':... |
fields/types/numberarray/NumberArrayFilter.js | vokal/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
FormField,
FormInput,
FormSelect,
Grid,
} from '../../../admin/client/App/elemental';
const MODE_OPTIONS = [
{ label: 'Exactly', value: 'equals' },
{ label: 'Greater Than', value: 'gt' },
{ label: 'Less Than', value: 'lt' },
{ label:... |
components/GoogleAnalytics/GoogleAnalytics.js | saintnikopol/react-static-boilerplate | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
import { googleAnalyticsId } from '../../config';
const trackingCode = { __html:
`(function(b,o,i,l,e,r){b.GoogleAnalyticsO... |
website/irulez/src/components/admin_menu/fields/PasswordField.js | deklungel/iRulez | import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
import classNames from 'classnames';
import Visibility from '@material-ui/icons/Visibility';
import VisibilityOff from '@material-ui/icons/VisibilityOff';
import InputAdo... |
src/component/CreateTagButton.js | rsuite/rsuite-tag | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'rsuite';
import omit from 'lodash/omit';
const propTypes = {
inputMaxLength: PropTypes.number,
onInputConfirm: PropTypes.func
};
const defaultProps = {
inputMaxLength: 128
};
class CreateButton extends Compone... |
src/templates/page.js | green-arrow/ibchamilton | import React from 'react';
import styled from 'react-emotion';
import Link from 'gatsby-link';
import Container from '../components/Container';
import screenSizes from '../utils/screen-sizes';
const PageLayout = styled(Container)`
@media (min-width: ${screenSizes.MEDIUM}) {
display: flex;
}
`;
const SideNav ... |
pootle/static/js/shared/components/FormElement.js | evernote/zing | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import FormCheckedInput from '... |
public/js/components/profile/visitor/activityfeed/activityComp1.react.js | rajikaimal/Coupley | // import React from 'react';
// import Card from 'material-ui/lib/card/card';
// import CardActions from 'material-ui/lib/card/card-actions';
// import CardHeader from 'material-ui/lib/card/card-header';
// import CardMedia from 'material-ui/lib/card/card-media';
// import CardTitle from 'material-ui/lib/card/card-tit... |
assets/js/components/Pane.js | basarevych/webfm | import React from 'react';
import PropTypes from 'prop-types';
import { Tooltip } from 'reactstrap';
import { DropTarget } from 'react-dnd';
import DisabledBody from './DisabledBody';
import LoadingBody from './LoadingBody';
import Header from '../containers/Header';
import ContentBody from '../containers/ContentBody';... |
src/client/scripts/client.js | jingcleovil/react-webpack-boilerplate | import React from 'react';
import AppRoot from '../../app/components/AppRoot';
React.render(<AppRoot />, document.body); |
src/components/RewardCalculator.js | jhkmjnhamster/vcash-electron | import React from 'react'
import { translate } from 'react-i18next'
import { action, computed, observable } from 'mobx'
import { inject, observer } from 'mobx-react'
import { Input } from 'antd'
import { calculateIncentive, calculatePoW } from '../utilities/blockRewards'
@translate(['wallet'], { wait: true })
@inject(... |
app/index.js | agrant216/React-Electron-Mtg | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.global.c... |
src/components/blocks/BlockImage.js | m0sk1t/react_email_editor | import React from 'react';
const BlockImage = ({ blockOptions }) => {
const alt = "cool image!";
return (
<table
width={blockOptions.elements[0].width.match(/\d+/)[0]}
cellPadding="0"
cellSpacing="0"
role="presentation"
>
<tbody>
<tr>
<td
width={blockOptions.elements[0].width.match(/... |
client/components/Photo.js | kutyel/learn-redux | import React from 'react'
import { Link } from 'react-router'
import CSSTransitionGroup from 'react-addons-css-transition-group'
const Photo = ({ post: { code, caption, likes, display_src: src, liked }, comments, i, increment, decrement }) => (
<figure className='grid-figure'>
<div className='grid-photo-wrap'>
... |
app/javascript/mastodon/features/notifications/components/notification.js | primenumber/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
import { HotKeys } from 'react-hotkeys';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { me ... |
09-react-lab-b/src/app/todo-list.js | iproduct/course-node-express-react | import React from 'react';
export default ({todos}) => (
<ul className="todo-list">
{ todos.map(todo => (<li key={todo.id}><span className="id">{todo.id}. </span>
{todo.title} - {todo.status}
<span className="buttons">...</span>
</li>)) }
</ul>
);
|
src/containers/App.js | bplabombarda/3on3bot.com | import React from 'react'
import getSchedule from '../utils/getSchedule'
export default class App extends React.PureComponent {
state = {
date: new Date(2016, 2, 21),
didInvalidate: false,
isFetching: false,
games: [],
}
componentDidMount () {
const schedule = getSchedule(this.state.date)
... |
portfolio-site/src/scenes/home/navigation/navbar.js | dave5801/Portfolio | import React, { Component } from 'react';
import './navbar.css';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import Writings from './../Writings/writings';
import HomePage from './../homepage/homepage';
import About from './../About/about';
import Projects from './../Projects/projects';
... |
app/js/components/Article.js | andy02081224/chenscoffee-2 | 'use strict';
import React from 'react';
const Article = React.createClass({
render() {
return <article className={'article ' + this.props.class}>
<div className="article__cover">
<img src="images/product-detail.jpg" alt=""/>
</div>
<p className="article__content">
臻咖啡座落於安靜的埔心街區,讓您放鬆、聊天,細細品嚐咖啡度過美好... |
docs/app/Examples/collections/Breadcrumb/Variations/BreadcrumbExampleMiniSize.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Breadcrumb } from 'semantic-ui-react'
const BreadcrumbExampleMiniSize = () => (
<Breadcrumb size='mini'>
<Breadcrumb.Section link>Home</Breadcrumb.Section>
<Breadcrumb.Divider icon='right chevron' />
<Breadcrumb.Section link>Registration</Breadcrumb.Section>
<Breadc... |
src/index.js | lzm854676408/big-demo |
import React from 'react';
import {render} from 'react-dom';
import {Router,browserHistory} from 'react-router';
import routes from './routes.js';
import './style/commen.css';
import injectTapEventPlugin from 'react-tap-event-plugin';
// Needed for onTouchTap
// http://stackoverflow.com/a/34015469/988941
injectTapEv... |
app/javascript/mastodon/features/account_timeline/index.js | blackle/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import ... |
src/widgets/DropdownRow.js | sussol/mobile | /* eslint-disable react/forbid-prop-types */
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import React from 'react';
import { StyleSheet, TextInput } from 'react-native';
import PropTypes from 'prop-types';
import { DropDown } from './DropDown';
import { FlexRow } from './FlexRow';
import { LIGH... |
src/components/TextViews.js | KtuluTeam/Ktulu | import React from 'react'
import {
Text,
View,
TouchableOpacity,
Image
} from 'react-native'
import * as cards from '../cards'
import { styles } from '../styles/styles'
export const ReadLoud = ({text}) => {
if (text === '')
return (<View />)
return (
<View style={styles.readLoud}>
<Text styl... |
src/svg-icons/device/signal-wifi-1-bar.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi1Bar = (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="M6.67 14.86L12 21.49v.01... |
src/icons/BatteryLow.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class BatteryLow extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M42.1,384h381.1c5.5,0,9.9-4.5,9.9-10v-54h36.9c5.6,0,10.1-4.5,10.1-10V202c0-5.5-4.5-10-10.1-10H433v-54
c0-5.5-4.3-10-9... |
docs/app/Examples/collections/Table/Variations/TableExampleStriped.js | shengnian/shengnian-ui-react | import React from 'react'
import { Table } from 'shengnian-ui-react'
const TableExampleStriped = () => (
<Table striped>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Date Joined</Table.HeaderCell>
<Table.HeaderCell>E-mail</Table.HeaderCell>
... |
src/svg-icons/hardware/speaker-group.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareSpeakerGroup = (props) => (
<SvgIcon {...props}>
<path d="M18.2 1H9.8C8.81 1 8 1.81 8 2.8v14.4c0 .99.81 1.79 1.8 1.79l8.4.01c.99 0 1.8-.81 1.8-1.8V2.8c0-.99-.81-1.8-1.8-1.8zM14 3c1.1 0 2 .89 2 2s-.9 2-2... |
src/js/app/components/devtools.js | ericf89/survey | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
const DevTools = createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-q"
defaultIsVisibl... |
frontend/src/Activity/Queue/QueueConnector.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import * as commandNames from 'Commands/commandNames';
import withCurrentPage from 'Components/withCurrentPage';
import { clearAlbums, fetchAlbums } from 'Store... |
src/core/Checkbox.js | sateesh2020/letshop | import React, { Component } from 'react';
class Checkbox extends Component {
state = {
isChecked: false,
}
toggleCheckboxChange = () => {
const { handleCheckboxChange, label } = this.props;
this.setState(({ isChecked }) => (
{
isChecked: !isChecked,
}
));
handleCheckbox... |
frontend/src/Components/Filter/Builder/ProtocolFilterBuilderRowValue.js | lidarr/Lidarr | import React from 'react';
import FilterBuilderRowValue from './FilterBuilderRowValue';
const protocols = [
{ id: 'torrent', name: 'Torrent' },
{ id: 'usenet', name: 'Usenet' }
];
function ProtocolFilterBuilderRowValue(props) {
return (
<FilterBuilderRowValue
tagList={protocols}
{...props}
/... |
src/svg-icons/notification/airline-seat-legroom-reduced.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomReduced = (props) => (
<SvgIcon {...props}>
<path d="M19.97 19.2c.18.96-.55 1.8-1.47 1.8H14v-3l1-4H9c-1.65 0-3-1.35-3-3V3h6v6h5c1.1 0 2 .9 2 2l-2 7h1.44c.73 0 1.39.49 1.53 1.2zM5 1... |
admin/src/components/PopoutListItem.js | tanbo800/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
var PopoutListItem = React.createClass({
displayName: 'PopoutListItem',
propTypes: {
icon: React.PropTypes.string,
iconHover: React.PropTypes.string,
iconHoverAlt: React.PropTypes.string,
isSelected: React.Prop... |
old-or-not-typescript/learn-redux/shopping-cart/index.js | janaagaard75/framework-investigations | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import logger from 'redux-logger'
import thunk from 'redux-thunk'
import reducer from './reducers'
import { getAllProducts } from './actions'
i... |
maodou/posts/client/components/tabs.js | ShannChiang/meteor-react-redux-base | import React from 'react';
export default class extends React.Component {
render() {
return (
<div className={`posts-tab ${this.props.position} ${this.props.color}`}>
<ul className="flex-container">
{
this.props.configs ?
this.props.configs.categories.map((cate,... |
src/components/place-form-component.js | havok2905/react-night-entry | import React from 'react';
import ReactDOM from 'react-dom';
import PlaceActions from '../actions/place-actions';
class PlaceForm extends React.Component {
constructor() {
super();
}
clearPlaces() {
PlaceActions.clearPlaces();
this.clearInput();
}
clearInput() {
let node = this.input();
... |
examples/todo/js/components/TodoApp.js | andimarek/generic-relay | /**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... |
react-router-tutorial/lessons/07-more-nesting/modules/NavLink.js | zerotung/practices-and-notes | // modules/NavLink.js
import React from 'react'
import { Link } from 'react-router'
export default React.createClass({
render() {
return <Link {...this.props} activeClassName="active"/>
}
})
|
client/src/components/Draftail/decorators/TooltipEntity.js | zerolab/wagtail | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Icon } from 'draftail';
import Tooltip from '../Tooltip/Tooltip';
import Portal from '../../Portal/Portal';
const shortenLabel = (label) => {
let shortened = label;
if (shortened.length > 25) {
shortened = `${shortened.slic... |
node_modules/react-router/es6/IndexRoute.js | qingege/react_draft | import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { component, components, falsy } from './InternalPropTypes';
var func = React.PropTypes.func;
/**
* An <IndexRoute> i... |
example/src/App.js | Splact/react-demiguise | import React, { Component } from 'react';
import Demiguise from 'react-demiguise';
export default class App extends Component {
state = {
loop: 1,
};
onLoopEnd = () => {
console.log(`Loop ${this.state.loop} ended`);
this.setState({
loop: this.state.loop + 1,
});
}
render () {
co... |
src/common/component/netWorkImage.js | liuboshuo/react-native-food | /**
* Created by liushuo on 17/4/27.
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Image,
ActivityIndicator,
} from 'react-native';
export default class NetWorkImage extends Component {
constructor (props) {
super(props)
this.state = {
loadi... |
source/components/SearchBox.js | TroyAlford/axis-wiki | import React from 'react'
import debounce from 'lodash/debounce'
const searchFor = debounce(term => window.routerHistory.push(`/search/${term}`), 500)
export default class SearchBox extends React.Component {
static defaultProps = {
className: '',
placeholder: 'Search... (Ctrl+Shift+F)',
term: '',
}
... |
client/src/components/Draftail/decorators/Link.js | wagtail/wagtail | import PropTypes from 'prop-types';
import React from 'react';
import { gettext } from '../../../utils/gettext';
import Icon from '../../Icon/Icon';
import TooltipEntity from '../decorators/TooltipEntity';
const LINK_ICON = <Icon name="link" />;
const BROKEN_LINK_ICON = <Icon name="warning" />;
const MAIL_ICON = <Ic... |
addons/graphql/src/preview.js | nfl/react-storybook | import React from 'react';
import GraphiQL from 'graphiql';
import { fetch } from 'global';
import 'graphiql/graphiql.css';
import FullScreen from './components/FullScreen';
const FETCH_OPTIONS = {
method: 'post',
headers: { 'Content-Type': 'application/json' },
};
function getDefautlFetcher(url) {
return para... |
src/svg-icons/action/perm-identity.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermIdentity = (props) => (
<SvgIcon {...props}>
<path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9... |
enrolment-ui/src/modules/Dashboard/components/Requests.js | overture-stack/enrolment | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { withTranslation } from 'react-i18next';
import StaffActions from './StaffActions';
import FeesSidebarWidget from '../../Fees';
import { ApplicationRequests } from '../../Applications';
import { UserReque... |
packages/fyndiq-component-timeline/src/event.js | fyndiq/fyndiq-ui | import React from 'react'
import PropTypes from 'prop-types'
import styles from '../timeline.css'
const Event = ({ icon, children }) => (
<div className={styles.event}>
<div className={styles.icon}>
{React.cloneElement(icon, {
color: null,
})}
</div>
<span>{children}</span>
</div>
... |
docs/app/Examples/collections/Grid/Variations/GridExampleVerticalAlignmentRow.js | koenvg/Semantic-UI-React | import React from 'react'
import { Grid, Image } from 'semantic-ui-react'
const GridExampleVerticalAlignmentRow = () => (
<Grid columns={4} centered>
<Grid.Row verticalAlign='top'>
<Grid.Column>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
</Grid.Column>
<Grid.Colum... |
src/shared/components/form/colorPickerGroup.js | namroodinc/truth-serum | import React from 'react';
import {pink50, pink900} from 'material-ui/styles/colors';
export default class ColorPickerGroup extends React.Component {
render() {
const { backgroundColor, color, label } = this.props;
return (
<div
className="container__row"
style={{
backgroundC... |
examples/with-stencil/packages/web-app/pages/_app.js | JeromeFitz/next.js | import React from 'react'
import App from 'next/app'
import { applyPolyfills, defineCustomElements } from 'test-component/loader'
export default class MyApp extends App {
componentDidMount() {
applyPolyfills().then(() => {
defineCustomElements(window)
})
}
render() {
const { Component, pagePr... |
src/svg-icons/image/movie-filter.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageMovieFilter = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 3h-3l-2-3h-2l2 3h-3l-2-3H8l2 3H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4zm-6.75 11.25L10 18l-1.25-2.75L6 14l2.7... |
src/Label.js | PeterDaveHello/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
src/main.js | saitodisse/scrap-cerebral-2 | import React from 'react';
import ReactDOM from 'react-dom';
import { Container } from 'cerebral/react';
import Main from './components/Main/index';
import controller from './controller';
import '../vendors/semantic/semantic.css';
ReactDOM.render(
<Container controller={controller}>
<Main />
</Container>,
do... |
dist/internal/menu/StartMenuLinks.js | Caleydo/ordino | import React from 'react';
import { EStartMenuMode } from '../constants';
export function StartMenuLinks(props) {
return (React.createElement(React.Fragment, null,
props.status === 'success' &&
props.tabs.map((tab) => (React.createElement("li", { className: `nav-item ${props.activeTab === tab ? ... |
admin/client/Signin/Signin.js | Yaska/keystone | /**
* The actual Sign In view, with the login form
*/
import assign from 'object-assign';
import classnames from 'classnames';
import React from 'react';
import xhr from 'xhr';
import Alert from './components/Alert';
import Brand from './components/Brand';
import UserInfo from './components/UserInfo';
import LoginF... |
js/components/loaders/ProgressBar.android.js | crod93/googlePlacesEx-react-native | /* @flow */
'use strict';
import React from 'react';
import { ActivityIndicatorIOS, Platform } from 'react-native';
import ProgressBar from "ProgressBarAndroid";
import NativeBaseComponent from 'native-base/Components/Base/NativeBaseComponent';
import computeProps from 'native-base/Utils/computeProps';
export defaul... |
stories/print/DailyViewPrintPDF.js | tidepool-org/viz | /*
* == BSD2 LICENSE ==
* Copyright (c) 2017, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program ... |
app/javascript/mastodon/features/account_gallery/components/media_item.js | imomix/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Permalink from '../../../components/permalink';
class MediaItem extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.i... |
packages/icons/src/md/hardware/KeyboardArrowLeft.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdKeyboardArrowLeft(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="29.83 33.17 20.66 24 29.83 14.83 27 12 15 24 27 36" />
</IconBase>
);
}
export default MdKeyboardArrowLeft;
|
node_modules/react-scripts/node_modules/case-sensitive-paths-webpack-plugin/demo/src/AppRoot.component.js | vitorgomateus/NotifyMe | import React, { Component } from 'react';
export default class AppRoot extends Component {
// we can't use `connect` in this component, so must do naiively:
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<div>
<h1>This is just an empty demo</h1>
... |
app/javascript/mastodon/features/domain_blocks/index.js | MitarashiDango/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debou... |
web/lib/netrunner.js | zachasme/netrunner | /* eslint-env browser */
import App from 'lib/shared/components/app';
import * as actions from './shared/actions';
import React from 'react';
actions.bootstrap();
export function renderToDOM(container){
let element = React.createElement(App);
return React.render(element, container);
}
|
demo/index.js | fabiobiondi/react-test-ui-components | import React from 'react';
import { render } from 'react-dom';
import App from './components/App';
render(
<App />,
document.getElementById('root')
);
|
todo_list/src/components/Footer.js | nipe0324/js_samples | import React from 'react'
import FilterLink from '../containers/FilterLink'
import { VisibilityFilters } from '../actions'
const Footer = () => (
<div>
<span>Show: </span>
<FilterLink filter={VisibilityFilters.SHOW_ALL}>
All
</FilterLink>
<FilterLink filter={VisibilityFilters.SHOW_ACTIVE}>
... |
client/page/redirects/columns/source-flag.js | johngodley/redirection | /**
* External dependencies
*/
import React from 'react';
import classnames from 'classnames';
/**
* Internal dependencies
*/
import Badge from 'wp-plugin-components/badge';
/**
* A redirect flag
*
* @param {object} props
* @param {string} props.name - Name to display in the flag
* @param {string} [props.c... |
src/components/App.js | QuackenbushDev/github-notetaker | import React, { Component } from 'react';
import SearchGithub from './SearchGithub'
export class App extends Component {
render() {
return (
<div className="main-container">
<nav className="navbar navbar-default" role="navigation">
<div className="col-sm-7 col-sm-offset-2" style={{m... |
app/components/List/index.js | PeterKow/clientAurity | import React from 'react';
import styles from './styles.css';
function List(props) {
const ComponentToRender = props.component;
let content = (<div></div>);
// If we have items, render them
if (props.items) {
content = props.items.map((item, index) => (
<ComponentToRender key={'item-' + index } ite... |
local-cli/templates/HelloNavigation/views/chat/ChatScreen.js | clozr/react-native | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Button,
ListView,
StyleSheet,
Text,
TextInput,
View,
} from 'react-native';
import KeyboardSpacer from '../../components/KeyboardSpacer';
import Backend from '../../lib/Backend';
export default class ChatScreen extends C... |
src/svg-icons/action/feedback.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFeedback = (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-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</SvgIcon>
);
ActionFeedback = pure(Acti... |
examples/official-storybook/stories/core/decorators.stories.js | kadirahq/react-storybook | import React from 'react';
// We would need to add this in config.js idiomatically however that would make this file a bit confusing
import { addDecorator } from '@storybook/react';
addDecorator((s, { kind }) =>
kind === 'Core/Decorators' ? (
<>
<p>Global Decorator</p>
{s()}
</>
) : (
s()
... |
app/components/LocationModule.js | danichim/redshift-material-gui | 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/js/components/ui/CarouselContinuous/CarouselContinuous.js | nekuno/client | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import styles from './CarouselContinuous.scss';
export default class CarouselContinuous extends Component {
static propTypes = {
items : PropTypes.array.isRequired,
marginRight: PropTypes.number
};
construc... |
src/components/NavIndexLink.js | Korkemoms/amodahl.no | // @flow
import React from 'react'
import { NavItem } from 'react-bootstrap'
import {IndexLinkContainer} from 'react-router-bootstrap'
/* Purely presentational component */
const NavIndexLink = (props: Object) => {
const {children, to}: {children: Array<mixed>, to: string} = props
return (
<IndexLinkContainer... |
js/jqwidgets/demos/react/app/chart/datetimexaxisrangeselection/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
class App extends React.Component {
componentDidMount() {
this.refs.myChart.on('rangeSelectionChanging', (event) => {
let args = event.args;
args.instance... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.