path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/js/components/User.js
nicholasodonnell/moonshine
import React from 'react'; class User extends React.Component { constructor() { super(); } componentWillMount() { } render() { return ( <a class="c-user" href="#"> <img class="c-user__gravatar" src="https://www.gravatar.com/avatar/8c9d6e893592ae13f0588...
packages/side-nav/src/js/react.js
govau/uikit
/*! [replace-name] v[replace-version] */ /*************************************************************************************************************************************************************** * * sideNav function * * A vertical list of links for site navigation typically placed next to the body content. ...
packages/react/src/components/UIShell/SideNavMenu.js
carbon-design-system/carbon-components
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { ChevronDown20 } from '@carbon/icons-react'; import { settings } from 'carbon-components'; import cx from 'classnames'; import PropTy...
Realization/frontend/czechidm-core/src/components/advanced/ContractSliceInfo/ContractSliceInfo.js
bcvsolutions/CzechIdMng
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; // import * as Utils from '../../../utils'; import * as Basic from '../../basic'; import { ContractSliceManager } from '../../../redux'; import AbstractEntityInfo from '../EntityInfo/AbstractEntityInfo'; import DateVal...
node_modules/react-bootstrap/es/InputGroup.js
WatkinsSoftwareDevelopment/HowardsBarberShop
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 ...
ui/src/main/js/components/JobListItem.js
apache/aurora
import React from 'react'; import { Link } from 'react-router-dom'; import Icon from 'components/Icon'; import { TASK_COUNTS } from 'utils/Job'; export function JobTaskStats({ stats }) { const taskStats = []; TASK_COUNTS.forEach((k) => { if (stats[k] > 0) { const label = k.replace('TaskCount', ''); ...
variations/fix-helper-way/src/components/Button.js
xaviervia/tessellation
import React from 'react' export default function Button ({children, title, ...props}) { return <button className='b--none bg-navy' {...props}> {children} <span className='below'>{title}</span> </button> }
index.js
NoamELB/shouldComponentUpdate-Children
import React from 'react'; export function useShallowEqual(WrappedComponent) { class ShallowEqualEnhancer extends WrappedComponent { shouldComponentUpdate(nextProps, nextState) { let shouldUpdate = false; if (!super.shouldComponentUpdate || super.shouldComponentUpdate(nextProps, nex...
src/index.js
panlu888/small-react-app
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
lib/views/create-dialog-view.js
atom/github
import React from 'react'; import PropTypes from 'prop-types'; import DialogView from './dialog-view'; import RepositoryHomeSelectionView from './repository-home-selection-view'; import DirectorySelect from './directory-select'; import RemoteConfigurationView from './remote-configuration-view'; import TabGroup from '....
src/home/Search.js
zhangxin840/mobile-env
import React, { Component } from 'react'; import _ from 'lodash'; var Search = React.createClass({ getInitialState: function() { return {id: window.location.hash.split("/").pop()}; }, componentDidMount: function() { window.onpopstate = () => { var id = window.location.hash.split("/").pop(); t...
examples/01 Dustbin/Stress Test/index.js
craigklem/react-dnd
import React from 'react'; import Container from './Container'; export default class DustbinStressTest { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/01%20Dustbin/Stress%20Test'>Browse the Source</a></b> </p> <p> ...
blueprints/layout/files/__test__/layouts/__name__Layout.spec.js
hajiwon1023/react-webpack-redux
import React from 'react' describe('(Layout) <%= pascalEntityName %>', () => { it('should exist', () => { }) })
examples/sidebar/app.js
maksad/react-router
import React from 'react'; import { Router, Route, Link } from 'react-router'; import data from './data'; var Category = React.createClass({ render() { var category = data.lookupCategory(this.props.params.category); return ( <div> <h1>{category.name}</h1> {this.props.children || ( ...
src/containers/tests/sidebar.spec.js
ashmaroli/jekyll-admin
import React from 'react'; import ReactDOM from 'react-dom'; import renderer from 'react-test-renderer'; import _ from 'underscore'; import { mount } from 'enzyme'; import { Sidebar } from '../Sidebar'; import { config, site, blank_site } from './fixtures'; const defaultProps = { config, site }; const nonCollect...
app/javascript/mastodon/components/short_number.js
maa123/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers'; import { FormattedMessage, FormattedNumber } from 'react-intl'; // @ts-check /** * @callback ShortNumberRenderer * @param {JSX.Element} displayNumber Number to display * @para...
src/routes/Dashboard/components/Map/MapMarker/MapMarker.story.js
leeloo-acme-freight/acme-freight-webui
import React from 'react'; import { storiesOf } from '@kadira/storybook'; import MapMarker from './MapMarker'; storiesOf('MapMarker', module) .add('distributionCenter', () => ( <MapMarker type="distributionCenter" /> )) .add('retailer', () => ( <MapMarker type="retailer" /> )) .ad...
test/FormGroupSpec.js
wjb12/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import FormGroup from '../src/FormGroup'; import {shouldWarn} from './helpers'; describe('FormGroup', () => { it('renders children', () => { let instance = ReactTestUtils.renderIntoDocument( <FormGroup> <span classNam...
src/components/MainView/SocketIOLogTable.js
parkjoon/socketio-log-viewer
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { setApplicationFilter } from '../../actions/filters'; import { TYPE_TO_CLASS } from '../../utils/constants'; class SocketIOLogTable extends Component { toggleTypeFilter(type) { this.props.setApplicationFilter({ application:...
modules/__tests__/isActive-test.js
moudy/react-router
/*eslint-env mocha */ import expect from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import IndexRoute from '../IndexRoute' import Router from '../Router' import Route from '../Route' describe('isActive', function () { var node beforeEach(function () { node =...
app/components/global/AccountName.js
aaroncox/vessel
// @flow import React, { Component } from 'react'; const { shell } = require('electron'); export default class AccountName extends Component { handleLink = () => { const { name } = this.props; shell.openExternal(`https://hive.blog/@${name}`); } render() { const { name } = this.props; return ( ...
samples/react/internals/templates/containers/App/index.js
IntelliSearch/search-client
/** * * App.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot ...
spa/src/APITest/APITest.js
santiagorp/auth0-spa-api-ae
import React, { Component } from 'react'; import {Button} from 'react-bootstrap' import axios from 'axios'; import './APITest.css'; export default class APITest extends Component { constructor(props, context) { super(props, context) this.state = { pingData: "", timeSheetData: "", employeesD...
test/HotKeys/SpecifyingKeyMapUsingObjects.spec.js
JohnC-80/react-hotkeys
import React from 'react'; import {mount} from 'enzyme'; import {expect} from 'chai'; import sinon from 'sinon'; import HotKeys from '../../lib/HotKeys'; import KeyCode from '../support/KeyCode'; import FocusableElement from '../support/FocusableElement'; describe('Specifying key map using objects:', () => { contex...
src/svg-icons/image/crop.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCrop = (props) => ( <SvgIcon {...props}> <path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"/> </SvgIcon> ); ImageCrop = pure(ImageCrop); ImageCrop.displayNam...
Markup/publisher/src/index.js
wso2-dev-ux/product-apim
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/li...
eventkit_cloud/ui/static/ui/app/tests/MapTools/SearchAOIButton.spec.js
terranodo/eventkit-cloud
import React from 'react'; import sinon from 'sinon'; import { createShallow } from '@material-ui/core/test-utils'; import ActionSearch from '@material-ui/icons/Search'; import ContentClear from '@material-ui/icons/Clear'; import { SearchAOIButton } from '../../components/MapTools/SearchAOIButton'; describe('SearchAOI...
packages/mineral-ui-icons/src/IconFindReplace.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 IconFindReplace(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconPr...
client/src/App.js
andela-emabishi/github-users
import React, { Component } from 'react'; import './App.css'; import UsersContainer from './components/UsersContainer/UsersContainer'; class App extends Component { render() { return ( <div className="App"> <UsersContainer /> </div> ); } } export default App;
ajax/libs/react-instantsearch/5.2.1/Connectors.js
sufuf3/cdnjs
/*! React InstantSearch 5.2.1 | © 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(['exports',...
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-bricks-lsi.js
UnicornCollege/ucl.itkpd.configurator
import React from 'react'; import BaseMixin from '../common/base-mixin.js'; import ElementaryMixin from '../common/elementary-mixin.js'; import LsiMixin from '../common/lsi-mixin.js'; import Span from './span.js'; import './lsi.less'; export const Lsi = React.createClass({ //@@viewOn:mixins mixins: [ BaseMix...
app/javascript/mastodon/features/ui/components/__tests__/column-test.js
imas/mastodon
import { render, fireEvent, screen } from '@testing-library/react'; import React from 'react'; import Column from '../column'; describe('<Column />', () => { describe('<ColumnHeader /> click handler', () => { it('runs the scroll animation if the column contains scrollable content', () => { const scrollToMo...
example/index.js
binocarlos/folder-ui
import React from 'react' import ReactDOM from 'react-dom' import injectTapEventPlugin from 'react-tap-event-plugin' import { Provider } from 'react-redux' import { applyMiddleware, compose, createStore, combineReducers } from 'redux' import { Router, hashHistory } from 'react-router' import { syncHistoryWithStore, rou...
game-new/src/views/skills/diff.js
d07RiV/d3planner
import React from 'react'; import { Link } from 'react-router-dom'; import { ErrorView, withAsync, Icon, Cache, scrollView } from 'utils'; import { lineDiff, multilineDiff, valueDiff } from 'utils/diff'; import { elements, SkillView, PassiveView } from './common'; const runesEqual = (lhs, rhs) => lhs.name === rhs.nam...
test/components/app-test.js
stefuhnee/moments
'use strict'; import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import App from '../../src/components/app'; describe('<App />', function(){ const wrapper = shallow(<App />); it('should render a nav bar', () => { expect(wrapper.find('NavBar')).to.have.length(1); });...
renderer/components/Form/SearchInput.js
LN-Zap/zap-desktop
import React from 'react' import styled from 'styled-components' import { themeGet } from '@styled-system/theme-get' import Input from './Input' import Search from 'components/Icon/Search' const Icon = styled(Search)` cursor: pointer; height: 16px; width: 16px; position: absolute; left: 16px; user-select: ...
src/routes/Oppgave3/components/StarWarsCharacters.js
andreasnc/summer-project-tasks-2017
import React from 'react'; import PropTypes from 'prop-types'; import StarWarsCharacter from './StarWarsCharacter'; const StarWarsCharacters = ({}) => <div className="star-wars-characters"> {/* add missing code here */} </div>; StarWarsCharacters.propTypes = { characters: PropTypes.arrayOf(PropTypes.shape()...
src/svg-icons/device/gps-fixed.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceGpsFixed = (props) => ( <SvgIcon {...props}> <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.1...
src/frontend/html-renderer.js
simnalamburt/pen
import React from 'react'; import renderHTML from 'react-render-html'; import SocketClient from './socket-client'; class HTMLRenderer extends React.Component { constructor(props) { super(props); this.state = { html: '' }; } componentDidMount() { this.socketClient = new SocketClient(this.props.locatio...
src/svg-icons/toggle/star-border.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleStarBorder = (props) => ( <SvgIcon {...props}> <path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1...
app/components/GlobalNav.js
jefferchang/reactApp
import React from 'react' import { Link } from 'react-router' import { ButtonToolbar,Button,Navbar,NavbarHeader,NavbarBrand,NavbarToggle,NavbarCollapse ,Nav,NavItem,MenuItem,NavDropdown} from 'react-bootstrap' const light = '#fff' const styles = {} styles.wrapper = { padding: '10px 10px', overflow: 'hidden', ...
App/db/entities/content/FocusedItems.js
neytz/mamasound.fr
/* * Copyright (c) 2017. Caipi Labs. All rights reserved. * * This File is part of Caipi. 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 * License, or (at your option) any later version. ...
example-app/src/components/Todo/Todo.js
tmf/services-example
import React from 'react'; import PropTypes from 'prop-types'; import './Todo.css'; const Todo = ({ onClick, completed, text }) => ( <li onClick={onClick} className={completed ? 'completed' : ''} > <input type="checkbox" className="toggle" checked={completed} /> <label>{text}</...
app/containers/LanguageProvider/index.js
ducthong1991/React-Sagas
/* * * LanguageProvider * * this component connects the redux state language locale to the * IntlProvider component and i18n messages (loaded from `app/translations`) */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { IntlProvider } from 'reac...
components/AddFoodDialog.js
filbertteo/frontend-challenge
import React from 'react'; import Dialog from 'material-ui/lib/dialog'; import FoodItemNutritionTable from './FoodItemNutritionTable'; import FlatButton from 'material-ui/lib/flat-button'; const AddFoodDialog = ({ open, foodItem, onRequestClose, onRequestAddFoodItem, }) => { const actions = [ <FlatButto...
__tests__/index.ios.js
jimju/BNDemo
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/Tooltip.js
tleunen/react-mdl
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import MDLComponent from './utils/MDLComponent'; const Tooltip = (props) => { const { label, large, children, position, ...otherProps } = props; const id = Math.random().toString(36).substr(2); const newLab...
app/app.js
mikejong0815/Temp
/** * 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...
app/components/BillListItem/TableRow.js
balintsoos/app.rezsi.io
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import styled from 'styled-components'; import { TableRow as MuiTableRow, TableRowColumn, } from 'material-ui/Table'; import { grey500 as unitColor } from 'material-ui/styles/colors'; import messages fro...
es/mobile/components/MediaList/Row.js
welovekpop/uwave-web-welovekpop.club
import _jsx from "@babel/runtime/helpers/builtin/jsx"; import React from 'react'; import PropTypes from 'prop-types'; import Avatar from "@material-ui/core/es/Avatar"; import ListItem from "@material-ui/core/es/ListItem"; import ListItemText from "@material-ui/core/es/ListItemText"; var MediaRow = function MediaRow(_r...
src/components/InitiativeDropTarget.js
jeremyfry/init-tracker
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { DropTarget } from 'react-dnd'; import { DRAG_TYPES, } from '../constants'; import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import * as initiativeActions from '../actions/initiativeActions'; class Init...
src/encoded/static/components/viz/components/RotatedLabel.js
4dn-dcic/fourfront
import React from 'react'; import _ from 'underscore'; import memoize from 'memoize-one'; import * as vizUtil from '@hms-dbmi-bgm/shared-portal-components/es/components/viz/utilities'; import { console, isServerSide, layout } from '@hms-dbmi-bgm/shared-portal-components/es/components/util'; /** * If keep in RotatedLa...
client/components/basic/Page.stories.js
Sing-Li/Rocket.Chat
import { Button, ButtonGroup, Tile } from '@rocket.chat/fuselage'; import React from 'react'; import { fullHeightDecorator } from '../../../.storybook/decorators'; import Page from './Page'; export default { title: 'components/basic/Page', component: Page, }; const DummyContent = () => <> {Array.from({ length: 60...
HomeRange/app/pages/home/achievement/component/achievement_all.js
Onlyjson/yanShu_Project
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Button, Image, TouchableOpacity, FlatList } from 'react-native'; import request from '../../../../utils/Request'...
frontend/src/App/AppRoutes.js
Radarr/Radarr
import PropTypes from 'prop-types'; import React from 'react'; import { Redirect, Route } from 'react-router-dom'; import BlocklistConnector from 'Activity/Blocklist/BlocklistConnector'; import HistoryConnector from 'Activity/History/HistoryConnector'; import QueueConnector from 'Activity/Queue/QueueConnector'; import ...
docs/src/app/components/pages/components/GridList/Page.js
spiermar/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import gridListReadmeText from './README'; import gridListExampleSimpleCode from...
src/components/SegmentedControl.js
hnq90/elemental
import classnames from 'classnames'; import React from 'react'; module.exports = React.createClass({ displayName: 'SegmentedControl', propTypes: { className: React.PropTypes.string, equalWidthSegments: React.PropTypes.bool, onChange: React.PropTypes.func.isRequired, options: React.PropTypes.array.isRequired...
cheesecakes/plugins/content-manager/admin/src/components/FilterOptions/index.js
strapi/strapi-examples
/** * * FilterOptions * */ import React from 'react'; import PropTypes from 'prop-types'; import { get } from 'lodash'; import cn from 'classnames'; import InputSelect from 'components/InputSelect/Loadable'; import Add from './Add'; import Div from './Div'; import InputWithAutoFocus from './InputWithAutoFocus'; ...
packages/core/upload/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/components.js
wistityhq/strapi
import React from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import ChevronLeft from '@strapi/icons/ChevronLeft'; import ChevronRight from '@strapi/icons/ChevronRight'; import { VisuallyHidden } from '@strapi/design-system/VisuallyHidden'; import { Typography } from '@strapi/de...
components/base/Footer.js
CarbonStack/carbonstack
import React from 'react' class Footer extends React.PureComponent { render () { return <footer> <p> Copyright 2017 Junyoung Choi.&nbsp;<a href='https://github.com/CarbonStack/carbonstack' target='_blank'>Source code of Carbonstack</a>&nbsp;is published under MIT. </p> <style jsx>{` ...
app/javascript/components/Schedule/Ruler.js
rubycentral/cfp-app
import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Ruler extends Component { render() { const { startTime, endTime } = this.props; let hours = []; for (let i = Math.floor(startTime); i <= Math.floor(endTime); i++) { let time; if (i > 12) { time = i - 1...
src/index.js
topit/gallery-by-react
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
src/index.js
mtheoryx/tomato-timer
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
src/components/demo/fieldArrays/FieldArraysForm.js
tedyuen/react-redux-form-v6-example
import React from 'react'; import { Field, FieldArray, reduxForm } from 'redux-form' import { connect } from 'react-redux' import inputField from '../../utils/validation/inputField'; import renderMembers from './renderMembers'; import validate from './validate'; let FieldArraysForm = props => { const { handleSubmit,...
src/js/components/Widgets/Area_chart.js
masogit/dashboard
/** * Created by huling on 10/22/2016. */ import React, { Component } from 'react'; import { Box, Heading, Header, Menu, Anchor} from 'grommet'; import { AreaChart } from 'react-d3'; import Warpper from './Warpper'; var myDate = new Date(); const areaData = [ { name: "series1", values: [ { x: myDate,...
src/components/auth/Import.js
meetfranz/franz
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; import { Link } from 'react-router'; import classnames from 'classnames'; import Form from '../../lib/Form'; import To...
examples/huge-apps/routes/Course/routes/Announcements/routes/Announcement/components/Announcement.js
andreftavares/react-router
/*globals COURSES:true */ import React from 'react' class Announcement extends React.Component { render() { let { courseId, announcementId } = this.props.params let { title, body } = COURSES[courseId].announcements[announcementId] return ( <div> <h4>{title}</h4> <p>{body}</p> ...
actor-apps/app-web/src/app/components/common/Banner.react.js
supertanglang/actor-platform
import React from 'react'; import BannerActionCreators from 'actions/BannerActionCreators'; class Banner extends React.Component { constructor(props) { super(props); if (window.localStorage.getItem('banner_jump') === null) { BannerActionCreators.show(); } } onClose = () => { BannerActionC...
public/js/components/profile/blocklist/BlockListContainer.react.js
MadushikaPerera/Coupley
import React from 'react'; import Activity from './BlockList.react'; import List from 'material-ui/lib/lists/list'; import ProfileStore from '../../../stores/ProfileStore'; import ProfileActions from '../../../actions/profile/ProfileActions'; const ActivityFeedContainer = React.createClass({ getInitialState: funct...
src/layouts/index.js
EricSSartorius/homepage
import React from 'react' import PropTypes from 'prop-types' import Link from 'gatsby-link' import Helmet from 'react-helmet' import favicon from '../../favicon.ico' import Header from '../components/header' import './index.scss' const Footer = () => ( <footer className="footer"> <ul> <li><a href="https://...
app/static/js/modules/client.js
isaaguilar/sandbox
//import React from 'react' //import ReactDOM from 'react-dom' var Counter = React.createClass({ aFunctionNameThatIncrementsCount: function(){ this.setState({ count: this.state.count + 1 }); }, getInitialState: function(){ return { count: 0, message: "Hello React" } }, r...
flask_react/client/test/components/UserDocuments.spec.js
ebottabi/mmakinde-ebot
/* global jest expect */ import React from 'react'; import { shallow } from 'enzyme'; import { UserDocuments } from '../../components/documents/UserDocuments'; describe('Users component', () => { const props = { currentUser: {}, myDocuments: jest.fn(() => Promise.resolve()), deleteDocuments: jest.fn(() ...
src/components/Sidebar/StartNow.js
ryanbaer/busy
import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import './SidebarBlock.less'; const StartNow = () => (<div className="SidebarBlock"> <h3 className="SidebarBlock__title"> <FormattedMessage id="never_written_post" defaultMessage="Never writte...
app/javascript/mastodon/components/permalink.js
yukimochi/mastodon
import React from 'react'; import PropTypes from 'prop-types'; export default class Permalink extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; static propTypes = { className: PropTypes.string, href: PropTypes.string.isRequired, to: PropTypes.string.isRequired, ...
app/static/js/reactDarts/src/client/app/index.js
pwgraham91/ELO-Darts
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('main') );
src/components/ui/Button.js
arayi/SLions
/** * Buttons * <Button text={'Server is down'} /> * * React Native Starter App * https://github.com/mcnamee/react-native-starter-app */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-native-elements'; // Consts and Libs import { AppColors, AppFon...
node_modules/react-navigation/src/views/HeaderTitle.js
joan17cast/Enigma
/* @flow */ import React from 'react'; import { Platform, StyleSheet, Text } from 'react-native'; import type { Style } from '../TypeDefinition'; type Props = { tintColor?: ?string, style?: Style, }; const HeaderTitle = ({ style, ...rest }: Props) => ( <Text numberOfLines={1} {...rest} style={[st...
src/shared/routes.js
poetcyborg/redux-app-skeleton
import React from 'react'; import { Route, NoMatch, IndexRoute } from 'react-router'; import LayoutComponent from './components/LayoutComponent'; import IndexContainer from './containers/IndexContainer'; import RandomTextContainer from './containers/RandomTextContainer'; import AboutComponent from './components/AboutC...
src/shared/components/LinkedAccountList/index.js
rvboris/finalytics
import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { Alert } from 'reactstrap'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { get } from 'lodash'; import classnames from 'classnames'; const messages = defineMessages(...
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js
Gouthamve/BINS-FRONT
import React from 'react' import { reduxForm } from 'redux-form' export const fields = [] const validate = (values) => { const errors = {} return errors } type Props = { handleSubmit: Function, fields: Object, } export class <%= pascalEntityName %> extends React.Component { props: Props; defaultProps = ...
src/datepicker.js
wiflsnmo/react_study2
import React from 'react'; import ReactDOM from 'react-dom'; import DatePicker from 'react-datepicker'; import moment from 'moment'; // CSS Modules, react-datepicker-cssmodules.css import 'react-datepicker/dist/react-datepicker-cssmodules.css'; class Example extends React.Component { constructor (props) { super...
src/svg-icons/action/language.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionLanguage = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 ...
docs/src/GettingStartedPage.js
zerkms/react-bootstrap
import React from 'react'; import CodeExample from './CodeExample'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; export default class Page extends React.Component { render() { return ( <div> <NavMain activePage="getting-started"...
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js
darul75/react-router
import React from 'react'; class Assignments extends React.Component { render () { return ( <div> <h3>Assignments</h3> {this.props.children || <p>Choose an assignment from the sidebar.</p>} </div> ); } } export default Assignments;
src/browser/auth/SignInPage.js
TheoMer/este
// @flow import type { State } from '../../common/types'; import Email from './Email'; import React from 'react'; import SignInError from './SignInError'; import Social from './Social'; import linksMessages from '../../common/app/linksMessages'; import { Box, Loading, PageHeader } from '../../common/components'; import...
app/javascript/mastodon/features/compose/components/search_results.js
Craftodon/Craftodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import AccountContainer from '../../../containers/account_container'; import StatusContainer from '../../../containers/status_container'; import { Link } from 'react-router-dom'; import ...
app/router/Root.js
ykforerlang/my-react-redux
import React from 'react' import { Provider } from 'react-redux' import { Router } from 'react-router' import routes from './routes' const Root = ({ store, history }) => ( <Provider store={store}> <Router history={history} routes={routes} /> </Provider> ) export default Root
src/App.js
longyarnz/WelFurnish-E-Commerce
import React, { Component } from 'react'; import AppLogic from './AppLogic'; import FetchGraph from './components/FetchGraph'; import LandingPanel from './components/LandingPanel'; export default class App extends Component { constructor(props){ super(props); this.actions = this.actions.bind(this); this._...
services/ui/src/components/Tasks/index.stories.js
amazeeio/lagoon
import React from 'react'; import mocks, { seed } from 'api/src/mocks'; import Tasks from './index'; export default { component: Tasks, title: 'Components/Tasks', }; seed(); const environment = mocks.Environment(); const tasks = [ mocks.Task(null, {environment}), mocks.Task(null, {environment}), mocks.Task(...
src/components/Pagination.js
ttrentham/Griddle
import React from 'react'; const Pagination = ({ Next, Previous, PageDropdown, style, className }) => ( <div style={style} className={className}> {Previous && <Previous />} {PageDropdown && <PageDropdown /> } {Next && <Next /> } </div> ); export default Pagination;
client/app/scripts/components/matched-text.js
kinvolk/scope
import React from 'react'; const TRUNCATE_CONTEXT = 6; const TRUNCATE_ELLIPSIS = '…'; /** * Returns an array with chunks that cover the whole text via {start, length} * objects. * * `('text', {start: 2, length: 1}) => [{text: 'te'}, {text: 'x', match: true}, {text: 't'}]` */ function chunkText(text, { start, len...
example/src/App.js
kzima/react-static
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> ...
app/features/player/player.js
tco/ReactPlayer
import React from 'react'; import Video from './video/video.js'; import Controls from './controls/controls.js'; var ReactPlayer = React.createClass({ render: function() { return ( <div id="react-player" onMouseOver={this.showControls} onMouseOut={this.hideControls}> <Video ref=...
src/components/common/svg-icons/action/settings.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettings = (props) => ( <SvgIcon {...props}> <path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l...
src/Components/App.js
aryalprakash/omgyoutube
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Router, Route, browserHistory, Link } from 'react-router' import Helmet from "react-helmet"; import {getVideoData, getChannelVideos, clearChannelVideos, flushCurrentData, getPlaylistVideos, getMovieList} from '../actions/video.js'...
src/components/blog.js
ateixeira/andreteixeira.info
import React from 'react'; module.exports = React.createClass({ // RENDER render: function() { return ( <div className="blog"> <div className="box"> <div className="title"> Lorem Ipsum Sit Amet Dolor Bla ...
examples/src/components/Contributors.js
Paveltarno/react-select
import React from 'react'; import Select from 'react-select'; const CONTRIBUTORS = require('../data/contributors'); const MAX_CONTRIBUTORS = 6; const ASYNC_DELAY = 500; const Contributors = React.createClass({ displayName: 'Contributors', propTypes: { label: React.PropTypes.string, }, getInitialState () { ret...
app/components/job/Index/jobs.js
fotinakis/buildkite-frontend
import React from 'react'; import PropTypes from 'prop-types'; import Relay from 'react-relay/classic'; import searchQuery from 'search-query-parser'; import Spinner from '../../shared/Spinner'; import Panel from '../../shared/Panel'; import Button from '../../shared/Button'; import Row from './row'; const PAGE_SIZE...
src/components/WebSocketDebugTool/index.js
jiangxy/websocket-debug-tool
import React from 'react'; import {Form, Icon, Input, Button, Checkbox} from 'antd'; import SockJS from 'sockjs-client'; import StompJS from 'stompjs/lib/stomp.js'; import './index.less'; const FormItem = Form.Item; const CheckboxGroup = Checkbox.Group; const Stomp = StompJS.Stomp; /** * 用于调试websocket的一个小工具, 支持sockj...
src/groups/notifs/EditItemFailNotif.js
dash-/netjumpio-tabs-web
/// // Dependencies /// import React, { Component } from 'react'; import FailRetryNotif from '../../elements/FailRetryNotif'; import * as actions from '../actions'; /// // View /// class EditItemFailNotifView extends Component { /// // Rendering /// renderMessage(action, userMessage) { return ( 'Updatin...