path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/views/admin/oauthApps/OAuthAppsRoute.js | VoiSmart/Rocket.Chat | import React from 'react';
import NotAuthorizedPage from '../../../components/NotAuthorizedPage';
import { usePermission } from '../../../contexts/AuthorizationContext';
import OAuthAppsPage from './OAuthAppsPage';
export default function MailerRoute() {
const canAccessOAuthApps = usePermission('manage-oauth-apps');... |
web/src/layout/Breadcrumb.js | caicloud/cyclone | import React from 'react';
import { Link } from 'react-router-dom';
import { Breadcrumb } from 'antd';
import PropTypes from 'prop-types';
const mainModules = [
'overview',
'projects',
'stageTemplate',
'resource',
'integration',
'workflows',
];
const operations = ['update', 'add'];
/**
* define the route... |
roguelike-dungeon-crawler-game/src/App.js | mstoyanovca/front-end | import React, { Component } from 'react';
import Dungeon from './Dungeon';
import Header from './Header';
import LossModal from './LossModal';
import WinModal from './WinModal';
const weapons = ["stick", "brass knuckles", "serrated dagger", "katana", "reaper's scythe", "large trout"];
//tune the game here; you need 24... |
packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js | RobzDoom/frame_trap | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
src/ContractRows.js | simoneas02/contracts-list | import React, { Component } from 'react';
import update from 'immutability-helper';
import edit from './icons/edit.svg'
import save from './icons/save.svg'
import close from './icons/close.svg'
class ContractRows extends Component {
constructor(props) {
super(props);
this.state = {
contract: [],
... |
components/utils/PositionCard.js | Mudano/m-dash-ui | import React from 'react'
import className from 'classnames'
export default class PositionCard extends React.Component {
static defaultProps = {
}
constructor(props){
super(props)
this.state = {
isOpen : this.props.isOpen,
isReady : !this.props.isOpen,
}
}
componentWillReceivePr... |
src/Label.js | roderickwang/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
packages/demos/demo/src/components/Project/Input.js | yusufsafak/cerebral | import React from 'react'
import { connect } from 'cerebral/react'
import { props, signal, state } from 'cerebral/tags'
import translations from '../../common/compute/translations'
export default connect(
{
// autoFocus
enterPressed: signal`projects.enterPressed`,
escPressed: signal`projects.escPressed`,... |
src/www/js/index.js | training4developers/bootcamp_04112016 | import React from 'react';
import Relay from 'react-relay';
import ReactDOM from 'react-dom';
import WidgetToolContainer from './containers/widget-tool-container';
import ViewerRoute from './routes/viewer-route';
ReactDOM.render(
<Relay.RootContainer Component={WidgetToolContainer} route={new ViewerRoute()} />,
d... |
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/Modal.js | Akkuma/npm-cache-benchmark | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... |
1l_React_ET_Lynda/Ex_Files_React_EssT/Ch07/07_01/finish/src/index.js | yevheniyc/C | import React from 'react'
import { render } from 'react-dom'
// import routes from './routes'
import Member from './components/ui/Member'
window.React = React
render(
<Member admin={true}
name="Edna Welch"
email="edna.welch88@example.com"
thumbnail="https://randomuser.me/api/portr... |
src/routes/tool/index.js | chunkiat82/rarebeauty-ui | /**
* 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 Tool from './Tool';
i... |
src/containers/NewRoutineForm.js | snsavage/timer-react | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'
import RoutineForm from './RoutineForm';
import { createRoutine } from '../actions/routineFormActions';
import { clearCurrentRoutine } from '../actions/routineActions';
export class NewRoutineFo... |
client/components/Common/ListItem.js | Mignon-han/issue-processing | import React from 'react';
import './css/style.css';
import { hexToRgb } from '../../utils/utils';
const ListItem = ({ selected, label, value, color, onClick, visible }) => (
<div className="common-list-item">
<div className='item-container bgStyle' data-value={value}
onClick={() => onClick()} style={s... |
components/TimePickerSelect.js | hellobrian/carbon-components-react | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import Icon from './Icon';
export default class TimePickerSelect extends Component {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
id: PropTypes.string.isRequir... |
docs-ui/components/checkboxFancy.stories.js | beeftornado/sentry | import React from 'react';
import {withInfo} from '@storybook/addon-info';
import {number, boolean} from '@storybook/addon-knobs';
import styled from '@emotion/styled';
import CheckboxFancy from 'app/components/checkboxFancy/checkboxFancy';
export default {
title: 'Core/Style/Icons',
};
export const _CheckboxFancy... |
src/js/components/Employees/New.js | appdev-academy/appdev.academy-react | import React from 'react'
import { browserHistory } from 'react-router'
import { inject, observer } from 'mobx-react'
import Form from './Form'
@inject('employeesStore')
@observer
export default class New extends React.Component {
constructor(props) {
super(props)
this.state = {
errors: []
}
... |
app/test/components/ContentFilter.spec.js | seanislegend/RushDiscography-ReactDemo | import React from 'react';
import {expect} from 'chai';
import {shallow} from 'enzyme';
import {spy} from 'sinon';
import ContentFilter from '../../src/js/components/ContentFilter';
describe('Component: <ContentFilter />', () => {
it('should render a filter element', () => {
const handleClick = spy();
... |
src/components/Header/index.js | frintjs/frint.js.org | import React from 'react';
import Link from "gatsby-link";
import SearchForm from '../SearchForm';
const Header = () => (
<div className="container">
<div className="nav-left">
<Link activeClassName="is-active" className="nav-item brand" to="/">
<img alt="Frint" className="dark" src="/img/frint-log... |
src/components/common/FeedbackBlock/index.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import ReactGA from 'react-ga';
import { Heading } from 'common/base';
import Button from 'common/button/Button';
import ButtonGroupImage from 'common/button/ButtonGroupImage';
import Checked from 'common/icons/Checked';
import... |
pootle/static/js/admin/components/ItemTableRow.js | JohnnyKing94/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import cx from 'classnames';
import React from 'react';
... |
docs/website/src/templates/package.js | adaltas/node-nikita | // React
import React from 'react'
// Gatsby
import { graphql, Link } from 'gatsby'
// MDX
import { MDXProvider } from "@mdx-js/react"
import { MDXRenderer } from "gatsby-plugin-mdx"
// Local
import Layout from '../components/Layout'
const Template = ({
data
}) => {
const { page } = data
return (
<Layout pag... |
app/javascript/mastodon/components/admin/Retention.js | abcang/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl';
import classNames from 'classnames';
import { roundTo10 } from 'mastodon/utils/numbers';
const dateForCohort = cohort => {
switch(cohort.freque... |
client/src/index.js | medelbou/react-redux-express | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
examples/react-application/index.js | alexeyraspopov/actor-system | import React from 'react';
import ReactDOM from 'react-dom';
import { ActorSystem } from 'actor-system';
import Application from './modules/Application.react';
import Wrapper from './modules/Wrapper.react';
import Storage from './modules/Storage';
import Main from './modules/Main.actor';
const system = ActorSystem.fro... |
tp-3/euge/src/components/pages/alumnos/components/form/AlumnoForm.js | jpgonzalezquinteros/sovos-reactivo-2017 | import React from 'react';
import './alumnoForm.scss';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import TextField from 'material-ui/TextField';
import {orange500, blue500} from 'material-ui/styles/colors';
import RaisedButton from 'material-ui/RaisedButton';
const styles = {
errorStyle: {
... |
src/commons/title.js | jessy1092/react-semantify |
import React from 'react';
import filter from '../filter';
import Div from './div';
const stateArray = ['active'];
const defaultClassName = 'title';
const componentName = 'Title';
const Title = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent(componen... |
mobile/mock ups/tech_stack/App.js | parammehta/TravLendar | import React from 'react';
import { View } from 'react-native';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from './src/reducers';
import { Header } from './src/components/common';
import LibraryList from './src/components/LibraryList';
const App = () => (
<Provider s... |
web/test/feedback/components/Pagination.js | trendmicro/serverless-survey-forms | import DomMock from '../../helpers/dom-mock';
import expect from 'expect';
import React from 'react';
import TestUtils from 'react-dom/test-utils';
import Pagination from '../../../src/components/Pagination';
DomMock('<html><body></body></html>');
describe('[Feedback] Testing Pagination Component', () => {
it('c... |
src/components/CardsList/cardsList.js | VitaliiK91/AlramRN | import React from 'react';
import PropTypes from 'prop-types';
import {
ScrollView,
} from 'react-native';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { cards as actions } from '../../store/actions';
import Card from '../Card';
const CardList = props => (
<ScrollView>
... |
src/components/atoms/Paragraph/index.stories.js | SIB-Colombia/dataportal_v2_frontend | import React from 'react'
import { storiesOf } from '@kadira/storybook'
import Paragraph from '.'
storiesOf('Paragraph', module)
.add('default', () => (
<Paragraph>
Nisi eu eiusmod cupidatat aute laboris commodo excepteur esse dolore incididunt incididunt aliquip pariatur est minim officia sit. Nulla paria... |
src/svg-icons/action/flight-land.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFlightLand = (props) => (
<SvgIcon {...props}>
<path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2... |
src/Tab.js | thealjey/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import TransitionEvents from './utils/TransitionEvents';
const Tab = React.createClass({
propTypes: {
/**
* @private
*/
active: React.PropTypes.bool,
animation: React.PropTypes.bool,
/**
* It is used by 'Tab... |
example/app.js | snario/react-mapbox-gl | import React from 'react';
import SimpleExample from './simple';
import EventsExample from './events';
import VectorLayersExample from './vector-layers';
const examples = <div>
<h1>React-Leaflet examples</h1>
<h2>Popup with Marker</h2>
<SimpleExample />
<h2>Events</h2>
<p>Click the map to show a marker at y... |
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-forms-auto-complete.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, ContentMixin} from './../common/common.js';
import {Link, Backdrop} from './../bricks/bricks.js';
import $ from 'jquery';
import './auto-complete.less';
export default React.createClass({
mixins: [
BaseMixin,
ElementaryMixin,
ContentMixin
... |
app/screens/gold/gold.container.js | it-surya/hack-jeninvest | import React from 'react';
import {
View,
Image,
Keyboard
} from 'react-native';
import {
RkButton,
RkText,
RkTextInput,
RkStyleSheet,
RkTheme,
RkAvoidKeyboard,
RkChoice
} from 'react-native-ui-kitten';
import {GradientButton} from '../../components/';
import {scale, scaleModerate, scaleVertical} fr... |
src/px-modal/index.js | jonniespratley/px-components-react | import React from 'react';
import Overlay from '../px-overlay';
import Button from '../px-button';
import classnames from 'classnames';
import stylesheet from './style.scss';
/**
* px-modal component
*/
export default ({
style,
modalHeading = 'Modal',
btnModalNegative,
onBtnModalNegativeClick,
btnModalPos... |
src/svg-icons/av/recent-actors.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvRecentActors = (props) => (
<SvgIcon {...props}>
<path d="M21 5v14h2V5h-2zm-4 14h2V5h-2v14zM14 5H2c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM8 7.75c1.24 0 2.25 1.01 2.25 2.25S9.... |
app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js | cybrespace/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import Toggle from 'react-toggle';
import AsyncSelect from 'react-select/lib/Async';
export default @injectIntl
class ColumnSettings exte... |
extension/panel/src/components/app-view.js | capacitorjs/capacitor | 'use strict';
import React from 'react';
import {RouteHandler} from 'react-router';
import Locator from 'capacitor-locator';
import PluginList from 'src/components/plugin-list';
import PluginStore from 'src/stores/plugin';
/**
* Display the current list of plugins and the currently-selected plugin
*/
export default... |
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-bricks-camera.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, Tools} from '../common/common.js';
import './camera.less';
// TODO
// quality of picture -> jpg, png, ...
// choice of camera devices if pc has more cameras
export const Camera = React.createClass({
//@@viewOn:mixins
mixins: [
BaseMixin,
Elem... |
shared/app/Tms/config/components/TmsConfig.js | pebie/react-universally-node-config | import React from 'react';
import PropTypes from 'prop-types';
import serialize from 'serialize-javascript';
import filterWithRules from '../../../../../shared/utils/objects/filterWithRules';
import { getConfig } from '../../config';
const values = getConfig();
// Filter the config down to the properties that are all... |
src/common/EmptyView/EmptyViewDouble.js | Syncano/syncano-dashboard | import React from 'react';
import { FontIcon, RaisedButton } from 'material-ui';
const EmptyViewDouble = ({
title,
description,
iconClassName,
iconColor,
leftIconType,
rightIconType,
handleClickRightButton,
handleClickLeftButton,
labelButtonLeft,
labelButtonRight
}) => {
const styles = {
con... |
src/components/exercises/LetterRotated.stories.js | cognostics/serlo-abc | import React from 'react';
import { storiesOf } from '@storybook/react-native';
import LetterRotated from './LetterRotated';
storiesOf('exercises/LetterRotated', module)
.add('difficulty level 1', () => (
<LetterRotated
letters={['a', 'N', 'E']}
rotated={[4]}
angles={['50deg']}
difficult... |
src/ModalBody.js | PeterDaveHello/react-bootstrap | import React from 'react';
import classnames from 'classnames';
class ModalBody extends React.Component {
render() {
return (
<div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalBody.propTypes = {
/**
... |
src/widgets/codes-lists/components/codes-lists.spec.js | Zenika/Pogues | import React from 'react';
import { shallow } from 'enzyme';
import CodesLists from './codes-lists';
import CodesListsCodes from './codes-lists-codes';
import { WIDGET_CODES_LISTS } from 'constants/dom-constants';
import { CODES_LIST_INPUT_ENUM } from 'constants/pogues-constants';
const { PANEL_CLASS } = WIDGET_CODE... |
src/EmptyRadar.js | shauns/react-d3-radar | // @flow
import React from 'react';
import RadarAxis from './RadarAxis';
import RadarRings from './RadarRings';
import type {RadarVariable} from './types';
import {radiusScales, forEachArray} from './utils';
type Props = {
width: number,
height: number,
padding: number,
variables: Array<RadarVariable>,
domai... |
src/views/Blocks/Clock.js | abachman/my-new-tab | import React from 'react'
import PropTypes from 'prop-types'
import { GridBlockWrapper } from './Base'
import formatDate from '../../lib/formatDate'
import '../../stylesheets/Clock.css'
class Clock extends React.Component {
static propTypes = {
block: PropTypes.object.isRequired
}
state = {
time: new... |
src/components/common/svg-icons/editor/format-shapes.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatShapes = (props) => (
<SvgIcon {...props}>
<path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-... |
fields/types/date/DateColumn.js | asifiqbal84/keystone | import React from 'react';
import moment from 'moment';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var DateColumn = React.createClass({
displayName: 'DateColumn',
propTypes: {
col: React.PropTypes.object,
... |
examples/huge-apps/routes/Grades/components/Grades.js | nhunzaker/react-router | import React from 'react'
class Grades extends React.Component {
render() {
return (
<div>
<h2>Grades</h2>
</div>
)
}
}
export default Grades
|
app/containers/App/index.js | nguyenduong127/kong-dashboard | /**
*
* App
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*/
import React from 'react';
import Helmet from 'react-helmet';
import styled from 'styled-components';
import Header from 'components/Header';
import F... |
js/components/blankPage/index.js | laurar07/onMy6 |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Text, Button, Icon } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import { popRoute } from '../../actions/route';
import styles from './styles';
class BlankPage exten... |
src/entypo/Foursquare.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--Foursquare';
let EntypoFoursquare = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M4.92,1C4.412,1,4,1.412,4,1.92v16.516c0,0.625,0.765,0.926,1.192,0.47l4.471-4.79C9.731,14.042,... |
src/components/Notification/Notification.js | carbon-design-system/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 PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import { settings } from '... |
example/react-todo/index.js | justinjung04/treeful | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Treeful from '../../src/treeful';
import './index.scss';
import TodoController from './components/todo-controller';
import Todo from './components/todo';
class App extends Component {
constructor () {
super();
Treeful.dev();
Tre... |
src/components/app.js | jvstrpv/reactredux_2 | import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
</div>
);
}
}
|
src/components/Status.js | greg5green/isrobhomeyet | import React from 'react';
import {isHereNow} from '../services/status';
class Status extends React.Component {
constructor(props) {
super(props);
this.state = this.getRobStatusObject();
}
componentDidMount() {
this.updateInterval = setInterval(() => this.updateStatusText(), 1000);
}
componen... |
components/__tests__/RadioButton-test.js | hellobrian/carbon-components-react | import React from 'react';
import RadioButton from '../RadioButton';
import { mount } from 'enzyme';
const render = (props) => mount(
<RadioButton
{...props}
className="extra-class"
name="test-name"
value="test-value"
/>
);
describe('RadioButton', () => {
describe('renders as expected', () => {
... |
src/app/index.js | ucokfm/admin-lte-react | import { AppContainer } from 'react-hot-loader';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
const rootEl = document.getElementById('root');
ReactDOM.render(
<AppContainer>
<App />
</AppContainer>,
rootEl
);
if (module.hot) {
module.hot.accept('./App', () => {
... |
src/client/devTools.js | cle1994/personal-website | /* ==========================================================================
* ./src/server/devtools.js
*
* DevTools Container
* ========================================================================== */
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-d... |
src/svg-icons/device/signal-cellular-connected-no-internet-3-bar.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M17 22V7L2 22h15zm3-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/>
</SvgIcon>
);
Devic... |
__tests__/components/Sidebar-test.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import renderer from 'react-test-renderer';
import Sidebar from '../../src/js/components/Sidebar';
// needed because this:
// https://github.com/facebook/jest/issues/1353
jest.mock('react-dom');
describe('Sidebar', () =>... |
geonode/contrib/monitoring/frontend/src/components/organisms/error-detail/index.js | kartoza/geonode | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Tabs, Tab } from 'material-ui/Tabs';
import HoverPaper from '../../atoms/hover-paper';
import styles from './styles';
import actions from './actions';
const mapStateToProps = (state) => ({
errorDetails: st... |
src/apps/home/root.component.js | raquel/cuddly-tribble | import React from 'react';
import Technology from './technology.component.js';
import Walkthroughs from './walkthroughs.component.js';
import {getBorder, showFrameworkObservable} from '../common/colored-border';
export default class HomeRoot extends React.Component {
constructor() {
super();
this.state = {
fra... |
app/components/transactions/AmountInput.js | jpsierens/budget | // @flow
import React from 'react';
type Props = {
value: String,
onInputChange: () => void
}
const AmountInput = ({ onInputChange, value } : Props) => {
let input;
return (
<div>
<label>Amount</label>
<input
type="text"
ref={(e) => { input ... |
src/components/ToolbarCallButton/ToolbarCallButton.js | dialogs/dialog-web-components | /*
* Copyright 2019 dialog LLC <info@dlg.im>
* @flow
*/
import React from 'react';
import classNames from 'classnames';
import Icon from '../Icon/Icon';
import styles from './ToolbarCallButton.css';
export type Props = {
className?: string,
disabled: boolean,
onClick: (event: SyntheticMouseEvent<>) => mixed,... |
src/App.js | serban-petrescu/serban-petrescu.github.io | import React, { Component } from 'react';
import data from './data';
import Hero from './hero/Hero';
import Introduction from './intro/Introduction';
import Footer from './footer/Footer';
import Highlights from './intro/Highlights';
import ExperienceList from './experience/ExperienceList';
import GalleryModal from './... |
frontend/test/app/components/MainInstallButton-test.js | 6a68/testpilot | import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import MainInstallButton from '../../../src/app/components/MainInstallButton';
describe('app/components/MainInstallButton', () => {
let subject, props;
beforeEach(() => {
props = {
rest... |
client/containers/Home/HomeContainer.js | Moises404/rapbot | import React from 'react'
import PostApp from '../../components/PostApp/PostApp'
class HomeContainer extends React.Component {
static displayName = 'HomeContainer'
render() {
return (
<div className="Home">
<PostApp {...this.props}/>
</div>
)
}
}
export default HomeContainer
|
src/demos/custom-layers/4-custom-attribute/root.js | uber-common/vis-academy | import React from 'react';
import {render} from 'react-dom';
import App from './src/app';
const element = document.getElementById('root');
render(<App />, element);
if (module.hot) {
module.hot.accept('./src/app', () => {
const Next = require('./src/app').default;
render(<Next />, element);
});
}
|
webapp/src/lib/form/FormFieldContainer.js | cpollet/itinerants | import React from 'react';
class FormFieldContainer extends React.Component {
onChange(event) {
if (typeof event.target.selectedOptions !== 'undefined') {
let value = [];
for (let i = 0; i < event.target.selectedOptions.length; i++) {
value.push(event.target.selected... |
src/components/main.component.js | MichelLosier/cardspace | import React from 'react';
import { Route, Link } from 'react-router-dom';
import RoomLobby from './rooms/room-lobby.component';
import UserService from '../services/user.service';
import UserEntry from './user/user-entry.component';
import Room from './rooms/room.component';
import '../main.css';
const User$ = new... |
mxcube3/ui/components/SampleView/MotorInput.js | amilan/mxcube3 | import React from 'react';
import cx from 'classnames';
import { Button } from 'react-bootstrap';
import PopInput from '../PopInput/PopInput';
import './motor.css';
export default class MotorInput extends React.Component {
constructor(props) {
super(props);
this.handleKey = this.handleKey.bind(this);
th... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | choy1379/MoonEDM | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
src/svg-icons/navigation/more-vert.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationMoreVert = (props) => (
<SvgIcon {...props}>
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"... |
modules/__tests__/Router-test.js | arbas/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createHistory from 'history/lib/createMemoryHistory'
import Router from '../Router'
import Route from '../Route'
describe('Router', function () {
let node
beforeEach(function () {
node = document.... |
addons/themes/txt/layouts/Blog.js | rendact/rendact | import $ from 'jquery'
import React from 'react';
import gql from 'graphql-tag';
import {graphql} from 'react-apollo';
import moment from 'moment';
import {Link} from 'react-router';
import scrollToElement from 'scroll-to-element';
let Blog = React.createClass({
componentDidMount(){
require('../assets/css/main.c... |
packages/material-ui-icons/src/PinDrop.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PinDrop = props =>
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z" />
</SvgIcon>;
Pi... |
src-example/components/molecules/Field/index.js | SIB-Colombia/biodiversity_catalogue_v2_frontend | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { Label, Input, Block } from 'components'
const Error = styled(Block)`
margin: 0.5rem 0 0;
`
const Wrapper = styled.div`
margin-bottom: 1rem;
input[type="checkbox"],
input[type="radio"] {
margin-rig... |
src/docs/components/headline/HeadlineExamplesDoc.js | karatechops/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Headline from 'grommet/components/Headline';
import InteractiveExample from '../../../components/InteractiveExample';
const PROPS_SCHEMA = {
strong: { value: true },
size: { options: ['small', 'me... |
src/svg-icons/image/edit.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageEdit = (props) => (
<SvgIcon {...props}>
<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>
... |
senic_hub/setup_app/components/SelectComponentDevices.js | grunskis/nuimo-hub-backend | import React from 'react'
import { Text } from 'react-native'
import { Button } from 'react-native-elements'
import Screen from './Screen'
import Settings from '../Settings'
export default class AddComponent extends Screen {
constructor(props) {
super(props)
this.setNavigationButtons([], [{
'title': "... |
examples/src/components/Creatable.js | dmatteo/react-select | import React from 'react';
import Select from 'react-select';
var CreatableDemo = React.createClass({
displayName: 'CreatableDemo',
propTypes: {
hint: React.PropTypes.string,
label: React.PropTypes.string
},
getInitialState () {
return {
multi: true,
multiValue: [],
options: [
{ value: 'R', labe... |
src/DropdownButton.js | pombredanne/react-bootstrap | import React from 'react';
import Dropdown from './Dropdown';
import omit from 'lodash-compat/object/omit';
import pick from 'lodash-compat/object/pick';
import Button from './Button';
class DropdownButton extends React.Component {
render() {
let { bsStyle, bsSize, disabled } = this.props;
let { title, chil... |
client/src/App.js | CrashsLanding/petfinder-searcher | import React, { Component } from 'react';
import FacetContainer from './Components/FacetContainer/FacetContainer';
import AnimalContainer from './Components/AnimalContainer/AnimalContainer';
import axios from 'axios';
import config from './config';
import './App.css';
import _ from 'lodash';
class App extends Componen... |
src/stores/CountryDefsStore.js | alexmasselot/medlineGeoWebFrontend | import React from 'react';
import {EventEmitter} from 'events';
import assign from 'object-assign';
import httpClient from '../core/HttpClient';
import dispatcher from '../core/Dispatcher';
import Constants from '../constants/Constants';
import BaseStore from './BaseStore'
import _ from 'lodash';
import topojsonWorld... |
test/helpers/shallowRenderHelper.js | andresin87/enAlquiler | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/components/subjects/BookSubjectItem.js | great-design-and-systems/cataloguing-app | import FontAwesome from 'react-fontawesome';
import { LABEL_REMOVE } from '../../labels/';
import { Link } from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import { toReadableSubject } from '../../utils/';
export const BookSubjectItem = ({ subject, removeSubject, index }) => {
re... |
src/components/SvgIcons/WhatsApp/index.js | RaphaelHaettich/werwolfga.me | import React from 'react';
import SvgIcon from 'material-ui/SvgIcon';
/* eslint-disable max-len*/
// SVG d Path | eslint disa
const icon = `M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-... |
src/components/exercises/MatchImage.stories.js | cognostics/serlo-abc | import React from 'react';
import { storiesOf } from '@storybook/react-native';
import MatchImage from './MatchImage';
storiesOf('exercises/MatchImage', module).add('Apfel', () => (
<MatchImage
images={[
require('../../assets/images/affe.jpg'),
require('../../assets/images/esel.jpg'),
require(... |
app/javascript/src/client/pages/not_found.js | rringler/billtalk | import React, { Component } from 'react';
export default class NotFound extends Component {
render() {
return <h1>404 <small>Not Found :(</small></h1>;
}
}
|
src/GhostButton/__tests__/GhostButton.web.js | Fineighbor/ui-kit | /* eslint-env jest */
import 'jest-styled-components'
import React from 'react'
import { shallow } from 'enzyme'
import GhostButton from '../index.js'
describe('GhostButton.web', () => {
it('renders a snapshot', () => {
const wrapper = shallow(
<GhostButton>Apple</GhostButton>
)
expect(wrapper).toM... |
packages/react-server-website/middleware/PageFooter.js | emecell/react-server | import React from 'react';
import Footer from '../components/Footer';
export default class PageFooter {
getElements(next) {
return next().concat(<Footer />);
}
}
|
frontend/jqwidgets/jqwidgets-react/react_jqxdragdrop.js | liamray/nexl-js | /*
jQWidgets v5.7.2 (2018-Apr)
Copyright (c) 2011-2018 jQWidgets.
License: https://jqwidgets.com/license/
*/
import React from 'react';
const JQXLite = window.JQXLite;
export const jqx = window.jqx;
export default class JqxDragDrop extends React.Component {
componentDidMount() {
let options = this.manag... |
src/components/buttons/RaisedButton.js | tuckerconnelly/carbon-ui | import React from 'react'
import PropTypes from 'prop-types'
import Uranium from 'uranium'
import Color from 'color'
import {
TouchableRipple,
Body2,
Breakpoints,
Colors,
Elevation,
connectTheme,
} from '../../index'
/**
* Raised buttons behave like a piece of material resting on another sheet –
* the... |
src/js/components/mobile_list.js | wangi4myself/myFirstReactJs | import React from 'react';
import {Row,Col} from 'antd';
import {Router, Route, Link, browserHistory} from 'react-router'
export default class MobileList extends React.Component {
constructor() {
super();
this.state = {
news: ''
};
}
componentWillMount() {
var myFetchOptions = {
method: 'GET'
};
fe... |
web/components/shared/Button/cosmos.decorator.js | skidding/flatris | // @flow
import React from 'react';
import { GameContainerMock } from '../../../mocks/GameContainerMock';
export default ({ children }: { children: React$Node }) => (
<GameContainerMock cols={4} rows={2}>
{children}
</GameContainerMock>
);
|
docs/src/examples/modules/Dropdown/Types/DropdownExampleInline.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const friendOptions = [
{
key: 'Jenny Hess',
text: 'Jenny Hess',
value: 'Jenny Hess',
image: { avatar: true, src: '/images/avatar/small/jenny.jpg' },
},
{
key: 'Elliot Fu',
text: 'Elliot Fu',
value: 'Elliot Fu',
... |
src/components/Sidebar/index.js | RodgerLai/nodejs-nedb-excel | import React from 'react';
import {Link} from 'react-router';
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {Menu, Icon} from 'antd';
import Logo from '../Logo';
import Logger from '../../utils/Logger';
import items from 'menu.js'; // 由于webpack中的设置, 不用写完整路径
import globalConfig fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.