path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
examples/InputRadio.js | jareth/react-materialize | import React from 'react';
import Input from '../src/Input';
export default
<div>
<Input name='group1' type='radio' value='red' label='Red' />
<Input name='group1' type='radio' value='yellow' label='Yellow' />
<Input name='group1' type='radio' value='green' label='Green' className='with-gap' />
<Input ... |
app/containers/FrontDesk/index.js | projectcashmere/admin | /*
*
* FrontDesk
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { FormattedMessage } from 'react-intl';
import format from 'date-fns/format';
import AddRoomModal from 'components/AddRoomModal';
import RoomOptionsModal from 'compone... |
app/javascript/mastodon/components/setting_text.js | dunn/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
export default class SettingText extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequired,
label: PropT... |
modules/gui/src/app/home/body/process/recipe/opticalMosaic/sceneAreasLayer.js | openforis/sepal | import {MapLayer} from 'app/home/map/mapLayer'
import {SceneAreaMarker} from './sceneAreaMarker'
import {SceneSelectionType} from 'app/home/body/process/recipe/opticalMosaic/opticalMosaicRecipe'
import {activator} from 'widget/activation/activator'
import {compose} from 'compose'
import {enabled} from 'widget/enableWhe... |
node_modules/react-router/es6/RoutingContext.js | xuan6/react-videos | import React from 'react';
import RouterContext from './RouterContext';
import warning from './routerWarning';
var RoutingContext = React.createClass({
displayName: 'RoutingContext',
componentWillMount: function componentWillMount() {
process.env.NODE_ENV !== 'production' ? warning(false, '`RoutingContext` has... |
app/components/Characters.js | Alayode/facesOfSpace | import React from 'react';
import CharacterStore from '../stores/CharacterStore';
import CharacterActions from '../actions/CharacterActions'
class Character extends React.Component {
constructor(props) {
super(props);
this.state = CharacterStore.getState();
this.onChange = this.onChange.bind(this);
}
... |
docs/src/app/components/pages/components/Menu/ExampleSimple.js | rhaedes/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
const style = {
display: 'inline-block',
margin: '16px 32px 16px 0',
};
const MenuExampleSimple = () => (
<div>
<Paper style={style}>
<Menu>
<Menu... |
src/components/theme-legacy/thanks-next-petition.js | MoveOnOrg/mop-frontend | import React from 'react'
import PropTypes from 'prop-types'
import { Portal } from 'react-portal'
export const ThanksNextPetition = ({ secondsLeft, onCancel }) => (
<Portal node={document && document.getElementById('message-portal')}>
<div className='message-header advancing_message'>
We've found anot... |
src/components/JobItem/Title/index.js | apedyashev/react-universal-jobs-aggregator | // libs
import React from 'react';
import {PropTypes} from 'prop-types';
// components
import {H4} from 'components/typography';
// other
import styles from './index.less';
export default function JobItemTitle({title}) {
return (<H4 className={styles.root}>{title}</H4>);
}
JobItemTitle.propTypes = {
title: PropTyp... |
src/components/MainScreen.js | gunaangs/Feedonymous | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
KeyboardAvoidingView,
StyleSheet,
Text,
View
} from 'react-native';
import Logo from './Logo';
import Search from './UserInput';
export default class Feedo... |
src/components/Button.js | enzoborgfrantz/react-boiler | import React from 'react';
import styled from 'styled-components';
import { tangerine, iceGray } from '../styles/colors';
const ButtonStyle = styled.button`
height: 35px;
appearance: none;
background-color: ${tangerine};
border-radius: 4px;
box-sizing: border-box;
color: ${iceGray};
font-size: 12px;
fo... |
src/svg-icons/navigation/arrow-drop-down-circle.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowDropDownCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/>
</SvgIcon>
);
NavigationArrowDropDownCircle =... |
src/svg-icons/image/blur-linear.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBlurLinear = (props) => (
<SvgIcon {...props}>
<path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-... |
saga/P/shopping-cart/src/components/CartItem.js | imuntil/React | import React from 'react'
import PropTypes from 'prop-types'
import Product from './Product'
function CartItem({onRemove, title, price, quantity}) {
const removeFromCartAction = (
<button onClick={onRemove}>
{' X '}
</button>
)
return (
<Product
price={price}
title={title}
qua... |
app/assets/scripts/views/app.js | openaq/openaq.github.io | 'use strict';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import c from 'classnames';
import { closeDownloadModal } from '../actions/action-creators';
import PageHeader from '../components/page-header';
import PageFooter from '../components/page-footer';
import HeaderMessa... |
example/examples/LiteMapView.js | jiaminglu/react-native-maps | import React from 'react';
import {
StyleSheet,
Dimensions,
ScrollView,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 31.23295;
const LONGITUDE = 121.3822;
const LATITUDE_DELTA = 0.0922;
... |
src/svg-icons/maps/transfer-within-a-station.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTransferWithinAStation = (props) => (
<SvgIcon {...props}>
<path d="M16.49 15.5v-1.75L14 16.25l2.49 2.5V17H22v-1.5zm3.02 4.25H14v1.5h5.51V23L22 20.5 19.51 18zM9.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 ... |
src/svg-icons/social/notifications.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialNotifications = (props) => (
<SvgIcon {...props}>
<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 ... |
test/PanelGroupSpec.js | dozoisch/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Panel from '../src/Panel';
import PanelGroup from '../src/PanelGroup';
import { getOne } from './helpers';
describe('<PanelGroup>', () => {
it('Should pass bsStyle to Panels', () => {
let instance = ReactTestUtils.renderIn... |
node_modules/react-bootstrap/es/Tabs.js | xuan6/admin_dashboard_local_dev | 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/components/__tests__/InfoBar-test.js | PhilNorfleet/pBot | import React from 'react';
import ReactDOM from 'react-dom';
import { renderIntoDocument } from 'react-addons-test-utils';
import { expect } from 'chai';
import { InfoBar } from 'components';
import { Provider } from 'react-redux';
import { browserHistory } from 'react-router';
import createStore from 'redux/create';
i... |
packages/icons/src/dv/Electron.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvElectron(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M18.108 11.366c1.039.192.75 1.759-.29 1.567-8.24-1.532-14.014 1.725-9.643 9.79.522.916-.864 1.706-1.386.79-5.205-9.117 1.544-13.998 11.319-12.147zm2... |
pkg/interface/link/src/js/components/root.js | jfranklin9000/urbit | import React, { Component } from 'react';
import { BrowserRouter, Switch, Route, Link } from "react-router-dom";
import classnames from 'classnames';
import _ from 'lodash';
import { api } from '/api';
import { subscription } from '/subscription';
import { store } from '/store';
import { Skeleton } from '/components/s... |
src/client/app/components/projectMembers.js | JuMBoSLICE/JuMBo | import React, { Component } from 'react';
class ProjectMembers extends Component {
constructor(props){
super(props);
}
render(){
return (
<div>
<div className="team one-third">
<h3>Team Members</h3>
<p>{this.props.teamMembers}</p>
</div>
<div className="project-date ... |
src/components/ui/Infobox.js | GustavoKatel/franz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import classnames from 'classnames';
import Loader from 'react-loader';
export default @observer class Infobox extends Component {
static propTypes = {
children: PropTypes.any.isRequired, // eslin... |
app/jsx/grading/PostAssignmentGradesTray/PostTypes.js | djbender/canvas-lms | /*
* Copyright (C) 2019 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
app/views/components/item-column/no-search-results.js | datachand/sprintly-kanban | import React from 'react';
import FilterActions from '../../../actions/filter-actions';
import ProductStore from '../../../stores/product-store';
var NoSearchResults = React.createClass({
propsTypes: {
product: React.PropTypes.object.isRequired
},
clearFilters() {
let product = ProductStore.getProduct(... |
src/components/common/LogoutLink.js | douglascorrea/react-hot-redux-firebase-starter | import React from 'react';
const LogoutLink = ({signOut}) => {
return <a href="#" onClick={signOut}>Logout</a>;
};
LogoutLink.propTypes = {
signOut: React.PropTypes.func.isRequired
};
export default LogoutLink;
|
src/svg-icons/image/filter-8.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter8 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-1... |
packages/vulcan-i18n/lib/modules/context.js | VulcanJS/Vulcan | import React from 'react';
const IntlContext = React.createContext({
locale: '',
key: '',
messages: [],
});
export default IntlContext;
|
src/svg-icons/editor/text-fields.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorTextFields = (props) => (
<SvgIcon {...props}>
<path d="M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"/>
</SvgIcon>
);
EditorTextFields = pure(EditorTextFields);
EditorTextFields.displayName = 'Edi... |
resources/assets/js/components/DrawerTransitionGroup.js | DoSomething/voting-app | import React, { Component } from 'react';
import TransitionGroup from 'react-addons-transition-group';
import DrawerTransitionGroupChild from './DrawerTransitionGroupChild';
class DrawerTransitionGroup extends Component {
wrapChild(child) {
return <DrawerTransitionGroupChild>{child}</DrawerTransitionGroupChild>... |
fields/types/relationship/RelationshipColumn.js | danielmahon/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
const moreIndicatorStyle = {
color: '#bbb',
fontSize: '.8rem',
fontWeight: 500,
marginLeft: 8,
};
var RelationshipColumn = React.createClass({
displayName: 'Rel... |
src/decorators/alignable.js | wundery/wundery-ui-react | import React from 'react';
// Utils
import classnames from 'classnames';
const alignable = (Component) => {
const AlignableComponent = (props) => {
const align = props.align;
if (align) {
return (
<Component {...props}>
<div className={classnames(`ui-align-${align}`)}>
{p... |
pkg/interface/chat/src/js/components/join.js | ngzax/urbit | import React, { Component } from 'react';
import classnames from 'classnames';
import { Route, Link } from 'react-router-dom';
import { Spinner } from './lib/icons/icon-spinner';
import urbitOb from 'urbit-ob';
export class JoinScreen extends Component {
constructor(props) {
super(props);
this.state = {
... |
src/containers/Wheelchair.js | osoken/project-train-2016 | import React from 'react'
import { connect } from 'react-redux'
import { setWheelchair } from '../actions'
import { Link } from 'react-router'
const WHEELCHAIR = {
MANUAL: 'manual',
ELECTRIC: 'electric',
SPECIAL: 'special'
}
let Wheelchair = ( {dispatch, wheelchair} ) => (
<div>
<h1>あなたの車いすのタイプは?</h1>
... |
src/navigation.js | vinej/react-remux | import React from 'react'
import RequireAuth from './components/auth/require_auth'
import Todos from './components/todos'
import { todoStore } from './stores/todo_store'
import Welcome from './components/welcome'
import SignIn from './components/auth/signin'
import SignUp from './components/auth/signup'
import SignOut ... |
demo02/src/index.js | lxlneo/reactdemo | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
client/pages/About.js | rockchalkwushock/photography-frontend | import React from 'react';
import { withTranslate } from 'react-redux-multilingual';
const original = 'https://res.cloudinary.com/rockchalkwushock/image/upload/f_auto,q_70,w_316/v1488749512/profile_pic.jpg 316w';
const options = 'https://res.cloudinary.com/rockchalkwushock/image/upload/f_auto,q_70,w_316/v1488749512/pr... |
src/utils/QuizListCreator.js | jpke/elearn | import React from 'react'
import {Link} from 'react-router'
//creates list of quizzes available to user
//if no quizzes passed in, will return a reminder to select a course
//if admin, displays option to edit quiz
const QuizListCreator = (items, selectFunction, admin, editQuiz) => {
if(!items) return <li>No quizzes ... |
src/views/WidgetList/widgets/Domains/Domains.js | GovReady/GovReady-Agent-Client | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { default as config } from 'config';
import { actions } from 'redux/modules/widgetReducer';
import { actions as siteActions } from 'redux/modules/siteReducer';
import { hashHistory } from ... |
examples/multi-react/src/LeftStore.js | rematch/rematch | import React from 'react'
import { init } from '@rematch/core'
import Counter from './Counter'
const count = {
state: 0,
reducers: {
increment(state) {
return state + 1
},
},
}
export const store = init({
name: 'left',
models: {
count,
},
})
export default class Left extends React.Component {
render(... |
client/modules/App/components/DrawerMenu/DrawerMenu.js | tranphong001/BIGVN | import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Navbar, Nav, NavItem, MenuItem, Glyphicon, Image, FormGroup, InputGroup, FormControl, Button, NavDropdown, DropdownButton } from 'react-bootstrap';
import MenuItem2 from 'material-ui/MenuItem';
... |
src/components/Home/Index.js | hao123-fe/weekly-report-generator | import React from 'react'
export default props => <section>HOME</section> |
example/main.js | uber/deck.gl | // Copyright (c) 2015 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
imports/client/ui/components/AuthenticatedNavigation.js | mgscreativa/base | import React from 'react';
import { withRouter } from 'react-router-dom';
import { PropTypes } from 'prop-types';
import { LinkContainer } from 'react-router-bootstrap';
import { Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';
const userName = () => {
const user ... |
source/components/Texts/Bio.js | mikey1384/twin-kle | import React from 'react';
import PropTypes from 'prop-types';
import { processedStringWithURL } from 'helpers/stringHelpers';
Bio.propTypes = {
firstRow: PropTypes.string,
secondRow: PropTypes.string,
thirdRow: PropTypes.string,
small: PropTypes.bool,
style: PropTypes.object
};
export default function Bio({... |
src/svg-icons/action/event-seat.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionEventSeat = (props) => (
<SvgIcon {...props}>
<path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"/>
</SvgIcon>
);
ActionEventSeat = pure(ActionEventSe... |
src/Header.react.js | z-vr/react-popup | import React from 'react';
import PropTypes from 'prop-types';
const Component = (props) => {
if (!props.title) {
return null;
}
return (
<header className={props.className}>
<h1 className={`${props.className}__title`}>{props.title}</h1>
</header>
);
};
Component.d... |
examples/sub-components-lazy/src/App.js | react-tools/react-table | import React from 'react';
import styled from 'styled-components';
import { useExpanded, useTable } from 'react-table';
import makeData from './makeData';
const Styles = styled.div`
padding: 1rem;
table {
border-spacing: 0;
border: 1px solid black;
tr {
:last-child {
td {
bor... |
src/Remword.js | zhukov-maxim/remword | import React from 'react';
import { Link } from 'react-router';
import firebaseUtils from './utils/firebaseUtils';
import './Remword.less';
var Remword = React.createClass({
displayName: 'Remword',
propTypes: {
children: React.PropTypes.element.isRequired,
},
getInitialState: function() {
return {
... |
lib/site/topic-layout/topic-article/comments/list/comment/replies/component.js | democracy-os-fr/democracyos | import React from 'react'
import RepliesForm from './form/component'
import RepliesList from './list/component'
export default function CommentReplies (props) {
if (!props.repliesVisibility) return null
return (
<div className='comments-replies-container'>
<RepliesList
onDeleteReply={props.onDel... |
docs/app/Examples/collections/Form/FieldVariations/index.js | clemensw/stardust | import React from 'react'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
const FormFieldVariationsExamples = () => (
<ExampleSection title='Field Variations'>
<ComponentExample
title='Inline'
... |
src/components/AnalyticsListener.js | BoilerMake/frontend | import React from 'react';
import GoogleAnalytics from 'react-ga';
import PropTypes from 'prop-types';
import { recordStatEvent } from '../actions'
export default class AnalyticsListener extends React.PureComponent {
static contextTypes = {
router: PropTypes.object
};
componentDidMount() {
... |
src/svg-icons/action/fingerprint.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFingerprint = (props) => (
<SvgIcon {...props}>
<path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12... |
stories/Dialog.js | Talend/react-talend-components | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { Dialog } from '../src/index';
const defaultProps = {
show: true,
};
const headerProps = {
header: 'Hello world',
show: true,
};
const actionProps = {
show: true,
header: 'Hello world',
action: {
label: 'OK',
onClick: ... |
app/src/components/logo/index.js | vvasilev-/weatheros | /* @flow */
/**
* The external dependencies.
*/
import React from 'react';
import styled from 'styled-components';
/**
* The internal dependencies.
*/
import IconSunBehindCloud from 'components/icon/sun-behind-cloud';
/**
* Render the link.
*
* @type {Function}
*/
const Link = styled.a`
float: left;
font-w... |
src/utils/childrenValueInputValidation.js | pandoraui/react-bootstrap | import React from 'react';
import { singlePropFrom } from './CustomPropTypes';
const propList = ['children', 'value'];
export default function valueValidation(props, propName, componentName) {
let error = singlePropFrom(propList)(props, propName, componentName);
if (!error) {
error = React.PropTypes.node(pro... |
client/views/omnichannel/currentChats/CurrentChatsPage.js | VoiSmart/Rocket.Chat | import React from 'react';
import GenericTable from '../../../components/GenericTable';
import Page from '../../../components/Page';
import FilterByText from './FilterByText';
function CurrentChatsPage({ data, header, setParams, params, title, renderRow, reload, children }) {
return (
<Page flexDirection='row'>
... |
src/routes/Home/components/AuthView/index.js | sanalonyedi/egitimbudur-web-app | import React, { Component } from 'react';
import LoginView from './LoginView';
import SignUpView from './SignUpView';
import PasswordReset from './PasswordReset';
class AuthView extends Component {
constructor() {
super();
// 1: Giriş Ekranı
// 2. Kayıt Ekranı
// 3. Şifre reset ek... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.js | RobzDoom/frame_trap | /**
* 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.
*/
import Rea... |
fields/types/password/PasswordColumn.js | udp/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var PasswordColumn = React.createClass({
displayName: 'PasswordColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropType... |
examples/huge-apps/routes/Course/components/Nav.js | migolo/react-router | import React from 'react'
import { Link } from 'react-router'
const styles = {}
styles.nav = {
borderBottom: '1px solid #aaa'
}
styles.link = {
display: 'inline-block',
padding: 10,
textDecoration: 'none'
}
styles.activeLink = {
...styles.link,
color: 'red'
}
class Nav extends React.Component {
rende... |
app/javascript/mastodon/features/ui/components/focal_point_modal.js | NS-Kazuki/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import ImageLoader from './image_loader';
import classNames from 'classnames';
import { changeUploadCompose } from '../../../... |
src/svg-icons/action/zoom-out.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionZoomOut = (props) => (
<SvgIcon {...props}>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 ... |
tests/layouts/CoreLayout.spec.js | TriPSs/react-esc-example | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
src/components/Icon/Component.js | bryanmartin82/react-starter | import React from 'react';
import styles from './styles.css';
import classnames from 'classnames';
export default function(props) {
const {svg, className, size, ...rest} = props;
const sizeCls = styles[`size${size}`] ? styles[`size${size}`] : styles.size16;
return (
<span {...rest} className={classnames(size... |
test/ModalSpec.js | bbc/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Modal from '../src/Modal';
import { render, shouldWarn } from './helpers';
describe('Modal', () => {
let mountPoint;
beforeEach(() => {
mountPoint = document.createElement('div');
document.body.appendChild(mountPoint)... |
src/components/Banner/BannerElement.js | City-of-Helsinki/helerm-ui | import React from 'react';
import PropTypes from 'prop-types';
class BannerElement extends React.Component {
render () {
const { children, background, color } = this.props;
return (
<div className={`helerm-banner__element`} style={{ background, color }}>
{children}
</div>
);
}
}
Ba... |
node_modules/antd/es/anchor/AnchorLink.js | ZSMingNB/react-news | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-run... |
examples/src/components/CustomKeysField.js | silppuri/react-select | import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var CustomKeysField = React.createClass({
displayName: 'CustomKeysField',
propTypes: {
label: React.PropTypes.string
},... |
src/components/ContactDetails.js | lmtm/react-training | import React from 'react' // required for JSX
import { connect } from 'react-redux'
import * as api from '../client/api' // There is a huge flaw here, as this code should be executed server-side too
import { fetchContactInfo } from '../actions/contacts'
class ContactDetails extends React.Component {
getInfo ({ info... |
src/svg-icons/action/accessible.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccessible = (props) => (
<SvgIcon {...props}>
<circle cx="12" cy="4" r="2"/><path d="M19 13v-2c-1.54.02-3.09-.75-4.07-1.83l-1.29-1.43c-.17-.19-.38-.34-.61-.45-.01 0-.01-.01-.02-.01H13c-.35-.2-.75-.3-1.19... |
src/containers/location/Locator.js | visa-innovation-sf/ldn-retail-demo | import React, { Component } from 'react';
import {
View,
Image,
StyleSheet,
TouchableOpacity,
TouchableHighlight
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import { connect } from 'react-redux';
import {AppColors, AppStyles, AppSizes} from '@theme/';
import {
T... |
app/components/Store/Icons/LeftChevronIcon.js | VineRelay/VineRelayStore | import React from 'react';
import Icon from 'react-icon-base';
const LeftChevronIcon = (props) => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m31.1 6.7l-11.8 11.9 11.8 11.8q0.5 0.4 0.5 1t-0.5 1l-3.7 3.7q-0.4 0.5-1 0.5t-1-0.5l-16.5-16.5q-0.5-0.4-0.5-1t0.5-1l16.5-16.6q0.5-0.4 1-0.4t1 0.4l3.7 3.7q0.5 0.4 0.... |
src/components/header.js | juthatip/authentication-client | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class Header extends Component {
renderLinks() {
if (this.props.authenticated) {
// show a link to sign out
return <li className="nav-item">
<Link cla... |
src/entypo/InfoWithCircle.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--InfoWithCircle';
let EntypoInfoWithCircle = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M10,0.4c-5.303,0-9.601,4.298-9.601,9.6c0,5.303,4.298,9.601,9.601,9.601c5.301,0,9.6-4.... |
packages/forms/src/deprecated/widgets/TabsWidget.js | Talend/ui | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Tabs, Tab } from 'react-bootstrap';
import { toIdSchema } from 'react-jsonschema-form/lib/utils';
import ObjectField from '../fields/ObjectField';
class TabsField extends Component {
constructor(props) {
super(props);
this.stat... |
src/svg-icons/image/monochrome-photos.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageMonochromePhotos = (props) => (
<SvgIcon {...props}>
<path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3... |
src/svg-icons/av/replay-5.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay5 = (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.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2... |
src/components/NumberComponent/test.js | ProteinsWebTeam/interpro7-client | // @flow
import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import { NumberComponent } from '.';
const renderer = new ShallowRenderer();
describe('<NumberComponent />', () => {
test('should render', () => {
renderer.render(
<NumberComponent
abbr={true}
l... |
tests/lib/rules/indent.js | platinumazure/eslint | /**
* @fileoverview This option sets a specific tab width for your code
* @author Dmitriy Shekhovtsov
* @author Gyandeep Singh
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------... |
src/lens/negative-space/LensRight.js | ethanselzer/react-image-magnify | import React from 'react';
import objectAssign from 'object-assign';
import clamp from 'clamp';
import Lens from './Lens';
import LensPropTypes from '../../prop-types/Lens';
const LensRight = ({
cursorOffset,
position,
fadeDurationInMs,
isActive,
isPositionOutside,
smallImage,
style: parent... |
packages/icons/src/md/navigation/ChevronLeft.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdChevronLeft(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="29.83 14.83 27 12 15 24 27 36 29.83 33.17 20.66 24" />
</IconBase>
);
}
export default MdChevronLeft;
|
src/components/Register/TextInputForm.js | TalentedEurope/te-app | import React from 'react';
import { StyleSheet, TextInput, View } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
export const TextInputForm = (props) => {
const {
icon,
value,
placeholder,
returnKeyType,
onChangeText,
onSubmitEditing,
secureTextEntry,
k... |
packages/bonde-admin/src/components/layout/settings-page-content-layout.spec.js | ourcities/rebu-client | import React from 'react'
import { shallow } from 'enzyme'
import { expect } from 'chai'
import { SettingsPageContentLayout } from '@/components/layout'
describe('client/components/layout/settings-page-content-layout', () => {
let wrapper
beforeEach(() => {
wrapper = shallow(
<SettingsPageContentLayout... |
src/client/components/upload/uploadContainer.component.js | DBCDK/dbc-ufo | import React from 'react';
import ImageUpload from './imageUpload.component';
import UploadTypePicker from './uploadTypePicker.component';
import UrlUpload from './urlUpload.component';
import PreviewList from '../preview/previewList.component';
import Overlay from '../overlay/overlay.component';
import State from '../... |
frontend/components/SearchForm.js | datoszs/czech-lawyers | import React from 'react';
import PropTypes from 'prop-types';
import {wrapEventStop} from '../util';
import styles from './SearchForm.less';
const SearchForm = ({onSubmit, children}) => (
<form className={styles.main} onSubmit={wrapEventStop(onSubmit)}>
{children}
</form>
);
SearchForm.propTypes = {
... |
src/components/Button/Base/StatefulButtonState.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import ButtonIcon from './ButtonIcon';
const renderStatefulButtonIcon = (icon, sprite) => (
<ButtonIcon
position="left"
icon={icon}
size="small"
sprite={sprite}
/>
);
const StatefulButtonState = (props) => ... |
docs/containers/Customize.js | 5rabbits/portrait | import React from 'react'
import { Container } from 'shared'
const Customize = () =>
<Container>
<h1>Customize</h1>
</Container>
export default Customize
|
examples/CollectionBasic.js | mattBlackDesign/react-materialize | import React from 'react';
import Collection from '../src/Collection';
import CollectionItem from '../src/CollectionItem';
export default
<Collection>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
</Col... |
static/src/routes.js | tferreira/piggydime | /* eslint new-cap: 0 */
import React from 'react'
import { Route } from 'react-router'
/* containers */
import { App } from './containers/App'
import { HomeContainer } from './containers/HomeContainer'
import AccountsContainer from './containers/AccountsContainer'
import RecurrenceContainer from './containers/Recurre... |
client/components/UserInfo.js | Lendr-Codesmith/Lendr | import React, { Component } from 'react';
// To be completed...
class UserInfo extends Component {
render() {
return (
<div>
<div className="flex-grid">
<div className="col">Stuff I Lent</div>
<div className="col">Stuff I Borrow</div>
</div>
</div>
);
}
}
e... |
src/Board/Board.js | kasimir-k/laput | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './Board.css';
class Board extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="Board">
<div className="Board-header">
Here be the list add butt... |
new-lamassu-admin/src/components/TableLabel.js | lamassu/lamassu-server | import { makeStyles } from '@material-ui/styles'
import classnames from 'classnames'
import React from 'react'
import { Label1 } from './typography'
const useStyles = makeStyles({
wrapper: {
display: 'flex',
alignItems: 'center'
},
colorIndicator: {
borderRadius: 3,
height: 12,
width: 12,
... |
src/components/couchdb/plain-wordmark/CouchdbPlainWordmark.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './CouchdbPlainWordmark.svg'
/** CouchdbPlainWordmark */
function CouchdbPlainWordmark({ width, height, className }) {
return (
<SVGDeviconInline
className={'Couchdb... |
webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutChart/TasksDonutChart.stories.js | ares/foreman-tasks | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, number, text, select } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { TASKS_DONUT_CHART_FOCUSED_ON_OPTIONS_ARRAY } from './TasksDonutChartConstants';
import TasksDonutChart from './T... |
src/components/extensions/bosses/boss.js | vFujin/HearthLounge | import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import Block from "../extension-block";
import Overview from "./boss-blocks/overview";
import Strategy from "../class-challenges/challenges/class-challenge/blocks/strategy";
import Rewards from "../class-challenges/chall... |
src/Parser/DisciplinePriest/TALENT_DESCRIPTIONS.js | Yuyz0112/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
export default {
descriptions: {
[SPELLS.TWIST_OF_FATE_TALENT.id]: <span>After Shadowdamaging Disciplinehealing a target below 35% health, you deal 20% increased damage and 20% increased healing for 10 sec.</span>,
[SPELLS.CASTIGATION_TALENT.id... |
example/__tests__/index.ios.js | joelrfcosta/react-native-logentries | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.