path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
src/components/Sections/SectionImage.js
demisto/sane-reports
import React from 'react'; import PropTypes from 'prop-types'; const SectionImage = ({ src, style, alt, classes }) => <img className={'section-image ui image ' + classes} src={src} style={style} alt={alt} />; SectionImage.propTypes = { src: PropTypes.string, style: PropTypes.object, alt: PropTypes.string, cl...
src/parser/druid/balance/modules/talents/StellarFlareUptime.js
sMteX/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import SpellLink from 'common/SpellLink'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage } from 'common/format'; import StatisticBox, {...
app/javascript/mastodon/features/list_adder/components/account.js
cybrespace/mastodon
import React from 'react'; import { connect } from 'react-redux'; import { makeGetAccount } from '../../../selectors'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Avatar from '../../../components/avatar'; import DisplayName from...
src/addons/Portal/Portal.js
Semantic-Org/Semantic-UI-React
import EventStack from '@semantic-ui-react/event-stack' import { handleRef, Ref } from '@fluentui/react-component-ref' import keyboardKey from 'keyboard-key' import _ from 'lodash' import PropTypes from 'prop-types' import React from 'react' import { ModernAutoControlledComponent as Component, customPropTypes, d...
src/components/sparklineWidget/sparklineChart.js
govau/datavizkit
import React from 'react'; import {compose} from 'recompose'; import withHighcharts from './../withHighcharts'; import withSparkline from './withSparkline'; import Count from './../count/count.js'; import TrendLegend from './../trendLegend/trendLegend.js'; const SparklineChart = ({children, countValue, countUnits,...
examples/04 Sortable/Stress Test/index.js
craigklem/react-dnd
import React, { Component } from 'react'; import Container from './Container'; export default class SortableStressTest extends Component { constructor(props) { super(props); // Avoid rendering on server because the big data list is generated this.state = { shouldRender: false }; } componentDidMount(...
Lumino/js/components/WrappedComponents/Picker.js
evonove/lumino
import React from 'react'; import PropTypes from 'prop-types'; import { Picker as NativePicker } from 'native-base'; const Picker = ({ input: { onChange, value }, children, ...custom }) => ( <NativePicker selectedValue={value} onValueChange={val => onChange(val)} {...custom} > {children} </Nativ...
options/TextConfigItem.js
SuperDOgePx/chrome-extension-react
import React from 'react'; import { autobind } from 'core-decorators'; import ConfigItem from './ConfigItem'; @autobind export default class TextConfigItem extends ConfigItem { changeHandler(e) { this.setValue(e.target.value); } renderConfig() { const { size = 30 } = this.props; return ( <lab...
examples/src/Badges/Badges.js
DanielMontesDeOca/react-autosuggest
require('./Badges.less'); import React, { Component } from 'react'; export default class Badges extends Component { render() { return ( <div className="badges"> <a href="//codeship.com/projects/67868" target="_blank"> <img src="//img.shields.io/codeship/41810250-aa07-0132-fbf4-4e62e8945e...
examples/demo/Form/index.js
NE-LOAN-FED/NE-Component
/** * Created by kisnows on 2016/12/26. */ import React from 'react' import { Form, Input, Select, CheckBox, CellInput, Cells, Cell, Icon, Modal, Alert, VerifyButton, Toast, Button } from '../../../lib' import Logger from '../../../src/_utils/log' import lang from '../../utils/lang' import v...
src/components/Privacy/Privacy.react.js
isuruAb/chat.susi.ai
import '../Terms/Terms.css'; import $ from 'jquery'; import Footer from '../Footer/Footer.react'; import PropTypes from 'prop-types'; import StaticAppBar from '../StaticAppBar/StaticAppBar.react'; import React, { Component } from 'react'; class Privacy extends Component { constructor(props) { super(props); ...
app/components/ColorChanger/Title/index.js
cerebral/cerebral-boilerplate-universal
import React from 'react'; import styles from './styles.css'; function Title(props) { return ( <h1 style={{color: props.color}} className={styles.title}> {props.children} </h1> ); } Title.propTypes = { color: React.PropTypes.string.isRequired, children: React.PropTypes.any.isRequired }; export ...
src/svg-icons/av/av-timer.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvAvTimer = (props) => ( <SvgIcon {...props}> <path d="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-...
js/components/TodoItem.js
rodson/react-es6-flux-todolist
import React from 'react'; import TodoActions from '../TodoActions'; import classNames from 'classnames'; const KEY_ENTER = 13; class TodoItem extends React.Component { static propTypes = { todo: React.PropTypes.object, editing: React.PropTypes.bool, onEdit: React.PropTypes.func, onToggle: React.Pr...
src/Tooltip.js
JimiHFord/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import CustomPropTypes from './utils/CustomPropTypes'; const Tooltip = React.createClass({ mixins: [BootstrapMixin], propTypes: { /** * An html id attribute, necessary for accessibility * @...
src/page/ProjectPage/ProjectPage.js
dovydasvenckus/time-tracker-web
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ProjectInfo from '../../components/ProjectInfo/ProjectInfo'; import TimeEntriesListContainer from '../../containers/TimeEntriesListContainer'; class ProjectPage extends Component { componentDidMount = () => { const { loadProject...
app/containers/HomePage.js
matthieuh/desktop-assistant
// @flow import React, { Component } from 'react'; import Home from '../components/Home'; export default class HomePage extends Component { render() { return ( <Home /> ); } }
Web/src/modules/Blog/components/BlogIndex.js
lepsalex/Mansplaining
// @flow import React from 'react' import Helmet from 'react-helmet' const BlogIndex = () => ( <div> <Helmet title="Blog" /> <h1>Blog</h1> </div> ) BlogIndex.displayName = 'BlogIndex' export default BlogIndex
src/svg-icons/action/dashboard.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDashboard = (props) => ( <SvgIcon {...props}> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/> </SvgIcon> ); ActionDashboard = pure(ActionDashboard); ActionDashboard.displayName...
docs/src/PropTable.js
cgvarela/react-bootstrap
import merge from 'lodash-compat/object/merge'; import React from 'react'; import Glyphicon from '../../src/Glyphicon'; import Label from '../../src/Label'; import Table from '../../src/Table'; let cleanDocletValue = str => str.trim().replace(/^\{/, '').replace(/\}$/, ''); let capitalize = str => str[0].toUpperCase()...
examples/counter/devTools.js
Foxandxss/ng2-redux
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'; import React, { Component } from 'react'; import {bind} from 'angular2/di'; let devTools = bind('devTools').toFactory(() => { return { start: (ngRedux) => { startDevTools(ngRedux); } }; }); export default devToo...
test/test_helper.js
suyash95/React-youtube-app
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
examples/passing-props-to-children/app.js
AnSavvides/react-router
import React from 'react'; import { Router, Route, Link, History } from 'react-router'; var App = React.createClass({ mixins: [ History ], getInitialState() { return { tacos: [ { name: 'duck confit' }, { name: 'carne asada' }, { name: 'shrimp' } ] }; }, addTaco() {...
src/components/RecentTracks.js
jeromelachaud/Last.fm-Activities-React
import React from 'react'; import styled from 'styled-components'; import RecentTrack from './RecentTrack.js'; import _map from 'lodash/map'; import _isEqual from 'lodash/isEqual'; import { fetchRecentTracks } from '../actions/action-creators'; import PropTypes from 'prop-types'; const RecentTrackWrapper = styled.se...
examples/todomvc/index.js
darrrk/redux
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; import 'todomvc-app-css/index.css'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} ...
react/features/prejoin/components/preview/ParticipantName.js
bgrozev/jitsi-meet
// @flow import React, { Component } from 'react'; import { translate } from '../../../base/i18n'; type Props = { /** * Flag signaling if the name is ediable or not. */ isEditable: boolean, /** * Joins the current meeting. */ joinConference: Function, /** * Sets the nam...
src/pages/blog.js
jameslutley/jameslutley.com
import React from 'react' import Link from 'gatsby-link' const BlogPage = () => ( <div> <h1>Blog</h1> <p>Welcome to blog page</p> <Link to="/">Go back to the homepage</Link> </div> ) export default BlogPage
client-react/src/components/LoginForm/LoginForm.js
diman84/Welthperk
import React, { Component } from 'react'; import { reduxForm, Field, propTypes } from 'redux-form'; import loginValidation from './loginValidation'; @reduxForm({ form: 'login', validate: loginValidation }) export default class LoginForm extends Component { static propTypes = { ...propTypes } renderInput...
src/js/components/icons/base/Validation.js
codeswan/grommet
import React from 'react'; import Validate from './Validate'; export default (props) => { console.warn( 'Validation has been renamed to Validate.' + ' Plese update your import statement.' ); return <Validate {...props} />; };
client/views/admin/info/InstancesCard.js
VoiSmart/Rocket.Chat
import { Box, ButtonGroup, Button } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import React from 'react'; import Card from '../../../components/Card'; import { useSetModal } from '../../../contexts/ModalContext'; import { useTranslation } from '../../../contexts/Tra...
demo/demo.js
bayun2/calendar
import React from 'react'; import ReactDOM from 'react-dom'; import Calendar from '../src/index.js'; const rootEl = document.createElement('div'); document.body.appendChild(rootEl); if (module.hot) { import('react-hot-loader').then(({AppContainer}) => { const render = () => ReactDOM.render(<AppContainer> ...
v7/development/src/pages/tag/index.js
BigBoss424/portfolio
/* Vendor imports */ import React from 'react' import PropTypes from 'prop-types' import { graphql, Link } from 'gatsby' import Image from 'gatsby-image' /* App imports */ import Layout from '../../components/layout' import SEO from '../../components/seo' import Config from '../../../config' import Utils from '../../ut...
client/components/FriendsList.js
carlbernardo/gut
import React from 'react'; //Components import FriendEntry from './FriendEntry'; class FriendsList extends React.Component { constructor(){ super(); this.displayFriends = this.displayFriends.bind(this); } displayFriends(){ const { userFriends, username, displayFriendsChoice, diners } = this.props; ...
www/src/components/TimeDistanceRow.js
savannidgerinel/health
import React from 'react' import math from 'mathjs' import moment from 'moment' require('moment-duration-format') import { divmod, intercalate, padStr , parseUnit, parseTime, renderTime , renderDistance , parseDuration, renderDuration } from '../common' import { TextEditForm } from './ValidatedTex...
src/entypo/EmojiFlirt.js
cox-auto-kc/react-entypo
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--EmojiFlirt'; let EntypoEmojiFlirt = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M7.5,9.75C8.329,9.75,9,8.967,9,8S8.329,6.25,7.5,6.25S6,7.034,6,8S6.672,9.75,7.5,9.75z M10,0.4...
src/svg-icons/action/description.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDescription = (props) => ( <SvgIcon {...props}> <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/> </SvgIcon> ); A...
websites/submit.vefverdlaun.is/src/components/Loading/index.js
svef/www
import React from 'react' import './styles.css' export default () => ( <div className="Loading"> <div className="sk-folding-cube"> <div className="sk-cube1 sk-cube" /> <div className="sk-cube2 sk-cube" /> <div className="sk-cube4 sk-cube" /> <div className="sk-cube3 sk-cube" /> </div...
src/icons/StrokeWindow.js
ipfs/webui
import React from 'react' const StrokeWindow = props => ( <svg viewBox='0 0 100 100' {...props}> <path d='M77.46 24H27.53c-4.2 0-8 4.11-8 8.61v35.26a8.29 8.29 0 0 0 8 8.13h49.93a8.1 8.1 0 0 0 7.86-8.13V32.61c0-4.06-3.32-8.61-7.86-8.61zm-49.93 3h49.93c2.74 0 4.86 3 4.86 5.61v1.57H22.51v-1.57c0-2.83 2.49-5.61 5.02...
src/components/03-organisms/SearchableUserTable/UserTableHeader/index.js
buildit/bookit-web
import React from 'react' const UserTableHeader = () => ( <thead> <tr> <td>Name</td> <td>Location</td> <td>Email</td> </tr> </thead> ) export default UserTableHeader
aaf-enrollment/src/components/enrollment/test-authenticator/method-tests/AsyncOnlyTest.js
MicroFocus/CX
import React from 'react'; class AsyncOnlyTest extends React.PureComponent { constructor(props) { super(props); this.props.setTestButtonAvailability(false); this.props.setAsyncLogon(() => {}, true); } render() { return null; } } export default AsyncOnlyTest;
src/NavItem.js
PeterDaveHello/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import SafeAnchor from './SafeAnchor'; const NavItem = React.createClass({ mixins: [BootstrapMixin], propTypes: { linkId: React.PropTypes.string, onSelect: React.PropTypes.func, active: React...
spec/javascripts/jsx/gradebook/default_gradebook/GradebookGrid/headers/AssignmentGroupColumnHeaderSpec.js
djbender/canvas-lms
/* * Copyright (C) 2017 - 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...
docs/public/static/examples/v42.0.0/tutorial/sharing-web-workaround.js
exponentjs/exponent
import React from 'react'; import { Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import * as ImagePicker from 'expo-image-picker'; import * as Sharing from 'expo-sharing'; import uploadToAnonymousFilesAsync from 'anonymous-files'; export default function App() { let [selectedImage...
src/containers/toputilizers/components/TopUtilizersForm.js
kryptnostic/gallery
import React from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-bootstrap'; import ContentContainer from '../../../components/applayout/ContentContainer'; import TopUtilizersSelectionRowContainer from '../containers/TopUtilizersSelectionRowContainer'; import styles from '../styles.module.c...
src/primitives/form/color-picker/index.js
mpigsley/sectors-without-number
import React from 'react'; import tinycolor from 'tinycolor2'; import PropTypes from 'prop-types'; import FlexContainer from 'primitives/container/flex-container'; import ColorSwatch from 'primitives/other/color-swatch'; import './style.scss'; const DEFAULT_COLORS = [ '#dbdbdb', '#8f8f8f', '#637182', '#00000...
src/svg-icons/content/mail.js
verdan/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentMail = (props) => ( <SvgIcon {...props}> <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/> </SvgIcon> ); ContentMail = pure(Conte...
src/components/ImportEpwing.js
rsimmons/voracious
import React, { Component } from 'react'; import './ImportEpwing.css'; import SecondaryScreen from './SecondaryScreen.js'; import SystemBrowserLink from './SystemBrowserLink.js'; import Button from './Button.js'; import { importEpwing } from '../dictionary'; const { ipcRenderer } = window.require('electron'); // use...
src/Main/MonkSpreadsheet.js
mwwscott0/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import SPELLS from 'common/SPELLS'; class MonkSpreadsheet extends React.Component { static propTypes = { parser: PropTypes.object.isRequired, }; render() { const { parser } = this.props; const abilityTracker = parser.modules.abilityTra...
app/javascript/mastodon/components/status_action_bar.js
verniy6462/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import DropdownMenuContainer from '../containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureCompo...
docs/src/sections/PaginationSection.js
mmarcant/react-bootstrap
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function PaginationSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> ...
src/containers/pages/miscellaneous/terms-of-service/content/termination.js
vFujin/HearthLounge
import React from 'react'; const Termination = () => { return ( <li> <h3 id="termination">Termination</h3> <p> HearthLounge may terminate your access to all or any part of our Services at any time, with or without cause, with or without notice, effective immediately. You may, as the r...
app/components/icons/Avatar/index.js
yasserhennawi/yasserhennawi
import React from 'react'; import PropTypes from 'prop-types'; export default function Avatar({ onClick }) { return ( <svg onClick={onClick} width="100%" height="100%" x="0px" y="0px" viewBox="0 0 500 500" > <g id="Layer_1"> <g> <g id="XMLID_1_"> ...
packages/mineral-ui-icons/src/IconLocalBar.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconLocalBar(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProps...
WashingmachineFrontend/vaskemaskine-app/src/components/Header/Login/Login/Login.js
holdam/washingmachine-booking
import React from 'react'; import {Form, FormGroup, FormControl, Button} from 'react-bootstrap' import strings from '../../../../commons/strings'; import CreateUserModal from '../CreateUserModal/CreateUserModal'; import './Login.css'; class Login extends React.Component { constructor(props) { super(props);...
app/javascript/mastodon/features/compose/containers/sensitive_button_container.js
danhunsaker/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { changeComposeSensitivity } from 'mastodon/actions/compose'; import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; const messages = defineMessages({ ...
examples/js/draganddrop/draganddrop-hook-table.js
powerhome/react-bootstrap-table
/* eslint max-len: 0 */ /* eslint no-alert: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; i++) { const id = startId + i; produc...
app/containers/tutorial/step-1.js
DeividasK/my-future-ai
import React from 'react' // Components import ListTool from 'components/tools/list' import SimpleList from 'components/lists/simple' import ConfirmationModal from 'components/modals/confirmation' import TutorialCollapse from './collapse' import TH from 'utils/TranslationHelper' import { addGoal, deleteGoal } from 'a...
auth/src/components/common/Header.js
haaswill/ReactNativeCourses
// Import libraries for making a component import React from 'react'; import { Text, View } from 'react-native'; // Make a component const Header = (props) => { const { textStyle, viewStyle } = styles; return ( <View style={viewStyle}> <Text style={textStyle}>{props.headerText}</Text> </View> ); };...
src/imports/ui/builder/components/wizard/NextQuestionButton.js
hwillson/meteor-recommendation-builder
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Button } from 'react-bootstrap'; class NextQuestionButton extends Component { render() { return ( <Button ref={(button) => { this.nextQuestionButton = button; }} bsStyle="link" className="next-quest...
src/components/Main.js
geniusq1981/gallery-by-react
require('normalize.css/normalize.css'); require('styles/App.scss'); import React from 'react'; import ReactDOM from 'react-dom'; //获取图片相关的数据 let imageDatas = require('../../data/imageData.json'); //获取区间内的一个随机值 function getRangeRandom(left, right){ return Math.ceil(Math.random()*(right-left)+left); } function get30...
app/containers/NotFoundPage/index.js
mrprim/mindfog
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
node_modules/react-bootstrap/es/Col.js
yeshdev1/Everydays-project
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 ...
springboot/GReact/src/main/resources/static/app/routes/dashboard/containers/SocialWall.js
ezsimple/java
import React from 'react' import HtmlRender from '../../../components/utils/HtmlRender' const html = require('html-loader?-attrs!./SocialWall.html') export default ()=>(<HtmlRender html={html} />)
examples/05 Customize/Handles and Previews/index.js
tomulin1/react-dnd
import React from 'react'; import Container from './Container'; export default class CustomizeHandlesAndPreviews { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/05%20Customize/Handles%20and%20Previews'>Browse the Source</a></b> ...
js/components/Code.react.js
Termina1/react-shower
import React, { Component } from 'react'; import {PrismCode} from "react-prism"; export default class Code extends Component { render() { var lang = this.props.lang ? `language-${this.props.lang}` : "language-javascript"; return ( <pre> <PrismCode className={lang}> {this.props.code} ...
apps/react-redux/components/Inbox.js
router5/examples
import React from 'react'; import InboxList from './InboxList'; import Message from './Message'; import { connect } from 'react-redux'; import { routeNodeSelector } from 'redux-router5'; function Inbox(props) { const { route } = props; return ( <div className='inbox'> <InboxList /> ...
src/components/IconButton/index.js
orionsoft/parts
import React from 'react' import Tooltip from '../Tooltip' import autobind from 'autobind-decorator' import PropTypes from 'prop-types' export default class IconButton extends React.Component { static propTypes = { icon: PropTypes.func, size: PropTypes.number, onPress: PropTypes.func, style: PropTyp...
client/components/empty-content/index.js
yeoh-joer/synapse
/** * External dependencies */ import React from 'react' import PropTypes from 'prop-types' import classNames from 'client/lib/class-names' class EmptyContent extends React.Component { static propTypes = { title: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]), illustration: Prop...
src/Parser/Warlock/Destruction/Modules/Features/UnusedLordOfFlames.js
hasseboulen/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import AbilityTracker from 'Parser/Core/Modules/AbilityTracker'; import calculateMaxCasts from 'Parser/Core/calculateMaxCasts'; import SpellLink from 'common/SpellLink'; import SPELLS from 'common/SPELLS'; import Wrapper from 'common/Wrapper'; /...
src/applications/third-party-app-directory/createThirdPartyApps.js
department-of-veterans-affairs/vets-website
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import reducer from './reducers'; export { reducer as thirdPartyAppsReducer }; export default (store, widgetType) => { // Derive the element to render our widget. const root = document.querySelector(`[data-widget...
src/components/Notes/Notes.js
SteveHoggNZ/react-notetaker
import React from 'react'; import NotesList from './NotesList'; import AddNote from './AddNote'; class Notes extends React.Component { render() { return ( <div> <h3>Notes for {this.props.username}</h3> <AddNote username={this.props.username} addNote={this.props.a...
pages/auth/welcome.js
rabbotio/nap
import React from 'react' import Link from 'next/link' import 'isomorphic-fetch' import persist from '../../lib/persist' import PropTypes from 'prop-types' class welcome extends React.Component { static async getInitialProps(context) { const { req } = context // Guard if (!req) { return {} } ...
src/index.js
Three-Leaves/progressive-machine
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
src/scenes/home/about/valueCard/valueCard.js
miaket/operationcode_frontend
import React from 'react'; import PropTypes from 'prop-types'; import styles from './valueCard.css'; const ValueCard = ({ name, description }) => ( <div className={styles.valueCard}> <h4>{name}</h4> <p>{description}</p> </div> ); ValueCard.propTypes = { name: PropTypes.string.isRequired, description: ...
app/javascript/mastodon/components/missing_indicator.js
3846masa/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; const MissingIndicator = () => ( <div className='missing-indicator'> <div> <FormattedMessage id='missing_indicator.label' defaultMessage='Not found' /> </div> </div> ); export default MissingIndicator;
templates/react/src/framework/index.js
Jam3/generator-jam3
'use strict'; import React from 'react'; import { render } from 'react-dom'; import { Route } from 'react-router'; import { ConnectedRouter } from 'react-router-redux'; import { syncHistoryWithStore, routerReducer } from 'react-router-redux'; import { Provider } from 'react-redux'; import detect from '../util/detect';{...
packages/material-ui-icons/src/OfflinePin.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z" /></g> , 'OfflinePin');
src/components/Header/Header.js
LeeSeungHyun/Portfolio
import React, { Component } from 'react'; import { NavLink } from 'react-router-dom'; import styled from 'styled-components'; const PortfolioMenu= styled.div` font-weight: 500; font-size: 16px; padding: 100px 40px 40px 40px; & > a:first-child { font-family: 'ProximaNova-Bold' !important; ...
app/javascript/mastodon/features/list_editor/components/edit_list_form.js
masto-donte-com-br/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; import IconButton from '../../../components/icon_button'; import { defineMessages, injectIntl } from 'react-intl'; const messages = def...
packages/react-native/src/login/components/user-field.js
js-accounts/react
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { View, TextInput, Text } from 'react-native'; import { styles } from '../styles'; export class UserField extends Component { static propTypes = { ...TextInput.propTypes, shouldRenderErrorLabel: PropTypes.bool, renderErr...
src/main.js
harijoe/redux-shooting-stars
import React from 'react'; import ReactDOM from 'react-dom'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import { useRouterHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import makeRoutes from './routes'; import Root from './containers/Root'; import co...
docs/src/app/components/pages/components/FlatButton/ExampleSimple.js
pancho111203/material-ui
import React from 'react'; import FlatButton from 'material-ui/FlatButton'; const FlatButtonExampleSimple = () => ( <div> <FlatButton label="Default" /> <FlatButton label="Primary" primary={true} /> <FlatButton label="Secondary" secondary={true} /> <FlatButton label="Disabled" disabled={true} /> ...
src/app/components/share-panel-item.js
pashist/soundcloud-like-player
import React from 'react'; export default class SharePanelItem extends React.Component { render() { let link = this.props.link; return ( <li className="share-panel-item"> <a className={'share-icon ' + link.key} href={link.href} tar...
modules/RouteUtils.js
whouses/react-router
import React from 'react' import warning from 'warning' function isValidChild(object) { return object == null || React.isValidElement(object) } export function isReactChildren(object) { return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)) } function checkPropTypes(componentName, p...
app/javascript/mastodon/features/video/index.js
vahnj/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { throttle } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen'; import { displaySensi...
modules/dreamview/frontend/src/components/Tasks/QuickStart.js
xiaoxq/apollo
import React from 'react'; import { inject, observer } from 'mobx-react'; import classNames from 'classnames'; import UTTERANCE from 'store/utterance'; import WS from 'store/websocket'; class CommandGroup extends React.Component { render() { const { name, commands, disabled, extraCommandClass, extra...
examples/src/components/SelectedValuesField.js
oriweingart/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 SelectedValuesField = React.createClass({ displayName: 'SelectedValuesField', propTypes: { allowCreate: React.PropTy...
src/pages/index.pt.js
angeloocana/tic-tac-toe-ai
import React from 'react'; import Index from '../components/IndexPage'; export default (props) => <Index {...props} />;
docs/app/Examples/elements/Step/Content/StepExampleIcons.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Icon, Step } from 'semantic-ui-react' const StepExampleIcons = () => ( <Step.Group> <Step> <Icon name='truck' /> <Step.Content> <Step.Title>Shipping</Step.Title> <Step.Description>Choose your shipping options</Step.Description> </Step.Content> ...
frontend/src/components/panels/MePanel.js
jeroen-visser/strava
import React, { Component } from 'react'; import moment from "moment"; import { Menu } from 'semantic-ui-react' class MePanel extends Component { shouldComponentUpdate(nextProps) { return this.props.me !== nextProps.me; } renderTime(movingTime) { return (movingTime) ? moment().startOf('day').sec...
docs/src/app/components/pages/components/Paper/ExampleRounded.js
kasra-co/material-ui
import React from 'react'; import Paper from 'material-ui/Paper'; const style = { height: 100, width: 100, margin: 20, textAlign: 'center', display: 'inline-block', }; const PaperExampleRounded = () => ( <div> <Paper style={style} zDepth={1} rounded={false} /> <Paper style={style} zDepth={2} round...
src/js/components/nav.js
alexzherdev/foosballtracker
import React from 'react'; import { Link } from 'react-router'; import NavLink from './navLink'; const Nav = () => <nav className="navbar navbar-default"> <div className="navbar-header"> <Link to="/" className="navbar-brand">Foosball Tracker</Link> </div> <ul className="nav navbar-nav"> <Na...
src/svg-icons/hardware/phonelink.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwarePhonelink = (props) => ( <SvgIcon {...props}> <path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/> ...
actor-apps/app-web/src/app/components/common/Favicon.react.js
Jeremy-Meng/actor-platform
import React from 'react'; export default class Fav extends React.Component { static propTypes = { path: React.PropTypes.string } constructor(props) { super(props); //// Create link element and it's attributes //let favicon = document.createElement('link'); //let rel = document.createAttrib...
src/icons/AirlineSeatReclineNormalIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class AirlineSeatReclineNormalIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M15.17 10.83c-1.56-1.56-1.56-4.09 0-5.66 1.56-1.56 4.09-1.56 5.66 0 1.56 1.56 1.56 4.09 0...
app/src/components/Icons/DoneIcon/index.js
jeremyhon/sia-challenge
import React from 'react'; // type PropsType = { // checked: boolean, // size: number, // fill: string, // } export default (props/*: PropsType*/) => ( <svg height={props.size} viewBox="0 0 24 24" width={props.size} xmlns="http://www.w3.org/2000/svg" > { props.checked ? <path fill={p...
src/admin/src/components/controls/forms/form_time.js
jgretz/zen-express
import React from 'react'; import { DateTimeInput } from '../inputs'; export const formTime = (field) => <DateTimeInput key={field.name} name={field.name} label={field.name} mode="time" />;
app/static/src/diagnostic/TestProfileForm.js
SnowBeaver/Vision
import React from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import ControlLabel from 'react-bootstrap/lib/ControlLabel'; import Checkbox from 'react-bootstrap/lib/Checkbox'; var items =[]; var ElectricalProfSelectField = React.createCla...
react-router/components/Routes.js
sensduo/flux-examples
import React from 'react'; import { DefaultRoute, Route } from 'react-router'; import Application from './Application'; import Home from './Home'; import About from './About'; const routes = ( <Route name="app" path="/" handler={Application}> <Route name="about" handler={About}/> <DefaultRoute name...
src/examples/index.js
iporaitech/react-to-mdl
import React from 'react'; import ReactDOM from 'react-dom'; import { AppContainer } from 'react-hot-loader'; // wrapper component needed for HMR // react-to-mdl based App import App from './App'; const render = (Component) => { ReactDOM.render( <AppContainer> <Component /> </AppContainer>, docume...