path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
example/browser.js
bkniffler/draft-wysiwyg
import 'babel-polyfill'; import Example from './container'; import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <Example />, document.getElementById('target') );
test/helpers/shallowRenderHelper.js
dtying/gallery-by-react
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
src/svg-icons/content/add-circle-outline.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentAddCircleOutline = (props) => ( <SvgIcon {...props}> <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.5...
packages/v4/src/pages/community.js
patternfly/patternfly-org
import React from 'react'; import { Link } from 'theme-patternfly-org/components'; import { Grid, GridItem, PageSection, Split, SplitItem, Title } from '@patternfly/react-core'; import './community.css'; import { getTitle } from 'theme-patternfly-org/helpers/getTitle'; import communityPageHeader from './community-page-...
src/js/components/icons/base/View.js
kylebyerly-hp/grommet
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
examples/src/components/RemoteSelectField.js
jwarning/react-select
import React from 'react'; import Select from 'react-select'; var RemoteSelectField = React.createClass({ displayName: 'RemoteSelectField', propTypes: { hint: React.PropTypes.string, label: React.PropTypes.string, }, loadOptions (input, callback) { input = input.toLowerCase(); var rtn = { options: [ ...
docs/app/Examples/elements/Container/index.js
clemensw/stardust
import React from 'react' import Types from './Types' import Variations from './Variations' const ContainerExamples = () => ( <div> <Types /> <Variations /> </div> ) export default ContainerExamples
src/components/PagedCollection.js
literarymachine/crg-ui
import React from 'react' import PropTypes from 'prop-types' import { Composer } from 'json-pointer-form' import ItemList from './ItemList' import Icon from './Icon' import translate from './translate' import withEmitter from './withEmitter' import schema from '../json/schema.json' import '../styles/PagedCollection....
src/components/screen.js
dadiaoguai/blog-react-demo-front
import React from 'react' import propTypes from 'prop-types' const Screen = ({ store }) => (<div style={{ position: 'fixed', bottom: 0, left: 0, }} > {JSON.stringify(store, null, 2)} </div>) Screen.propTypes = { store: propTypes.shape({}), } Screen.defaultProps = { store: {}, } export de...
examples/01 Dustbin/Single Target/__tests__/Box-test.js
konce/react-dnd
import React from 'react'; import TestUtils from 'react/lib/ReactTestUtils'; import wrapInTestContext from '../../../shared/wrapInTestContext'; import expect from 'expect'; import Box from '../Box'; describe('Box', () => { it('can be tested independently', () => { // Obtain the reference to the component before ...
actor-apps/app-web/src/app/components/sidebar/ContactsSectionItem.react.js
mxw0417/actor-platform
import React from 'react'; import { PureRenderMixin } from 'react/addons'; import DialogActionCreators from 'actions/DialogActionCreators'; import AvatarItem from 'components/common/AvatarItem.react'; const ContactsSectionItem = React.createClass({ propTypes: { contact: React.PropTypes.object }, mixins: [...
actor-apps/app-web/src/app/components/activity/GroupProfile.react.js
v2tmobile/actor-platform
import React from 'react'; //import { Experiment, Variant } from 'react-ab'; //import mixpanel from 'utils/Mixpanel'; import ReactMixin from 'react-mixin'; import ReactZeroClipboard from 'react-zeroclipboard'; import { IntlMixin, FormattedMessage } from 'react-intl'; import DialogActionCreators from 'actions/DialogAc...
src/svg-icons/action/delete-forever.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDeleteForever = (props) => ( <SvgIcon {...props}> <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1....
src/Card/Action.js
gutenye/react-mc
import React from 'react' import cx from 'classnames' import Button from '../Button' import type { PropsC } from '../types' class Action extends React.Component { props: PropsC static defaultProps = { component: Button, } static displayName = 'Card.Action' render() { const { component: Component, cl...
src/components/WeatherIcons/CloudPrim.js
Cirych/WeatherApp
import React from 'react'; export const CloudPrim = ({ color = 'white' }) => <g id="cloudPrim"> <path id="cloud1" fill={color} stroke="black" strokeWidth="10000" d="M472900 238469c6689,-709 13440,-1255 20252,-1255 71587,0 129619,59016 129619,131816 0,71009 -55312,129256 -125159,131775l-366116 39 -831 0c-64306,0 -11...
src/components/modules/AnimeCard.js
migueliriano/react-anime-project
import React from 'react'; import PropTypes from 'prop-types'; import { CardContainer, Header, BodyContainer, } from 'style/animeCard'; const AnimeCard = props => ( <CardContainer> <Header> {props.title} </Header> <BodyContainer> {props.children} </BodyContainer> </CardContainer> ); AnimeCard.defau...
src/components/LineChart.js
aastein/crypto-trader
import React, { Component } from 'react'; import ReactHighcharts from 'react-highcharts/ReactHighstock.src'; import PropTypes from 'prop-types'; export default class PriceChart extends Component { componentWillReceiveProps = (nextProps) => { const chart = this.wschart.getChart(); if (this.dataChanged(nextP...
ajax/libs/react-instantsearch/4.0.0-beta.1/Dom.js
joeyparrish/cdnjs
/*! ReactInstantSearch 4.0.0-beta.1 | © Algolia, inc. | https://community.algolia.com/instantsearch.js/react/ */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof ...
src/components/Sidebar/Contacts/Contacts.js
wall3/wall3.github.io
// @flow strict import React from 'react'; import { getContactHref, getIcon } from '../../../utils'; import Icon from '../../Icon'; import styles from './Contacts.module.scss'; type Props = { contacts: { [string]: string, }, }; const Contacts = ({ contacts }: Props) => ( <div className={styles['contacts']}>...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.js
tharakawj/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 './assets/style.css'; import { test, version } from 'test-integrity'; export default () => { const ...
docs/client/components/shared/GithubButton/index.js
koaninc/draft-js-plugins
import React, { Component } from 'react'; export default class GithubStarButton extends Component { componentDidMount() { const githubScript = document.createElement('script'); githubScript.src = '//buttons.github.io/buttons.js'; githubScript.id = 'github-bjs'; this.githubButton.parentNode.appendChi...
examples/05 Customize/Drop Effects/index.js
arnif/react-dnd
import React from 'react'; import Container from './Container'; export default class CustomizeDropEffects { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/05%20Customize/Drop%20Effects'>Browse the Source</a></b> </p> <p>...
KeychainExample/__tests__/App-test.js
oblador/react-native-keychain
/** * @format */ import 'react-native'; import React from 'react'; import App from '../App'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { renderer.create(<App />); });
classic/src/scenes/wbfa/generated/FARFrown.pro.js
wavebox/waveboxapp
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faFrown } from '@fortawesome/pro-regular-svg-icons/faFrown' export default class FARFrown extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faFrown} />) } }
frontend/components/rss-registration/fetch-preview.js
apostolidhs/wiregoose
import size from 'lodash/size'; import map from 'lodash/map'; import React from 'react'; import PropTypes from 'prop-types'; import Form from 'react-bootstrap/lib/Form'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import Col from 'react-bootstrap/lib/Col'; import Row from 'react-bootstrap/lib/Row'; import Fo...
packages/material-ui-icons/src/SignalWifi0BarOutlined.js
lgollut/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z" /> , 'SignalWifi0BarOutlined');
src/primitives/container/sub-container/index.js
mpigsley/sectors-without-number
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import FlexContainer from '../flex-container'; import './style.scss'; export default function SubContainer(props) { const { children, className, noMargin, fullWidth, ...rest } = props; return ( <FlexContainer ...
actor-apps/app-web/src/app/components/modals/AppCacheUpdate.react.js
lzpfmh/actor-platform
import React from 'react'; import Modal from 'react-modal'; //import pureRender from 'pure-render-decorator'; import { Styles, FlatButton } from 'material-ui'; import AppCacheStore from 'stores/AppCacheStore'; import AppCacheActionCreators from 'actions/AppCacheActionCreators'; import { KeyCodes } from 'constants/Act...
src/modules/works/components/WorkDetail/WorkDetail.js
cltk/cltk_frontend
import React from 'react'; import PropTypes from 'prop-types'; // Single work detail view class WorkDetail extends React.Component { render() { const work = this.props.work; return ( <div> <section className="page-head image-bg bg-dark"> <div className="background-image-holder less-blur blur"> ...
definitions/npm/@storybook/react_v4.x.x/flow_v0.142.x-/test_react_v4.x.x.js
flowtype/flow-typed
// @flow import { describe, it } from 'flow-typed-test'; import React from 'react'; import { storiesOf, addDecorator, addParameters, clearDecorators, getStorybook, forceReRender, configure, setAddon, type RenderFunction, type Story, } from '@storybook/react'; declare var fakeModule: { exports: a...
webapp/app/components/RestoreCreation/index.js
EIP-SAM/SAM-Solution-Node-js
// // Component page save // import React from 'react'; import { PageHeader } from 'react-bootstrap'; import RestoreCreationForm from 'containers/RestoreCreation/Form'; /* eslint-disable react/prefer-stateless-function */ export default class RestoreCreation extends React.Component { componentWillUnmount() { th...
actor-apps/app-web/src/app/components/sidebar/RecentSection.react.js
gaolichuang/actor-platform
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import _ from 'lodash'; import React from 'react'; import DialogActionCreators from 'actions/DialogActionCreators'; import CreateGroupActionCreators from 'actions/CreateGroupActionCreators'; import DialogStore from 'stores/DialogStore'; import CreateGroupSt...
7-hover/app.js
aruberto/styling-react-components
import React from 'react'; import ReactDOM from 'react-dom'; import Button from './button'; const App = () => ( <div> <div> <Button>Everything is normal ....</Button> &nbsp;&nbsp; <Button error>Oh no, there is an error!</Button> </div> </div> ); ReactDOM.render(<App />, document.getElem...
docs/app/Examples/elements/Segment/Variations/SegmentCompactGroupExample.js
jcarbo/stardust
import React from 'react' import { Segment } from 'stardust' const SegmentCompactGroupExample = () => ( <Segment.Group compact> <Segment> Pellentesque habitant morbi </Segment> <Segment> Pellentesque habitant morbi </Segment> </Segment.Group> ) export default SegmentCompactGroupExample...
src/client/index.js
kettui/webcord-web-app
import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import moment from 'moment'; import Root from './root'; import '../../semantic/src/semantic.less'; import './global.scss'; if(process.env.NODE_ENV === 'development') __webpack_public_path__ = `http://${...
src/svg-icons/maps/local-taxi.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalTaxi = (props) => ( <SvgIcon {...props}> <path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.4...
client/components/UserCard/index.js
vinks/redux-ultimate-ssr
import React from 'react' import styles from './styles.scss' const UserCard = ({ info }) => ( <div className={styles.UserCard}> <h4>User Card</h4> <ul> <li>Name: {info.name}</li> <li>Phone: {info.phone}</li> <li>Email: {info.email}</li> <li>Website: {info.website}</li> </ul> </...
todomvc-multi-user/src/index.js
reindexio/reindex-examples
import React from 'react'; import ReactDOM from 'react-dom'; import Relay from 'react-relay'; import Reindex from './Reindex'; import App from './components/App'; Relay.injectNetworkLayer(Reindex.getRelayNetworkLayer()); ReactDOM.render( <App />, document.getElementById('root') );
clients/packages/admin-client/src/mobilizations/widgets/__plugins__/pressure/components/__pressure__.js
nossas/bonde-client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; // import * as graphqlQueries from 'graphql/queries' import * as pressureHelper from '../../../../../mobilizations/widgets/utils/pressure-helper'; import * as p...
src/components/add-files-button.js
MCeddy/nodefilestore
import React from 'react'; import classnames from 'classnames'; import FileViewModel from '../viewmodels/file.viewmodel'; export default class AddFilesButton extends React.Component { constructor(props) { super(props); } render() { const btnClasses = classnames('btn-floating', 'btn-large'...
node_modules/react-select/src/utils/defaultMenuRenderer.js
Sweetgrassbuffalo/ReactionSweeGrass-v2
import classNames from 'classnames'; import React from 'react'; function menuRenderer ({ focusedOption, instancePrefix, labelKey, onFocus, onSelect, optionClassName, optionComponent, optionRenderer, options, valueArray, valueKey, onOptionRef }) { let Option = optionComponent; return options.map((option,...
assets/javascript/components/profile/inviteList.js
colinjeanne/learning-site
import React from 'react'; const inviteList = props => { const listItems = props.invitations.map(invite => ( <li key={invite.id}> {'Invite from: ' + invite.createdBy} <button onClick={() => props.onAcceptInvitation(invite.id)} type="button"> ...
react/liveevent/components/LiveEventPanel.js
phil-lopreiato/the-blue-alliance
import React from 'react' import PropTypes from 'prop-types' import FirebaseApp from '../firebaseapp' import { getCompLevelStr, getMatchSetStr } from '../helpers' import CurrentMatchDisplay from './CurrentMatchDisplay' import LastMatchesTable from './LastMatchesTable' import UpcomingMatchesTable from './UpcomingMatch...
blueprints/view/files/__test__/views/__name__View.spec.js
jeffaustin81/cropcompass-ui
import React from 'react' describe('(View) <%= pascalEntityName %>', () => { it('should exist', () => { }) })
packages/react-server-website/pages/homepage.js
davidalber/react-server
import React from 'react'; import HomepageBody from '../components/homepage-body'; import './homepage.less'; export default class Homepage { getTitle() { return "React Server"; } getElements() { return ( <div className="homepage"> <HomepageBody /> </div> ); } }
app/javascript/mastodon/components/load_more.js
Kirishima21/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class LoadMore extends React.PureComponent { static propTypes = { onClick: PropTypes.func, disabled: PropTypes.bool, visible: PropTypes.bool, } static defaultProps = { vi...
example/src/scripts/pages/PlayerDemo/index.js
vyorkin-personal/erlyeditor
import React, { Component } from 'react'; import css from 'react-css-modules'; import { Player, Html5Video } from 'erlyeditor'; import { sources } from '../videoSources'; import styles from './styles'; export class PlayerDemo extends Component { render() { return ( <div styleName='root'> <Player ...
__tests__/index.ios.js
thrifty-p2p/thrifty-client
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 /> ); });
app/components/ListItem/index.js
Frai/Events
import React from 'react'; import Item from './Item'; import Wrapper from './Wrapper'; function ListItem(props) { return ( <Wrapper> <Item> {props.item} </Item> </Wrapper> ); } ListItem.propTypes = { item: React.PropTypes.any, }; export default ListItem;
app/components/Menu/Admin.js
code4romania/monitorizare-vot-votanti-client
import React from 'react'; import styled from 'styled-components'; import { Link } from 'react-router'; import UserIcon from './user_icon.svg'; const MenuList = styled.ul` list-style-type: none; padding: 0; margin: 0 10px 0 0; display: none; @media (min-width: 64em) { display: block; } `; const MenuI...
src/backward/Widgets/CardSwiper.js
sampsasaarela/NativeBase
/* @flow */ import React from 'react'; import clamp from 'clamp'; import { Animated, PanResponder } from 'react-native'; import NativeBaseComponent from '../Base/NativeBaseComponent'; import { View } from './View'; const SWIPE_THRESHOLD = 120; export default class CardSwiper extends NativeBaseComponent { constru...
src/routes/index.js
stevecrozz/test-directory-client
import React from 'react' import { Route, IndexRoute, Redirect } from 'react-router' import CoreLayout from 'layouts/CoreLayout/CoreLayout' import HomeView from 'views/HomeView/HomeView' import UserIndexView from 'views/UserIndexView/UserIndexView' import NotFoundView from 'views/NotFoundView/NotFoundView' import AuthV...
test/ColSpec.js
laran/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Col from '../src/Col'; describe('Col', () => { it('Should set Offset of zero', () => { let instance = ReactTestUtils.renderIntoDocument( <Col xsOffset={0} smOffset={0} mdOffset={0} lgOffset={0} /> ); let insta...
examples/src/BasicExample/BasicExample.js
brennanerbz/react-autosuggest
import React, { Component } from 'react'; import utils from '../utils'; import Autosuggest from '../../../src/Autosuggest'; import SourceCodeLink from '../SourceCodeLink/SourceCodeLink'; import suburbs from 'json!../suburbs.json'; function getSuggestions(input, callback) { const escapedInput = utils.escapeRegexChara...
src/components/Touchable/ButtonHOC.js
wkozyra95/react-boilerplate
/* @flow */ import React from 'react'; const ButtonHOC = (WrapedComponent: any) => { return class extends React.Component { props: { onTouchTap?: Function, payload?: any, } onTouchTap = (event: any) => { if (this.props.onTouchTap) { this.props.onTouchTap(event, this.props.paylo...
client/index/components/pop/index.js
sliwei/react16-koa2
import React from 'react'; import {Popup, Modal} from 'Public' import css from './pop.scss' export default class Index extends React.Component { constructor(props) { super(props); this.state = { sta: false, sta1: false, open: false, time: new Date() ...
src/Parser/Monk/Windwalker/Modules/Spells/TouchOfKarma.js
hasseboulen/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import Analyzer from 'Parser/Core/Analyzer'; import HealingDone from 'Parser/Core/Modules/HealingDone'; import StatisticBox...
src/components/PastDecisionsModal/PastDecisionsModal.js
labzero/lunch
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; import Modal from 'react-bootstrap/lib/Modal'; import ModalBody from 'react-bootstrap/lib/ModalBody'; import ModalHeader from 'react-bootstrap/lib/ModalHeader'; import ModalFooter fro...
resources/js/Admin/Campaigns/Create.js
DoSomething/northstar
import React from 'react'; import Layout from '../components/Layout'; import TextField from '../components/Form/TextField'; import AdminForm from '../components/Form/AdminForm'; import DateField from '../components/Form/DateField'; import NoteCard from '../../components/Card/NoteCard'; import SelectField from '../comp...
src/containers/register-form.js
MoveOnOrg/mop-frontend
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import RegisterForm from 'Theme/register-form' import RegisterFormMaterial from '../components/theme-giraffe/create-petition/register-form' import Config from '../config' import { register, devLocalRegister } from '../a...
src/svg-icons/action/assignment-turned-in.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAssignmentTurnedIn = (props) => ( <SvgIcon {...props}> <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 ....
app/containers/ExplainScreen/index.js
nypl-spacetime/where
import React from 'react' import { Images, ComponentTable } from './styles' export class ExplainScreen extends React.Component { constructor (props) { super(props) this.state = { selectedIndex: 0, intervalDuration: 2500 } } componentDidMount () { this.startAnimation() } compo...
docs/pages/blog/2020-q2-update.js
lgollut/material-ui
import React from 'react'; import TopLayoutBlog from 'docs/src/modules/components/TopLayoutBlog'; import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown'; const pageFilename = 'blog/2020-q2-update'; const requireRaw = require.context('!raw-loader!./', false, /2020-q2-update\.md$/); export default funct...
docs/app/Examples/elements/Rail/index.js
koenvg/Semantic-UI-React
import React from 'react' import Types from './Types' import Variations from './Variations' const RailExamples = () => ( <div> <Types /> <Variations /> </div> ) export default RailExamples
src/platform/user/tests/authentication/components/DowntimeBanner.unit.spec.js
department-of-veterans-affairs/vets-website
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import configureMockStore from 'redux-mock-store'; import DowntimeBanners, { downtimeBannersConfig, DowntimeBanner, } from 'platform/user/authentication/components/DowntimeBanner'; const mockStore = configureMockStore(); co...
src/components/ui/StatusBarTargetUrl.js
meetfranz/franz
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; import classnames from 'classnames'; import Appear from './effects/Appear'; export default @observer class StatusBarTargetUrl extends Component { static propTypes = { className: PropTypes.string,...
Rate.UI/app/components/Categories.js
jcnavarro/rateflicks
import React from 'react'; import { Link } from 'react-router'; import styled from 'styled-components'; const StyledLink = styled(Link)` color: tomato; display: block; margin: 0.5em 0; font-family: Helvetica, Arial, sans-serif; &:hover { text-decoration: underline;...
ui/src/frontend/component/Package.js
Virtustream-OSS/packrat
import React from 'react'; import CInP from './cinp'; import AddPackageDialog from './AddPackageDialog'; import PackageFile from './PackageFile'; import { Table, TableHead, TableRow, TableCell } from 'react-toolbox'; import { Link } from 'react-router-dom'; class Package extends React.Component { state = { pa...
src/components/Aside/Aside.js
corbinpage/react-play
import React, { Component } from 'react'; import { TabContent, TabPane, Nav, NavItem, NavLink, Progress } from 'reactstrap'; import classnames from 'classnames'; class Aside extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { activeTab: '1' ...
test/TooltipSpec.js
yickli/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Tooltip from '../src/Tooltip'; describe('Tooltip', function () { it('Should output a tooltip with content', function () { let instance = ReactTestUtils.renderIntoDocument( <Tooltip> <strong>Tooltip Content</str...
fields/types/boolean/BooleanFilter.js
pswoodworth/keystone
import React from 'react'; import { SegmentedControl } from 'elemental'; const VALUE_OPTIONS = [ { label: 'Is Checked', value: true }, { label: 'Is NOT Checked', value: false }, ]; function getDefaultValue () { return { value: true, }; } var BooleanFilter = React.createClass({ propTypes: { filter: React.Pro...
pathfinder/vtables/globalapplicationportfolio/src/index.js
leanix/leanix-custom-reports
// 3rd party css files import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; import '../node_modules/bootstrap/dist/css/bootstrap-theme.min.css'; import '../node_modules/react-bootstrap-table/dist/react-bootstrap-table.min.css'; // Import css declarations for the report import './assets/main.css'; import '@l...
client/canx-client/src/views/LogoutModal.js
uros-stegic/canx
import React from 'react' import Modal from 'react-modal' import {modalStyle} from '../style/modalStyle' import {bindActionCreators} from 'redux' import { connect } from 'react-redux' import * as authActions from '../actions/userActions' class LogoutModal extends React.Component { constructor(...args) { super(.....
src/components/Page/Page.js
0xcdc/rfb-client-app
import useStyles from 'isomorphic-style-loader/useStyles'; import React from 'react'; import PropTypes from 'prop-types'; import s from './Page.css'; export default function Page({ title, html }) { useStyles(s); return ( <div> <h1>{title}</h1> <div // eslint-disable-next-line react/no-dange...
themes/frontend/assets/reactjs/process/js/SearchCarRow.js
fonea/velon
import React from 'react'; import SearchCarRowImage from './SearchCarRowImage'; export default class SearchCarRow extends React.Component { constructor(props) { super(props); this.createMarkup = this.createMarkup.bind(this); } createMarkup(markup) { return {__html: markup}; } render() { ...
app/js/components/Footer.js
raulalgo/button_rr
'use strict'; import React from 'react'; import CountItem from '../components/level_counter/CountItem' class Footer extends React.Component{ constructor(props) { super(props); } render() { return ( <footer> </footer> ); } } export default Footer;
app/components/common/snackbar/SnackbarContent.js
rvpanoz/luna
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import green from '@material-ui/core/colors/green'; import IconButton from '@material-ui/core/IconButton'; import SnackbarContent from '@material-ui/core/SnackbarContent'; import Typography from '@material-ui/core/Typogr...
7-css-modules/src/TodoItem.js
mariusz-malinowski/tutorial-react
import React from 'react'; import styles from './todo.css' export default (props) => { return ( <li className={props.todo.completed ? styles.todo_done : styles.todo_pending} onClick={props.onTodoClicked}>{props.todo.name}</li> ); };
src/components/searchbar.js
tgundavelli/React_Udemy
import React, { Component } from 'react'; //const SearchBar = () => { // return <input />; //}; // each class based object has a state object // if state of search bar is changed then the render function is reran class SearchBar extends Component{ // this is how we initialize state in a class based component // ...
src/interface/statistics/components/PlayerHits/index.js
fyruna/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import char1 from './images/char1.png'; import char2 from './images/char2.png'; import char3 from './images/char3.png'; import char4 from './images/char4.png'; import char5 from './images/char5.png'; import char1Active from './images/char1-active.png'; imp...
src/svg-icons/editor/border-left.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorBorderLeft = (props) => ( <SvgIcon {...props}> <path d="M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2z...
src/components/common/ImageUpload.js
bharney/YogaMarieMills
import React from 'react'; const ImageUpload = ({uploadImage}) => { return ( <div className="previewComponent"> <label for="upload-photo" className="btn btn-info btn-circle-lg" title="Change Image"> <i className="p-t-3 glyphicon glyphicon-camera"></i> ...
fields/types/markdown/MarkdownField.js
frontyard/keystone
import Field from '../Field'; import React from 'react'; import { FormInput } from '../../../admin/client/App/elemental'; /** * TODO: * - Remove dependency on jQuery */ // Scope jQuery and the bootstrap-markdown editor so it will mount var $ = require('jquery'); require('./lib/bootstrap-markdown'); // Append/remo...
docs/app/Examples/views/Card/Types/index.js
shengnian/shengnian-ui-react
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const Types = () => ( <ExampleSection title='Types'> <ComponentExample title='Card' description='A card displays sit...
src-client/admin/components/layout-sidebar/index2.js
helinjiang/xman-admin
import React from 'react'; import {Link} from 'react-router'; import classnames from 'classnames'; class Sidebar extends React.Component { constructor(props, context) { super(props, context); console.log('==sidebar.js== constructor'); this.state = { routes: [ {url: '/index', icon: 'home...
src/music/Player/MiniControls/index.js
NewSpring/Apollos
import React from 'react'; import PropTypes from 'prop-types'; import Color from 'color'; import { compose, setPropTypes } from 'recompose'; import { View, StyleSheet } from 'react-native'; import SafeAreaView from '@ui/SafeAreaView'; import Icon from '@ui/Icon'; import Touchable from '@ui/Touchable'; import ConnectedI...
src/frontend/routes/index.js
PiTeam/garage-pi
import React from 'react'; import { browserHistory, Router, Route, IndexRoute, } from 'react-router'; import Main from 'components/main'; import Login from 'containers/login'; import Logout from 'containers/logout'; import Door from 'containers/door/list'; import AddUser from 'containers/user/admin/add'; impor...
app/components/Chart.js
paul-uu/weather
import React from 'react'; import d3 from 'd3'; import c3 from 'c3'; export default class Chart extends React.Component { constructor(props) { super(props); } componentDidMount() { this.chartC3(this.props.weatherArray); } componentDidUpdate() { this.chartC3(this.props.weatherArray); } chartC3...
test/integration/css-fixtures/url-global-asset-prefix-1/pages/_app.js
flybayer/next.js
import React from 'react' import App from 'next/app' import '../styles/global1.css' import '../styles/global2.css' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
packages/material-ui-icons/src/Crop.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Crop = props => <SvgIcon {...props}> <path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z" /> </SvgIcon>; Crop = pure(Crop); Crop.muiName = 'SvgIcon'; export...
gatsby-ssr.js
orleans-tech/orleans-tech.github.io
import React from 'react' import { Provider } from 'react-redux' import { createStore, combineReducers, applyMiddleware, compose } from 'redux' import exampleReducer from 'src/reducers/example' import { GRAPHQL_API_BASE_URL } from 'src/config' import { ApolloClient, ApolloProvider, createNetworkInterface, Intr...
src/components/antd/icon/index.js
hyd378008136/olymComponents
import React from 'react'; import classNames from 'classnames'; import omit from 'omit.js'; const Icon = (props) => { const { type, className = '', spin } = props; const classString = classNames({ anticon: true, 'anticon-spin': !!spin || type === 'loading', [`anticon-${type}`]: true, ...
test/alert.js
Vision100IT/v100it-template
import test from 'ava'; import React from 'react'; import {renderToStaticMarkup} from 'react-dom/server'; import Alert from '../src/components/alert'; test('', t => { const result = renderStatic(); t.true(result); }); function renderStatic(props) { return renderToStaticMarkup(<Alert {...props}/>); }
src/components/interactive/Link.js
mrozilla/mrozilla.cz
// ───────────────────────────────────────────────────────────────────────────── // import // ───────────────────────────────────────────────────────────────────────────── import React from 'react'; import { string, node } from 'prop-types'; import { Link as GatsbyLink } from 'gatsby'; import { OutboundLink } from 'ga...
client/src/modules/Nav.js
showmethewei/tuna-io
import React from 'react'; import { browserHistory, Link } from 'react-router'; import { Menu, NavItem, Media, Heading, Text, Divider, InlineForm } from 'rebass'; import Recommended from './Recommended'; export default class Nav extends React.Component { constructor(props) { super(props); this.state = { ...
src/components/icon-dropdown/index.js
KleeGroup/focus-components
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import Button from '../../components/button'; import Translation from '../../behaviours/translation'; function isDescendant(parent, child) { let node = child.parentNode; while (node != null) { ...
src/main.js
nodatall/avoid-the-meters
import React from 'react' import { render } from 'react-dom' import App from './components/App' render( <App />, document.getElementById('mountApp') )
frontend/src/components/GithubIcon.js
tdv-casts/website
import React from 'react'; import SvgIcon from 'material-ui/SvgIcon'; const GithubIcon = (props) => ( <SvgIcon viewBox="0 0 16 16" {...props}> <path d="M8 0C3.58 0 0 3.582 0 8c0 3.535 2.292 6.533 5.47 7.59.4.075.547-.172.547-.385 0-.19-.007-.693-.01-1.36-2.226.483-2.695-1.073-2.695-1.073-.364-.924-.89-1.17...
packages/lore-hook-dialogs-material-ui/src/blueprints/destroy/Wizard/forms/Confirmation.js
lore/lore-forms
import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { CardTitle, CardText, CardActions, RaisedButton, FlatButton } from 'material-ui'; export default createReactClass({ displayName: 'Confirmation', propTypes: { callbacks: PropTypes.object ...
src/client/js/components/LoginForm.js
neffka/ssi
import React from 'react'; export default class LoginForm extends React.Component { constructor(props) { super(props); } render() { return ( <div style={{visibility: this.props.visibility, position: 'fixed', fontFamily: ["Lucida Sans Unicode", "Lucida Grande", 'sans-serif'], fontSize: 12 + 'px', left: 40 + '...