path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/svg-icons/hardware/cast.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareCast = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4... |
examples/todomvc-redux/src/components/MainSection.spec.js | Anaphalis/ds | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import MainSection from './MainSection'
import TodoItem from './TodoItem'
import Footer from './Footer'
import { SHOW_ALL, SHOW_COMPLETED } from '../constants/TodoFilters'
function setup(propOverrides) {
const props = Object.assign({
todos... |
src/routes/Spots/components/Spot.js | ZeusTheTrueGod/WindsurfingNetwork-client | // @flow
import { Grid, Carousel, Col, Panel, Media, Tabs, Tab, Button } from 'react-bootstrap';
import React from 'react';
import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps';
import { LinkContainer } from 'react-router-bootstrap';
import { Link } from 'react-router';
import _ from 'lodash-es';
import... |
local-cli/templates/HelloNavigation/views/chat/ChatScreen.js | chnfeeeeeef/react-native | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Button,
ListView,
StyleSheet,
Text,
TextInput,
View,
} from 'react-native';
import KeyboardSpacer from '../../components/KeyboardSpacer';
import Backend from '../../lib/Backend';
export default class ChatScreen extends C... |
src/stories/2017-06-17-summer-in-amsterdam.js | danpersa/remindmetolive-react | import React from 'react';
import PostImageResp from '../components/story/PostImageResp';
import TwoPostImageResp from '../components/story/TwoPostImageResp';
import StoryPage from '../components/story/StoryPage';
import StoryTextBlock from '../components/story/StoryTextBlock';
import StoryImages from '../components/st... |
app/pages/lab/subject-sets.spec.js | zooniverse/Panoptes-Front-End | import React from 'react';
import assert from 'assert';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import SubjectSetsPage from './subject-sets';
const meta = function () {
return { meta: { page: 1, page_size: 1 }};
};
const subjectSets = [
{ id: '1', display_name: 'Rad Subject Set', getMeta: met... |
examples/complete/simple/src/Home.js | prescottprue/react-redux-firebase | import React from 'react'
import Todos from './Todos'
import NewTodo from './NewTodo'
import logo from './logo.svg'
import './App.css'
function Home() {
return (
<div className='App'>
<div className='App-header'>
<h2>react-redux-firebase demo</h2>
<img src={logo} className='App-logo' alt='l... |
docs/app/Examples/modules/Popup/Variations/PopupExamplePosition.js | shengnian/shengnian-ui-react | import React from 'react'
import { Icon, Popup, Grid } from 'shengnian-ui-react'
const PopupExamplePosition = () => (
<Grid columns={3} style={{ width: '600px' }}>
<Grid.Row>
<Grid.Column>
<Popup
trigger={<Icon name='heart' color='red' size='large' circular />}
content='I am pos... |
react/features/base/react/components/native/NavigateSectionListItem.js | gpolitis/jitsi-meet | // @flow
import React, { Component } from 'react';
import type { Item } from '../../Types';
import AvatarListItem from './AvatarListItem';
import Container from './Container';
import Text from './Text';
import styles from './styles';
type Props = {
/**
* Item containing data to be rendered.
*/
it... |
src/routes/index.js | j2xx/netease-music-h5 | import React from 'react';
import { Route, IndexRedirect } from 'react-router';
import { App, PageNotFound } from '../pages';
const Home = (location, callback) => {
require.ensure([], (require) => {
callback(null, require('../pages/home').default);
}, 'home');
};
const Music = (location, callback) => {... |
test/test_helper.js | jessepatricio/react-weather | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
examples/navigation-react-redux/components/UserSearchInput.js | joshburgess/redux-most | import React from 'react'
const UserSearchInput = ({ value, defaultValue, onChange }) => {
const handleOnChange = evt => onChange(evt.target.value)
return (
<input
type='text'
placeholder='Search for a GH user'
defaultValue={defaultValue}
onChange={handleOnChange}
/>
)
}
export ... |
src/applications/gi/tests/helpers.js | department-of-veterans-affairs/vets-website | import React from 'react';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history-v4';
import { combineReducers, applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import sinon from 'sinon';
import createCommonStore, { commonReducer } from 'platform/startup/s... |
App/Navigation/NavItems.js | MapReactor/Sonder | // @flow
import React from 'react'
import { TouchableOpacity } from 'react-native'
import styles from './Styles/NavItemsStyle'
import { Actions as NavigationActions } from 'react-native-router-flux'
import Icon from 'react-native-vector-icons/FontAwesome'
import { Colors, Metrics } from '../Themes'
const openDrawer =... |
react-flux-mui/js/material-ui/src/svg-icons/image/photo-size-select-actual.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoSizeSelectActual = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zM5 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"/>
</SvgIcon>
);
ImagePhotoSiz... |
jenkins-design-language/src/js/components/material-ui/svg-icons/editor/format-align-right.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const EditorFormatAlignRight = (props) => (
<SvgIcon {...props}>
<path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"/>
</SvgIcon>
);
EditorFormatAlignRight.displayName = 'EditorFormatAlignRight';
EditorFormatAlign... |
packages/material-ui-icons/legacy/SignalCellular0BarSharp.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path fillOpacity=".3" d="M2 22h20V2L2 22z" />
, 'SignalCellular0BarSharp');
|
node_modules/@material-ui/core/esm/test-utils/describeConformance.js | pcclarke/civ-techs | import _defineProperty from "@babel/runtime/helpers/defineProperty";
import { assert } from 'chai';
import React from 'react';
import findOutermostIntrinsic from './findOutermostIntrinsic';
import testRef from './testRef';
/**
* Glossary
* - root component:
* - renders the outermost host component
* - has the `... |
packages/cmf/src/App.js | Talend/ui | /**
* Internal module, you should not use it directly
* @module react-cmf/lib/App
*/
import PropTypes from 'prop-types';
import React from 'react';
import { Provider } from 'react-redux';
import RegistryProvider from './RegistryProvider';
import { WaitForSettings } from './settings';
import ErrorBoundary from './c... |
src/routes/home/ComponentsList/ComponentStatus.js | balmbees/overwatch | import React from 'react';
import {
STATUS_NONE,
STATUS_SUCCESS,
STATUS_ERROR,
} from '../../../server/models/watch_result';
const STATUS_TO_COLOR_MAP = {};
STATUS_TO_COLOR_MAP[STATUS_NONE] = '#111111';
STATUS_TO_COLOR_MAP[STATUS_SUCCESS] = '#00de0e';
STATUS_TO_COLOR_MAP[STATUS_ERROR] = '#ff3800';
function Comp... |
src/components/video_list.js | alxDiaz/reactFirstProject | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList= (props) => {
const videoItems = props.videos.map((video) => {
return (
<VideoListItem
onVideoSelect = {props.onVideoSelect}
key={video.etag}
video={video} />
);
});
return (
... |
src/components/SearchPage.js | hawaijar/reactnd-project-myreads-starter |
import React from 'react';
import { Link } from 'react-router-dom';
import { Throttle } from 'react-throttle';
import * as Constants from '../constant';
import Book from './Book';
import Spinner from './Spinner';
export default class SearchBook extends React.Component {
state = {
isLoading: false,
};
updat... |
examples/custom-server-hapi/pages/a.js | sedubois/next.js | import React from 'react'
export default () => <div>a</div>
|
Front-End/components/chat.component.js | brandonrninefive/prIDE | import React from 'react';
import ReactDOM from 'react-dom';
import {FormControl, FromGroup} from 'react-bootstrap';
class Chat extends React.Component{
constructor(props)
{
super(props);
this.state = {
log:''
}
this.handleSubmit = this.handleSubmit.bind(thi... |
app/common/components/SentencePair/MarkedSentence/index.js | Kaniwani/KW-Frontend | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import splitSentenceByMatch from 'common/utils/splitSentenceByMatch';
import A from 'common/components/A';
import { Sentence, VocabMark } from './styles';
MarkedSentence.propTypes = {
sentence: PropTypes.string.isR... |
src/svg-icons/image/crop-square.js | verdan/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... |
react/features/desktop-picker/components/DesktopSourcePreview.js | parisjulien/arkadin-jitsimeet | import React, { Component } from 'react';
/**
* React component for displaying a preview of a DesktopCapturerSource.
*
* @extends Component
*/
class DesktopSourcePreview extends Component {
/**
* DesktopSourcePreview component's property types.
*
* @static
*/
static propTypes = {
... |
modules/App.js | PaulsBecks/BasicReact | import React from 'react'
export default React.createClass({
render : function render() {
const { main, navbar} = this.props;
return (
<div>
{navbar}
{main}
</div>
);
}
})
|
src/svg-icons/image/control-point-duplicate.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPointDuplicate = (props) => (
<SvgIcon {...props}>
<path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 ... |
client/src/components/Home.js | zinsani/calmemo | // @flow
import React, { Component } from 'react';
class Home extends Component {
render() {
return (
<h2>Home</h2>
);
}
}
export default Home;
|
frontend/src/components/eois/modals/completeDsr/sendDsrModal.js | unicef/un-partner-portal | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { withStyles } from 'material-ui/styles';
import { Typography } from 'material-ui';
import PaddedContent from '../../../common/paddedContent';
import ControlledModal from '../../../common/modals/c... |
src/components/count_down_timer.js | ravindraranwala/countdowntimerapp | import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as constants from './constants';
class CountdownTimer extends Component {
constructor(props) {
super(props);
this.secondsToTime = this.secondsToTime.bind(this);
this.timer = 0;
this.startTimer = this.startTimer.... |
packages/components/src/VirtualizedList/CellBoolean/BooleanColumn.component.js | Talend/ui | import React from 'react';
import { defaultColumnConfiguration } from '../Content.component';
import CellBoolean, { DISPLAY_MODE } from './CellBoolean.component';
export const cellType = 'texticon';
export const booleanColumnConfiguration = {
cellRenderer: props => <CellBoolean {...props} />,
};
// this is a fake co... |
classic/src/scenes/mailboxes/src/Scenes/AppScene/Sidelist/SidelistControls/SidelistControlSettings.js | wavebox/waveboxapp | import React from 'react'
import SidelistControl from './SidelistControl'
import { TOUR_STEPS } from 'stores/settings/Tour'
import SettingsSharpIcon from '@material-ui/icons/SettingsSharp'
import { withStyles } from '@material-ui/core/styles'
import ThemeTools from 'wbui/Themes/ThemeTools'
import SidelistMatIcon from '... |
docs/app/Examples/elements/Image/Types/ImageExampleLink.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Image } from 'semantic-ui-react'
const ImageExampleLink = () => (
<Image
src='/assets/images/wireframe/image-text.png'
as='a' size='medium'
href='http://google.com'
target='_blank'
/>
)
export default ImageExampleLink
|
src/svg-icons/navigation/unfold-more.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationUnfoldMore = (props) => (
<SvgIcon {...props}>
<path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"/>
</SvgIcon>
);
Navig... |
src/components/Nav.js | 5-gwoap/adopt-a-family | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
class Nav extends Component {
render() {
return (
<div className="header-container">
<div className="col-3 header-group header-text">
<Link to="/">Adopt A Family</Link>
</div>
<div classNam... |
src/plot/xy-plot.js | Apercu/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... |
tests/layouts/CoreLayout.spec.js | baronkwan/ig_clone | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
build-bench/src/dialogs/RenameTab.js | FredTingaud/quick-bench-front-end | import React from 'react';
import { Modal, Button, Form } from 'react-bootstrap';
class RenameInput extends React.Component {
constructor(props) {
super(props);
this.innerRef = React.createRef();
}
componentDidMount() {
this.innerRef.current.focus();
}
keyPressed(event) {
... |
packages/website/src/components/content/Contributors.js | mucsi96/w3c-webdriver | import React from 'react';
import styled from 'styled-components';
import { contributors } from 'packageJson';
import theme from '../../theme';
const Avatar = styled.img`
width: 100px;
display: block;
overflow: hidden;
border-radius: 50%;
opacity: inherit;
transition: inherit;
`;
const ContributorContaine... |
src/scenes/selectDate.js | Andrey11/golfmanager | 'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
Text,
View,
InteractionManager,
TouchableHighlight,
StyleSheet
} from 'react-native';
import * as RightButtonMapper from '../navigation/rightButtonMapper';
import DatePicker from '../components/datePicker';
export default class... |
src/views/components/chatroom/comment/comment-form.js | EragonJ/Kaku | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ActionButton from '../../shared/action-button';
import { Picker } from 'emoji-mart';
class CommentFormComponent extends Component {
constructor(props) {
super(props);
this.state = {
text: '',
isPickerShown: false... |
examples/src/components/NumericSelect.js | paulmillr/react-select | import React from 'react';
import Select from 'react-select';
var ValuesAsNumbersField = React.createClass({
displayName: 'ValuesAsNumbersField',
propTypes: {
label: React.PropTypes.string
},
getInitialState () {
return {
options: [
{ value: 10, label: 'Ten' },
{ value: 11, label: 'Eleven' },
{ ... |
src/client/components/AdminPanel/ForgotPassword/index.js | mweslander/veery | // Imports
import React, { Component } from 'react';
import PropTypes from 'prop-types';
// Components
import Button from '../../Base/Button';
// CSS
import './index.scss';
// Services
import usersService from '../../../services/users';
// Utils
import mapFormValues from '../../../utils/mapFormValues';
// PropType... |
tools/public-components.js | asiniy/react-bootstrap | import React from 'react';
import * as 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/LinearProgress/LinearProgress.spec.js | lawrence-yu/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import LinearProgress from './LinearProgress';
import getMuiTheme from '../styles/getMuiTheme';
describe('<LinearProgress />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => ... |
src/gallery-item.js | cutofmyjib/porftolio-template | import React, { Component } from 'react';
export default class GalleryItem extends Component {
render() {
return (
<li className="gallery-item">
<a href="#">
<img src={this.props.url} className="gallery-item-img"/>
</a>
<span className="gallery-item-desc">{this.props.desc}... |
node_modules/react-router/es6/RouteContext.js | TarikHuber/react-redux-material-starter-kit | import warning from './routerWarning';
import React from 'react';
var object = React.PropTypes.object;
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent trans... |
app/containers/LanguageProvider/index.js | talal7860/punch-assignment-react | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
frontend/src/views/LoginView.js | svalyn/svalyn | /**************************************************************
* Copyright (c) Stéphane Bégaudeau
*
* This source code is licensed under the MIT license found in
* the LICENSE file in the root directory of this source tree.
***************************************************************/
import React from 'react'... |
src/components/note_form.js | asommer70/thehoick-notes-server | import React, { Component } from 'react';
import { Link, browserHistory } from 'react-router'
import cookie from 'react-cookie';
import Store from '../lib/store';
var store = new Store();
var socket = io();
class NoteForm extends Component {
constructor(props) {
super(props);
this.username = cookie.load('us... |
app/jsx/courses/notification_settings/CourseNotificationSettingsQuery.js | djbender/canvas-lms | /*
* Copyright (C) 2020 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: 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, version 3 of the License.
*
* Canvas is distribut... |
src/app.js | craigbilner/quizapp | 'use strict';
import iso from 'iso';
import React from 'react';
import ReactDOM from 'react-dom';
import alt from '../altWrapper';
import AppComponent from './components/appComponent/appComponent';
iso.bootstrap(function (state, meta, container) {
alt.bootstrap(state);
ReactDOM.render(React.createElement(AppCompo... |
fields/types/boolean/BooleanColumn.js | creynders/keystone | import React from 'react';
import Checkbox from '../../components/Checkbox';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var BooleanColumn = React.createClass({
displayName: 'BooleanColumn',
propTypes: {
col: React.PropTypes.object,
... |
src/server/server.js | AlekseyWW/shop-react-ssr | import React from 'react';
import { renderToString } from 'react-dom/server';
import { Provider } from 'react-redux';
import createHistory from 'history/createMemoryHistory';
import StaticRouter from 'react-router-dom/StaticRouter';
import matchPath from 'react-router-dom/matchPath';
import { ServerStyleSheet } from 's... |
src/components/DeveloperMenu.js | apoi/kahvi | import React from 'react';
import {View} from 'react-native';
// For tests
const DeveloperMenu = () => <View/>;
export default DeveloperMenu;
|
src/modules/rideOffer/components/RideOffer.js | CaronaBoard/caronaboard-native | import React from 'react'
import PropTypes from 'prop-types'
import { View, Text, TouchableOpacity } from 'react-native'
import Styles from './styles/RideOffer.style'
import { RkCard } from 'react-native-ui-kitten'
import { RidePropType } from '../../rideRequest/types'
export class RideOffer extends React.Component {... |
frontend/src/containers/RecordingTools/RecordingTools.js | webrecorder/webrecorder | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { toggleAutopilotSidebar } from 'store/modules/automation';
import { setAutoscroll } from 'store/modules/controls';
import { toggleClipboard } from 'store/modules/toolBin';
import { RecordingToolsUI } f... |
gui/src/app/components/simulation-settings-dialog.js | mbonvini/LambdaSim | import React from 'react';
import log from 'loglevel';
import Dialog from 'material-ui/Dialog';
class SimulationSettingsDialog extends React.Component {
constructor(props) {
super(props);
}
render = () => {
return (
<Dialog
title="Settings"
moda... |
src/schema/queryMachine.dataSchema.js | lijinfengworm/ant-design-reactjs | import React from 'react';
import {Icon} from 'antd';
// 定义某个表的dataSchema, 结构跟querySchema很相似, 见下面的例子
// 注意: 所有的key不能重复
// 这个配置不只决定了table的schema, 也包括用于新增/删除的表单的schema
module.exports = [
{
key: 'id', // 传递给后端的key
title: 'ID', // 前端显示的名字
// 其实dataType对前端的意义不大, 更重要的是生成后端接口时要用到, 所以要和DB中的类型一致
// 对java... |
blueocean-material-icons/src/js/components/svg-icons/maps/person-pin.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const MapsPersonPin = (props) => (
<SvgIcon {...props}>
<path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2.7-1.21-2.7-2.7 0-1.49 1.21-2.7 2... |
examples/huge-apps/routes/Course/routes/Grades/components/Grades.js | carlosmontes/react-router | import React from 'react';
class Grades extends React.Component {
render () {
var assignments = COURSES[this.props.params.courseId].assignments;
return (
<div>
<h3>Grades</h3>
<ul>
{assignments.map(assignment => (
<li key={assignment.id}>{assignment.grade} - {assi... |
src/decorators/withViewport.js | remoteportal/widgets-spa-react | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... |
src/components/playback/StreamPlayer.js | streamr-app/streamr-web | import React from 'react'
import DrawManager from './DrawManager'
import cx from 'classnames'
import PlaybackControls from './PlaybackControls'
export default class StreamPlayer extends React.Component {
constructor (props) {
super(props)
this.state = {
position: 0,
loading: true,
fullscr... |
frontend/src/Settings/CustomFormats/CustomFormats/ExportCustomFormatModal.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Modal from 'Components/Modal/Modal';
import { sizes } from 'Helpers/Props';
import ExportCustomFormatModalContentConnector from './ExportCustomFormatModalContentConnector';
class ExportCustomFormatModal extends Component {
//
// ... |
packages/mineral-ui-icons/src/IconBluetoothSearching.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 IconBluetoothSearching(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {..... |
src/components/datepicker/DatePickerCalendar.js | f0zze/rosemary-ui | import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import values from 'lodash/values';
import memoize from 'lodash/memoize';
import chunk from 'lodash/chunk';
import {
isWeekend,
isFirstDayOfWeek,
isMonthTheSame,
isToday,
isDayBefore,
isDayAfter,
... |
node_modules/react-bootstrap/es/MediaList.js | GregSantulli/react-drum-sequencer | 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/containers/SignIn/index.js | Jasonlucas724/Digimortal | /*
*
* SignIn
*
*/
import React from 'react';
import Helmet from 'react-helmet';
export default class SignIn extends React.PureComponent {
render() {
const div1={
display:"flex",
flexDirection:"column",
width:"200px",
height:"100%",
color:"#000000",
background:"black",
marginTop:... |
example/v9.x.x/storybook/src/App.js | i18next/react-i18next | import React, { Component } from 'react';
import { withNamespaces, Trans } from 'react-i18next';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
const { t, i18n } = this.props;
const changeLanguage = lng => {
i18n.changeLanguage(lng);
};
return (
... |
test/server-side.js | zapier/redux-router-kit | import test from 'ava';
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import 'babel-core/register';
import routerReducer from '../src/reducer';
import createRouterMiddle... |
examples/passing-props-to-children/app.js | trotzig/react-router | import React from 'react';
import { Router, Route, Link, History } from 'react-router';
var App = React.createClass({
mixins: [ History ],
getInitialState() {
return {
tacos: [
{ name: 'duck confit' },
{ name: 'carne asada' },
{ name: 'shrimp' }
]
};
},
addTaco() {... |
src/containers/blog_categories.js | b0ts/react-redux-sweetlightstudios-website | import React, { Component } from 'react';
import { connect } from 'react-redux'; // glue between react and redux
import { bindActionCreators } from 'redux';
import { blogGetCategories } from '../actions/index.js';
import { Navbar, Nav } from 'react-bootstrap';
import BlogCategory from '../components/blog_category';
cl... |
src/components/Menu/Menu.js | nambawan/g-old | // taken from https://github.com/grommet/grommet/blob/master/src/js/components/Menu.js
import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import withStyles from 'isomorphic-style-loader/withStyles';
import StyleContext from 'isomorphic-style-loader/StyleContext';
i... |
src/components/Amount/Amount.js | nobt-io/frontend | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedNumber } from 'react-intl';
import classnames from 'classnames';
import { useNobt } from '../../hooks/useNobt';
const valueViewModel = props =>
props.absolute ? Math.abs(props.value) : props.value;
const computeClassNames = props =>
... |
src/components/CounterContainer.js | prontodev/simple-react | import React from 'react'
import ClickStore from '../ClickStore.js'
import ClickActions from '../ClickActions.js'
import Counter from './Counter'
class CounterContainer extends React.Component {
constructor(props) {
super(props)
this.state = {
clickCount: ClickStore.getClickCount()
}
}
compone... |
src/routes/admin/index.js | langpavel/react-starter-kit | /**
* 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... |
modules/__tests__/serverRendering-test.js | chrisirhc/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createLocation from 'history/lib/createLocation'
import RoutingContext from '../RoutingContext'
import match from '../match'
import Link from '../Link'
describe('server rendering', function () {
let App... |
ee/app/engagement-dashboard/client/components/ChannelsTab/index.js | subesokun/Rocket.Chat | import React from 'react';
import { TableSection } from './TableSection';
export function ChannelsTab() {
return <>
<TableSection />
</>;
}
|
BasicPractice/__tests__/index.ios.js | DajuanM/DHReactNativeDemo | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/components/TurnTimes.js | wiserl/appraisal-frontend | import React, { Component } from 'react';
// import Appraisal from './TurnTimeFormat';
export default class TurnTime extends Component {
constructor() {
super();
this.state = { appraisalTypes: {}, region: 'Colorado' };
// we need to re-bind the method so it is called with the TurnTime as its call objec... |
app/javascript/mastodon/features/compose/components/text_icon_button.js | unarist/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class TextIconButton extends React.PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,
title: PropTypes.string,
active: PropTypes.bool,
onClick: PropTypes.func.isRequired,
ariaControls: PropTypes.s... |
__tests__/mocks/FakeIcon.js | nickjvm/grommet | import React from 'react';
const FakeIcon = () => {
return (
<svg version="1.1" viewBox="0 0 24 24.3616"
width="24px" height="24px" role="img" />
);
};
FakeIcon.icon = true;
FakeIcon.displayName = 'Fake';
export default FakeIcon;
|
fields/types/html/HtmlField.js | efernandesng/keystone | import _ from 'underscore';
import Field from '../Field';
import React from 'react';
import tinymce from 'tinymce';
import { FormInput } from 'elemental';
/**
* TODO:
* - Remove dependency on underscore
*/
var lastId = 0;
function getId() {
return 'keystone-html-' + lastId++;
}
module.exports = Field.create({
... |
docs/app/Examples/elements/Segment/Variations/SegmentExampleFloated.js | koenvg/Semantic-UI-React | import React from 'react'
import { Segment } from 'semantic-ui-react'
const SegmentExampleFloated = () => (
<div>
<Segment floated='left'>
This segment will appear to the left
</Segment>
<Segment floated='right'>
This segment will appear to the right
</Segment>
</div>
)
export default ... |
app/javascript/mastodon/features/ui/components/follow_requests_nav_link.js | rainyday/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { fetchFollowRequests } from 'mastodon/actions/accounts';
import { connect } from 'react-redux';
import { NavLink, withRouter } from 'react-router-dom';
import IconWithBadge from 'mastodon/components/icon_with_badge';
import { List as ImmutableList }... |
example/comments.js | matteolc/admin-on-rest | import React from 'react';
import {
AutocompleteInput,
Create,
DateField,
DateInput,
DisabledInput,
Edit,
EditButton,
Filter,
List,
LongTextInput,
ReferenceField,
ReferenceInput,
Responsive,
SelectInput,
SimpleList,
SimpleForm,
TextField,
TextInput... |
SSBW/Tareas/Tarea9/restaurantes2/node_modules/react-bootstrap/es/Button.js | jmanday/Master | import _Object$values from 'babel-runtime/core-js/object/values';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-... |
src/containers/SearchView/SearchView.js | JamesJin038801/CampID | import { Text, View, Platform, Image, ScrollView } from 'react-native';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import I18n from 'react-native-i18n';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import NavigationBar from 'react-native-navbar... |
test/js/release_test/ViroLightTest.js | viromedia/viro | /**
* Sample React Native App
* https://github.com/facebook/react-native
*//**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import {
ViroS... |
src/svg-icons/action/settings-brightness.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsBrightness = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1... |
modern/src/components/NavBar.js | tananaev/traccar-web | import React from 'react';
import {
AppBar, Toolbar, Typography, IconButton,
} from '@material-ui/core';
import MenuIcon from '@material-ui/icons/Menu';
const Navbar = ({ setOpenDrawer, title }) => (
<AppBar position="fixed" color="inherit">
<Toolbar>
<IconButton
color="inherit"
aria-labe... |
components/SingleFlop.js | TopOfTheFlops/client-side | import React from 'react'
import Header from './Header'
import Nav from './Nav'
import deleteFlop from '../api/deleteFlop'
import voteFlop from '../api/voteFlop'
function Flops ({state, dispatch}) {
function goToCreateFlop (e) {
dispatch({type: 'CHANGE_PAGE', payload: '/flops/new'})
}
function goBack (e) {... |
src/views/Icons/GlyphiconsSocial/GlyphiconsSocial.js | hungtruongquoc/shipper_front | import React, { Component } from 'react';
class GlyphiconsSocial extends Component {
render() {
return (
<div className="animated fadeIn">
<div className="card">
<div className="card-header">
<strong>GLYPHICONS</strong> Social
</div>
<div className="card-bl... |
Paths/React/05.Building Scalable React Apps/6-react-boilerplate-building-scalable-apps-m6-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... |
app/containers/todolist/PrivateTodoList.js | flanamacca/react-learning-kit | import React from 'react';
import { connect } from 'react-redux';
import { toggleTodo, removeTodo } from '../../actions';
import TodoList from '../../components/todolist/TodoList';
import AddTodo from './AddTodo';
import FilterList from '../../components/todolist/FilterList';
import TodoCounter from '../../components/t... |
assets/js/social.js | Subash/sundar-nepal.subash.me | import React from 'react';
export default function() {
return (
<div className="social">
<div
className="fb-like"
data-href="http://sundar-nepal.subash.me/"
data-layout="standard"
data-action="like"
data-show-faces="false"
data-share="true"
/>
</div... |
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js | damoguyan8844/actor-platform | import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
import ActorClient from 'utils/ActorClient';
import Inputs from 'utils/Inputs';
import { Styles, FlatButton } from 'material-ui';
import { KeyCodes... |
src/AffixMixin.js | PeterDaveHello/react-bootstrap | import React from 'react';
import domUtils from './utils/domUtils';
import EventListener from './utils/EventListener';
const AffixMixin = {
propTypes: {
offset: React.PropTypes.number,
offsetTop: React.PropTypes.number,
offsetBottom: React.PropTypes.number
},
getInitialState() {
return {
a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.