path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/packs/src/components/generic/TableRecord.js
ComPlat/chemotion_ELN
/* eslint-disable no-empty */ /* eslint-disable react/forbid-prop-types */ import PropTypes from 'prop-types'; import React from 'react'; import Numeral from 'numeral'; import GenericSubField from '../models/GenericSubField'; import { AddRowBtn, DelRowBtn, DnDRowBtn, NullRowBtn } from './GridBtn'; import { ColumnHeader...
examples/todomvc/containers/TodoApp.js
ngokevin/redux
import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { Connector } from 'redux/react'; import Header from '../components/Header'; import MainSection from '../components/MainSection'; import * as TodoActions from '../actions/TodoActions'; export default class TodoApp extends Comp...
containers/medicineList.js
s1hit/react-onsenui-redux-weather-edited
import React from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {List, Button} from 'react-onsenui'; import Medicine from './Medicine'; import * as Actions from '../actions'; const MedicineList = ({medicines, navigator, actions}) => { const changeVisibility = (isVi...
slides/the-speaker/components/Polygon.js
javivelasco/scaffolding-react-apps-slides
import React from 'react'; const Polygon = (props) => ( <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" {...props}> <polygon className="polygon" points="50,0 93.3,25 93.3,75 50,100 6.7,75 6.7,25 50,0" fill="#99E2DB"> <animate id="shape01" begin="0;shape02.end + 1s" attributeName="points" dur=...
src/js/containers/SearchBar.js
nicksp/react-geo-weather
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { fetchWeather } from '../actions'; class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' }; // Context bindings thi...
packages/@lyra/form-builder/src/inputs/ObjectInput/ObjectInput.js
VegaPublish/vega-studio
//@flow import PropTypes from 'prop-types' import React from 'react' import FormBuilderPropTypes from '../../FormBuilderPropTypes' import Field from './Field' import Fieldset from 'part:@lyra/components/fieldsets/default' import PatchEvent, {set, setIfMissing, unset} from '../../PatchEvent' import isEmpty from '../../u...
pkg/users/dialog-utils.js
cockpit-project/cockpit
/* * This file is part of Cockpit. * * Copyright (C) 2020 Red Hat, Inc. * * Cockpit is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any l...
scripts/intl-helper.js
vallacodec/react-scaff
/** * Components using the react-intl module require access to the intl context. * This is not available when mounting single components in Enzyme. * These helper functions aim to address that and wrap a valid, * English-locale intl context around them. */ import React from 'react'; import { IntlProvider, intlSha...
react/features/base/components/buttons/QuickActionButton.js
gpolitis/jitsi-meet
// @flow import { makeStyles } from '@material-ui/styles'; import React from 'react'; type Props = { /** * Label used for accessibility. */ accessibilityLabel: string, /** * Additional class name for custom styles. */ className: string, /** * Children of the component. ...
pages/api/text-field.js
cherniavskii/material-ui
import React from 'react'; import withRoot from 'docs/src/modules/components/withRoot'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './text-field.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default withRoot(Page);
client/src/components/Session/withAuthorization.js
stanographer/aloft
import React from 'react'; import { withRouter } from 'react-router-dom'; import { compose } from 'recompose'; import { withFirebase } from '../Firebase'; import AuthUserContext from './context'; import * as ROUTES from '../../constants/routes'; import * as ROLES from '../../constants/roles'; const withAuthorization ...
src/js/components/OwnUser/EditProfileCategory.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import styles from './EditProfileCategory.scss'; import FrameCollapsible from "../ui/FrameCollapsible/FrameCollapsible"; export default class EditProfileCategory extends Component { static propTypes = { onToggleCollapse: PropTyp...
modules/lazy/client/components/lazy.client.splitFetchHOC.js
dimitriaguera/playlist-app
/** * Created by Dimitri on 22/10/2017. */ import React, { Component } from 'react'; import debounce from 'lodash/debounce'; function splitFetchHOC(params, fetchActions) { return function(WrappedComponent) { return class splitFetchWrapped extends Component { constructor(props) { super(props); ...
docs/app/Examples/collections/Message/Types/MessageExampleMessage.js
mohammed88/Semantic-UI-React
import React from 'react' import { Message } from 'semantic-ui-react' const MessageExampleMessage = () => ( <Message> <Message.Header> Changes in Service </Message.Header> <p> We updated our privacy policy here to better service our customers. We recommend reviewing the changes. </p> </...
tp-2/marisol/src/sovos-reactivo/componentes/new/NewFooter.js
solp/sovos-reactivo-2017
import React from 'react'; class NewFooter extends React.Component{ render(){ return( <div className="post_info"> {this.props.New.date}| Posted by <a href="#">{this.props.New.creator}</a>| <a href="#">{this.props.New.quantityOfComments}</a> </div> ); } } ...
common/containers/ModalNormalContainer/ModalNormalContainer.js
sauleddy/HomePortal
import React from 'react'; import { connect } from 'react-redux'; import ModelNormal from '../../components/Modal'; import { ActionModalNormal } from '../../actions'; export default connect( (state) => ({ title: state['modalNormal'].getIn(['title']), content: state['modalNormal'].getIn(['content']), ...
django/webcode/webcode/frontend/node_modules/react-bootstrap/es/CarouselItem.js
OpenKGB/webcode
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/containers/user-list-container.js
HuangXingBin/goldenEast
import React from 'react'; import { Button, AutoComplete ,DatePicker } from 'antd'; import './user-list-container.css'; import UserListTable from '../views/user-list-view.js'; import SearchInput from '../views/SearchInput.js'; import store from '../../store'; import { connect } from 'react-redux'; import { updateUserLi...
web/src/js/__tests__/components/ContentView/ContentViewSpec.js
zlorb/mitmproxy
import React from 'react' import renderer from 'react-test-renderer' import TestUtils from 'react-dom/test-utils' import { Provider } from 'react-redux' import { ViewServer, ViewImage, PureViewServer, Edit } from '../../../components/ContentView/ContentViews' import { TFlow, TStore } from '../../ducks/tutils' import mo...
client/modules/App/components/Footer/Footer.js
CODEINAE/todoy
import React from 'react'; import { FormattedMessage } from 'react-intl'; // Import Style import styles from './Footer.css'; // Import Images import bg from '../../header-bk.png'; export function Footer() { return ( <div style={{ background: `#FFF url(${bg}) center` }} className={styles.footer}> <p>&copy...
examples/todos-with-undo/index.js
okmttdhr/redux-with-comment
import React from 'react' import { render } from 'react-dom' import { createStore } from 'redux' import { Provider } from 'react-redux' import App from './containers/App' import todoApp from './reducers' const store = createStore(todoApp) const rootElement = document.getElementById('root') render( <Provider store={...
src/Main/PlayerSelectionList.js
hasseboulen/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import ReactTooltip from 'react-tooltip'; import SPECS from 'common/SPECS'; import ROLES from 'common/ROLES'; import { getFightId } from 'selectors/url/report'; import { getRep...
javascripts/components/Edit.js
undefinerds/libris
import React, { Component } from 'react'; class Edit extends Component { constructor(props) { super(props); const { book } = this.props; this.state = { title: book.title || '', author: book.author || '', subject: book.subject || '', description: book.description || '', editi...
components/card/__tests__/Card.spec.js
react-material-design/react-material-design
import React from 'react'; import { shallow } from 'enzyme'; import Card from '../index'; import CardTitle from '../cardTitle'; describe('<Card />', () => { it('should render', () => { const card = shallow( <Card> <CardTitle title="title" /> </Card>, ); e...
src/common/components/build-request-row/index.js
canonical-websites/build.snapcraft.io
import PropTypes from 'prop-types'; import React from 'react'; import { Row, Data } from '../vanilla/table-interactive'; import { BuildStatusColours } from '../../helpers/snap-builds.js'; import BuildStatus from '../build-status'; import * as buildAnnotation from '../../helpers/build_annotation'; const getBuildTrigg...
app/javascript/app/pages/my-climate-watch/my-cw-editor/plugins/side-toolbar-plugin/draft-js-side-toolbar-plugin/components/Toolbar/index.js
Vizzuality/climate-watch
/* eslint-disable */ import React from 'react'; import DraftOffsetKey from 'draft-js/lib/DraftOffsetKey'; export default class Toolbar extends React.Component { state = { position: { transform: 'scale(0)' } }; componentDidMount() { this.props.store.subscribeToItem('editorState', this.onEditorS...
node_modules/react-bootstrap/es/DropdownToggle.js
okristian1/react-info
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 ...
addons/graphql/src/preview.js
jribeiro/storybook
import React from 'react'; import GraphiQL from 'graphiql'; import { fetch } from 'global'; import 'graphiql/graphiql.css'; import FullScreen from './components/FullScreen'; const FETCH_OPTIONS = { method: 'post', headers: { 'Content-Type': 'application/json' }, }; function getDefautlFetcher(url) { return para...
server/sonar-web/src/main/js/components/ui/IssueTypeIcon.js
Builders-SonarSource/sonarqube-bis
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
app/containers/AdminNouvelleCommande/components/NouvelleCommandeDistribution.js
Proxiweb/react-boilerplate
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import DatePicker from 'material-ui/DatePicker'; import TimePicker from 'material-ui/TimePicker'; import RaisedButton from 'material-ui/RaisedButton'; import IconButton from 'material-ui/IconButton'; import ClearIcon from 'material-ui/svg-ico...
src/svg-icons/navigation/arrow-drop-up.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationArrowDropUp = (props) => ( <SvgIcon {...props}> <path d="M7 14l5-5 5 5z"/> </SvgIcon> ); NavigationArrowDropUp = pure(NavigationArrowDropUp); NavigationArrowDropUp.displayName = 'NavigationArrowDrop...
client/index.js
itaywaisman/blog
import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import App from './App'; import configureStore from './store'; const store = configureStore(window.__INITIAL_STATE__); const mountApp = document.getElementById('root') render( <AppContainer> <App stor...
src/interface/others/Cooldown.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import Icon from 'common/Icon'; import { formatThousands, formatNumber, formatPercentage, formatDuration } from 'common/format'; import { TooltipElement } from 'common/Tooltip'; ...
src/svg-icons/image/photo-library.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhotoLibrary = (props) => ( <SvgIcon {...props}> <path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"/>...
src/renderers/2d/strategies/naiveCanvas/NaiveCanvasRenderView.js
jeffdowdle/l-systems
import React from 'react'; import PropTypes from 'prop-types'; import { expand } from 'modules/lsystem/functions'; import NaiveCanvas from './NaiveCanvas'; class NaiveCanvasRenderView extends React.Component { constructor(props) { super(props); this.canvas = null; } shouldComponentUpdate() { return ...
docs/src/PropTable.js
mmarcant/react-bootstrap
import merge from 'lodash/merge'; import React from 'react'; import Glyphicon from '../../src/Glyphicon'; import Label from '../../src/Label'; import Table from '../../src/Table'; import capitalize from '../../src/utils/capitalize'; function cleanDocletValue(str) { return str.trim().replace(/^\{/, '').replace(/\}$/...
src/parser/core/ParseResults.js
FaideWW/WoWAnalyzer
import React from 'react'; // eslint-disable-line no-unused-vars import ISSUE_IMPORTANCE from './ISSUE_IMPORTANCE'; const ASSERTION_MODES = { IS_GREATER_THAN: '>', IS_GREATER_THAN_OR_EQUAL: '>=', IS_LESS_THAN: '<', IS_LESS_THAN_OR_EQUAL: '<=', IS_TRUE: '==true', IS_FALSE: '==false', IS_EQUAL: '===', }; c...
src/svg-icons/notification/network-locked.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationNetworkLocked = (props) => ( <SvgIcon {...props}> <path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 1...
src/svg-icons/notification/sync.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationSync = (props) => ( <SvgIcon {...props}> <path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25...
assets/jqwidgets/demos/react/app/grid/columnsresize/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js'; class App extends React.Component { componentDidMount() { this.refs.myGrid.on('columnresized', (event) => { let column = event.args.columntext; let newwidth...
fields/types/select/SelectColumn.js
matthewstyers/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var SelectColumn = React.createClass({ displayName: 'SelectColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, linkTo: React.Prop...
app/javascript/mastodon/features/search/index.js
yi0713/mastodon
import React from 'react'; import SearchContainer from 'mastodon/features/compose/containers/search_container'; import SearchResultsContainer from 'mastodon/features/compose/containers/search_results_container'; const Search = () => ( <div className='column search-page'> <SearchContainer /> <div className='...
definitions/npm/react-redux_v4.x.x/flow_v0.30.x-v0.52.x/test_Provider.js
flowtype/flow-typed
// @flow import React from 'react' import { Provider } from 'react-redux' // $FlowExpectedError const provider = <Provider />; // missing store
src/muiThemeable.js
chrismcv/material-ui
import React from 'react'; import getMuiTheme from './styles/getMuiTheme'; function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } export default function muiThemeable(WrappedComponent) { const MuiComponent = (props, {muiTheme = getMuiTheme()}) =>...
client/scripts/components/read-only-questionnaire-summary/index.js
kuali/research-coi
/* The Conflict of Interest (COI) module of Kuali Research Copyright © 2005-2016 Kuali, Inc. This program 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, either version 3 of the Lic...
src/reactions/ReactionList.js
saketkumar95/zulip-mobile
/* @flow */ import React from 'react'; import { StyleSheet, View } from 'react-native'; import { ReactionType } from '../types'; import Reaction from './Reaction'; import aggregateReactions from './aggregateReactions'; const styles = StyleSheet.create({ reactions: { flexDirection: 'row', flexWrap: 'wrap', ...
src/main.js
Mmzer/redux-demo-calculator
import React from 'react'; import { render } from 'react-dom'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import './assets/mobile-reset.scss'; import App from './components/App'; //import reducer from './reducers'; import reducers from './reducers/reducers'; const store = createSto...
app/javascript/mastodon/components/load_gap.js
MitarashiDango/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; import Icon from 'mastodon/components/icon'; const messages = defineMessages({ load_more: { id: 'status.load_more', defaultMessage: 'Load more' }, }); export default @injectIntl class LoadGap exte...
src/PageHeader.js
azmenak/react-bootstrap
import React from 'react'; import classNames from 'classnames'; const PageHeader = React.createClass({ render() { return ( <div {...this.props} className={classNames(this.props.className, 'page-header')}> <h1>{this.props.children}</h1> </div> ); } }); export default PageHeader;
test/compare.js
concordancejs/react
import test from 'ava' import concordance from 'concordance' import React from 'react' import renderer from 'react-test-renderer' import plugin from '..' import HelloMessage from './fixtures/react/HelloMessage' const plugins = [plugin] const render = value => renderer.create(value).toJSON() const compare = (t, getSa...
test/focus-first-suggestion/AutosuggestApp.js
fresk-nc/react-autosuggest
import React, { Component } from 'react'; import sinon from 'sinon'; import Autosuggest from '../../src/AutosuggestContainer'; import languages from '../plain-list/languages'; import { escapeRegexCharacters } from '../../demo/src/components/utils/utils.js'; function getMatchingLanguages(value) { const escapedValue =...
src/svg-icons/image/tonality.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageTonality = (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 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87....
src/input.js
knledg/react-blur-admin
import _ from 'lodash'; import React from 'react'; export class Input extends React.Component { static propTypes = { type: React.PropTypes.string, id: React.PropTypes.string, name: React.PropTypes.string, className: React.PropTypes.string, placeholder: React.PropTypes.string, helpLabel: Reac...
BuyDemo/index.ios.js
HAPENLY/ReactNative-Source-code-Demo
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; //导入外部组件 var Main = require('./Component/Main/ZPMain'); export default class BuyDemo extends Component { render...
examples/src/components/UsersField.js
lemming/react-select
import GravatarOption from './CustomOption'; import GravatarValue from './CustomSingleValue'; import React from 'react'; import Select from 'react-select'; const USERS = require('../data/users'); var UsersField = React.createClass({ propTypes: { hint: React.PropTypes.string, label: React.PropTypes.string, }, r...
platform/ui/src/components/studyList/StudyList.js
OHIF/Viewers
import './StudyList.styl'; import React from 'react'; import classNames from 'classnames'; import TableSearchFilter from './TableSearchFilter.js'; import PropTypes from 'prop-types'; import { StudyListLoadingText } from './StudyListLoadingText.js'; import { useTranslation } from 'react-i18next'; const getContentFromU...
src/routes.js
maquessime/stack-to-issue-ui
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import Router from 'react-routing/src/Router'; import http from './core/HttpClient'; import App from './components/App'; import ContentPage from './components/ContentPage'; import ContactPage from './components/ContactP...
tests/MultiDropdownList/MultiDropdownList.js
divyanshu013/reactivebase
import React from 'react'; import { ReactiveBase, MultiDropdownList, ReactiveList } from '../../app/app.js'; import {config} from './config'; import { mount } from 'enzyme'; function testComponent(cb) { const onData = function(res, err) { cb(res, err); } const component = mount( <ReactiveBase app={config.Re...
src/components/navBar/MoreComponent.js
Philin-Anton/prototypeApp
'use strict'; import React from 'react'; import { connect } from 'react-redux' import { createSelector } from 'reselect' require('styles/ActionIcons.scss'); require('styles/navBar/More.scss'); import {getContent, clearLocalStore} from '../../api/maggo'; import {handleSave, handlePublish, handleDelete} from '../../api...
modules/gui/src/app/home/body/process/recipe/classification/panels/inputImagery/recipeSection.js
openforis/sepal
import {Form} from 'widget/form/form' import {compose} from 'compose' import {connect, select} from 'store' import {getRecipeType} from 'app/home/body/process/recipeTypes' import {msg} from 'translate' import {recipeAccess} from '../../../../recipeAccess' import {switchMap} from 'rxjs' import PropTypes from 'prop-types...
src/svg-icons/notification/event-busy.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationEventBusy = (props) => ( <SvgIcon {...props}> <path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V...
react/src/components/dashboard/spinner/spinner.js
pbca26/EasyDEX-GUI
import React from 'react'; class Spinner extends React.Component { constructor() { super(); } render() { let _paths = []; for (let i = 0; i < 4; i++) { _paths.push( <circle className={ i === 0 ? 'path' : `path${i + 1}` } cx="50" cy="50" r="20" ...
src/components/hoc/OnKeyDownHOC.js
f0zze/rosemary-ui
import React from 'react'; import ReactDOM from 'react-dom'; import {KEY_DOWN} from '../../constant/events'; import {isFunction} from '../../util/utils'; export function enhanceWithKeyDown(ParentClass) { class Enhance extends ParentClass { static get displayName() { return ParentClass.displayNa...
app/javascript/mastodon/features/ui/components/link_footer.js
Kirishima21/mastodon
import { connect } from 'react-redux'; import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { invitesEnabled, limitedFederationMode, version, repository, source_url } from 'mastodon/initi...
src/components/maps.js
blanck-space/redux-weather
import React, { Component } from 'react'; import { Sparklines, SparklinesLine } from 'react-sparklines'; export class Map extends Component{ constructor(props){ super(props); } componentDidMount(){ new google.maps.Map(this.refs.mapDiv,{ zoom: 12, center:{ lat: this.props.lat, ...
src/components/Header/Header.js
TriPSs/react-esc-example
import React from 'react' import { Link } from 'react-router-dom' export const Header = () => ( <div> <h1>React ESC Example Project</h1> <Link to="/"> Home </Link> {' · '} <Link to="/counter"> Counter </Link> {' · '} <Link to="/async"> Async </Link> </div> ) e...
app/javascript/spec/forms/data-driven-form.spec.js
ManageIQ/manageiq-ui-classic
import React from 'react'; import { mount } from 'enzyme'; import { componentTypes } from '@@ddf'; import { act } from 'react-dom/test-utils'; import MiqFormRenderer from '../../forms/data-driven-form'; describe('DataDrivenForm', () => { let initialProps; beforeEach(() => { const schema = { fields: [{ ...
packages/react-scripts/fixtures/kitchensink/template/src/features/webpack/ScssModulesInclusion.js
jdcrensh/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. */ import React from 'react'; import styles from './assets/scss-styles.module.scss'; import indexStyles from './assets/index.module.scss'; ...
templates/rubix/laravel/laravel-example/src/common/header.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import React from 'react'; import classNames from 'classnames'; import { SidebarBtn, Navbar, Nav, NavItem, Icon, Grid, Row, Col } from '@sketchpixy/rubix'; class Brand extends React.Component { render() { return ( <Navbar.Header {...this.props}> <Navbar.Brand tabIndex='-1'> <a href='#'> ...
src/client.js
ACPK/react-starter-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import 'whatwg-fetch'; import React from 'react'; impor...
src/scripts/views/header.js
earlgreygoo/TwitterClone
import React from 'react' var Header = React.createClass({ _search: function(event){ if(event.keyCode === 13){ console.log("searching") location.hash = "search/" + event.target.value event.target.value = "" } }, render: function() { return ( <header> <a href="#home"> <h1>Twitter</h1> ...
docs/src/PageFooter.js
PeterDaveHello/react-bootstrap
import React from 'react'; import packageJSON from '../../package.json'; let version = packageJSON.version; if (/docs/.test(version)) { version = version.split('-')[0]; } const PageHeader = React.createClass({ render() { return ( <footer className='bs-docs-footer' role='contentinfo'> <div c...
app/javascript/mastodon/components/admin/Counter.js
im-in-space/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import api from 'mastodon/api'; import { FormattedNumber } from 'react-intl'; import { Sparklines, SparklinesCurve } from 'react-sparklines'; import classNames from 'classnames'; import Skeleton from 'mastodon/components/skeleton'; const percIncrease = (a,...
src/index.js
harsh-S/ecomm_review_ui
import React from 'react' import ReactDOM from 'react-dom' import {Modal, Button, ButtonGroup, Form, FormGroup, FormControl, ControlLabel, Col, Table, Panel, ListGroup, ListGroupItem} from 'react-bootstrap' import StarRatingComponent from 'react-star-rating-component' import * as constants from './constants.js' impo...
src/Card/CardMedia.spec.js
AndriusBil/material-ui
// @flow import React from 'react'; import { assert } from 'chai'; import { createShallow, getClasses } from '../test-utils'; import CardMedia from './CardMedia'; describe('<CardMedia />', () => { let shallow; let classes; before(() => { shallow = createShallow({ untilSelector: 'CardMedia' }); classes ...
docs/src/app/components/pages/components/SelectField/ExampleSimple.js
xmityaz/material-ui
import React from 'react'; import SelectField from 'material-ui/SelectField'; import MenuItem from 'material-ui/MenuItem'; const styles = { customWidth: { width: 150, }, }; export default class SelectFieldExampleSimple extends React.Component { constructor(props) { super(props); this.state = {value...
third_party/prometheus_ui/base/web/ui/node_modules/eslint-plugin-react/lib/util/propTypes.js
GoogleCloudPlatform/prometheus-engine
/** * @fileoverview Common propTypes detection functionality. */ 'use strict'; const flatMap = require('array.prototype.flatmap'); const annotations = require('./annotations'); const propsUtil = require('./props'); const variableUtil = require('./variable'); const testFlowVersion = require('./version').testFlowVer...
ui/src/components/WorkbenchTabs.js
jliddev/pgBrowse
import React, { Component } from 'react'; class WorkbenchTabs extends Component { componentWillMount() { } render() { return ( <div className="WorkbenchTabs"> <p> Workbench Tabs </p> </div> ); } } expo...
src/containers/book-list.js
timseo/tinder_redux
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { selectBook } from '../actions/index'; import { bindActionCreators } from 'redux'; class BookList extends Component { renderList() { return this.props.books.map((book) => { return ( <li key={book.titl...
src/components/views/dialogs/SetPasswordDialog.js
martindale/vector
/* Copyright 2017 Vector Creations Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
frontend/components/Login.js
ParroApp/parro
import React from 'react'; import axios from 'axios'; import { Link } from 'react-router-dom' class Login extends React.Component { constructor(props) { super(props); this.state = { username: '', password: '' } } // onSubmit(event) { // event.preventDefault(); // // axios.post("h...
src/components/RequiredInput/RequiredInput.js
nicolasmoise/CMC-2
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import withStyles from '../../decorators/withStyles'; import styles from './RequiredInput.css'; @withStyles(styles) class RequiredInput extends React.Component { constructor(props) { super(props); this.state...
src/components/safety/gallery-item-header.js
mozilla/advocacy.mozilla.org
import React from 'react'; import MobileHeader from './mobile-header.js'; var Router = require(`react-router`); var Link = Router.Link; var GalleryItemHeader = React.createClass({ contextTypes: { intl: React.PropTypes.object }, render: function() { return ( <div className="gallery-item-header-conta...
src/pagination/PaginationList.js
opensourcegeek/react-bootstrap-table
import React from 'react'; import PageButton from './PageButton.js'; import Const from '../Const'; class PaginationList extends React.Component { changePage(page) { if (page == this.props.prePage) { page = this.props.currPage - 1 < 1 ? 1 : this.props.currPage - 1; } else if (page == this.props.nextPag...
src/svg-icons/editor/vertical-align-bottom.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorVerticalAlignBottom = (props) => ( <SvgIcon {...props}> <path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/> </SvgIcon> ); EditorVerticalAlignBottom = pure(EditorVerticalAlignBottom); EditorVertical...
client/src/components/AllBooks.js
elliotjz/book-trading-club
import React from 'react' import PropTypes from 'prop-types' import BookGallery from './BookGallery' import CircularProgress from 'material-ui/CircularProgress' import Trades from './Trades' import Divider from 'material-ui/Divider' class AllBooks extends React.Component { requestTrade(event) { event.preventDefaul...
lavalab/html/node_modules/react-bootstrap/es/MediaBody.js
LavaLabUSC/usclavalab.org
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/Navbar/auth/Signup/Signup.js
znewton/myxx-client
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import firebase from 'firebase/app'; import 'firebase/auth'; import GoogleButton from '../GoogleButton/GoogleButton'; export default class Signup extends Component { constructor () { super(); this.state = { email: '...
example/ReactNativeYouTubeExample.js
inProgress-team/react-native-youtube
/** * @format * @flow */ import React from 'react'; import { StyleSheet, View, Text, ScrollView, PixelRatio, Platform, Button, Dimensions, } from 'react-native'; import YouTube, { YouTubeStandaloneIOS, YouTubeStandaloneAndroid } from 'react-native-youtube'; export default class ReactNativeYouTubeEx...
test/FadeSpec.js
andrew-d/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Fade from '../src/Fade'; describe('Fade', function () { let Component, instance; beforeEach(function(){ Component = React.createClass({ render(){ let { children, ...props } = this.props; return ( ...
packages/material-ui/src/Dialog/Dialog.js
cherniavskii/material-ui
// @inheritedComponent Modal import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import withStyles from '../styles/withStyles'; import { capitalize } from '../utils/helpers'; import Modal from '../Modal'; import Fade from '../transitions/Fade'; import { duration } from '...
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
tecnologiaaxios/produccionXico
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
src/components/Organization.js
hozefaj/project-helena
import React, { Component } from 'react'; import { Table, Menu, Header, Input, Button, Icon } from 'semantic-ui-react'; import parse from 'parse-link-header'; import _ from 'lodash'; import { Link } from 'react-router-dom'; let state = { repos: [], org: '', pages: 0, error: false, currentPage: 1, forkAsc: ...
src/index.js
jasonslyvia/react-anything-sortable
/** * @file react-anything-sortable * @author jasonslyvia */ /* eslint new-cap:0, consistent-return: 0, react/prefer-es6-class: 0, react/sort-comp: 0 */ /** * @dependency */ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import ReactDOM from 'reac...
src/svg-icons/action/view-array.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionViewArray = (props) => ( <SvgIcon {...props}> <path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/> </SvgIcon> ); ActionViewArray = pure(ActionViewArray); ActionViewArray.displayName = 'ActionViewA...
React Native/Demos/douApp/index.android.js
AngryLi/note-iOS
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; class douApp extends Component { render() { return ( <View style={styles.container}> <Text s...
src/views/components/formatted-time/index.js
zerubeus/sawt
import React from 'react'; import PropTypes from 'prop-types'; function FormattedTime({value = 0, unit}) { // HTMLAudioElement provides time in seconds // SoundCloud provides time in milliseconds if (unit === 'ms') { value /= 1000; // convert milliseconds to seconds } let hours = Math.floor(value / 360...
src/rsg-components/Markdown/Pre/Pre.spec.js
bluetidepro/react-styleguidist
import React from 'react'; import Pre from './index'; describe('Markdown Pre', () => { it('should render a pre', () => { const actual = render(<Pre>This is pre-formatted text.</Pre>); expect(actual).toMatchSnapshot(); }); });
app/helpers/common.js
logful/logful-web
import React from 'react'; var fileSizeLib = require('filesize'); import { formatNow, formatUnix } from '../helpers/datetime'; export function levelToString(level) { switch (level) { case 1: return 'verbose'; case 2: return 'debug'; case 3: return 'info';...
src/svg-icons/places/ac-unit.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesAcUnit = (props) => ( <SvgIcon {...props}> <path d="M22 11h-4.17l3.24-3.24-1.41-1.42L15 11h-2V9l4.66-4.66-1.42-1.41L13 6.17V2h-2v4.17L7.76 2.93 6.34 4.34 11 9v2H9L4.34 6.34 2.93 7.76 6.17 11H2v2h4.17l-3.2...