path stringlengths 5 304 | repo_name stringlengths 6 79 | content stringlengths 27 1.05M |
|---|---|---|
dispatch/static/manager/src/js/components/fields/TextField.js | ubyssey/dispatch | import React from 'react'
import { TextAreaInput } from '../inputs'
export default function TextField(props) {
return (
<TextAreaInput
placeholder={props.field.label}
value={props.data || ''}
rows='5'
onChange={e => props.onChange(e.target.value)} />
)
}
|
meteor/imports/ui/components/ChartTags.js | globeandmail/chart-tool | import React, { Component } from 'react';
import { Meteor } from 'meteor/meteor';
import slug from 'slug';
import Tags from '../../api/Tags/Tags';
import { Creatable as Select } from 'react-select';
import { withTracker } from 'meteor/react-meteor-data';
import { arrayDiff } from '../../modules/utils';
class ChartTags... |
src/Button/__tests__/Button.web.js | Fineighbor/ui-kit | /* eslint-env jest */
import 'jest-styled-components'
import React from 'react'
import { shallow } from 'enzyme'
import Button from '../index.js'
describe('Button.web', () => {
it('renders a snapshot', () => {
const wrapper = shallow(
<Button>Apple</Button>
)
expect(wrapper).toMatchSnapshot()
})
... |
react/exercises/part_05/src/index.js | jsperts/workshop_unterlagen | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import './index.css';
import AppContainer from './containers/App';
import { getContacts } from './actions';
import store from './store';
store.dispatch(g... |
src/svg-icons/action/toc.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionToc = (props) => (
<SvgIcon {...props}>
<path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"/>
</SvgIcon>
);
ActionToc = pure(ActionToc);
ActionToc.displa... |
test/WellSpec.js | collinwu/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Well from '../src/Well';
describe('Well', function () {
it('Should output a well with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Well>
<strong>Content</strong>
</Well>
... |
pootle/static/js/admin/components/ItemTable.js | ta2-1/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 React from 'react';
import ItemTableRow from './It... |
src/svg-icons/action/watch-later.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionWatchLater = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"/>
</SvgIcon>
);
ActionWatchLater = pure(Ac... |
examples/gh-pages/components/Distribution.js | broucz/react-inline-grid | import React, { Component } from 'react';
import { Row, Cell } from 'react-inline-grid';
import Code from 'react-embed-code';
import { COLOR } from '../constants';
import Box from './Box';
const { gray, primary } = COLOR;
const strAround = `<Cell> are positioned with space before && between && and after.
`;
const st... |
src/components/Layout.js | bj0rge/bjorge-irc | import React from 'react';
import Header from './common/Header';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {signOut} from '../actions/authActions';
class Layout extends React.Component {
constructor(props, context) {
super(props, context);
}
render() {
const ... |
src/controls/BlockType/__test__/blockControlTest.js | michalko/draft-wyswig | /* @flow */
import React from 'react';
import { expect } from 'chai';
import { mount } from 'enzyme';
import {
EditorState,
convertFromHTML,
ContentState,
} from 'draft-js';
import Block from '..';
import defaultToolbar from '../../../config/defaultToolbar';
import ModalHandler from '../../../event-handler/modal... |
ui/header/index.js | DannyvanderJagt/portfolio | import React from 'react';
import Telescope from 'telescope';
import Config from '../../../portfolio.config';
import Button from '../button';
class Header extends Telescope.Component{
render(){
let image;
if(this.props.image){
image = <img className='background-image' src={this.props.image}/>
}
... |
docs/app/Examples/elements/Header/Types/HeaderExampleContent.js | clemensw/stardust | import React from 'react'
import { Header } from 'semantic-ui-react'
const HeaderExampleContent = () => (
<div>
<Header size='huge'>Huge Header</Header>
<Header size='large'>Large Header</Header>
<Header size='medium'>Medium Header</Header>
<Header size='small'>Small Header</Header>
<Header size=... |
src/components/Footer.js | aengl/sector4-website | import React from 'react';
import './Footer.css';
export const Footer = props => (
<div className='Footer'>
<div className='Footer-copyright'>
The Unknown Artists AB © 2017<br />
info@sector4.life
</div>
<a href='#'><i className='fa fa-instagram'></i></a>
</div>
);
|
wrappers/md.js | jkupcho/eri-blog | import React from 'react'
import PropTypes from 'prop-types'
import 'css/markdown-styles.css'
import Helmet from 'react-helmet'
import { config } from 'config'
export default class Markdown extends React.Component {
static propTypes = {
router: PropTypes.object,
}
render() {
const post = this.props.rout... |
src/components/RadioRow.js | wolfib/sequenceTubeMap | import React, { Component } from 'react';
import { Col, Label, Input, FormGroup } from 'reactstrap';
const colorMap = new Map([
['colorful', 'plainColors'],
['greyscale', 'greys'],
['reds', 'reds'],
['blues', 'blues'],
['pale colors', 'lightColors']
]);
class RadioRow extends Component {
onChange = event ... |
frontend/src/components/ViewTrips/delete-trip-button.js | googleinterns/SLURP | import React from 'react';
import app from '../Firebase/';
import Button from 'react-bootstrap/Button';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as DB from '../../constants/database.js';
const db = app.firestore();
// This constant determines the max number of docs deleted in a batc... |
Tetris/ClientApp/src/components/GameMetaFrame.js | stewie1570/tetris | import React from 'react';
import styled from 'styled-components';
const App = styled.div`
width: 300px;
margin-top: 10px;
`;
const Game = styled.div`
position: relative;
width: 242px;
padding-left: 1px;
padding-bottom: 1px;
`;
export const GameMetaFrame = ({ header, game, scoreBoard, controls, ...otherP... |
modules/gob-web/index.js | hawkrives/gobbldygook | // @flow
import '@babel/polyfill'
import 'typeface-fira-sans'
import './styles/normalize.scss'
import './styles/css-colors.scss'
import './styles/css-variables.scss'
// Include React and react-dom.render
import React from 'react'
import {render} from 'react-dom'
// Include google analytics (in production)
import st... |
docs/src/app/components/pages/discover-more/Showcase.js | mmrtnz/material-ui | import React from 'react';
import Title from 'react-title-component';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import FontIcon from 'material-ui/FontIcon';
import MarkdownElement from '../../MarkdownElement';
import showcaseText from './showcase.md';
con... |
client/node_modules/redux-form/es/ConnectedFields.js | Dans-labs/dariah | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';... |
lens-ui/app/components/QueryDetailResultComponent.js | sriksun/incubator-lens | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not... |
app/routes.js | agrant216/React-Electron-Mtg | // @flow
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
import MtgPage from './containers/MtgPage';
import ModeSelectPage from './containers/ModeSelectPage'... |
frontend/javascript/components/app.component.js | artyomtrityak/letsplay-graphql-sever | import React from 'react';
import Relay from 'react-relay';
class App extends React.Component {
render() {
return (
<div>
<h1>Users list</h1>
<ul>
{this.props.viewer.users.map(user =>
<li key={user.id}>{user.email} (ID: {user.id})</li>
)}
</ul>
... |
src/svg-icons/file/folder.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolder = (props) => (
<SvgIcon {...props}>
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>
</SvgIcon>
);
FileFolder = pure(FileFolder);
FileFolder.d... |
src/create-glamorous.js | robinpowered/glamorous-native | import React from 'react'
import {StyleSheet} from 'react-native'
import {CHANNEL} from './constants'
import getStyles from './get-styles'
import PropTypes from './react-compat'
function prepareStyles(styles) {
return styles.filter(style => {
if (typeof style === 'object') {
return Object.keys(style).lengt... |
examples/complete/material/src/components/FormTextField/FormTextField.js | prescottprue/react-redux-firebase | import React from 'react'
import PropTypes from 'prop-types'
import TextField from '@material-ui/core/TextField'
function FormTextField({
label,
input,
meta: { touched, invalid, error },
...custom
}) {
return (
<TextField
label={label}
placeholder={label}
error={touched && invalid}
... |
src/react/components/EditableComponentList/EditableComponentList.component.js | formtools/core | import React, { Component } from 'react';
import styles from './EditableComponentList.scss';
import ComponentList from '../ComponentList/ComponentList';
import { Checkmark } from '../Icons';
import { Pills, Pill } from '../Pills/Pills.component';
// displays an editable list of components for a single section ('modul... |
examples/Chips.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Row from '../src/Row';
import Col from '../src/Col';
import Chip from '../src/Chip';
import Tag from '../src/Tag';
export default
<Row>
<Col s={12}>
<Chip>
<image src='assets/yuna.jpg' alt='Contact Person' />
Jane Doe
</Chip>
<Tag>tag</Tag>
</Col>
</Row>;
|
03. AMD and SystemJS/demos/2. loopgifs-demo/jspm_packages/es6-module-loader.src.js | SimoPrG/JavaScript-Applications | !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u... |
webpack/__mocks__/foremanReact/components/common/EmptyState.js | johnpmitsch/katello | import React from 'react';
const EmptyState = props => (
<div>
{`EmptyState: ${JSON.stringify(props)}`}
</div>
);
export default EmptyState;
|
ajax/libs/3Dmol/1.0.3/3Dmol-min.js | redmunds/cdnjs | (function(r,n){function wa(a){var b=a.length,d=c.type(a);return c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||"function"!==d&&(0===b||"number"===typeof b&&0<b&&b-1 in a)}function Qb(a){var b=Sa[a]={};c.each(a.match(O)||[],function(a,c){b[c]=!0});return b}function Ta(a,b,d,e){if(c.acceptData(a)){var f=c.expando,g="... |
assets/js/vendor/jquery-1.9.1.min.js | Delvis/delvis.github.io | /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return... |
src/components/ModalSelectionList.js | JacksonBates/pair-frontend | import React from 'react';
import ModalSelection from './ModalSelection';
const ModalSelectionList = props => {
const modalSelections = props.modalSelections.map(selection => <ModalSelection title={selection} handleChange={props.handleChange} key={selection}/>)
return (
<fieldset>
<legend htmlFor="setup[... |
src/index.js | GTyexing/react-start-kit | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
js/App/Components/Schedule/Device.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
assets/jqwidgets/demos/react/app/scheduler/dataexport/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
this.refs.myScheduler.ensureAppointmentVis... |
src/index.js | thehackerati/react-app-template | 'use strict';
require("react-hot-loader/patch");
import React from 'react'
import ReactDOM from 'react-dom'
import {AppContainer} from 'react-hot-loader'
import configureStore from './store/configureStore'
import Root from './containers/Root'
const store = configureStore();
const rootElement = document.getElementByI... |
src/svg-icons/communication/no-sim.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationNoSim = (props) => (
<SvgIcon {...props}>
<path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.... |
FTP_Downloads/09132013/www/wp-content/plugins/jetpack/modules/sharedaddy/sharing.js | elderdaffodil/brandtberntson | var WPCOMSharing = {
done_urls : [],
get_counts : function( url ) {
if ( 'undefined' != typeof WPCOMSharing.done_urls[ WPCOM_sharing_counts[ url ] ] )
return;
if ( jQuery( '#sharing-facebook-' + WPCOM_sharing_counts[ url ] ).length )
jQuery.getScript( 'https://api.facebook.com/method/fql.query?query=' + en... |
src/components/offcanvas/OffcanvasContext.js | ProAI/react-essentials | import React from 'react';
const OffcanvasContext = React.createContext();
OffcanvasContext.displayName = 'OffcanvasContext';
export default OffcanvasContext;
|
src/Editor.js | AllenFang/react-bootstrap-table | import Utils from './util';
import React from 'react';
const editor = function(editable, attr, format, editorClass, defaultValue, ignoreEditable, row) {
if (editable === true ||
(editable === false && ignoreEditable) ||
typeof editable === 'string') { // simple declare
const type = editable ? 'text' : ed... |
docs/app/Examples/elements/Header/Content/HeaderExampleSubheaderProp.js | ben174/Semantic-UI-React | import React from 'react'
import { Header } from 'semantic-ui-react'
const HeaderExampleSubheaderProp = () => (
<Header as='h2' content='Account Settings' subheader='Manage your account settings and set email preferences' />
)
export default HeaderExampleSubheaderProp
|
pages/api/chip.js | AndriusBil/material-ui | // @flow
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './chip.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
webpack/components/FHIRDoc.js | CDCgov/SDP-Vocabulary-Service | import React, { Component } from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
export default class FHIRDoc extends Component {
render() {
return (
<Grid>
<Row className="basic-bg">
<Col md={12}>
<div className="showpage_header_container no-print">
<... |
src/lib/NodeOutputList.js | lightsinthesky/react-node-graph | import React from 'react';
import NodeOutputListItem from './NodeOutputListItem';
export default class NodeOutputList extends React.Component {
onMouseDown(i) {
this.props.onStartConnector(i);
}
render() {
let i = 0;
return (
<div className="nodeOutputWrapper">
<ul className="nodeOutputList">
... |
src/shelf_chart.js | AnkoNako/MyReads | import React, {Component} from 'react';
import BookChart from './book_chart.js';
import {PropTypes} from 'prop-types';
class ShelfChart extends Component{
render(){
return (
<div>
<div className="chart-label">{this.props.title}</div>
<div className="chart-books">... |
openex-front/src/components/UserField.js | Luatix/OpenEx | import React, { Component } from 'react';
import * as R from 'ramda';
import { PersonOutlined } from '@mui/icons-material';
import Box from '@mui/material/Box';
import withStyles from '@mui/styles/withStyles';
import { connect } from 'react-redux';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mu... |
browser/app/js/components/ObjectsList.js | rushenn/minio | /*
* Minio Cloud Storage (C) 2016 Minio, Inc.
*
* 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... |
client/src/frontend/components/collecting/reading-group/edit/CollectionEditor/SortableCategories/parts/CategoryEdit.js | ManifoldScholar/manifold | import React from "react";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
import Form from "global/components/form";
import FormContainer from "global/containers/form";
import { readingGroupsAPI, requests } from "api";
function CategoryEdit({ category, groupId, onSuccess, onCancel ... |
index.js | sonnylazuardi/react-native-credit-card | 'use strict';
import React from 'react';
const {
PropTypes,
Component
} = React;
import Payment from 'payment';
import FlipCard from 'react-native-flip-card';
import {
View,
TouchableOpacity,
Text,
StyleSheet,
Platform,
Image
} from 'react-native';
const images = require('./card-image... |
view/frontend/preact/src/component/Map.js | pandagrouppl/StoreLocator | import React from 'react';
import { h, Component } from 'preact';
import camelize from './../util/Camelize';
const mapStyles = {
container: {
position: 'absolute',
width: '100%',
height: '100%',
},
map: {
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
top: 0,
},
};
const evtNames = [
'ready'... |
packages/cf-component-modal/test/ModalBody.js | manatarms/cf-ui | import React from 'react';
import renderer from 'react-test-renderer';
import { ModalBody } from 'cf-component-modal';
test('should render', function() {
const component = renderer.create(<ModalBody>ModalBody</ModalBody>);
expect(component.toJSON()).toMatchSnapshot();
});
|
UI/src/router.js | ssvictorlin/PI | import React from 'react';
import { StackNavigator } from 'react-navigation';
import { Icon } from 'react-native-elements';
import Friends from './components/Friends';
import FriendDetail from './components/FriendDetail';
import Groups from './components/Groups';
import GroupDetail from './components/GroupDetail';
impo... |
src/core/resourceErrors/decorator.js | squarewave/addons-frontend | /* eslint-disable react/prop-types */
import React from 'react';
import { compose } from 'redux';
import { connect } from 'react-redux';
import { getReduxConnectError } from './reduxConnectErrors';
/*
* Display resource errors such as a 404, 500, etc.
*
* Currently, the only way to produce a resource error is if ... |
js/views/login/LoginView.js | n8e/memoirs | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay';
import { Grid, Row, Col, FormGroup, Checkbox, Panel, Alert } from 'react-bootstrap';
import { Link, hashHistory } from 'react-router';
import FRC from 'formsy-react-components';
import LoginMutation from '../.... |
src/components/concent/steps/Step1.js | golemfactory/golem-electron | import React from 'react';
import Lottie from 'react-lottie';
import animData from './../../../assets/anims/Concent01';
const defaultOptions = {
loop: false,
autoplay: true,
animationData: animData,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
};
export default class Step1... |
examples/huge-apps/routes/Course/routes/Announcements/components/Announcements.js | apoco/react-router | import React from 'react';
class Announcements extends React.Component {
render () {
return (
<div>
<h3>Announcements</h3>
{this.props.children || <p>Choose an announcement from the sidebar.</p>}
</div>
);
}
}
export default Announcements;
|
src/js/components/nodes/NodesListView/NodeExtendedInfo.js | knowncitizen/tripleo-ui | /**
* Copyright 2017 Red Hat Inc.
*
* 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 agreed to... |
packages/reactor-kitchensink/src/examples/Panels/BasicPanels/BasicPanels.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { Container, Panel, Button } from '@extjs/ext-react';
import { shortText, mediumText } from '../../dummy';
Ext.require('Ext.Toast');
function toolHandler(owner, tool) {
Ext.toast(`You clicked ${tool.config.type || 'a custom tool'}.`);
}
export default class BasicP... |
docs/src/layouts/wrapper.js | mcanthony/nuclear-js | import React from 'react'
import { BASE_URL } from '../globals'
const PRISM_PATH = BASE_URL + 'assets/js/prism.js'
const CSS_PATH = BASE_URL + 'assets/css/output.css'
const JS_PATH = BASE_URL + 'app.js'
const GA_SCRIPT = `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[])... |
scripts/components/result/details/xrefs/formatXrefsForGene.js | warelab/gramoogle | import React from 'react';
import _ from 'lodash';
import dbxrefs from 'gramene-dbxrefs';
import Xref from './Xref.jsx';
export default function formatXrefsForGene(gene) {
if(!gene || !_.isArray(gene.xrefs)) {
throw new Error("No xrefs for " + _.get(gene._id));
}
return _(gene.xrefs)
.keyBy('db')
.p... |
modules/Link.js | dmitrigrabov/react-router | import React from 'react'
import warning from 'warning'
const { bool, object, string, func } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
}
function isEmptyObject(obj... |
app/javascript/mastodon/features/ui/index.js | rutan/mastodon | import classNames from 'classnames';
import React from 'react';
import { HotKeys } from 'react-hotkeys';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import NotificationsContai... |
Libraries/StyleSheet/LayoutPropTypes.js | Maxwell2022/react-native | /**
* 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.
*
* @provides... |
vj4/ui/components/scratchpad/ScratchpadPretestTabPaneContainer.js | vijos/vj4 | import React from 'react';
import { connect } from 'react-redux';
import i18n from 'vj/utils/i18n';
import DataInput from './DataInputComponent';
const mapStateToProps = state => ({
data: state.pretest.data,
});
const mapDispatchToProps = dispatch => ({
handleDataChange(id, type, value) {
dispatch({
ty... |
packages/material-ui-icons/src/AirportShuttleTwoTone.js | Kagami/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M3 14h.78c.55-.61 1.34-1 2.22-1s1.67.39 2.22 1h7.56c.55-.61 1.34-1 2.22-1s1.67.39 2.22 1H21v-2H3v2z" opacity=".3" /><path d="M17 5H3c-1.1 0-2 .8... |
docs/src/pages/demos/badges/BadgeVisibility.hooks.js | Kagami/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/styles';
import Badge from '@material-ui/core/Badge';
import MailIcon from '@material-ui/icons/Mail';
import Switch from '@material-ui/core/Switch';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/Fo... |
02_ReactIntroduction/Code/start/app/components/StorePane.js | joacoleonelli/react-zerotohero | import React from 'react';
import Store from './Store'
import autoBind from 'react-autobind';
class StorePane extends React.Component {
constructor(props) {
super(props);
autoBind(this);
}
renderStore(store){
return <Store key={store} index={store} details={this.props.stores[store]} />;
}
rende... |
node_modules/exponent/src/registerRootComponent.js | 15chrjef/mobileHackerNews | // @flow
import React from 'react';
import { AppRegistry, StyleSheet } from 'react-native';
import Constants from './Constants';
import { processFontFamily } from './Font';
import Notifications from './Notifications';
function wrapWithExponentRoot(AppRootComponent: ReactClass<{}>) {
class ExponentRootComponent ext... |
app/components/common/footerDep/index.js | liujia14/mayi | /*
name: footerDep
desc: 首页底部部门展示组件
author: 俞雅菲
version:v1.0
*/
import React from 'react';
import ReactDOM from 'react-dom';
import './../commonCss/index.less';
import './index.less';
import QueueAnim from 'rc-queue-anim'; //淡入淡出动画
export default class FooterDep extends React.Component {
constructor(props) {
su... |
src/svg-icons/maps/directions-car.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsCar = (props) => (
<SvgIcon {...props}>
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1... |
app/components/StaticMap.js | mapbox/osm-comments | import React from 'react';
const StaticMap = React.createClass({
render: function() {
var config = this.props.config;
var lat = this.props.lat;
var lng = this.props.lng;
var zoom = this.props.zoom;
var mapURL = config.STATIC_MAPS_BASE + lng + "," + lat + ',' + zoom + '/500x... |
node_modules/react/lib/createClass.js | charmainetham/charmainetham.github.io | /**
* Copyright 2013-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.
*
*/
'use strict... |
test/input.js | woshisbb43/coinMessageWechat | import React from 'react';
import { shallow } from 'enzyme';
import assert from 'assert';
import WeUI from '../src/index';
const {Input} = WeUI;
describe('<Input></Input>', ()=> {
[undefined, null, 'custom_class'].map(clazz => {
describe(`<Input className=${clazz}></Input>`, ()=> {
const wrapp... |
src/components/shared/Price.js | Terrapin-Ticketing/althea | import React from 'react';
let price = ({ price }) =>
<span>${parseFloat(price / 100.0).toFixed(2)}</span>;
export default price;
|
wp-content/plugins/liveblog/src/react/Editor/Editor.js | MinnPost/minnpost-wordpress | /* eslint-disable no-return-assign */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import 'draft-js/dist/Draft.css';
import {
Editor,
RichUtils,
} from 'draft-js';
import {
parseTemplate,
getTriggerRange,
hasEntityAtSelection,
getTopPosition,
focusableBlockIsSelected,
}... |
src/utils/Link.js | companyjuice/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import invariant from 'react/lib/invariant';
import AppActions from '../actions/AppActions';
function handleClick(event) {
// If not left mouse click
if (event.button !== 0) {
return;
}
// If modified event
if (event.metaKey || e... |
src/svg-icons/notification/airline-seat-legroom-normal.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomNormal = (props) => (
<SvgIcon {...props}>
<path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.... |
ajax/libs/react-native-web/0.14.6/exports/CheckBox/index.js | cdnjs/cdnjs | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbo... |
node_modules/react-bootstrap/es/PagerItem.js | cmccandless/SolRFrontEnd | 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 ... |
ajax/libs/jquery/1.11.0-rc1/jquery.min.js | viskin/cdnjs | /*! jQuery v1.11.0-rc1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof ... |
src/renderers/shared/reconciler/__tests__/ReactComponentLifeCycle-test.js | slongwang/react | /**
* Copyright 2013-2015, 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.
*
* @emails react-co... |
src/components/Pagination/Pagination.js | renegens/blog | // @flow strict
import React from 'react';
import classNames from 'classnames/bind';
import { Link } from 'gatsby';
import { PAGINATION } from '../../constants';
import styles from './Pagination.module.scss';
type Props = {
prevPagePath: string,
nextPagePath: string,
hasNextPage: boolean,
hasPrevPage: boolean
... |
src/js/components/input/input_file.js | working-minds/realizejs | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from '../../prop_types';
import $ from 'jquery';
import i18n from '../../i18n';
import { autobind, mixin } from '../../utils/decorators';
import InputBase from './input_base';
import {
CssClassMixin
} from '../../mixins';
@... |
src/docs/index.js | gabrielcsapo/psychic-ui | import { render } from 'react-dom';
import React from 'react';
import Main from './main.js';
import Layout from './layout.js';
const mountNode = document.querySelector('#root');
render(<Layout>
<Main/>
</Layout>, mountNode);
|
src/collections/Breadcrumb/Breadcrumb.js | aabustamante/Semantic-UI-React | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getUnhandledProps,
getElementType,
META,
SUI,
} from '../../lib'
import BreadcrumbDivider from './BreadcrumbDivider'
import BreadcrumbSection from './BreadcrumbSection'
/... |
src/components/Footer/Footer.js | Light1c3/ResumeSite | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isomorp... |
node_modules/_rc-tooltip@3.5.0@rc-tooltip/es/Tooltip.js | ligangwolai/blog | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runt... |
packages/insomnia-app/app/ui/components/editors/body/body-editor.js | Atvaark/insomnia | // @flow
import * as React from 'react';
import * as mimes from 'mime-types';
import clone from 'clone';
import autobind from 'autobind-decorator';
import RawEditor from './raw-editor';
import UrlEncodedEditor from './url-encoded-editor';
import FormEditor from './form-editor';
import FileEditor from './file-editor';
i... |
app/counter/componets/RCTLinearGradientView.js | littlethree/DemoProject | /*************************************************************************
* Description: 渐变组件
* Author: raojia
* Mail: raojia@le.com
* Created Time: 2016-12-07
* Modified Time: 2016-12-07
************************************************************************/
'use strict';
import React, { Component, PropTypes... |
src/js/containers/MadLibber/placeholder_input.js | mathjoy/simpleReact | import React from 'react';
export default (props) => {
return (
<input type='text' placeholder={this.props.placeholder} required />
);
}
|
src/views/Playlist/components/Track.js | Gouthamve/BINS-FRONT | import React from 'react'
import { ListGroupItem, Row, Col, Image, Button } from 'react-bootstrap'
import alart from 'img/coverart1.jpg'
const Track = ({ name, album, artist, playing, setCurrent, pauseCurrent}) => {
let playButton = <Button onClick={setCurrent}><i className={`fa fa-play-circle-o fa-2x`}></i></Butto... |
src/js/components/FormFields.js | primozs/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import classnames from 'classnames';
import CSSClassnames from '../utils/CSSClassnames';
const CLASS_ROOT = CSSClassnames.FORM_FIELDS;
export default class FormFields extends Component {
render () {
l... |
dcs-fe/src/components/common/Header.js | chumak84/dance-competition-system | import React from 'react';
import { Link, NavLink } from 'react-router-dom';
const Header = () => {
return (
<nav className="navbar is-primary">
<Link className="navbar-item" to="/">Home</Link>
<Link className="navbar-item" to="/formats">Formats</Link>
<Link ... |
admin/client/App/shared/Portal.js | giovanniRodighiero/cms | /**
* Used by the Popout component and the Lightbox component of the fields for
* popouts. Renders a non-react DOM node.
*/
import React from 'react';
import ReactDOM from 'react-dom';
module.exports = React.createClass({
displayName: 'Portal',
portalElement: null, // eslint-disable-line react/sort-comp
compone... |
ajax/libs/core-js/0.4.1/library.js | x112358/cdnjs | /**
* Core.js 0.4.1
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
*/
!function(returnThis, framework, undefined){
'use strict';
/******************************************************************************
* Module : common ... |
examples/js/style/table-class-table.js | powerhome/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-unused-vars: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
... |
server/server.js | Hashnode/mern-starter | 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';
// Initialize the Express App
const app = new Express();
// Set Development modes checks
c... |
app/javascript/mastodon/components/missing_indicator.js | unarist/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const MissingIndicator = () => (
<div className='regeneration-indicator missing-indicator'>
<div>
<div className='regeneration-indicator__figure' />
<div className='regeneration-indicator__label'>
<FormattedMessage id=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.