path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
source/patterns/00-atoms/progress-tracker-step/__tests__/progress-tracker-step.spec.js | apparena/patterns | /* eslint-env mocha */
import React from 'react';
import {shallow, mount, configure} from 'enzyme';
import {spy} from 'sinon';
import ProgressTrackerStep from '../index';
import style from '../index.module.scss';
import Adapter from 'enzyme-adapter-react-16';
configure({adapter: new Adapter()});
test('DUMMY', () => ... |
client/src/components/chrome/index.js | 15thnight/15thnight | import React from 'react';
import { connect } from 'react-redux';
import {
getCurrentUser,
togglePageContainer,
clearPageScroll
} from 'actions';
import Navbar from './Navbar.js';
import Flash from './Flash';
import styles from './index.css';
class Chrome extends React.Component {
constructor(props)... |
src/components/icons/OpenInNewIcon.js | austinknight/ui-components | import React from 'react';
const OpenInNewIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M0 0h24v24H0z" fill="none" />
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 ... |
app/index.js | chenzhq/TagViewer | import 'babel-polyfill'; // generators
require('antd/dist/antd.css')
import {render} from 'react-dom';
import React from 'react';
import {Provider} from 'react-redux'
import MainLayout from './components/MainLayout'
import configureStore from './store/store';
render(
<Provider store={configureStore()}>
<MainLay... |
examples/huge-apps/routes/Course/components/Course.js | cold-brew-coding/react-router | import React from 'react';
import Dashboard from './Dashboard';
import Nav from './Nav';
var styles = {};
styles.sidebar = {
float: 'left',
width: 200,
padding: 20,
borderRight: '1px solid #aaa',
marginRight: 20
};
class Course extends React.Component {
render () {
let { children, params } = this.pro... |
frontend/src/components/siteComponents/UserManagementUI/loginForm.js | webrecorder/webrecorder | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Alert, Button, Col, Form, FormGroup, FormControl, Row } from 'react-bootstrap';
import { guestSessionTimeout, product, userRegex } from 'config';
import { login } from 'helpers/userMessaging'... |
js/jqwidgets/jqwidgets-react/react_jqxlayout.js | luissancheza/sice | /*
jQWidgets v5.3.2 (2017-Sep)
Copyright (c) 2011-2017 jQWidgets.
License: http://jqwidgets.com/license/
*/
import React from 'react';
const JQXLite = window.JQXLite;
export const jqx = window.jqx;
export default class JqxLayout extends React.Component {
componentDidMount() {
let options = this.manageAtt... |
src/react/text-filter/text_filter.js | pivotal-cf/pivotal-ui | // eslint-disable-next-line no-unused-vars
import React from 'react';
import PropTypes from 'prop-types';
import {Grid, FlexCol} from '../flex-grids';
import {Icon} from '../iconography';
export class TextFilter extends React.Component {
static propTypes = {
data: PropTypes.array.isRequired,
emptyState: Prop... |
client/src/js/components/LoginPage.js | muhammad-saleh/weightlyio | "use strict";
import React from 'react';
class LoginPage extends React.Component {
componentDidMount(){
var lock = new Auth0Lock('Ak0xmdNNIZNUbwtOYUVt1Y7wKPgPGra5', 'msaleh.auth0.com');
lock.show({
container: 'LoginBox'
});
}
showLock() {
// We receive lock from th... |
examples/todo/js/components/TodoListFooter.js | SBUtltmedia/relay | /**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... |
Paths/React/05.Building Scalable React Apps/7-react-boilerplate-building-scalable-apps-m7-exercise-files/After/app/containers/NotFoundPage/index.js | phiratio/Pluralsight-materials | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor i... |
fixtures/fiber-debugger/src/Fibers.js | roth1002/react | import React from 'react';
import {Motion, spring} from 'react-motion';
import dagre from 'dagre';
// import prettyFormat from 'pretty-format';
// import reactElement from 'pretty-format/plugins/ReactElement';
function getFiberColor(fibers, id) {
if (fibers.currentIDs.indexOf(id) > -1) {
return 'lightgreen';
}... |
fields/types/location/LocationFilter.js | trentmillar/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
FormField,
FormInput,
Grid,
SegmentedControl,
} from '../../../admin/client/App/elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
ret... |
src/js/components/GamesTable.js | bcongdon/sgdq-stats | import React from 'react'
import Stat from './Stat'
import { connect } from 'react-redux'
import { PropTypes } from 'prop-types'
import Col from 'react-bootstrap/lib/Col'
import Row from 'react-bootstrap/lib/Row'
import Grid from 'react-bootstrap/lib/Grid'
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'... |
www/components/Navbar/index.js | andrewlinfoot/keystone | import React, { Component } from 'react';
import Link from 'gatsby-link';
// import GithubIcon from 'react-icons/lib/go/mark-github';
import MenuClose from 'react-icons/lib/md/close';
import MenuIcon from 'react-icons/lib/md/menu';
// import TwitterIcon from 'react-icons/lib/ti/social-twitter';
import typography from ... |
src/routes.js | codenamekt/reactive-boiler | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/HomePage';
import FuelSavingsPage from './containers/FuelSavingsPage'; // eslint-disable-line import/no-named-as-default
import AboutPage from './components/AboutPage.js';... |
fields/types/url/UrlColumn.js | Tangcuyu/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
var UrlColumn = React.createClass({
displayName: 'UrlColumn',
propTypes: {
col: React.PropTypes.object,
da... |
docs/components/Docs/index.js | jribeiro/storybook | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import Header from '../Header';
import Container from './Container';
import Footer from '../Footer';
import './style.css';
const Docs = ({ sections, selectedItem, selectedSectionId, selectedItemId }) =>
<div className=... |
examples/dynamic-segments/app.js | rdjpalmer/react-router | import React from 'react'
import { render } from 'react-dom'
import { browserHistory, Router, Route, Link, Redirect } from 'react-router'
class App extends React.Component {
render() {
return (
<div>
<ul>
<li><Link to="/user/123" activeClassName="active">Bob</Link></li>
<li><Lin... |
RefreshDemo/__tests__/index.android.js | shiwenwen/react-native-swRefresh | import 'react-native';
import React from 'react';
import Index from '../index.android.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/svg-icons/editor/insert-invitation.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertInvitation = (props) => (
<SvgIcon {...props}>
<path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/>
... |
src/components/Checkbox/index.js | TF2PickupNET/components | // @flow strict-local
import React from 'react';
import PropTypes from 'prop-types';
import getNotDeclaredProps from 'react-get-not-declared-props';
import CheckboxBlankOutlineIcon from 'mdi-react/CheckboxBlankOutlineIcon';
import CheckboxMarkedIcon from 'mdi-react/CheckboxMarkedIcon';
import Ripple from '../Ripple';... |
packages/veritone-widgets/src/widgets/EngineSelection/EngineListView/index.js | veritone/veritone-sdk | import React from 'react';
import { connect } from 'react-redux';
import {
bool,
func,
objectOf,
object,
arrayOf,
string,
shape,
any
} from 'prop-types';
import { isEmpty, debounce } from 'lodash';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Button from '@... |
node_modules/antd/es/message/index.js | prodigalyijun/demo-by-antd | import React from 'react';
import Notification from 'rc-notification';
import Icon from '../icon';
var defaultDuration = 1.5;
var defaultTop = void 0;
var messageInstance = void 0;
var key = 1;
var prefixCls = 'ant-message';
var getContainer = void 0;
function getMessageInstance() {
messageInstance = messageInstanc... |
src/svg-icons/editor/insert-chart.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertChart = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/>
</SvgIcon>
);
Editor... |
node_modules/react-bootstrap/es/Checkbox.js | vitorgomateus/NotifyMe | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/components/singleNote.js | nrafter/react-native-notes | import React, { Component } from 'react';
import {
Text,
View,
TextInput,
BackAndroid,
StatusBar
} from 'react-native';
import { connect } from 'react-redux';
import { NavigationActions } from 'react-navigation';
import Toolbar from '../lib/Toolbar';
import TitleText from '../lib/TitleText';
import TickBtn f... |
packages/ringcentral-widgets-docs/src/app/pages/Components/CallList/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... |
src/components/basic/Li.js | casesandberg/react-mark | 'use strict';
import React from 'react';
export class LI extends React.Component {
render() {
return <li>{ this.props.children }</li>;
}
}
export default LI;
|
app/components/__tests__/App_test.js | keathley/webpack-react-skeleton | import React from 'react'
import { shallow } from 'enzyme'
import { expect } from 'chai'
import App from '../App'
describe('App', () => {
it('renders', () => {
const component = shallow(<App />)
expect(component.find('h1').text()).to.equal("Test Application")
})
})
|
pages/rant/hate_software.js | mvasilkov/mvasilkov.ovh | import React from 'react'
import Article from '../../app/article'
export const pagePath = 'rant/hate_software'
export const pageTitle = 'Ryan Dahl: I hate almost all software'
export default class extends React.Component {
render() {
return (
<Article path={pagePath} title={pageTitle}>
... |
codes/reactstrap-demo/src/views/Components/Forms/Forms.js | atlantis1024/react-step-by-step | import React, { Component } from 'react';
import { Button, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
class Forms extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div className="animated fadeIn">
<div c... |
src/components/content/home.js | isthereagametoday/is-there-a-cubs-game | import React from 'react';
// components
import Nav from './nav';
import Seo from './seo';
import Header from './header';
import Footer from './footer';
import Yes from './yes';
import No from './no';
// utils
import apiUtils from '../../utils/api-utils';
import dateUtils from '../../utils/date-utils';
import time... |
src/parser/warlock/demonology/modules/talents/DemonicCalling.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import SpellUsable from 'parser/shared/modules/SpellUsable';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { STATISTIC_ORDER } from 'interface/o... |
docs/app/Examples/modules/Dropdown/States/DropdownExampleDisabled.js | ben174/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const DropdownExampleDisabled = () => (
<Dropdown text='Dropdown' disabled>
<Dropdown.Menu>
<Dropdown.Item>Choice 1</Dropdown.Item>
<Dropdown.Item>Choice 2</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
)
export default Dropd... |
src/containers/Home/index.js | hahoocn/react-mobile-boilerplate | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { showHello, showHelloAsync, showMoviesAsync } from './actions';
import logoImg from '../../assets/images/logo.jpg';
import config from '../../config';
import { selectInfo, sel... |
src/home/home.app.js | joeldenning/single-spa-examples | import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaReact from 'single-spa-react';
import rootComponent from './root.component.js';
const reactLifecyles = singleSpaReact({
React,
ReactDOM,
domElementGetter,
rootComponent,
});
export const bootstrap = [
reactLifecyles.bootstrap,
];
... |
common/views/Pages/Page404/Page404.js | sauleddy/HomePortal | import React, { Component } from 'react';
class Page404 extends Component {
render() {
return (
<div className="container">
<div className="row justify-content-center">
<div className="col-md-6">
<div className="clearfix">
<h1 className="float-left display-3 mr-4... |
src/Collection.js | 15lyfromsaturn/react-materialize | import React from 'react';
import cx from 'classnames';
class Collection extends React.Component {
constructor(props) {
super(props);
this.renderHeader = this.renderHeader.bind(this);
}
render() {
let classes = {
collection: true,
'with-header': !!this.props.header
};
let C = 'ul... |
test/daypicker/localization.js | saenglert/react-day-picker | import React from 'react';
import { mount } from 'enzyme';
import DayPicker from '../../src/DayPicker';
import * as LocaleUtils from '../../src/LocaleUtils';
describe('DayPicker’s localization', () => {
it('should use the months prop to localize the month names', () => {
const wrapper = mount(
<DayPicker
... |
app/Components/MainView.js | csujedihy/react-native-textgo | 'use strict';
import React, { Component } from 'react';
import Communications from 'react-native-communications';
import TabBar from '../Components/TabBar';
import ContactCard from './ContactCard';
import MyNavigationBar from './MyNavigationBar';
import {bindActionCreators} from 'redux';
import { connect } from 'react... |
tests/PlayerRow.spec.js | flocks/deeprun-front | import React from 'react';
import renderer from 'react-test-renderer';
import PlayerRow from '../app/components/PlayerRow';
describe('<PlayerRow />', () => {
it('should render properly with empty value', () => {
const component = renderer.create(
<PlayerRow
label="player 1"
... |
dynamic-react-router demo/src/Components/App/index.js | gabriel-lopez-lopez/dynamic-react-route | import React, { Component } from 'react';
import Layout from '../Layout';
import DynamicReactRouter from 'dynamic-react-router';
// Configuración del Enrutador
import { ROUTES_CONFIG } from '../../route';
class App extends Component {
constructor(props) {
super(props);
}
// Funcioón booleana pa... |
src/js/components/correspondence-definitions.js | Antoine-Dreyer/Classification-Explorer | import React from 'react'
import { sparqlConnect } from '../sparql//configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { toggleCorrespondenceDefinitions } from '../actions/app-state'
import { connect } from 'react-redux'
//a sparql component can be passed additional props (either by its ... |
docs/src/app/components/pages/components/Table/ExampleSimple.js | hai-cea/material-ui | import React from 'react';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
} from 'material-ui/Table';
/**
* A simple table demonstrating the hierarchy of the `Table` component and its sub-components.
*/
const TableExampleSimple = () => (
<Table>
<TableHeader>
... |
packages/material-ui-icons/src/Https.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.... |
imports/ui/Login.js | dandev237/short-lnk | /**
* Created by Daniel on 18/06/2017.
*/
import React from 'react';
import {Link} from 'react-router-dom';
import {Meteor} from 'meteor/meteor';
export default class Login extends React.Component {
constructor(props) {
super(props);
this.state = { //Component state
error: ''
... |
examples/redirect-using-index/app.js | whouses/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... |
app/client/components/map/Story.js | breakfast-mimes/cyber-mimes | import React from 'react';
export default class Story extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render(){
const { row, col, messages} = this.props;
return(
<div className='noSelect'>
{messages[row] ? messages[row][col] : "No Messages"}
... |
src/index.js | gaoqiang19514/blog | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register()... |
src/docs/examples/Label/ExampleRequired.js | wsherman67/UBA | import React from 'react';
import Label from 'ps-react/Label';
/** Required label */
export default function ExampleRequired() {
return <Label htmlFor="test" label="test" required />
}
|
app/containers/LocaleToggle/index.js | jwarning/react-ci-test | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
swagger-editor/test/unit/plugins/editor/editor.js | thomaxxl/safrs | import rewiremock from 'rewiremock';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import React from 'react';
import FakeAce, { Session } from 'test/unit/mocks/ace.js';
import { fromJS } from 'immutable';
import makeEditor from 'plugins/editor/components/editor';
c... |
src/components/common/svg-icons/image/image-aspect-ratio.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageImageAspectRatio = (props) => (
<SvgIcon {...props}>
<path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H... |
assets/javascripts/kitten/components/structure/cards/summary-card/components/cell.js | KissKissBankBank/kitten | import React from 'react'
import classNames from 'classnames'
import PropTypes from 'prop-types'
export const Cell = ({ name, className, style, ...props }) => {
return (
<div
{...props}
className={classNames(
'k-SummaryCard__cell',
className,
`k-SummaryCard__cell__${name}`,
... |
src/search.js | baherami/bookapp | import * as BooksAPI from'./BooksAPI'
import React, { Component } from 'react';
import {Link } from 'react-router-dom';
import Shelf from './shelf'
class Search extends Component{
state = {
books:''
}
searchBooks=(e)=>{
e.preventDefault();
let searchTerm=e.target.value
BooksAPI.search(searchTerm,... |
app/components/Toggle/index.js | samit4me/react-boilerplate | /**
*
* LocaleToggle
*
*/
import React from 'react';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = (<option>--</option>);
// If we have items, render them
if (props.values) {
content = props.values.map((value) => (
<ToggleOption key... |
source/common/components/Prompt/index.js | shery15/react | import React from 'react';
import {
BrowserRouter as Router,
Route,
Link,
Prompt
} from 'react-router-dom';
const PreventingTransitionsExample = () => (
<Router>
<div>
<ul>
<li><Link to="/">Form</Link></li>
<li><Link to="/one">One</Link></li>
<li><Link to="/two">Two</Link></... |
src/parser/shared/modules/spells/bfa/azeritetraits/OverwhelmingPower.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { calculateAzeriteEffects } from 'common/stats';
import UptimeIcon from 'interface/icons/Uptime';
import HasteIcon from 'interface/icons/Haste';
import AzeritePowerStatistic from 'interface/statistic... |
web/src/components/Pagination/index.js | trendmicro/serverless-survey-forms | /**
* @module Pagination
* Pagination component, only appeared if paging is more than one
*
**/
import styles from './style.css';
import React from 'react';
import PropTypes from 'prop-types';
import PureComponent from 'react-pure-render/component';
import classNames from 'classnames';
import Button from '../Butto... |
app/javascript/mastodon/components/autosuggest_emoji.js | ashfurrow/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
import { assetHost } from 'mastodon/utils/config';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequire... |
actor-apps/app-web/src/app/components/activity/UserProfile.react.js | chengjunjian/actor-platform | import React from 'react';
import { PureRenderMixin } from 'react/addons';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
import PeerStore from 'stores/PeerStore';
import DialogStore from 'stores/DialogStore';
import AvatarItem from... |
app/javascript/mastodon/components/missing_indicator.js | Nyoho/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_disappointed.svg';
import classNames from 'classnames';
const MissingIndicator = ({ fullPage }) => (
<div className={classNames('regeneration-indicato... |
src/shared/components/modal/modal.js | OperationCode/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
import ReactModal from 'react-modal';
import Section from 'shared/components/section/section';
import styles from './modal.css';
const Modal = ({
isOpen, title, onRequestClose, children
}) => (
<ReactModal
isOpen={isOpen}
contentLabel={title}
... |
frontend/src/Settings/Profiles/Quality/EditQualityProfileModalContentConnector.js | lidarr/Lidarr | import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { fetchQualityProfileSchema, saveQualityProfile, setQualityProfileValue } from 'Store/Actions/settingsActions';
import createProf... |
client/admin/info/DescriptionList.js | subesokun/Rocket.Chat | import { Box, Table } from '@rocket.chat/fuselage';
import React from 'react';
const style = { wordBreak: 'break-word' };
export const DescriptionList = ({ children, title, ...props }) => <>
{title && <Box display='flex' justifyContent='flex-end' width='30%' paddingInline='x8'>
{title}
</Box>}
<Table striped mar... |
node_modules/react-bootstrap/es/Row.js | premcool/getmydeal | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/routes/workTeamManager/RequestsView.js | nambawan/g-old | import React from 'react';
import PropTypes from 'prop-types';
import Request from '../../components/Request';
import AssetsTable from '../../components/AssetsTable';
import RequestRow from './RequestRow';
const RequestsView = ({
showRequest,
updates,
request,
onAllowRequest,
onDenyRequest,
onCancel,
onR... |
rojak-ui-web/src/Routes.js | rawgni/rojak | import { Route, IndexRoute } from 'react-router';
import React from 'react';
import Container from './app/utils/Container';
import HomePage from './app/home/HomePage';
export default (
<Route component={Container}>
<Route path="/(search/:keyword)" component={HomePage} />
</Route>
)
|
frontend/src/components/submitcast/ShowInput.js | tanzdervampire/website | // @flow
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { red500 } from 'material-ui/styles/colors';
import CircularProgress from 'material-ui/CircularProgress';
import { Card, CardHeader, CardText, CardActions } from 'material-ui/Card';
import DropDownMenu from 'ma... |
src/components/topic/platforms/PlatformSizeNotice.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import Permissioned from '../../common/Permissioned';
import { PERMISSION_TOPIC_WRITE } from '../../..... |
examples/html-table/SortableList.js | danielstocks/react-sortable | import React from 'react'
import SortableListItem from './SortableItem'
export default class SortableList extends React.Component {
state = {
items: this.props.items
};
onSortItems = (items) => {
this.setState({
items: items
});
}
render() {
const { items } = this.state;
var list... |
src/app/components/task/DatetimeTaskResponse.js | meedan/check-web | import React from 'react';
import { FormattedMessage, FormattedDate } from 'react-intl';
import { convertNumbers2English } from '../../helpers';
const DateDisplay = ({ isoDate }) => (
<time dateTime={isoDate}>
<FormattedDate value={new Date(isoDate)} day="numeric" month="long" year="numeric" />
</time>
);
fun... |
src/components/Main.js | chiefwhitecloud/running-man-frontend | import React from 'react';
import { Switch, Route } from 'react-router-dom';
import RacePageLayout from './Races/PageLayout';
import FilterableRaceResults from './FilterableRaceResults';
import RacerContainer from './RacerContainer';
const containerStyle = {
maxWidth: '1200px',
margin: '0px auto',
};
const Main ... |
components/Nav/Social.js | styled-components/styled-components-website | import React from 'react';
import styled from 'styled-components';
import { Github, MediumM } from '@styled-icons/fa-brands';
import rem from '../../utils/rem';
import { navbarHeight } from '../../utils/sizes';
import Link from '../Link';
const Wrapper = styled.nav`
display: flex;
align-items: center;
flex: 1 1 ... |
client/components/operations/label.js | jankeromnes/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { translate as $t } from '../../helpers';
import { actions } from '../../store';
// If the length of the short label (of an operation) is smaller than this
// threshold, the raw label of the operation will be ... |
src/containers/Home/index.js | anitrack/anitrack-web | import React, { Component } from 'react';
import { Col, Row, Button, Form, FormGroup, Label, Input, InputGroup, InputGroupButton, UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import MediaQuery from 'react-responsive';
import * as css from './css';
const flexItem = [
{icon: ... |
UI/src/components/common/Spinner.js | ssvictorlin/PI | import React from 'react';
import { View, ActivityIndicator } from 'react-native';
const Spinner = ({ size }) => {
return (
<View style={ styles.spinnerStyle }>
<ActivityIndicator size={ size || 'large' } />
</View>
);
};
const styles = {
spinnerStyle: {
flex: 1,
justifyContent: 'center',
alignItems: ... |
ux/Selector.js | rameshvk/j0 | 'use strict';
import BaseComponent from './BaseComponent.js';
import React from 'react';
import SelectView from './SelectView.js';
function getState(props) {
return {optionIndex: props.model.get(React.Children.count(props.children))};
}
export default class Selector extends BaseComponent {
constructor(props) {
... |
wwwroot/app/src/components/MealPlannerPage/Meal/index.js | AlinCiocan/PlanEatSave | import React from 'react';
import Routes from '../../../services/Routes';
import Link from '../../base/Link';
import RemoveIcon from '../../base/icons/RemoveIcon';
const Meal = ({ meal, onRemoveMeal }) => (
<div className="pes-meal">
<div className="pes-meal__divider"></div>
<Link
unde... |
boxroom/archive/backup-js-glow-2018-01-28/boxroom/archive/js-surface-2018-01-27/boxroom/archive/2017-10-23-before-redesign/src/demo/pagination/pagination.js | mcjazzyfunky/js-surface | import {
defineClassComponent,
defineFunctionalComponent,
hyperscript as h,
mount
} from 'js-surface';
import { Seq } from 'js-essential';
import PaginationHelper from './helper/PaginationHelper.js';
import ComponentHelper from './helper/ComponentHelper.js';
import React from 'react';
import ReactD... |
src/components/Footer/Footer.js | stinkyfingers/IsoTest | /**
* 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, { Component } from 'react';
import withStyle... |
src/svg-icons/communication/location-on.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationLocationOn = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12... |
client/components/TableBeta2.js | ForestJS/ForestJS-Production | import React, { Component } from 'react';
class TableBeta2 extends Component {
constructor(props) {
super(props);
this.state = {
login: null,
user: null
}
this.createTable = this.createTable.bind(this);
this.detailView = this.props.detailView.bind(this);
}
createTable(){
cons... |
src/components/sandbox/Sandbox.js | gtdudu/hapi-wurb | import React from 'react';
import PropTypes from 'prop-types';
const Sandbox = () => {
return (
<div className="outer_face">
<div className="marker oneseven"></div>
<div className="marker twoeight"></div>
<div className="marker fourten"></div>
<div className="marker fiveeleven"></div>
... |
tests/components/Header/Header.spec.js | chenfanggm/steven-mern-starter-kit | import React from 'react'
import { Header } from 'components/Header/Header'
import { IndexLink, Link } from 'react-router'
import { shallow } from 'enzyme'
describe('(Component) Header', () => {
let _wrapper
beforeEach(() => {
_wrapper = shallow(<Header />)
})
it('Renders a welcome message', () => {
... |
src/app/SelectSpotTypePage.js | EsriJapan/photospot-finder | // Copyright (c) 2016 Esri Japan
import React from 'react';
class SelectSpotTypePage extends React.Component {
constructor (props) {
super(props);
}
render () {
let visibility = 'block';
if (this.props.visibility === false) {
visibility = 'none';
}
return (
<div className="se... |
6.webpack/message/components/Message.js | zhufengnodejs/201608node | import React from 'react';
export default class Message extends React.Component {
render() {
return (
<li className="list-group-item">{this.props.author}:{this.props.children}
<button onClick={()=>{this.props.click(this.props.id)}} className="btn btn-danger">删除</button> <span cla... |
src/components/Search/Search-test.js | joshblack/carbon-components-react | /**
* 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 React from 'react';
import Search16 from '@carbon/icons-react/lib/search/16';
import Close20 from '@carbon/icons-react/lib/close/20';
... |
app/react-icons/fa/user-md.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaUserMd extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m13.1 30q0 0.6-0.5 1t-1 0.4-1-0.4-0.4-1 0.4-1 1-0.4 1 0.4 0.5 1z m22.8 1.4q0 ... |
tools/public-components.js | joemcbride/react-starter-kit | import React from 'react';
import index from '../src/index';
let components = [];
Object.keys(index).forEach(function (item) {
if (index[item] instanceof React.Component.constructor) {
components.push(item);
}
});
export default components;
|
src/svg-icons/navigation/subdirectory-arrow-right.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationSubdirectoryArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/>
</SvgIcon>
);
NavigationSubdirectoryArrowRight = pure(Navigat... |
public/js/components/visits/othersvisits.react.js | rajikaimal/Coupley | import React from 'react';
import Avatar from 'material-ui/lib/avatar';
import Card from 'material-ui/lib/card/card';
import CardActions from 'material-ui/lib/card/card-actions';
import CardHeader from 'material-ui/lib/card/card-header';
import CardMedia from 'material-ui/lib/card/card-media';
import CardTitle from 'ma... |
react/features/mobile/navigation/functions.js | jitsi/jitsi-meet | import React from 'react';
import { useTranslation } from 'react-i18next';
import { Platform } from 'react-native';
import { IconClose } from '../../base/icons';
import HeaderNavigationButton from './components/HeaderNavigationButton';
/**
* Close icon/text button based on platform.
*
* @param {Function} goBack -... |
src/Parser/RestoDruid/Modules/Features/NaturesEssence.js | mwwscott0/WoWAnalyzer | import React from 'react';
import { formatPercentage } from 'common/format';
import SpellLink from 'common/SpellLink';
import Module from 'Parser/Core/Module';
import SPELLS from 'common/SPELLS';
import Combatants from 'Parser/Core/Modules/Combatants';
const MINOR = 0.07;
const AVERAGE = 0.12;
const MAJOR = 0.17;
cl... |
app/components/AddTask/GMaps/index.js | theterra/newsb | import React from 'react';
import './MapStyle.css';
let searchBox;
export default class GMaps extends React.Component { //eslint-disable-line
constructor(props) {
super(props);
this.geolocate = this.geolocate.bind(this);
this.initAutocomplete = this.initAutocomplete.bind(this);
this.searchBoxPlaces ... |
src/js/components/Box.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import KeyboardAccelerators from '../utils/KeyboardAccelerators';
import Intl from '../utils/Intl';
import Props from '../utils/Pro... |
packages/material-ui-icons/src/Timer3.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.04-.28-1.46-.18-.42-.44-.77-.78-1.06-.33-.28... |
ui/me/index.js | DannyvanderJagt/portfolio | import React from 'react';
import Telescope from 'telescope';
import Config from '../../../portfolio.config';
import Button from '../button';
import Svg from '../svg';
class Me extends Telescope.Component{
render(){
return (
<div className='me'>
<div className='image'>
<img src='/assets/... |
app/resources/author/views/Login.react.js | shiminghua/front_end_practice | 'use strict';
import React, { Component } from 'react';
import InputText from '../../../components/inputs/InputText.react';
import InputPassword from '../../../components/inputs/InputPassword.react';
import '../../../browser/javascript/mui';
class Login extends Component {
constructor(props) {
super(prop... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.