path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
node_modules/node_modules/react-solr-connector/demo/app.js | SerendpityZOEY/Fixr-RelevantCodeSearch | import React from 'react';
import ReactDOM from 'react-dom';
import SolrConnector from '../src/react-solr-connector';
import SolrConnectorDemo from './demo.js';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
searchParams: null
}
}
doSearch(searchParams) ... |
example/examples/ZIndexMarkers.js | azt3k/react-native-maps | import React from 'react';
import {
Dimensions,
StyleSheet,
Text,
View,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.733858;
const LONGITUDE = -122.446549;
const MARKERS_LATITUDE_DE... |
tests/lib/rules/vars-on-top.js | dominicbarnes/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... |
client/src/components/BackButton/tests/BackButton-test.js | open-sausages/silverstripe-asset-admin | /* global jest, jasmine, describe, it, expect, beforeEach */
import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import { Component as BackButton } from '../BackButton';
describe('BackButton', () => {
let props = null;
beforeEach(() => {
props = {
onClick: jest.fn(),
enl... |
app/components/LinkForm/index.js | rahsheen/scalable-react-app | /**
*
* LinkForm
*
*/
import React from 'react';
import styles from './styles.css';
import TextInput from '../TextInput';
class LinkForm extends React.Component { // eslint-disable-line react/prefer-stateless-function
state = {};
render() {
return (
<div className={styles.overlay}>
<div classN... |
src/components/Menu/Menu.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import getScrollbarSize from 'dom-helpers/util/scrollbarSize';
import Popover from '../Popover';
import MenuList from './MenuList';
if(process.env.WEBPACK) require('./menu.css');
const RTL_ORIGIN = {
vertical: 'to... |
tests/components/AreaTest.js | ericgio/r-d3 | import {expect} from 'chai';
import * as d3 from 'd3';
import {shallow} from 'enzyme';
import React from 'react';
import {Area} from '../../src';
const data = [107, 125, 156, 210, 184, 107, 125, 156, 210, 184, 30, 24];
const height = 500;
const width = 960;
const x = d3.scaleBand()
.domain([0, data.length - 1])
... |
ui/src/main/js/components/__tests__/InstanceHistory-test.js | apache/aurora | import React from 'react';
import { shallow } from 'enzyme';
import InstanceHistory from '../InstanceHistory';
import InstanceHistoryItem from '../InstanceHistoryItem';
describe('InstanceHistory', () => {
it('Should reverse sort the tasks given to it by latest timestamp', () => {
const tasks = [
{assigned... |
src/index.js | LizBossley/nha | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise';
import { Router, browserHistory } from 'react-router';
import reducers from './reducers';
import routes from './routes';
... |
docs/src/app/components/pages/components/Dialog/ExampleAlert.js | mmrtnz/material-ui | import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
/**
* Alerts are urgent interruptions, requiring acknowledgement, that inform the user about a situation.
*/
export default class DialogExampleAler... |
src/LibroView.js | tillkahlbrock/libro-web | import React from 'react';
import ReactDom from 'react-dom';
import { Provider } from 'react-redux';
import * as Redux from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import reducer from './reducer';
import Layout from './components/Layout';
import { initApp } from './actions';
... |
packages/mineral-ui-icons/src/IconPowerInput.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconPowerInput(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconPro... |
docs-ui/components/autoComplete.stories.js | ifduyue/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
// import {action} from '@storybook/addon-actions';
import AutoComplete from 'app/components/autoComplete';
const items = [
{
name: 'Apple',
},
{
name: 'Pineapple',
},
{
name: '... |
app/javascript/mastodon/features/directory/index.js | abcang/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column... |
generators/component/templates/4/tests/Base.js | newtriks/generator-react-webpack | import React from 'react';
import { shallow } from 'enzyme';
import <%= component.className %> from '<%= component.webpackPath %>';
describe('<<%= component.className %> />', function () {
let component;
beforeEach(function () {
component = shallow(<<%= component.className %> />);
});
describe('when rend... |
src/Parser/Druid/Balance/Modules/Items/Tier21_2set.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Combatants from 'Parser/Core/Modules/Combatants';
import Analyzer from 'Parser/Core/Analyzer';
import getDamageBonus from 'Parser/Mage/Shared/Modules/GetDamageBonus';... |
admin/client/App/App.js | Pop-Code/keystone | /**
* The App component is the component that is rendered around all views, and
* contains common things like navigation, footer, etc.
*/
import React from 'react';
import { Container } from './elemental';
import { Link } from 'react-router';
import { css } from 'glamor';
import MobileNavigation from './components... |
packages/ui-toolkit/src/status-loader/index.js | geek/joyent-portal | import React from 'react';
import styled from 'styled-components';
import is, { isNot } from 'styled-is';
import remcalc from 'remcalc';
import Widget from './widget';
import P from '../text/p';
import Baseline from '../baseline';
const Container = styled.div`
display: flex;
flex-direction: column;
flex-wrap: n... |
src/components/SettingsContainer.js | joellanciaux/Griddle | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from '../utils/griddleConnect';
import compose from 'recompose/compose';
import mapProps from 'recompose/mapProps';
import getContext from 'recompose/getContext';
import { classNamesForComponentSelector, stylesForComponentSelector } from... |
admin/client/App/screens/List/components/Filtering/ListFiltersAdd.js | andrewlinfoot/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import Transition
from 'react-addons-css-transition-group';
import classnames from 'classnames';
import ListFiltersAddForm from './ListFiltersAddForm';
import Popout from '../../../../shared/Popout';
import PopoutList from '../../../../shared/Popout/P... |
src/components/header.js | sPyOpenSource/personal-website | import React, { Component } from 'react';
class Header extends Component {
constructor() {
super();
this.toggle = this.toggle.bind(this);
this.reset = this.reset.bind(this);
this.state = {
classes: "navbar-collapse collapse"
};
}
reset() {
this.setState({classes: "navbar-collapse co... |
src/components/MainPage/Footer.js | coolshare/ReactReduxPattern | import React from 'react'
import { Link } from 'react-router';
/**
*
*/
export default class Footer extends React.Component{
/**
* render
* @return {ReactElement} markup
*/
render(){
return (
<div id="footer" style={{margin:'20px'}}>
<a href="http://markqian.com" target="_blank">See more on Ma... |
src/assets/images/icons.js | barrierandco/barrierandco | import React from 'react'
const Icons = () =>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<path d="M17.016,12.984 L14.016,12.984 L14.016,9 L9.985,9 L9.985,12.984 L6.985,12.984 L12.001,18 L17.016,12.984 Z M19.359,10.031 C21.937,10.219 24,12.37... |
actor-apps/app-web/src/app/components/modals/create-group/ContactItem.react.js | chieryw/actor-platform | import React from 'react';
import AvatarItem from 'components/common/AvatarItem.react';
class ContactItem extends React.Component {
static propTypes = {
contact: React.PropTypes.object,
onToggle: React.PropTypes.func
}
constructor(props) {
super(props);
this.onToggle = this.onToggle.bind(this)... |
src/containers/Chattee.js | morgangiraud/react-chat | import React from 'react';
import { connect } from 'react-redux';
import App from '../components/App.js';
import { checkSession, logout } from '../actions';
const mapStateToProps = (state) => {
return {
appLoading: state.chattee.appLoading,
user: state.chattee.user
}
}
const mapDispatchToProps = (dispatc... |
Ch06/06_02/finish/bulletin-board/src/Board.js | MuhammadHafidzMisrudin/reactjs-basics | import React from 'react'
import './App.css'
import Note from './Note'
var Board = React.createClass({
propTypes: {
count: function(props, propName) {
if(typeof props[propName] !== "number") {
return new Error("the count must be a number")
... |
docs/app/Examples/collections/Table/Types/TableExamplePagination.js | clemensw/stardust | import React from 'react'
import { Icon, Label, Menu, Table } from 'semantic-ui-react'
const TableExamplePagination = () => {
return (
<Table celled>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Header</Table.HeaderCell>
<Table.HeaderCell>Header</Table.HeaderCell>
<Tab... |
src/components/time/Time.js | StillLearnin/time-clock-ui | import React, { Component } from 'react';
import css from './Time.css';
class Time extends Component {
render() {
return (
<div className={css.punchRow}>
<div className={css.punchIn}>
{this.props.punch.in}
</div>
<div className={css.punchOut}>
... |
node_modules/semantic-ui-react/dist/es/modules/Dimmer/DimmerDimmable.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly } from '../../lib';
/**
* A dimmable sub-component for Dimmer.
*/
function DimmerDimmable(pr... |
src/widgets/TextEditor.js | sussol/mobile | /* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { Text, TextInput } from 'react-native';
import { BACKGROUND_COLOR, APP_FONT_FAMILY, DARKER_GREY } from '../globalStyles';
import { FlexRow } from './FlexRo... |
examples/decorators/form/index.js | stackscz/re-app | import React from 'react';
import WildForm from './ExampleForm';
import Example from 're-app-examples/Example';
const codeFiles = [
{
name: 'ExampleForm.js',
content: require('!!raw!./ExampleForm.js'),
description: 'ExampleForm',
},
{
name: './PaperOrientationInput.js',
content: require('!!raw!./PaperOri... |
src/svg-icons/action/view-day.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewDay = (props) => (
<SvgIcon {...props}>
<path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"/>
</SvgIcon>
);
ActionViewDay = pure(A... |
src/svg-icons/toggle/radio-button-unchecked.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonUnchecked = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</SvgIco... |
node_modules/react-iframe/test/index.js | aggiedefenders/aggiedefenders.github.io | import Iframe from "../index"
import React from 'react';
import { expect } from 'chai';
import { configure, render, shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16'
configure({ adapter: new Adapter() })
describe('<Iframe />', () => {
let wrapper
before(() => {
wrapper = shallow(<Iframe ... |
index.ios.js | corragon/six | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Six extends Component {
render() {
return (
<View style={styles.container}>
... |
src/components/train/MessageDataset.js | mBeierl/Better-Twitch-Chat | import React from 'react';
import ReactPaginate from 'react-paginate';
import { List, ListItem } from 'material-ui/List';
import Checkbox from 'material-ui/Checkbox';
import IconButton from 'material-ui/IconButton';
class MessageDataset extends React.Component {
constructor(props) {
super(props);
this.state... |
internal/FloatingMenu.js | hellobrian/carbon-components-react | import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import window from 'window-or-global';
class FloatingMenu extends React.Component {
static propTypes = {
children: PropTypes.any,
menuPosition: PropTypes.object.isRequired,
menuDirection: PropTypes.oneOf(['le... |
code/workspaces/web-app/src/containers/adminMessages/MessageCreator.spec.js | NERC-CEH/datalab | import React from 'react';
import { render, fireEvent, screen, configure } from '@testing-library/react';
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
import MomentUtils from '@date-io/moment';
import MessageCreator from './MessageCreator';
jest.mock('../../components/app/Message', () => props => <d... |
rn-kitchen-sink/components/Home.js | 77ircloud/yymobile2 | import React from 'react';
import {
StyleSheet,
View,
Text,
Image,
Platform,
TouchableOpacity,
Alert,
Linking,
ActivityIndicator,
StatusBar,
} from 'react-native';
import { List } from 'antd-mobile';
import codePush from 'react-native-code-push';
import AppInfo from './appInfo.js';
const codePushOp... |
src/components/Panel/stories.js | envisioning/tdb-storybook | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { Panel, PanelHeader, PanelBody, PanelTitle } from './';
import { Technologies } from '../../resources/icons'
const options = {
inline: false,
source: false,
header: true
}
storiesOf('Panel', module)
.addWithInfo('Panel',... |
frontend/tests/components/profile/follows.js | 1905410/Misago | import assert from 'assert';
import moment from 'moment';
import React from 'react'; // jshint ignore:line
import Follows from 'misago/components/profile/follows'; // jshint ignore:line
import misago from 'misago/index';
import reducer from 'misago/reducers/users';
import snackbar from 'misago/services/snackbar';
impor... |
src/icons/PhoneMissedIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class PhoneMissedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M13 11l11 11L38 8l-2-2-12 12-9-9h7V6H10v12h3v-7zm34.41 22.34C41.32 27.55 33.07 24 24 24S6.68 27.55.59 ... |
src/components/progress/Line.js | quark-ui/quark-ui | /**
* Line Component
* @author ryan.bian
*/
import React from 'react';
import classnames from 'classnames';
import { defaultProps, propTypes } from './propDefine';
import Icon from '../icon';
import styles from './Progress.css';
const Line = ({ percent, status, size, showInfo }) => {
const lineProps = {
class... |
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/DropdownToggle.js | JamieMason/npm-cache-benchmark | 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 ... |
react/src/containers/ModalSelect/ModalSingleSelect/index.js | sinfin/folio | import React from 'react'
import SingleSelect from 'containers/SingleSelect'
import { EVENT_NAME } from './constants'
import ModalSelect from '../'
class ModalSingleSelect extends ModalSelect {
selector () {
return `.f-c-add-file[data-file-type="${this.props.fileType}"]`
}
fileModalSelector () {
retur... |
templates/rubix/rails/rails-example/src/routes/AllTodos.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import { Link } from 'react-router';
import Todo from '../components/Todo';
import TodoForm from '../components/TodoForm';
import client from '@sketchpixy/rubix/lib/utils/HttpClient';
import {
Row,
Col,
Grid,
Panel,
PanelBody,
PanelContainer,
} from '@sketchpixy/rubix';
expor... |
js/jqwidgets/demos/react/app/scheduler/appointmentsexacttimerendering/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js';
class App extends React.Component {
componentDidMount() {
this.refs.myScheduler.ensureAppointmentVisible('id1');
}
render() {
let appointments = new Array... |
app/components/List/index.js | shaggyshelar/CLA | import React from 'react';
import Ul from './Ul';
import Wrapper from './Wrapper';
function List(props) {
const ComponentToRender = props.component;
let content = (<div></div>);
// If we have items, render them
if (props.items) {
content = props.items.map((item, index) => (
<ComponentToRender key={... |
src/main/js/page/Privacy.js | MannanM/corporate-game-share | import React, { Component } from 'react';
import { Jumbotron, Button } from 'react-bootstrap';
class Privacy extends Component{
render() {
return (
<>
<p>
This Privacy Policy describes Game-Share’s practices regarding the collection, use and disclosure of the information we collect from and about you when you us... |
src/web/forms/fields/__mocks__/CheckGroup.js | asha-nepal/AshaFusionCross | /**
* Copyright 2017 Yuichiro Tsuchiya
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
docs/src/sections/TransitionSection.js | Sipree/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function TransitionSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
... |
src/svg-icons/action/https.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<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-... |
src/todo/TaskForm.js | carlodicelico/reify | import React from 'react';
const TaskForm = (props) => {
return (
<p className='control has-icon has-icon-right'>
<input autoFocus={true} className='add-task input is-large' type='text' placeholder='Add a task' />
<i className='fa fa-plus'></i>
</p>
);
};
export default TaskForm;
|
src/components/ui/search.js | simors/HLifeAdmin | import React from 'react'
import ReactDOM from 'react-dom'
import styles from './search.less'
import { Input, Select, Button, Icon } from 'antd'
class Search extends React.Component {
state = {
clearVisible: false,
selectValue: (this.props.select && this.props.selectProps) ? this.props.selectProps.defaultVal... |
app/components/donateform/donateform.js | tidepool-org/blip | /**
* Copyright (c) 2017, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program is distributed in the... |
fall-colors/components/default/gist.js | mathisonian/idyll | import React from 'react';
const PropTypes = require('prop-types');
class EmbeddedGist extends React.PureComponent {
constructor(props) {
super(props);
this.gist = props.gist;
this.file = props.file;
this.stylesheetAdded = false;
this.state = {
loading: true,
src: ""
... |
news-app/src/index.js | abhilashsajeev/news-app | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { Provider } from 'react-redux';
import store from './store';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const RootCom... |
client/src/components/AppRouter.js | FlorianEdelmaier/ReduxAsyncDemo | import React from 'react';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import App from './App';
const AppRouter = () => (
<Router history={ hashHistory }>
<Route path="/" component={App}>
</Route>
</Router>
)
export default AppRouter;
|
app/javascript/mastodon/features/ui/components/column_link.js | dunn/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Icon from 'mastodon/components/icon';
const ColumnLink = ({ icon, text, to, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span... |
packages/es-components/src/components/containers/tabPanels/Tab.js | TWExchangeSolutions/es-components | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { noop } from 'lodash';
import screenReaderOnly from '../../patterns/screenReaderOnly/screenReaderOnly';
const TabButton = styled.button`
background-color: ${props =>
props.selected ? props.theme.colors... |
index.js | lida1984/react-router-learning | import React from 'react'
import { render } from 'react-dom'
import { Router, Route,hashHistory, browserHistory, IndexRoute } from 'react-router'
import App from './modules/App'
import About from './modules/About'
import Repos from './modules/Repos'
import Repo from './modules/Repo'
import Home from './modules/Home'
r... |
DemoApp/lib/message-list/index.js | andyfen/react-native-UIKit | import React from 'react';
import {
View,
ListView,
Dimensions,
} from 'react-native';
import { Message } from '../';
const { width } = Dimensions.get('window');
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
const MessageList = ({
items, headerContent, footerContent,
backgro... |
docs/src/components/home/features.js | evanlucas/node-tap | import React from 'react';
import styled from 'styled-components';
import {theme, breakpoints} from '../../theme';
import {Image, Flex, Box} from 'rebass';
import brain from '../../images/brain.gif';
import batteries from '../../images/batteries.gif';
import separator from '../../images/separator.svg';
import {ButtonLi... |
packages/cf-component-input/test/Input.js | jroyal/cf-ui | import React from 'react';
import { felaSnapshot } from 'cf-style-provider';
import { Input } from '../../cf-component-input/src/index';
test('should render', () => {
const snapshot = felaSnapshot(
<Input name="example" value="content" onChange={() => {}} />
);
expect(snapshot.component).toMatchSnapshot();
... |
actor-apps/app-web/src/app/components/DialogSection.react.js | mitchellporter/actor-platform | import _ from 'lodash';
import React from 'react';
import { PeerTypes } from 'constants/ActorAppConstants';
import MessagesSection from 'components/dialog/MessagesSection.react';
import TypingSection from 'components/dialog/TypingSection.react';
import ComposeSection from 'components/dialog/ComposeSection.react';
i... |
src/utils/CustomPropTypes.js | BespokeInsights/react-bootstrap | import React from 'react';
import warning from 'react/lib/warning';
import childrenToArray from './childrenToArray';
const ANONYMOUS = '<<anonymous>>';
/**
* Create chain-able isRequired validator
*
* Largely copied directly from:
* https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L9... |
stories/Button.js | Bandwidth/shared-components | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from 'components/Button';
import Horizontal from 'layouts/Horizontal';
storiesOf('Button', module)
.add('types', () => (
<React.Fragment>
<h2>Standard</h2>
<Horizo... |
react-flux-mui/js/material-ui/src/svg-icons/navigation/chevron-right.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronRight = (props) => (
<SvgIcon {...props}>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</SvgIcon>
);
NavigationChevronRight = pure(NavigationChevronRight);
NavigationChevronRigh... |
src/routes.js | MoveOnOrg/mop-frontend | import React from 'react'
import { IndexRoute, Route, Redirect, Router, browserHistory, hashHistory, match } from 'react-router'
import { Config } from './config'
import { scrollToTop } from './lib'
import { trackPage } from './actions/sessionActions'
import { loadOrganization } from './actions/navActions'
import { c... |
test/component.spec.js | APSL/redux-i18n | import React from 'react'
import ReactDOM from 'react-dom'
import expect from 'expect'
import {describe, it, before} from 'mocha'
import {createStore, applyMiddleware, combineReducers} from 'redux'
import thunk from 'redux-thunk'
import TestUtils from 'react-dom/test-utils'
import {Provider} from 'react-redux'
import ... |
docs/src/app/components/pages/components/Slider/ExampleSimple.js | w01fgang/material-ui | import React from 'react';
import Slider from 'material-ui/Slider';
/**
* The `defaultValue` property sets the initial position of the slider.
* The slider appearance changes when not at the starting position.
*/
const SliderExampleSimple = () => (
<div>
<Slider />
<Slider defaultValue={0.5} />
<Slide... |
src/components/common/svg-icons/maps/flight.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsFlight = (props) => (
<SvgIcon {...props}>
<path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/>
</SvgIcon>... |
app/index.js | klikstermkd/react-starter-kit | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import {
Router,
browserHistory
} from 'react-router';
import App from './components/App';
import configureStore from './configureStore';
import configureRoutes from './routes';
const s... |
server/server.js | 4dinterface/profpruf | import Express from 'express';
import compression from 'compression';
import mongoose from 'mongoose';
import bodyParser from 'body-parser';
import path from 'path';
import IntlWrapper from '../client/modules/Intl/IntlWrapper';
// Webpack Requirements
import webpack from 'webpack';
import config from '../webpack.confi... |
example/Card.js | jerryshew/dot-css | import React, { Component } from 'react';
import {CN, TitleBlock} from './util';
const makeCard = (cn='card') => {
return (
<div className={cn}>
<div className={CN('image')}>
<img src="http://braavos.me/dot-css/dist/img/img.png"/>
</div>
<div className="h... |
app/javascript/mastodon/features/mutes/index.js | corzntin/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { ScrollContainer } from 'react-router-scroll';
import Column from '../ui/components... |
view/utils.js | fangwei716/30-days-of-react-native | // obtained from react native tutorials
import React from 'react';
import { PixelRatio } from 'react-native';
import Dimensions from 'Dimensions';
const Util = {
ratio: PixelRatio.get(),
pixel: 1 / PixelRatio.get(),
size: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height
... |
src/parser/shared/modules/features/RaidHealthTab/index.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import ROLES from 'game/ROLES';
import Analyzer from 'parser/core/Analyzer';
import TabComponent from './TabComponent';
class RaidHealthTab extends Analyzer {
constructor(...args) {
super(...args);
this.active = this.selectedCombatant.spec.role === ROLES.HEALER;
}
tab() {
... |
fields/types/date/DateField.js | stunjiturner/keystone | import DateInput from '../../components/DateInput';
import Field from '../Field';
import moment from 'moment';
import React from 'react';
import { Button, InputGroup, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'DateField',
focusTargetRef: 'dateInput',
// default input format
inpu... |
src/collections/Breadcrumb/BreadcrumbDivider.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
createShorthandFactory,
customPropTypes,
getUnhandledProps,
getElementType,
META,
} from '../../lib'
import Icon from '../../elements/Icon'
/**
* A divider sub-component... |
src/components/cv.js | ateixeira/mern-stack | import React from 'react';
module.exports = React.createClass({
// RENDER
render: function() {
return (
<div className="cv">
CV
</div>
);
}
}); |
src/containers/create_chat_message.js | TedtheDev/Tic-Tac-Toe | import React, { Component } from 'react';
import { createChatMessage } from '../actions/index';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { reduxForm, Field } from 'redux-form';
import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextFi... |
web/src/pages/devops/user/list.js | nodefx/nbot | /**
* Created by ken on 2017/5/15.
*/
import React from 'react'
import {inject, observer} from 'store/index'
import {Table, Tag, Modal} from 'antd'
import DropOption from 'component/DropOption'
@observer
export default class extends React.Component {
componentWillMount() {
this.props.store.getMembers()
cons... |
debugger/cerebral-debugger/src/components/Debugger/Signals/Signal/index.js | FWeinb/cerebral | /* global Prism */
import './styles.css'
import React from 'react'
import {connect} from 'cerebral/react'
import connector from 'connector'
import Action from './Action'
export default connect(props => ({
currentPage: 'debugger.currentPage',
useragent: 'useragent.**',
signal: `debugger.signals.${props.currentSi... |
test/integration/client-navigation/pages/nav/head-2.js | zeit/next.js | import React from 'react'
import Head from 'next/head'
import Link from 'next/link'
export default (props) => (
<div id="head-2">
<Head>
<meta name="description" content="Head Two" />
<title>this is head-2</title>
</Head>
<Link href="/nav/head-1">
<a id="to-head-1">to head 1</a>
</L... |
src/components/UserDetailsContainer/index.js | LittleFurryBastards/webpack-react-redux | import React from 'react';
import UserDetails from '../UserDetails';
import { getUserDetails } from '../../actions';
import store from '../../store';
const UserDetailsContainer = React.createClass({
propTypes: {
params: React.PropTypes.object
},
getInitialState() {
return {
currentUser: store.getS... |
src/Overlay.js | adamschroder/react-overlays | import React from 'react';
import Portal from './Portal';
import Position from './Position';
import RootCloseWrapper from './RootCloseWrapper';
import elementType from 'react-prop-types/lib/elementType';
/**
* Built on top of `<Position/>` and `<Portal/>`, the overlay component is great for custom tooltip overlays.
... |
frontend/src/components/OneRestaurantPage/OneRestaurantPage.js | FrancescoNegri/progetto-just-eat | import React from 'react';
import Collapsible from 'react-collapsible';
import 'whatwg-fetch';
import CartManager from '../../utilities/cartManager';
import './OneRestaurantPage.scss';
import startupData from '../../../../shared/startupData.json';
export default class OneRestaurantPage extends React.Component {
c... |
node_modules/@material-ui/core/es/Modal/SimpleBackdrop.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
export const styles = {
/* Styles applied to the root element. */
root: {
zIndex: -1,
positio... |
src/svg-icons/content/sort.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentSort = (props) => (
<SvgIcon {...props}>
<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>
</SvgIcon>
);
ContentSort = pure(ContentSort);
ContentSort.displayName = 'ContentSort';
ContentSort.mui... |
src/components/Story/StoryPreview.js | ryanbaer/busy | import React from 'react';
import PropTypes from 'prop-types';
import embedjs from 'embedjs';
import _ from 'lodash';
import PostFeedEmbed from './PostFeedEmbed';
import BodyShort from './BodyShort';
import { jsonParse } from '../../helpers/formatter';
import { image } from '../../vendor/steemitLinks';
import {
getPo... |
docs/src/app/components/pages/components/Popover/Page.js | IsenrichO/mui-with-arrows | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import popoverReadmeText from './README';
import PopoverExampleSimple from './Ex... |
src/svg-icons/action/autorenew.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAutorenew = (props) => (
<SvgIcon {...props}>
<path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 ... |
__tests__/src/components/soundList.spec.js | bluedaniel/Kakapo-app | import React from 'react';
import { SoundList } from 'components/';
import { getData, createComponentWithIntl, randomSounds } from '../helper';
test('<SoundList/> render empty', () => {
const props = {
...getData('sounds'),
...getData('themes'),
};
const tree = createComponentWithIntl(<SoundList {...prop... |
frontend/react-stack/react/cdc-admin/src/components/CustomInput.js | wesleyegberto/courses-projects | import React, { Component } from 'react';
import PubSub from 'pubsub-js';
export default class CustomInput extends Component {
constructor() {
super();
this.state = {
errorMessage: ''
};
}
componentDidMount() {
PubSub.subscribe('input-error', (topic, error) => {
if (error.field === t... |
example/src/index.js | xiefei89/rc-cropper | import React from 'react';
import ReactDOM from 'react-dom';
import Demo from './Demo';
const Root = () => (<Demo />);
ReactDOM.render(<Root />, document.getElementById('main'));
|
app_learn/src/containers/Tab1/customPickerDemo.js | liuboshuo/react-native | /**
* Created by ls-mac on 2017/4/29.
*/
import React, { Component } from 'react';
import {
View,
StyleSheet,
TouchableOpacity,
Text
} from 'react-native';
import NavigationBar from '../../component/navBarCommon'
import back from './../../source/images/icon_back.png'
import * as Constants from '../..... |
webapp/src/containers/layout/loader/index.js | alliance-genome/agr_prototype | /*eslint-disable react/no-set-state */
import React, { Component } from 'react';
import { connect } from 'react-redux';
import style from './style.css';
import { selectIsPending } from '../../../selectors/searchSelectors';
const FINISH_INTERVAL = 250;
class Loader extends Component {
constructor(props) {
super... |
src/svg-icons/communication/phonelink-setup.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPhonelinkSetup = (props) => (
<SvgIcon {...props}>
<path d="M11.8 12.5v-1l1.1-.8c.1-.1.1-.2.1-.3l-1-1.7c-.1-.1-.2-.2-.3-.1l-1.3.4c-.3-.2-.6-.4-.9-.5l-.2-1.3c0-.1-.1-.2-.3-.2H7c-.1 0-.2.1-.3.2l-.2 1... |
app/containers/HomePage.js | zedtux/grrn | import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home />
);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.