path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/javascript/mastodon/features/compose/containers/warning_container.js
Kirishima21/mastodon
import React from 'react'; import { connect } from 'react-redux'; import Warning from '../components/warning'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; const buildHashtagRE = () => { try { const HASHTAG_SEPARATORS = '_\\u00b7\...
src/svg-icons/av/snooze.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSnooze = (props) => ( <SvgIcon {...props}> <path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9...
app/component/Nav.js
vankai/hitokoto-pwa
import React from 'react'; import PropTypes from 'prop-types'; import QueueAnim from 'rc-queue-anim'; import {withRouter, HashRouter as Router, Route, Link} from 'react-router-dom' import hitokotoDriver from '../API/hitokotoDriver'; import {PANEL_OPEN} from '../actions' import { navWrapper, nav, navPhone, na...
src/svg-icons/image/photo.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhoto = (props) => ( <SvgIcon {...props}> <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/> </SvgIcon> ); ImagePhoto = p...
src/index.js
expdevelop/yoap
import React from 'react' import { render } from 'react-dom' import { Provider } from 'mobx-react' import { AppContainer } from 'react-hot-loader' import { App } from 'containers' import { store } from 'store' export const Application = (App, _store) => ( <AppContainer> <Provider {..._store}> <App /> <...
src/Accordion.js
deerawan/react-bootstrap
import React from 'react'; import PanelGroup from './PanelGroup'; const Accordion = React.createClass({ render() { return ( <PanelGroup {...this.props} accordion> {this.props.children} </PanelGroup> ); } }); export default Accordion;
test/ModalSpec.js
jontewks/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Modal from '../src/Modal'; import { render, shouldWarn } from './helpers'; describe('Modal', function () { let mountPoint; beforeEach(() => { mountPoint = document.createElement('div'); document.body.appendChild(mount...
programming/javascript/react/src/dnd.js
at-ishikawa/samples
import React from 'react'; import ReactDOM from 'react-dom'; import { DragSource, DropTarget } from 'react-dnd'; const types = { ITEM: 'item' } const source = { beginDrag: (props) => { return props; } } const dragCollect = (connect, monitor) => { return { connectDragSource: connect.dragSource(), ...
src/components/Feedback/Feedback.js
austinsprawls/mqb
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback extends Component { render() { return ( <div className="Feedback...
packages/react-ui-components/src/DateInput/index.story.js
mstruebing/PackageFactory.Guevara
import React from 'react'; import {storiesOf, action} from '@storybook/react'; import {withKnobs, text, boolean} from '@storybook/addon-knobs'; import {StoryWrapper} from './../_lib/storyUtils'; import DateInput from '.'; storiesOf('DateInput', module) .addDecorator(withKnobs) .addWithInfo( 'default', ...
src/App.js
amsb/storybook_styled-components_example
import React, { Component } from 'react'; import styled, { keyframes } from 'styled-components'; import logo from './logo.svg'; const Main = styled.div` text-align: center; `; const Header = styled.div` background-color: #222; height: 150px; padding: 20px; color: white; `; const AppLogoSpin = keyframes` ...
app/jsx/shared/FlickrSearch.js
venturehive/canvas-lms
/* * Copyright (C) 2016 - 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...
src/components/SliderDemo/SliderDemo.js
askd/animakit
import SliderSimple from 'components/SliderSimple/SliderSimple'; import SliderFlexible from 'components/SliderFlexible/SliderFlexible'; import SliderColor from 'components/SliderColor/SliderColor'; import SliderVertical from 'components/SliderVertical/SliderVertical'; import SliderTimer from 'components/SliderTimer/Sli...
src/modules/common/NavLink.js
rllc/llc-archives-react
import React from 'react' import { Link } from 'react-router' class NavLink extends React.Component { render() { return <Link activeClassName="active" {...this.props} /> } } export default NavLink
src/TeamPage/Retros/Retros.js
velesin/retroinator
import React from 'react'; import moment from 'moment'; import './Retros.css'; import { Column, NewItemForm } from '../../shared'; import { Retro } from '../Retro/Retro'; export function Retros({ teamId, retros, onAddNew }) { function addNewRetro(name) { onAddNew(teamId, name); } const retrosWithTeamId = ...
frontend/src/containers/CreateTarget.js
esarafianou/rupture
import React from 'react'; import { ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from 'react-modal-bootstrap'; import { Form } from 'react-bootstrap'; import axios from 'axios'; export default class CreateTarget extends React.Component { handleSubmit = (event) => { let method; if...
stories/ContentTypeIcon.stories.js
nekuno/client
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { linkTo } from '@storybook/addon-links' import ContentTypeIcon from '../src/js/components/ui/ContentTypeIcon/ContentTypeIcon.js'; storiesOf('ContentTypeIcon', module) .add('Video', ()...
js/components/button/index.js
YeisonGomez/RNAmanda
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text, List, ListItem } from 'native-base'; import { Actions } from 'react-native-router-flux'; import { actions } from 'react-native-navigation-redux-helpers'; ...
src/pages/home/TodoList.js
flintovich/category-todos
import React, { Component } from 'react'; import { connect } from 'react-redux'; import moment from 'moment' import { Panel, ListGroup, ListGroupItem } from 'react-bootstrap'; import { toggleTodo, removeCategory } from '../../actions/index'; import './TodoList.css'; @connect(mapStateToProps, { toggleTodo, removeCateg...
src/PageItem.js
Cellule/react-bootstrap
import React from 'react'; import classNames from 'classnames'; const PageItem = React.createClass({ propTypes: { href: React.PropTypes.string, target: React.PropTypes.string, title: React.PropTypes.string, disabled: React.PropTypes.bool, previous: React.PropTypes.bool, next: React.PropTypes...
examples/todomvc/index.js
eraviart/redux
import 'babel-core/polyfill'; import React from 'react'; import Root from './containers/Root'; import 'todomvc-app-css/index.css'; React.render( <Root />, document.getElementById('root') );
src/withDisplayName.js
klarna/higher-order-components
import React from 'react' const takeAName = name => { const withDisplayName = TargetOrName => { if (typeof TargetOrName === 'string') { return takeAName(`${name}.${TargetOrName}`) } else { const WithDisplayName = props => <TargetOrName {...props} /> WithDisplayName.displayName = name ...
examples/basic/app.js
thinkcompany/react-a11y-announcer
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import Announcer from '../../src/Announcer'; class App extends Component { constructor(props) { super(props); this.state = { announcement: '' } this.handleClick = this.handleClick.bind(this); } handleClick() { ...
blueocean-material-icons/src/js/components/svg-icons/hardware/keyboard-tab.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const HardwareKeyboardTab = (props) => ( <SvgIcon {...props}> <path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/> </SvgIcon> ); HardwareKeyboardTab.displayName = 'HardwareKeyboardTab'; HardwareKeyboardTab...
node_modules/react-bootstrap/es/DropdownMenu.js
premcool/getmydeal
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _Array$from from 'babel-runtime/core-js/array/from'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtim...
fields/types/boolean/BooleanFilter.js
qwales1/keystone
import React from 'react'; import { SegmentedControl } from 'elemental'; const VALUE_OPTIONS = [ { label: 'Is Checked', value: true }, { label: 'Is NOT Checked', value: false }, ]; function getDefaultValue () { return { value: true, }; } var BooleanFilter = React.createClass({ propTypes: { filter: React.Pro...
examples/with-algolia-react-instantsearch/components/head.js
nelak/next.js
import NextHead from 'next/head' import { string } from 'prop-types' import React from 'react' const defaultDescription = '' const defaultOGURL = '' const defaultOGImage = '' export const Head = props => <NextHead> <meta charSet='UTF-8' /> <title>{props.title || ''}</title> <meta name='description...
youtube-searcher/src/js/components/video_list_item.js
rsancle/udemy-react
import React from 'react'; const VideoListItem = ({video, onVideoSelect}) => { const imageUrl = video.snippet.thumbnails.default.url; return ( <li onClick = {() => onVideoSelect(video)} className = "list-group-item"> <div className = "video-list media" > <div className="media-left"> ...
app/screens/eCommerce/cards.js
it-surya/hack-jeninvest
import React from 'react'; import { StyleSheet, FlatList, View, Image, TouchableOpacity, Modal } from 'react-native'; import { RkText, RkCard, RkButton, RkStyleSheet, RkTheme } from 'react-native-ui-kitten'; import LinearGradient from 'react-native-linear-gradient'; import {data} from '../../data'...
src/Card/CardContent.spec.js
dsslimshaddy/material-ui
// @flow import React from 'react'; import { assert } from 'chai'; import { createShallow, getClasses } from '../test-utils'; import CardContent from './CardContent'; describe('<CardContent />', () => { let shallow; let classes; before(() => { shallow = createShallow({ untilSelector: 'CardContent' }); ...
Study/Udemy Docker and Kubernetes/Section09/deployment-07-added-frontend-project/frontend/src/components/UI/ErrorAlert.js
tarsoqueiroz/Docker
import React from 'react'; import './ErrorAlert.css'; function ErrorAlert(props) { return ( <section className='error-alert'> <h2>Something went wrong!</h2> <p>{props.errorText}</p> </section> ); } export default ErrorAlert;
src/components/GeneralRoulette/GeneralRoulette.js
eunvanz/handpokemon2
import React from 'react' import PropTypes from 'prop-types' import bg from './assets/unloader.png' class GeneralRoulette extends React.PureComponent { render () { const { id, images, style, size, innerSize, ...props } = this.props const renderImages = () => { return images.map((image, idx) => <img ke...
react/components/Profile/NotLoaded.js
xpandmmi/biographies
import React from 'react'; import TranslatableComponent from 'components/I18N/TranslatableComponent'; import LinearProgress from 'material-ui/LinearProgress'; export default class NotLoaded extends TranslatableComponent { render() { const styles = { flexCards: { alignItems: 'center', width:...
ajax/libs/react-instantsearch/5.2.0-beta.0/Connectors.js
ahocevar/cdnjs
/*! React InstantSearch 5.2.0-beta.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : typeof define === 'function' && define.amd ? define(['ex...
app/static/src/diagnostic/LabCreateForm.js
vsilent/Vision
import React from 'react'; import injectTapEventPlugin from "react-tap-event-plugin"; import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table'; import FormControl from 'react-bootstrap/lib/FormControl'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import ControlLabel from 'react-bootstrap/lib/C...
components/animals/zebraGrevyho.adult.js
marxsk/zobro
import React, { Component } from 'react'; import { Text } from 'react-native'; import styles from '../../styles/styles'; import InPageImage from '../inPageImage'; import AnimalText from '../animalText'; import AnimalTemplate from '../animalTemplate'; const IMAGES = [ require('../../images/animals/zebraGrevyho/01.jp...
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/DropDownMenu/ExampleOpenImmediate.js
pbogdan/react-flux-mui
import React from 'react'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; export default class DropDownMenuOpenImmediateExample extends React.Component { constructor(props) { super(props); this.state = {value: 2}; } handleChange = (event, index, value)...
internals/templates/app.js
Cherchercher/Wedding-Llama
/** * 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 { Provider } from 'react-redux'; impor...
src/components/Filters/Filter.js
wundery/wundery-ui-react
import React, { Component } from 'react'; import classnames from 'classnames'; class Filter extends Component { static propTypes = { title: React.PropTypes.string.isRequired, onChange: React.PropTypes.func.isRequired, active: React.PropTypes.bool, }; static defaultProps = { active: false, }; ...
components/Icon/Icon.js
scott-riley/loggins
import React, { Component } from 'react'; import invariant from 'invariant'; import styles from './Icon.css'; import icons from './icons'; export default class Icon extends Component { constructor(props) { super(props); invariant( icons[props.name], `Icon(): No icon exists for "${props.name}"` ...
assets/javascripts/kitten/components/graphics/icons-next/long-arrow-icon-next/stories.js
KissKissBankBank/kitten
import React from 'react' import { Grid, GridCol } from 'kitten' import { LongArrowIconNext } from './index' import { DocsPage } from 'storybook/docs-page' export default { title: 'Graphics/Icons Next/LongArrowIconNext', component: LongArrowIconNext, parameters: { docs: { page: () => ( <DocsPag...
src/Collapse.js
xiaoking/react-bootstrap
import React from 'react'; import Transition from 'react-overlays/lib/Transition'; import domUtils from './utils/domUtils'; import CustomPropTypes from './utils/CustomPropTypes'; import deprecationWarning from './utils/deprecationWarning'; import createChainedFunction from './utils/createChainedFunction'; let capitali...
src/components/Container/Container.js
andrew-filonenko/habit-tracker
import React from 'react'; export default function Container({ children }) { return <div className="b-container">{ children }</div>; }
screens/ProfileScreen/index.js
React-Native-Warehouse/TabBasicExtension
import React from 'react'; import { ScrollView, StyleSheet } from 'react-native'; import { ExpoLinksView } from '@expo/samples'; export default class ProfileScreen extends React.Component { static navigationOptions = { title: 'Profile', }; render() { return ( <ScrollView style={styles.container}> ...
src/containers/App/App.js
anvk/redux-portal-boilerplate
import '../../../node_modules/bootstrap/dist/css/bootstrap.min.css'; import '../../../node_modules/bootstrap/dist/js/bootstrap.js'; import '../../../node_modules/ladda/dist/ladda-themeless.min.css'; import '../../../node_modules/ladda/dist/ladda.min.js'; import '../../../node_modules/ladda/dist/spin.min.js'; import '.....
src/svg-icons/notification/bluetooth-audio.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationBluetoothAudio = (props) => ( <SvgIcon {...props}> <path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-...
screens/EditScreen.js
beaesguerra/Aut2Talk
import React, { Component } from 'react'; import {Text, StyleSheet, View, TextInput, Button, Alert, ScrollView } from 'react-native'; import Video from 'react-native-video'; import Backend from './DataModification'; import { NavigationActions } from 'react-navigation'; export default class EditScreen extends Component...
src/names/UnprotectedPage.js
VasilyShelkov/ClientRelationshipManagerUI
import React from 'react'; import { Switch, Route } from 'react-router'; import UnprotectedNamesWithData from '../names/list/unprotected/UnprotectedNamesWithData'; import AddUnprotectedNameFormWithData from './list/unprotected/add/UnprotectedNameFormWithData'; export default ({ match }) => { return ( <Switch> ...
qmarkit/src/qmark/QmarkCard/factory.js
tjpumis/alchemy
import React from 'react'; export function componentFactory(mapTagComp) { const _createComponent = (tree, level = 0, index = 0) => { // 遍历tag tree,将tag转换成component let tag = tree[0]; const props = { key: `qmd-${tag}-${index}` }; let attrs = tree[1]; i...
docs/src/examples/collections/Grid/Content/GridExampleColumns.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Grid, Image } from 'semantic-ui-react' const GridExampleColumns = () => ( <Grid> <Grid.Row> <Grid.Column width={8}> <Image src='/images/wireframe/paragraph.png' /> </Grid.Column> <Grid.Column width={8}> <Image src='/images/wireframe/paragraph.p...
site/components/Wrap.js
romelperez/romelperez.com
import React from 'react'; import cx from 'classnames'; import { withStyles } from 'arwes'; const styles = () => ({ root: { margin: '0 auto', maxWidth: 800, } }); const Wrap = props => { const { theme, classes, className, children, ...etc } = props; const cls = cx(classes.root, c...
src/svg-icons/editor/format-underlined.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatUnderlined = (props) => ( <SvgIcon {...props}> <path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/> </SvgIcon> ); EditorF...
docs/app/Examples/elements/Label/Types/index.js
vageeshb/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const LabelTypes = () => ( <ExampleSection title='Types'> <ComponentExample title='Label' description='A label' ...
src/main/components/lib/json-schema-form-controller.js
hayond/web-pack-example
import React from 'react' import ObjectJsonSchema from './schema/object-json-schema' export default class JsonSchemaFormController { jsonSchema = null baseFieldProps = {} componentContext = {} initController() { } getValues() { } setValues() { } reset() { } componentDefaultSchema(type) { le...
packages/material-ui-icons/src/SwapHoriz.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z" /></g> , 'SwapHoriz');
app/packs/src/components/ContainerDatasets.js
ComPlat/chemotion_ELN
import React, { Component } from 'react'; // import PropTypes from 'prop-types'; import { ListGroup, ListGroupItem, Button, Well } from 'react-bootstrap'; import ContainerDatasetModal from './ContainerDatasetModal'; import ContainerDatasetField from './ContainerDatasetField'; import Container from './models/Container';...
src/index.js
zerkedev/zerke-app
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import {FirebaseProvider} from 'firekit'; import configureStore from './store'; import { Root } from './containers/Root'; import { addLocalizationData } from './locales'; import registerServiceWorker from './regi...
app/javascript/client_messenger/tour/globalStyle.js
michelson/chaskiq
import { Global, css } from '@emotion/core' import React from 'react' export default function GlobalStyle () { return (<Global styles={css` .focus-outline-hidden :focus { outline: none; } div[data-tour-elem="controls"] { justify-content: center ...
addons/notes/src/index.js
enjoylife/storybook
import React from 'react'; import PropTypes from 'prop-types'; import addons from '@storybook/addons'; export class WithNotes extends React.Component { render() { const { children, notes } = this.props; const channel = addons.getChannel(); // send the notes to the channel. channel.emit('storybook/no...
src/components/Pagination.js
fhelwanger/react-datatable
import React from 'react'; export default class Pagination extends React.Component { handleClickPage(page, e) { e.preventDefault(); if (page < 1) page = 1; if (page > this.totalPages()) page = this.totalPages(); this.props.onChangePage(page - 1); } currentPage() { return this.props.current...
src/components/helpers/loadbar.js
VictorQD/react-pdf-viewer
import React from 'react'; const Loader = ({ loadingProgress }) => { const pct = () => { let val = parseInt(loadingProgress); // var $circle = $('#svg #bar'); const radius = 15; // $circle.attr('r'); const c = 2 * Math.PI * radius; if (val < 0) val = 0; if (val > 100) val = 100; return (1...
tests/client/imports/MaterialTabs.tests.js
Zodiase/meteor-mdl-react
import { Meteor } from 'meteor/meteor'; import { describe, it } from 'meteor/practicalmeteor:mocha'; import { expect } from 'meteor/practicalmeteor:chai'; import React from 'react'; import { render } from 'react-dom'; import { MDlReact } from 'meteor/zodiase:mdl-react'; export default (createContainer) => { describ...
assets/javascripts/kitten/components/structure/cards/contribution-card/components/description.js
KissKissBankBank/kitten
import React from 'react' import classNames from 'classnames' import { Text } from '../../../../typography/text' export const Description = props => { return ( <Text tag="p" color="font1" weight="light" size="micro" {...props} className={classNames('k-ContributionCard__descrip...
features/base/media/components/AbstractVideoTrack.js
jitsi/jitsi-meet-react
import React, { Component } from 'react'; import { trackVideoStarted } from '../../tracks'; import { shouldRenderVideoTrack } from '../functions'; import { Video } from './_'; /** * Component that renders video element for a specified video track. * * @abstract */ export class AbstractVideoTrack extends Componen...
src/docs/examples/ProgressBar/Example100Percent.js
zeegeek/ps-react-reusable-comp
import React from 'react' import ProgressBar from 'rc-react/ProgressBar'; /** 100% Progress & height 0f 20px*/ export default function Example10Percent() { return <ProgressBar width={150} percent={100} height={20} /> }
src/renderer/pages/controllers/player.js
venobo/app
import React from 'react' import classNames from 'classnames' import debounce from 'debounce' import {ipcRenderer} from 'electron' import {dispatch} from '../../lib/dispatcher' import PlayerPage from '../player' export default class PlayerController extends React.Component { initialState = { isReady: false, ...
test/withLink.js
LeonardoGentile/react-mobx-router5
import React from 'react'; import {mount} from 'enzyme'; import {mobxPlugin, RouterStore} from 'mobx-router5'; import {createTestRouter} from './utils/test-utils'; import withLink from '../src/modules/withLink'; import NavLink from '../src/modules/NavLink'; describe('withLink', () => { let router; let routerStore...
src/js/components/icons/base/DocumentTransfer.js
odedre/grommet-final
/** * @description DocumentTransfer SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColo...
docs/src/examples/elements/Rail/Variations/RailExampleAttachedInternal.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Image, Rail, Segment } from 'semantic-ui-react' const RailExampleAttachedInternal = () => ( <Segment> <Image src='/images/wireframe/paragraph.png' /> <Rail attached internal position='left'> <Segment>Left Rail Content</Segment> </Rail> <Rail attached interna...
example/src/MyComponent.js
damassi/react-responsive-decorator
import React from 'react'; import Responsive from '../../src/index'; @Responsive class MyComponent extends React.Component { static propTypes = { hey: React.PropTypes.string, you: React.PropTypes.bool } state = { isMobile: false } componentDidMount() { this.props.media({ minWidth: 768 }, (...
src/documentation/Usage/UsageHtml-story.legacy.js
wfp/ui
/* eslint-disable no-console */ import React from 'react'; import { storiesOf } from '@storybook/react'; import PrismCode from 'react-prism'; import Page from '../Page'; import Blockquote from '../../components/Blockquote'; import Link from '../../components/Link'; storiesOf('Getting started|Getting started', module)...
fields/types/code/CodeField.js
xyzteam2016/keystone
import _ from 'lodash'; import CodeMirror from 'codemirror'; import Field from '../Field'; import React from 'react'; import { findDOMNode } from 'react-dom'; import { FormInput } from 'elemental'; import classnames from 'classnames'; /** * TODO: * - Remove dependency on underscore */ // See CodeMirror docs for AP...
src/layouts/social.js
jszgb/jszgb.github.io
import React from 'react' import { Timeline } from 'react-twitter-widgets' import FontAwesome from 'react-fontawesome' const Social = () => ( <aside id='social'> {/* <h2><b className='icon-calendar' />Upcoming events</h2> <table id='events' /> */} <h2><FontAwesome name='twitter' />Follow <a href='https:/...
src/parser/rogue/subtlety/modules/core/NightbladeDuringSymbols.js
fyruna/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import DamageTracker from 'parser/shared/modules/AbilityTracker'; import SymbolsDamageTracker from './SymbolsDamageTracker'; class NightbladeDuringSymbols extends Ana...
frontend/app/js/components/genericform/selectservice.js
serverboards/serverboards
import React from 'react' import rpc from 'app/rpc' import RichDescription from './richdescription' import i18n from 'app/utils/i18n' import store from 'app/utils/store' import {match_traits, map_get} from 'app/utils' import cache from 'app/utils/cache' import AddServiceModal from 'app/components/service/addmodal' impo...
app/containers/ExportDialog/index.js
acebusters/ab-web
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { DialogContents, DialogTitle, DialogButtonWrapper, DialogText, } from 'components/Modal/styles'; import Input from '../../components/Input'; import CopyInput from '../../components/CopyInput'; import S...
app/javascript/mastodon/features/ui/components/boost_modal.js
yukimochi/mastodon
import React from 'react'; import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Button from '../../../components/button'; import StatusContent from '../../....
src/svg-icons/image/remove-red-eye.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageRemoveRedEye = (props) => ( <SvgIcon {...props}> <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5...
docs/src/pages/demos/lists/SimpleList.js
AndriusBil/material-ui
// @flow weak import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import List, { ListItem, ListItemIcon, ListItemText } from 'material-ui/List'; import Divider from 'material-ui/Divider'; import InboxIcon from 'material-ui-icons/Inbox'; import DraftsIcon from...
app/javascript/mastodon/features/ui/components/column_link.js
Toootim/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Link from 'react-router-dom/Link'; const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => { if (href) { return ( <a href={href} className={`column-link ${hideOnMobile ? 'hidden-on-mobile' : ''}`} data-method={method}> ...
src/svg-icons/notification/do-not-disturb-off.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationDoNotDisturbOff = (props) => ( <SvgIcon {...props}> <path d="M17 11v2h-1.46l4.68 4.68C21.34 16.07 22 14.11 22 12c0-5.52-4.48-10-10-10-2.11 0-4.07.66-5.68 1.78L13.54 11H17zM2.27 2.27L1 3.54l2.78 2.78...
packages/flow-upgrade/src/upgrades/0.53.0/ReactUtilityTypes/__tests__/codemod-test.js
mroch/flow
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ 'use strict'; const path = require('path'); const fs = require('fs'); const cp = require('child_process'); const ...
src/parser/deathknight/unholy/modules/features/checklist/Component.js
fyruna/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import Checklist from 'parser/shared/modules/features/Checklist'; import Rule from 'parser/shared/modules/features/Checklist/Rule'; import Requirement from 'parser/shared/modules...
web/assets/js/dmspage/ImageUpload.js
xuqiantong/NY_Auto
import React, { Component } from 'react'; import './ImageUpload.css'; var Row = require('react-bootstrap/lib/Row'); var Col = require('react-bootstrap/lib/Col'); var Image = require('react-bootstrap/lib/Image'); var ControlLabel = require('react-bootstrap/lib/ControlLabel'); export default class ImageUpload extends...
app/modules/Notes/components/AddNote.js
osenvosem/react-mobx-boilerplate
import React, { Component } from 'react'; import { observer } from 'mobx-react'; import styles from '../styles.css'; @observer export default class AddNote extends Component { handleSubmit = (e) => { e.preventDefault(); const title = e.target.title.value; const body = e.target.body.value; if (title &...
fixtures/nesting/src/shared/Clock.js
ArunTesco/react
import React from 'react'; import useTime from './useTime'; export default function Clock() { const time = useTime(); return <p>Time: {time}</p>; }
packages/react-error-overlay/src/components/Collapsible.js
christiantinauer/create-react-app
/** * 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. */ /* @flow */ import React, { Component } from 'react'; import { black } from '../styles'; import type { Element as ReactElement } from '...
src/routes/Logged/screens/Match/Match.js
rlesniak/tind3r.com
// @flow import React, { Component } from 'react'; import { observer, inject } from 'mobx-react'; import { observable } from 'mobx'; import { Link } from 'react-router-dom'; import { Scrollbars } from 'react-custom-scrollbars'; import cx from 'classnames'; import ReactTooltip from 'react-tooltip'; import MessageStore...
src/parser/paladin/retribution/modules/features/Checklist/Component.js
FaideWW/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import Checklist from 'parser/shared/modules/features/Checklist2'; import Rule from 'parser/shared/modules/features/Checklist2/Rule'; import Requirement from 'parser/shared/modul...
app/javascript/mastodon/features/community_timeline/index.js
summoners-riftodon/mastodon
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader fro...
examples/async-data/app.js
keathley/react-router
import React from 'react'; import { history } from 'react-router/lib/HashHistory'; import { Router, Route, Link, Navigation } from 'react-router'; import { loadContacts, loadContact, createContact } from './utils'; import AsyncProps from 'react-router/lib/experimental/AsyncProps'; var Spinner = React.createClass({ r...
src/svg-icons/action/perm-data-setting.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPermDataSetting = (props) => ( <SvgIcon {...props}> <path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.0...
app/javascript/mastodon/components/avatar_overlay.js
haleyashleypraesent/ProjectPrionosuchus
import React from 'react'; import PropTypes from 'prop-types'; class AvatarOverlay extends React.PureComponent { static propTypes = { staticSrc: PropTypes.string.isRequired, overlaySrc: PropTypes.string.isRequired, }; render() { const { staticSrc, overlaySrc } = this.props; const baseStyle = {...
Practicas/TicTac2/app.js
tonkyfiero/React_Ejercicios
import React from 'react'; import ReactDOM from 'react-dom'; import Game from './componentes/Game.js'; ReactDOM.render(<Game />,document.getElementById('root'));
src/interface/report/Results/ScrollToTop/index.js
sMteX/WoWAnalyzer
import React from 'react'; import { ReactComponent as Logo } from 'interface/images/logo.svg'; // This has an elevator music easter egg that occurs randomly once every 5 times. // Lazy load it to minimize bundle impact. This whole joke has a tiny amount of overhead. let elevator; async function loadElevator() { ele...
src/state/route/PrivateRoute.js
dannegm/danielgarcia
import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import useAuth from '@/shared/hooks/useAuth'; // eslint-disable-next-line react/prop-types const PrivateRoute = ({ component: Component, ...rest }) => { const { isLoading, isAuthorized } = useAuth(); if (isLoading) { retur...
tests/Rules-isUrl-spec.js
optiopay/optiopay-form
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import Formsy from './..'; import { InputFactory } from './utils/TestInput'; const TestInput = InputFactory({ render() { return <input value={this.getValue()} readOnly/>; } }); const TestForm = React.createClass({ render() { re...
test/setup.js
pburtchaell/react-input
import React from 'react'; import { shallow, render, mount } from 'enzyme'; global.React = React; global.shallow = shallow; global.render = render; global.mount = mount;
src/js/index.js
geraldchecka/bco_react_example
/* Libraries */ import React from 'react'; import { render } from 'react-dom'; /* Components */ import { MobilesPage } from './views'; /* CSS */ import '../css/style.css'; const mountNode = document.getElementById("parent"); render(<MobilesPage />, mountNode);
fixtures/dom/src/components/fixtures/input-change-events/RangeKeyboardFixture.js
mhhegazy/react
import React from 'react'; import Fixture from '../../Fixture'; class RangeKeyboardFixture extends React.Component { constructor(props, context) { super(props, context); this.state = { keydownCount: 0, changeCount: 0, }; } componentDidMount() { this.input.addEventListener('keydown'...