path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
test/components/Placeholder/Placeholder.js | bluetidepro/react-styleguidist | import React, { Component } from 'react';
import PropTypes from 'prop-types';
/**
* Image placeholders.
*
* @example ./examples.md
* @see {@link link}
* @link link
*/
export default class Placeholder extends Component {
static propTypes = {
type: PropTypes.oneOf([
'animal',
'bacon',
'beard',
'bear... |
src/components/RegistrationForm/RegistrationForm.js | zeegeek/ps-react-reusable-comp | import React from 'react';
import PropTypes from 'prop-types';
import TextInput from '../TextInput';
import PasswordInput from '../PasswordInput';
/** Registration form with built-in validation. */
class RegistrationForm extends React.Component {
constructor(props) {
super(props);
this.state = {
user:... |
stories/DayPicker.js | thg303/react-jalaali-dates | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import DayPicker from '../src/components/DayPicker';
import moment from 'moment-jalaali'
import {
VERTICAL_ORIENTATION,
VERTICAL_SCROLLABLE,
} from '../constants';
const TestPrevIcon = props => (
<span style={{
border: '1px solid #d... |
definitions/npm/redux-forms-react_v0.11.x/flow_v0.34.x-v0.52.x/test_redux-forms-react_v0.11.x.js | doberkofler/flow-typed | /* @flow */
import React from 'react';
import { Form, Field, FieldArray } from 'redux-forms-react';
let el;
/* ======== */
/* = Form = */
/* ======== */
el = (
<Form name="test" />
);
let f: HTMLFormElement;
el = (
<Form
name="test"
persistent
onSubmit={(values) => new Promise((resolve, reject) => {... |
src/components/Settings.js | tallessa/tallessa-frontend | import React from 'react';
const Settings = () => (
<div>Settings</div>
);
export default Settings;
|
src/Suggestion.js | tomkp/react-auto-suggest | import React from 'react';
let Suggestion = React.createClass({
onClick(event) {
let suggestion = this.props.suggestion;
this.props.onClick(suggestion);
},
render() {
let suggestion = this.props.suggestion;
let classes = [this.constructor.displayName];
let selec... |
src/shared/components/activity/ActivityPage.js | sbekti/path-web-client | import React from 'react'
import ReactDOM from 'react-dom'
import { Link } from 'react-router'
import request from 'superagent'
import MomentJS from 'moment'
class ActivityPage extends React.Component {
constructor(props) {
super(props)
this.state = {
activities: [],
locations: {},
users:... |
src/parser/rogue/outlaw/modules/spells/Opportunity.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import DamageTracker from 'parser/shared/modules/AbilityTracker';
import OpportunityDamageTracker from './Opportunity... |
app/main.js | andrew-starosciak/webpack-gratitude-client | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
ReactDOM.render(<App />, document.getElementById('root'));
|
frontend/src/components/review-list-view/review-comments.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { processor } from '../../utils/seafile-markdown2html';
import { Button, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import { seafileAPI } from '../../utils/seafile-api';
import { gettext, draftFilePath, draftRepoID } fr... |
src/svg-icons/image/exposure-neg-2.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageExposureNeg2 = (props) => (
<SvgIcon {...props}>
<path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81... |
js/app.js | marclebel/squaro | import React from 'react';
import Grid from './components/grid';
React.render(
<div>
<h1>SquarO</h1>
<Grid
data={[0,1,1,1,0,1,0,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,0,0]}
width="300"
/>
</div>,
document.getElementById('app')
); |
components/__tests__/CodeSnippet-test.js | hellobrian/carbon-components-react | import React from 'react';
import CodeSnippet from '../CodeSnippet';
import { mount, shallow } from 'enzyme';
describe('Code Snippet', () => {
describe('Renders as expected', () => {
const snippet = shallow(
<CodeSnippet className="some-class" type="terminal">
{'node -v'}
</CodeSnippet>,
... |
src/components/Content/index.js | yuwanlin/react-bookstore | import React from 'react';
import Book from '../../containers/Book';
import Header from '../../containers/Header';
const Content = () => {
return (
<div>
<Header />
<Book />
</div>
)
}
export default Content;
|
client/app/scripts/components/node-details/node-details-control-button.js | kinvolk/scope | import React from 'react';
import { connect } from 'react-redux';
import { trackAnalyticsEvent } from '../../utils/tracking-utils';
import { doControl } from '../../actions/app-actions';
class NodeDetailsControlButton extends React.Component {
constructor(props, context) {
super(props, context);
this.handle... |
definitions/npm/redux-form_v5.x.x/test_redux-form_v5.js | echenley/flow-typed | /** @flow */
import { reduxForm, reducer } from 'redux-form';
import type { InputProps } from 'redux-form';
import React from 'react';
const Input = (props: InputProps) => {
(props.onChange: (v: string) => mixed);
(props.onChange: (v: SyntheticEvent) => mixed);
(props.onUpdate: (v: string) => mixed);
(p... |
tests/react/createElementRequiredProp_string.js | samwgoldman/flow | // @flow
import React from 'react';
class Bar extends React.Component<{test: number}> {
render() {
return (
<div>
{this.props.test}
</div>
)
}
}
class Foo extends React.Component<{}> {
render() {
const Cmp = Math.random() < 0.5 ? 'div' : Bar;
return (<Cmp/>);
}
}
|
src/svg-icons/image/crop-square.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCropSquare = (props) => (
<SvgIcon {...props}>
<path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"/>
</SvgIcon>
);
ImageCropSquare = pure(ImageCropSquar... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | Chronister/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
export default class SettingToggle extends React.PureComponent {
static propTypes = {
prefix: PropTypes.string,
settings: ImmutablePropTypes.map.isReq... |
t1_client_react/src/components/login/loginWidget.js | tomjal/TicketOne | import React, { Component } from 'react';
export class LoginWidget extends Component {
render() {
const { children, headerText, inputLabel } = this.props;
return (
<div className="generic-widget">
<div className="row widget__header">
{headerText}
</div>
<div className=... |
js/components/about/AboutTab.js | kort/kort-reloaded | import React from 'react';
import { View, Text, StyleSheet, ScrollView, Image } from 'react-native';
import I18n from 'react-native-i18n';
import Config from '../../constants/Config';
const gitHubUrl = Config.KORT_GITHUB;
const uservoiceUrl = Config.KORT_USERVOICE;
const version = Config.KORT_VERSION;
const kortUrl =... |
src/browser/ticket/components/Footer/Footer.js | glaserp/Maturita-Project | import Component from 'react-pure-render/component'
import React from 'react'
import {Link} from 'react-router'
export default class Footer extends Component {
constructor(props) {
super(props)
}
render() {
return (
<footer className="footer">
<div className="copyright">Copyright © 2016</d... |
src/svg-icons/action/query-builder.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionQueryBuilder = (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 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5... |
admin/client/App/screens/List/components/UpdateForm.js | rafmsou/keystone | import React from 'react';
import Select from 'react-select';
import { findDOMNode } from 'react-dom';
import assign from 'object-assign';
import { Fields } from 'FieldTypes';
import InvalidFieldType from '../../../shared/InvalidFieldType';
import { plural } from '../../../../utils/string';
import { BlankState, Button,... |
client/app/scripts/components/node-details/node-details-generic-table.js | paulbellamy/scope | import React from 'react';
import sortBy from 'lodash/sortBy';
import { Map as makeMap } from 'immutable';
import { NODE_DETAILS_DATA_ROWS_DEFAULT_LIMIT } from '../../constants/limits';
import {
isNumber,
getTableColumnsStyles,
genericTableEntryKey
} from '../../utils/node-details-utils';
import NodeDetailsTabl... |
src/svg-icons/maps/local-parking.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalParking = (props) => (
<SvgIcon {...props}>
<path d="M13 3H6v18h4v-6h3c3.31 0 6-2.69 6-6s-2.69-6-6-6zm.2 8H10V7h3.2c1.1 0 2 .9 2 2s-.9 2-2 2z"/>
</SvgIcon>
);
MapsLocalParking = pure(MapsLocalParking... |
app/javascript/mastodon/features/reblogs/index.js | unarist/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchReblogs ... |
pages/topics.js | alivelee/NextTech | import React from 'react';
import Error from 'next/error';
import { getTopics } from '../utility/apiRequest';
import { getCookie } from '../utility/cookie';
import Layout from '../component/Layout';
import Topicitem from '../component/Topicitem'
export default class topics extends React.Component {
static async getIn... |
exemplos/ExemploBusca.js | vitoralvesdev/react-native-componentes | import React, { Component } from 'react';
import {
View,
Text,
StyleSheet
} from 'react-native';
import { Busca } from 'react-native-componentes';
const DATA = [
{ id: 0, nome: "Vitor" },
{ id: 0, nome: "Hugo" },
{ id: 0, nome: "Alves" }
];
export default class ExemploBusca extends Component {
... |
src/svg-icons/content/reply-all.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentReplyAll = (props) => (
<SvgIcon {...props}>
<path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/>
</SvgIcon>
);
ContentReplyAll = pure(ContentReplyAll);
Conte... |
src/components/IconUpload/index.js | oVirt/ovirt-web-ui | import React from 'react'
import PropTypes from 'prop-types'
import { withMsg } from '_/intl'
import FieldHelp from '../FieldHelp/index'
import style from './style.css'
const MAX_ICON_SIZE = 24 // in KiB; checked by oVirt API
class IconUpload extends React.Component {
constructor (props) {
super(props)
th... |
src/svg-icons/action/pets.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPets = (props) => (
<SvgIcon {...props}>
<circle cx="4.5" cy="9.5" r="2.5"/><circle cx="9" cy="5.5" r="2.5"/><circle cx="15" cy="5.5" r="2.5"/><circle cx="19.5" cy="9.5" r="2.5"/><path d="M17.34 14.86c-.8... |
client/index.js | lorix-lpan/perfect-schedule | import React from 'react';
import routes from '../app/config/routes';
import DevTools from '../app/helpers/DevTools/DevTools';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { configureStore } from '../app/redux/store/configureSt... |
src/containers/ProfilePage.js | qandobooking/booking-frontend | import React, { Component } from 'react';
import UpdateUserDataForm from './UpdateUserDataForm';
import UpdateUserPasswordForm from './UpdateUserPasswordForm';
import {
Tabs,
Tab
} from 'react-bootstrap';
export default class ProfilePage extends Component {
render() {
return (
<div className="container... |
frontend/src/components/users-list/root.js | 1905410/Misago | import React from 'react';
import UserCard from 'misago/components/users-list/user-card' // jshint ignore:line
import UserPreview from 'misago/components/users-list/user-preview' // jshint ignore:line
import batch from 'misago/utils/batch'; // jshint ignore:line
export default class extends React.Component {
shouldC... |
server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info 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, o... |
App/db/entities/content/Event.js | nthbr/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.
... |
app/javascript/mastodon/features/standalone/compose/index.js | MastodonCloud/mastodon | import React from 'react';
import ComposeFormContainer from '../../compose/containers/compose_form_container';
import NotificationsContainer from '../../ui/containers/notifications_container';
import LoadingBarContainer from '../../ui/containers/loading_bar_container';
import ModalContainer from '../../ui/containers/mo... |
tests/lib/rules/vars-on-top.js | mdebruijne/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
* @copyright 2014 Danny Fritz. All rights reserved.
* @copyright 2014 Gyandeep Singh. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requiremen... |
src/components/login/Login.js | simnau/event-scraper-ui | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Grid, Row, Col } from 'react-flexbox-grid';
import Paper from 'material-ui/Paper';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
import { Field } from ... |
docs/pages/api-docs/speed-dial-action.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/speed-dial-action';
const requireRaw = require.context('!raw-loader!./', false, /\/speed-dial-action\.md$/);
export default ... |
src/svg-icons/action/bookmark.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBookmark = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionBookmark = pure(ActionBookmark);
ActionBookmark.displayName = 'Ac... |
packages/my-joy-images/src/components/tags.js | geek/joyent-portal | import React from 'react';
import { Margin } from 'styled-components-spacing';
import { TagItem, KeyValue } from 'joyent-ui-toolkit';
export const AddForm = props => (
<KeyValue {...props} method="add" input="input" type="tag" expanded />
);
export const EditForm = props => (
<KeyValue {...props} method="edit" i... |
src/__tests__/createRefiter-test.js | toplan/react-hold | import React from 'react'
import createRefiter from '../createRefiter'
describe('Component refiter', () => {
it('refit dom component', () => {
const component = 'div'
const refiter = createRefiter(component)
expect(typeof refiter.refit).toBe('function')
expect(typeof refiter.undo).toBe('function')
... |
src/routes/privacy/index.js | jhlav/mpn-web-app | /**
* 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 React from 'react';
import Layout from '../../co... |
src/containers/__tests__/views/launch-view-test.js | b1alpha/Smoothie-Du-Jour | /**
* Test to check if the component renders correctly
*/
/* global it expect jest */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import LaunchView from '@containers/Launch/LaunchView';
// Login prop expects a promise
const mockPromise = new Promise((resolve) => {
... |
client/components/Grid/Body.js | dimitri-a/wp2_budget | import React from 'react';
export default ({ children }) => (
<tbody>{children}</tbody>
);
|
examples/simple/components/ScrollWrap.js | browniefed/react-scroll-monitor | import React from 'react';
import ScrollWatch from './ScrollWatch';
class ScrollWrap extends React.Component {
render() {
return (
<div {...this.props}>
<ScrollWatch />
</div>
)
}
}
module.exports = ScrollWrap |
app/components/Header.js | meryt/wordcount-react | import React from 'react';
import { IndexLink, Link } from 'react-router';
class Header extends React.Component {
render() {
const active = { borderBottomColor: '#3f51b5' };
return (
<nav className="navbar navbar-default navbar-static-top">
<div className="container">
<div className="... |
app/components/About.js | flocks/deeprun-front | import React from 'react';
const About = () =>
<div>
<div>test</div>
</div>;
export default About;
|
src/redux/utils/createDevToolsWindow.js | FiviumAustralia/RNSH-Pilot | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import DevTools from '../../containers/DevToolsWindow';
export default function createDevToolsWindow (store) {
const win = window.open(
null,
'redux-devtools', // give it a name so it reuses the same window
... |
MobileApp/mstudentApp/components/subsViews/DetailList.js | FresnoState/mobilestudentintranet | import React, { Component } from 'react';
import {
Text,
View,
ListView
} from 'react-native';
import DetailItem from './Detail_Item';
export default class DetailList extends Component {
constructor(props){
super(props);
}
render(){
return(
<View style={{flex: 1}}>
... |
submissions/leoasis/src/NavButton.js | sensduo/flux-challenge | import React from 'react';
import classNames from 'classnames';
export default class NavButton extends React.Component {
render() {
const className = classNames(
'css-button-' + this.props.direction,
this.props.disabled && 'css-button-disabled'
);
return <button
className={className}
... |
src/js/components/icons/base/BrandHpeLabsInsignia.js | odedre/grommet-final | /**
* @description BrandHpeLabsInsignia SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.text... |
src/client.js | Afrostream/react-redux-universal-hot-example | import React from 'react';
import Router from 'react-router';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import routes from './views/routes';
import createRedux from './redux/create';
import { Provider } from 'redux/react';
import ApiClient from './ApiClient';
const history = new BrowserHistory();
co... |
docs/src/app/components/pages/components/Snackbar/ExampleSimple.js | pradel/material-ui | import React from 'react';
import Snackbar from 'material-ui/Snackbar';
import RaisedButton from 'material-ui/RaisedButton';
export default class SnackbarExampleSimple extends React.Component {
constructor(props) {
super(props);
this.state = {
open: false,
};
}
handleTouchTap = () => {
th... |
packages/icons/src/md/image/FilterFrames.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdFilterFrames(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40 10c2.21 0 4 1.79 4 4v28c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4V14c0-2.21 1.79-4 4-4h8l8-8 8 8h8zm0 32V14h-8.97l-6.96-7-7.04 7H8v28h32zm-4-24... |
docs/src/app/components/pages/components/RaisedButton/ExampleComplex.js | w01fgang/material-ui | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import ActionAndroid from 'material-ui/svg-icons/action/android';
import FontIcon from 'material-ui/FontIcon';
const styles = {
button: {
margin: 12,
},
exampleImageInput: {
cursor: 'pointer',
position: 'absolute',
to... |
client/src/components/Button/Button.js | silverstripe/silverstripe-admin | import React from 'react';
import { Button as BaseButton } from 'reactstrap';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import IconHOC from './IconHOC';
const Button = ({ className, noText, children, ...props }) =>
(<BaseButton
className={classnames(className, { 'btn--no-text': noT... |
src/containers/Articles/Single.js | mcnamee/react-native-starter-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Layout from '../../components/Articles/Single';
class ArticlesSingleContainer extends Component {
constructor() {
super();
this.state = { loading: false, error: null, article: {} };
}... |
react/20161127/src/js/A.js | fengnovo/diary | import React from 'react'
import {Link } from 'react-router'
class A extends React.Component {
constructor (props){
super(props)
}
KeepScrollBar() {
var scrollPos;
if (typeof window.pageYOffset != 'undefined') {
scrollPos = window.pageYOffset;
}
... |
app/scripts/routes.js | sandyjoshi/react_reflux_demo | import React from 'react';
import { Router, Route, IndexRoute } from 'react-router';
import createHistory from 'history/lib/createHashHistory'
import App from './pages/app.jsx';
import User from './pages/user.jsx';
import UserDetails from './pages/userDetails.jsx';
import Group from './pages/group.jsx';
import GroupD... |
www/src/html.js | OKNoah/slipstream | import React from 'react'
import PropTypes from 'prop-types'
const BUILD_TIME = new Date().getTime() // eslint-disable-line no-unused-vars
export default class HTML extends React.Component {
static propTypes = {
body: PropTypes.string,
headComponents: PropTypes.node,
postBodyComponents: PropTypes.node,
... |
frontend/test/app/components/LayoutWrapper-test.js | dannycoates/testpilot | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import LayoutWrapper from '../../../src/app/components/LayoutWrapper';
describe('app/components/LayoutWrapper', () => {
let props, subject;
beforeEach(() => {
props = {
flexModifier: 'bar',
helperClass: ... |
src/ReadingSpace/ReadingSpace.js | tvthatsme/yalla-qari | import React, { Component } from 'react';
import './ReadingSpace.css';
/**
* ReadingSpace is for the student to practice reading the
* volcabulary words that they have provided.
*/
class ReadingSpace extends Component {
/**
* Get a random integer value between a min and max value
*/
randomIntFromInterval(... |
web/src/main/client/src/components/tweet/Tweet.js | BakkerTom/happy-news | import React, { Component } from 'react';
import Toggle from '../../components/toggle/Toggle';
import Flags from '../../components/flags/Flags';
import TweetEmbed from 'react-tweet-embed';
import './Tweet.css';
class Tweet extends Component {
constructor(props) {
super(props);
this.state = {
hidden: ... |
src/js/components/icons/base/IceCream.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... |
src/mui/layout/Menu.js | azureReact/AzureReact | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import inflection from 'inflection';
import compose from 'recompose/compose';
import DashboardMenuItem from './DashboardMenuItem';
import MenuItemLink from './MenuItemLink';
import translate from '../../i18n/translate'... |
tests/react_native_tests/test_data/native_code/ToolbarWithActions/app/icons/NotificationsIcon/component.js | ibhubs/sketch-components | /*
* @flow
*/
import React from 'react'
import Svg, { Circle, Defs, Desc, G, Path, Title, } from 'react-native-svg'
const NotificationsIcon = (props) => {
const {width, height, color='#000', fillColor='#FFF'} = props
return (
<Svg
height = '19'
version = '1.1'
... |
src/containers/application/index.js | Tsarpf/babel-webpack-react-eslint-boilerplate | import React from 'react';
import { Router, Route, IndexRoute } from 'react-router';
import Root from 'components/root';
import Home from 'components/home';
import About from 'components/about';
import Map from 'components/map';
export default class Application extends React.Component {
render() {
return (
<Rout... |
packages/showcase/color/mini-color-examples.js | uber-common/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
node_modules/react-bootstrap/es/NavItem.js | vietvd88/developer-crawler | 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 ... |
app/javascript/mastodon/features/status/components/detailed_status.js | musashino205/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from... |
packages/ui-toolkit/src/styleguide/header.js | geek/joyent-portal | import React from 'react';
import styled from 'styled-components';
import remcalc from 'remcalc';
import Logo from './logo';
import GHLogo from './ghlogo';
const Header = styled.header`
background: ${props => props.theme.greyDarker};
color: ${props => props.theme.white};
height: ${remcalc(48)};
padding: 0 ${r... |
src/components/playground/OvsdbComponent.js | reshak/exodus | /*jshint esnext: true */
'use strict';
import React from 'react';
import Toolbar from './ToolbarComponent';
const Table = require('material-ui/lib/table/table');
const TableBody = require('material-ui/lib/table/table-body');
const TableFooter = require('material-ui/lib/table/table-footer');
const TableHeader = requir... |
hw7/frontend/src/components/article/articlesView.spec.js | yusong-shen/comp531-web-development | import { expect } from 'chai'
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import {findDOMNode} from 'react-dom'
import { ArticlesView } from './articlesView'
describe('Component test : ArticlesView', () => {
it('should render articles', () => {
const testArticles = [
... |
src/components/common/Test.js | harpreetkhalsagtbit/url-manager | import React from 'react';
import PropTypes from 'prop-types'; // ES6
import {TextArea } from 'semantic-ui-react'
import Dropdown from './Dropdown/Dropdown'
import './Dropdown/Dropdown.css';
const Test = ({name}) => {
var arr = ["harpreet", "singh"]
return (
<div className="">
<Dropdown label="" options={arr}/... |
.history/src/components/GKM/EtsyProduct_20170624162147.js | oded-soffrin/gkm_viewer | import React from 'react'
import '../../styles/gkm-item.scss';
import ProductItem from './ProductItem'
import Input from '../Common/Input'
import SearchBar from '../SearchBar';
import _ from 'lodash'
class EtsyProduct extends React.Component {
constructor(props, context) {
super(props, context);
this.edit... |
src/containers/Contact/Contact.js | kayluhb/tbmaga | import Helmet from 'react-helmet';
import React from 'react';
import ReactDisqusThread from 'react-disqus-thread';
export default function About() {
const description = 'Get in touch with us.';
return (
<main className="page page--contact">
<Helmet
title="Contact"
meta={[
{ na... |
src/components/nav.js | shadow-Fiend/reduxTest | import React from 'react'
import PropTypes from 'prop-types'
import { push } from 'react-router-redux'
const Nav = ({push}) => (
<div>
<button onClick={()=>push('./additon')}>加法</button>
<button onClick={()=>push('./subtraction')}>减法</button>
</div>
)
export default Nav |
client/ui/organisms/login-form.story.js | LestaD/InstaClone | /* eslint-disable react/prop-types */
import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import { LoginForm } from './login-form'
storiesOf('ui/organisms', module)
.add('LoginForm', () => (
<LoginForm onSubmit={action('login clicked')} />
... |
src/js/components/PushNotificationService/partial/Hero.js | ajainsyn/project | import React from 'react';
import BrandLogo from '../../../shared/BrandLogo';
import introVideoPath from '../../../../assets/images/video/synbaas_intro.mp4';
import videoPlaceholder from '../../../../assets/images/video/video-placholder.jpg';
import emailFlow from '../../../../assets/images/email_notification_flow.... |
examples/huge-apps/components/GlobalNav.js | chunwei/react-router | import React from 'react';
import { Link } from 'react-router';
const styles = {};
class GlobalNav extends React.Component {
static defaultProps = {
user: {
id: 1,
name: 'Ryan Florence'
}
};
constructor (props, context) {
super(props, context);
this.logOut = this.logOut.bind(this);... |
actor-apps/app-web/src/app/components/modals/CreateGroup.react.js | fengchenlianlian/actor-platform | import React from 'react';
import CreateGroupActionCreators from 'actions/CreateGroupActionCreators';
import CreateGroupStore from 'stores/CreateGroupStore';
import CreateGroupForm from './create-group/Form.react';
import Modal from 'react-modal';
import { KeyCodes } from 'constants/ActorAppConstants';
const appEl... |
src/routes.js | ben-bartle/glowing-octo-spoon | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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 React from 'react';
import Router from 'react-routi... |
src/client/components/MessageList.js | janicduplessis/imessage-client | import React from 'react';
import TransitionGroup from 'react/lib/ReactCSSTransitionGroup';
import StyleSheet from 'react-style';
import Message from './Message';
class MessageList extends React.Component {
constructor(props) {
super(props);
this.shouldScrollBottom = true;
}
componentWillUpdate() {
... |
resources/assets/admin/pages/ShowSignup.js | DoSomething/northstar | import React from 'react';
import gql from 'graphql-tag';
import { Link } from 'react-router-dom';
import { useParams } from 'react-router-dom';
import { useQuery } from '@apollo/react-hooks';
import { formatDateTime } from '../helpers';
import Shell from '../components/utilities/Shell';
import TextBlock from '../comp... |
src/SearchHashtags.js | chelsea-le/nastywoman | // Tump Twitter Feed component
import React from 'react';
import './css/Trump.css';
import 'materialize-css'
import '../node_modules/font-awesome/css/font-awesome.css'
import { Timeline } from 'react-twitter-widgets';
var SearchHashtags = React.createClass({
render:function() {
return (
<div className="trumpFeed"... |
src/scripts/components/checkbox/Checkbox.component.js | kodokojo/kodokojo-ui-commons | /**
* Kodo Kojo - Software factory done right
* Copyright © 2017 Kodo Kojo (infos@kodokojo.io)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at ... |
examples/todomvc/src/index.js | bvasko/redux | import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './containers/App'
import reducer from './reducers'
import 'todomvc-app-css/index.css'
const store = createStore(reducer)
render(
<Provider store={store}>
<App ... |
src/FadeMixin.js | pandoraui/react-bootstrap | import React from 'react';
import domUtils from './utils/domUtils';
import deprecationWarning from './utils/deprecationWarning';
// TODO: listen for onTransitionEnd to remove el
function getElementsAndSelf(root, classes) {
let els = root.querySelectorAll('.' + classes.join('.'));
els = [].map.call(els, function(e... |
src/scripts/components/item/item.js | benvoluto/react-webpack-fetch | import React from 'react';
import style from './item.scss';
export default function Item(props) {
return (
<div className="item" style={style}>
<span className="item-text">{props.item.commonName}</span>
<span className="item-meta">{props.item.scientificName}</span>
</div>
);
}
Item.propTypes ... |
examples/counter/containers/Root.js | jackielii/redux | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import CounterApp from './CounterApp';
import configureStore from '../store/configureStore';
const store = configureStore();
export default class Root extends Component {
render() {
return (
<Provider store={store}>
... |
web/components/screens/GameOver/__fixtures__/multi-loss.js | skidding/flatris | // @flow
import React from 'react';
import { getSampleUser, getSampleUser2 } from '../../../../utils/test-helpers';
import {
getBlankGame,
addUserToGame,
updatePlayer,
} from 'shared/reducers/game';
import GameOver from '..';
const user1 = getSampleUser();
const user2 = getSampleUser2();
let game = getBlankGame... |
test/NavSpec.js | modulexcite/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Nav from '../src/Nav';
import NavItem from '../src/NavItem';
import Button from '../src/Button';
describe('Nav', function () {
it('Should set the correct item active', function () {
let instance = ReactTestUtils.renderIntoDo... |
src/FormGroup.js | Firfi/meteor-react-bootstrap | import React from 'react';
import classNames from 'classnames';
class FormGroup extends React.Component {
render() {
let classes = {
'form-group': !this.props.standalone,
'form-group-lg': !this.props.standalone && this.props.bsSize === 'large',
'form-group-sm': !this.props.standalone && this.pr... |
src/__tests__/cell-test.js | felixrieseberg/React-Spreadsheet-Component | 'use strict'
jest.dontMock('../cell');
import React from 'react';
import renderer from 'react-test-renderer';
import CellComponent from '../cell';
const testVars = {
key: 'row_0000_cell_1',
uid: [0, 0],
val: 'test',
spreadsheetId: '1',
selected: false,
editing: false
};
describe('Cell', () => {
it('... |
video_browser/src/index.js | simplanapp/course | import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY = 'AIzaSyAuQ... |
src/wics/node_modules/react-router/es/withRouter.js | civiclee/Hack4Cause2017 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import React from 'react';
import Route from './Route';
/**
... |
example/src/views/forms_home.js | kosiakMD/react-native-elements | import React, { Component } from 'react';
import { ScrollView, View, StyleSheet, Platform } from 'react-native';
import colors from 'HSColors';
import Icon from 'react-native-vector-icons/MaterialIcons';
import {
Button,
Text,
FormInput,
FormLabel,
CheckBox,
SearchBar,
} from 'react-native-elements';
clas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.