path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
lib/components/Main.js | hex13/atom-lupa | "use babel";
import React from 'react';
// TODO this is legacy HTML code. Change to JSX. HTML is not cool anymore.
var html = `<div id='lupa-editor-wrapper'></div>
<div id='lupa-info'></div>
<div style='height: 4px'></div>
<button style='display:none' id='lupa-run'>Run</button>
<button class='btn' id='lupa-refresh'><s... |
docs/static/js/34.a48d4954.chunk.js | yurizhang/ishow | webpackJsonp([34],{198:function(n,e,t){"use strict";function o(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function a(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?n:e}function ... |
docs/app/Examples/elements/Icon/Variations/IconExampleFlipped.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Icon } from 'semantic-ui-react'
const IconExampleFlipped = () => (
<div>
<Icon flipped='horizontally' name='cloud' />
<Icon flipped='vertically' name='cloud' />
</div>
)
export default IconExampleFlipped
|
app/javascript/mastodon/features/list_editor/components/search.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
import classNames from 'classnames';
import Icon from... |
test/integration/css-features/fixtures/browsers-old/pages/_app.js | flybayer/next.js | import App from 'next/app'
import React from 'react'
import './styles.css'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
app/containers/LocaleToggle/index.js | huahuaxiong/console | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { selectLocale } from '../LanguageProvider/selectors';
import { changeLocale } from '../LanguageProvider/actions';
import { appLocales } from '../../i18n';
import { createSelector } from 'reselect';
import styles fr... |
src/main/scripts/modules/sea-siege/react/views/game.js | twuni/sea-siege | import React from 'react';
import View from '../components/view';
import Link from '../components/link';
class GameView extends View {
get serversUrl() {
return `${this.url}/servers`;
}
renderTitle() {
const {model} = this;
const {logoUrl, displayName} = model;
if(logoUrl) {
return <img ... |
app/components/Trees/Visualizer.js | ivtpz/brancher | /* eslint react/no-array-index-key: 0 */
import React, { Component } from 'react';
import jsplumb from 'jsplumb';
import Tree from './Tree';
import { mapConnections } from '../../utils/vertTreeUtils';
import * as styles from '../Home.scss';
export default class Visualizer extends Component {
constructor(props) {
... |
src/js/components/icons/base/PlatformDxc.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
frontend/src/components/forms/fields/projectFields/selectionCriteria/criteriaField.js | unicef/un-partner-portal | import React from 'react';
import PropTypes from 'prop-types';
import SelectForm from '../../../selectForm';
const messages = {
label: 'Criteria',
};
const CriteriaField = (props) => {
const { name, values, fields, index, ...other } = props;
const chosenCriteria = fields.getAll().map(field => field.selection_c... |
docs/app/containers/Components/ComponentView.js | kmees/react-fabric | import React from 'react'
import ReactDOM from 'react-dom'
import cssm from 'react-css-modules'
import { Button } from 'react-fabric'
import { Raw } from '../../components'
import style from './Components.scss'
const EXAMPLE_REGEX = /<!-- EXAMPLE -->/g
const EXAMPLE_HOOK = 'js-load-example'
const EXAMPLE_PLACEHOLDER... |
examples/Debug.js | jaredpalmer/formik | import React from 'react';
import { FormikConsumer } from 'formik';
export const Debug = () => (
<div
style={{
margin: '3rem 1rem',
borderRadius: 4,
background: '#f6f8fa',
boxShadow: '0 0 1px #eee inset',
}}
>
<div
style={{
textTransform: 'uppercase',
font... |
test/MenuItemSpec.js | lo1tuma/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import MenuItem from '../src/MenuItem';
describe('MenuItem', function () {
it('should output an li', function () {
let instance = ReactTestUtils.renderIntoDocument(
<MenuItem>
Title
</MenuItem>
);
assert... |
src/parser/shared/modules/spells/bfa/essences/LucidDreamsRage.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS/index';
import { calculatePrimaryStat } from 'common/stats';
import SpellLink from 'common/SpellLink';
import StatIcon from 'interface/icons/PrimaryStat';
import ItemHealingDone from 'interface/ItemHealingDone';
import STATISTIC_CATEGORY from 'interface/oth... |
test/PageHeaderSpec.js | xuorig/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import PageHeader from '../src/PageHeader';
describe('PageHeader', function () {
it('Should output a div with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<PageHeader>
<strong>Content</str... |
client/blocks/quests/index.js | quarterto/almanac | import React from 'react'
import styled from 'styled-components'
import { compose, branch, withProps } from 'recompact'
import Ornamented from '../../visual/ornamented'
import { withCampaignDate } from '../../data/calendar'
import { withCampaignSession } from '../../data/campaign'
import withCards from '../../data/card... |
src/components/Sidebar/Copyright/Copyright.js | wall3/wall3.github.io | // @flow strict
import React from 'react';
import styles from './Copyright.module.scss';
type Props = {
copyright: string
};
const Copyright = ({ copyright }: Props) => (
<div className={styles['copyright']}>
{copyright}
</div>
);
export default Copyright;
|
src/components/Feedback/Feedback.js | sherlock221/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Feedback.css';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
class Feedback {
render() {
return (
<div className="Feedback">
<div className="Feedba... |
web/src/layout/layerbuttons.js | corradio/electricitymap | import React from 'react';
import { useSelector } from 'react-redux';
import { Link as RouterLink } from 'react-router-dom';
import { useTranslation } from '../helpers/translation';
import { saveKey } from '../helpers/storage';
import {
useWindEnabled,
useSolarEnabled,
useSolarToggledLocation,
useWindToggledLo... |
components/avatar/Avatar.js | rubenmoya/react-toolbox | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { AVATAR } from '../identifiers';
import InjectFontIcon from '../font_icon/FontIcon';
const factory = (FontIcon) => {
const Avatar = ({ alt, children, className, cover, ... |
actor-apps/app-web/src/app/components/common/State.react.js | berserkertdl/actor-platform | import React from 'react';
import { MessageContentTypes } from 'constants/ActorAppConstants';
class State extends React.Component {
static propTypes = {
message: React.PropTypes.object.isRequired
};
render() {
const { message } = this.props;
if (message.content.content === MessageContentTypes.SERVI... |
node_modules/redux-form/es/__tests__/FieldArray.spec.js | victor335882/ReduxSimpleStarter-4 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(ta... |
client/src/js/components/chatbox/ChatboxEmojiBar.js | abitlog/retube | import React from 'react';
import ChatboxEmojiList from './ChatboxEmojiList';
import ChatboxEmojiTab from './ChatboxEmojiTab';
class ChatboxEmojiBar extends React.Component {
static propTypes = {
hidden: React.PropTypes.bool.isRequired,
onEmojiClick: React.PropTypes.func.isRequired,
onOpen: React.PropTy... |
components/VehicleForm.js | dominiktilp/congestion-charge-app | import React from 'react';
import { browserHistory } from 'react-router';
class VehicleForm extends React.Component {
constructor(props) {
super(props);
this.next = this.next.bind(this);
this.validate = this.validate.bind(this);
}
validate() {
if (this.refs.vehicleId.value === '') {
r... |
app/components/d3/index.js | aleksandrenko/apollo-cc | import './style.less';
import React from 'react';
import { select } from 'd3';
import ReactFauxDOM from 'react-faux-dom';
const Component = React.createClass({
render() {
var list = ReactFauxDOM.createElement('ul');
select(list)
.selectAll('li')
.data([1,2,3])
.enter()
.app... |
src/App.js | oPauloChaves/controle-frotas | import React from 'react'
import { HashRouter as Router, Route } from 'react-router-dom'
import Grid from 'react-bootstrap/lib/Grid'
import Row from 'react-bootstrap/lib/Row'
import Col from 'react-bootstrap/lib/Col'
import Header from './Header'
import HomePage from './containers/Home'
import VehicleForm from './conta... |
src/containers/Portfolio/PortfolioPage.js | franciskim722/crypy | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as actions from '../../actions/PortfolioActions';
import './Portfolio.scss';
class PortfolioPage extends React.Component {
constructor(props, context) {
super(pr... |
examples/sidebar/app.js | rubengrill/react-router | import React from 'react'
import { render } from 'react-dom'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
import data from './data'
require('./app.css')
const history = useBasename(createHistory)({
basename: '/sidebar'
})
class Category extends React.Compo... |
src/svg-icons/action/swap-vert.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSwapVert = (props) => (
<SvgIcon {...props}>
<path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/>
</SvgIcon>
);
ActionSwapVert = pure(ActionSwapVert);
ActionSwapVert.displa... |
src/components/Weui/tab/tabbar.js | ynu/res-track-wxe | /**
* Created by n7best
*/
import React from 'react';
import classNames from 'classnames';
export default class TabBar extends React.Component {
render() {
const {children, className, ...others} = this.props;
const cls = classNames({
weui_tabbar: true
}, className);
... |
example/src/components/index.js | nheyn/express-isomorphic-dispatcher | import React from 'react';
import Immutable from 'immutable';
import TodoListHeader from './TodoListHeader';
import TodoListBody from './TodoListBody';
/**
* React Component that render the entire app.
*/
const App = React.createClass({
propTypes: {
dispatcher: React.PropTypes.object.isRequired // Isomorphi... |
src/svg-icons/notification/sms.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSms = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/>
</SvgIcon>
);
NotificationSm... |
docs/src/app/components/pages/customization/StylesOverridingCssExample.js | verdan/material-ui | import React from 'react';
import Checkbox from 'material-ui/Checkbox';
const StylesOverridingCssExample = () => (
<Checkbox
name="StylesOverridingCssExample"
label="Checked the mail"
className="styles-overriding-css-example"
/>
);
export default StylesOverridingCssExample;
|
exts/yapi-plugin-advanced-mock/MockCol/CaseDesModal.js | YMFE/yapi | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Form,
Select,
InputNumber,
Switch,
Col,
message,
Row,
Input,
Button,
Icon,
AutoComplete,
Modal
} from 'antd';
const Option = Select.Option;
const FormItem = Form.Item;
import { safeAssign } from 'client/common... |
examples/async/index.js | abalone0204/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.getElementByI... |
src/svg-icons/action/gavel.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionGavel = (props) => (
<SvgIcon {...props}>
<path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z... |
app/components/HomeComponents/OrderForm.js | hlynn93/basic_ims | import React, { Component } from 'react';
import _ from 'lodash';
import { Search, Input, Form, Button, Label } from 'semantic-ui-react';
const DEFAULT_QUANTITY = 1;
const DECIMAL = 10;
const initialState = {
isLoading: false,
value: '',
results: [],
transaction: {
quantity: DEFAULT_QUANTITY,
price: '... |
templates/rubix/laravel/laravel-example/src/main.js | jeffthemaximum/jeffline | import React from 'react';
import ReactDOM from 'react-dom';
import routes from './routes';
import render, { setRoutes } from '@sketchpixy/rubix/lib/others/router';
import { isBrowser } from '@sketchpixy/rubix';
if (isBrowser()) {
render(routes, () => {
console.log('Completed rendering!');
});
if (module.h... |
src/Avatar/Avatar.spec.js | dsslimshaddy/material-ui | // @flow
import React from 'react';
import { assert } from 'chai';
import { createShallow, getClasses } from '../test-utils';
import CancelIcon from '../svg-icons/cancel';
import Avatar from './Avatar';
describe('<Avatar />', () => {
let shallow;
let classes;
before(() => {
shallow = createShallow({ dive: ... |
docs/src/app/components/FullWidthSection.js | skarnecki/material-ui | import React from 'react';
import ClearFix from 'material-ui/internal/ClearFix';
import spacing from 'material-ui/styles/spacing';
import styleResizable from 'material-ui/utils/styleResizable';
const desktopGutter = spacing.desktopGutter;
const FullWidthSection = React.createClass({
propTypes: {
children: React... |
examples/with-overflow-x/app.js | fisshy/react-scroll | import React, { Component } from 'react';
import { render } from 'react-dom';
import { Element, scrollSpy, Events, Link } from 'react-scroll';
class App extends Component {
constructor() {
super();
this.state = {
name: 'React'
};
}
render() {
return (
<div>
<h1>test </h1>
... |
packages/mcs-lite-ui/src/SpaceTop/SpaceTop.example.js | MCS-Lite/mcs-lite | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import SpaceTop from '.';
storiesOf('SpaceTop', module).add(
'API',
withInfo({
text: 'margin-top',
inline: true,
})(() => <SpaceTop height={20}>SpaceTop content</SpaceTop>),
);
|
src/routes/Home/components/HomeView.js | jeffaustin81/cropcompass-ui | import React from 'react'
import Header from 'components/Header'
import Map from 'components/Map'
import FarmedLand from 'components/FarmedLand'
import FarmInfo from 'components/FarmInfo'
import TopCrops from 'components/TopCrops'
import Subsidies from 'components/Subsidies'
import CropProduction from 'components/CropP... |
src/components/TrackInfo.js | hedgerh/thinkful-react-style-guide | import React from 'react';
export default React.createClass({
propTypes: {
title: React.PropTypes.string,
username: React.PropTypes.string
},
render() {
return (
<div>
<p>{ this.props.title + ' - ' + this.props.username }</p>
</div>
);
}
}); |
packages/reactor-kitchensink/src/examples/PivotGrid/CompactLayout/CompactLayout.js | markbrocato/extjs-reactor | import React, { Component } from 'react';
import { Container, PivotGrid, Toolbar, Button } from '@extjs/reactor/modern';
import { generateData } from '../generateSaleData';
import SaleModel from '../SaleModel';
export default class CompactLayout extends Component {
store = Ext.create('Ext.data.Store', {
m... |
node_modules/react-bootstrap/es/TabContainer.js | lucketta/got-quote-generator | 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 React from 'r... |
app/javascript/flavours/glitch/features/public_timeline/components/column_settings.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
export default @injectIntl
class ColumnSettings extends React.... |
js/components/createArticle/index.js | phamngoclinh/PetOnline_vs2 |
import React, { Component } from 'react';
import { MapView, Image, TextInput, UselessTextInput, Alert, AsyncStorage } from 'react-native';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Text, Button, Icon, Fab, View, T... |
src/js/components/icons/base/Schedule.js | linde12/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/svg-icons/action/subject.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSubject = (props) => (
<SvgIcon {...props}>
<path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/>
</SvgIcon>
);
ActionSubject = pure(ActionSubject);
ActionSubject.displayName = 'Acti... |
public/js/components/profile.js | gonzochic/inox | import React from 'react';
import RestApi from 'public/js/components/restapi';
export default class Profile extends React.Component {
constructor() {
super()
this.state = {follows: []};
}
getProfile() {
RestApi.getDataFromUrl('/profiles/' + this.props.params.id,
(data) => console.log(data));
... |
app/javascript/mastodon/features/compose/index.js | Nyoho/mastodon | import React from 'react';
import ComposeFormContainer from './containers/compose_form_container';
import NavigationContainer from './containers/navigation_container';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { mountCom... |
src/icons/NoEncryptionIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class NoEncryptionIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M42 43.56L8.44 10 6 12.44l4.08 4.08C8.85 17.2 8 18.5 8 20v20c0 2.2 1.8 4 4 4h24c.47 0 .91-.09 1.32-.2... |
lib/src/app.js | SerendpityZOEY/Solr-Search-React-UI | import React from 'react';
import ReactDOM from 'react-dom';
import SolrConnector from 'react-solr-connector';
import Navbar from './navbar.js';
import baseTheme from 'material-ui/styles/baseThemes/lightBaseTheme';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import injectTapEventPlugin from 'react-tap-eve... |
docs/app/Examples/elements/Button/Variations/ButtonExampleSize.js | shengnian/shengnian-ui-react | import React from 'react'
import { Button } from 'shengnian-ui-react'
const ButtonExampleSize = () => (
<div>
<Button size='mini'>
Mini
</Button>
<Button size='tiny'>
Tiny
</Button>
<Button size='small'>
Small
</Button>
<Button size='medium'>
Medium
</Button>
... |
client-portal/custom-widgets/ConditionalField.js | thebestbenjamin/testing-reactjs | import SchemaField from 'react-jsonschema-form/lib/components/fields/SchemaField';
import React from 'react';
//import { transform } from 'babel-core';
//import * as babel2 from 'babel-core';
//var babel = require("babel-core");
//var babel = require("babel-plugin-eval");
//import babel from 'babel-plugin-eval';
expor... |
src/routes.js | aspsoluciones/mcw-client | import React from 'react';
import { Provider } from 'react-redux';
import { Router, Route} from 'react-router'
//ROUTES
import App from './containers/App';
import Public from './containers/Public';
import Dashboard from './containers/Dashboard';
import Login from './containers/Login';
import Forbidden from './containe... |
src/svg-icons/communication/contacts.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationContacts = (props) => (
<SvgIcon {...props}>
<path d="M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s... |
src/widgets/Dropdown/index.js | mydearxym/mastani | /*
*
* Dropdown
*
*/
import React from 'react'
import T from 'prop-types'
import { ICON_CMD } from '@/config'
import { buildLog } from '@/utils/logger'
import { Wrapper, IconWrapper, Icon } from './styles'
/* eslint-disable-next-line */
const log = buildLog('c:Dropdown:index')
const Dropdown = ({ children, siz... |
SQL/client/src/components/dumb/Avatar.js | thebillkidy/MERGE-Stack | import React from 'react';
import Link from 'next/link';
export default class Label extends React.Component {
render() {
return (
<Link href={this.props.href}>
<a className="Avatar">
<style jsx>{`
.Avatar {
... |
node_modules/react-bootstrap/es/NavItem.js | nikhil-ahuja/Express-React | 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 ... |
packages/wix-style-react/src/DragAndDrop/docs/SortableList/SingleAreaListWithAnimation/index.js | wix/wix-style-react | import React from 'react';
import CodeExample from 'wix-storybook-utils/CodeExample';
import Markdown from 'wix-storybook-utils/Markdown';
import SingleAreaListWithAnimationReadme from './SingleAreaListWithAnimationReadme.md';
import SingleAreaListWithAnimation from './SingleAreaListWithAnimation';
import SingleAreaLis... |
node_modules/react-router/es/Switch.js | lousanna/sinatrademo | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
client/src/javascript/components/icons/SeedsIcon.js | jfurrow/flood | import React from 'react';
import BaseIcon from './BaseIcon';
export default class SeedsIcon extends BaseIcon {
render() {
return (
<svg className={`icon icon--seeds ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M47.95,1.4a12.05,12.05,0,0,0-11.78,9.55H23.84A12,12,0,1,0,12.05,25.5... |
assets/scripts/src/components/ModeSwitcher.js | jshjohnson/NumberRush | // React
import React, { Component } from 'react';
class ModeSwitcher extends Component {
render() {
const { modes, changeMode, currentMode } = this.props;
return (
<modeswitcher>
<select className="header__input header__input--select header__input--push-left h... |
src/client/components/common/auth.js | fabriciocolombo/este | import React from 'react';
import {isLoggedIn} from '../../user/store';
// Higher order component.
// https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750
export default function auth(Component) {
return class Auth extends React.Component {
static willTransitionTo(trans... |
js/screens/HomeScreenComponents/Notification.js | ujwalramesh/REHU-discourse | /* @flow */
'use strict'
import React from 'react'
import {
StyleSheet,
Text,
View
} from 'react-native'
class Notification extends React.Component {
render() {
if (this.props.count > 0) {
return (
<View style={styles.container}>
<View style={[styles.number, {backgroundColor: this.... |
docs/app/Examples/elements/Label/Types/LabelExampleRibbonImage.js | clemensw/stardust | import React from 'react'
import { Grid, Image } from 'semantic-ui-react'
const LabelExampleRibbonImage = () => (
<Grid columns={2}>
<Grid.Column>
<Image
fluid
label={{ as: 'a', color: 'black', content: 'Hotel', icon: 'hotel', ribbon: true }}
src='http://semantic-ui.com/images/wiref... |
client/app/app.js | Zuehlke/poinz | import React from 'react';
import {createRoot} from 'react-dom/client';
import {Provider} from 'react-redux';
import log from 'loglevel';
import 'purecss';
import '../node_modules/purecss/build/grids-responsive-min.css';
import './assets/font/poinz.css';
import './assets/font/animation.css';
import appConfig from './... |
react/TimeIcon/TimeIcon.iconSketch.js | seekinternational/seek-asia-style-guide | import React from 'react';
import TimeIcon from './TimeIcon';
export const symbols = {
'TimeIcon': <TimeIcon />,
'TimeIcon -> Recent': <TimeIcon recent={true} />,
'TimeIcon -> Filled': <TimeIcon filled={true} />
};
|
src/modules/ChatTabs/component.js | svmn/ace-rx | import React from 'react';
import PropTypes from 'prop-types';
import { Tabs, Tab } from 'material-ui/Tabs';
function ChatTabs({ tabs, chooseChat, currentChat }) {
return (
<Tabs className='chat-tabs' onChange={chooseChat} value={currentChat}>
{
tabs.map(({ code, label }, index) =>
<Tab ... |
docs/src/app/components/pages/components/TextField/ExampleDisabled.js | frnk94/material-ui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleDisabled = () => (
<div>
<TextField
disabled={true}
hintText="Disabled Hint Text"
/><br />
<TextField
disabled={true}
id="text-field-disabled"
defaultValue="Disabled Value"
/>... |
src/mixins/helpers.js | tarkanlar/react-slick | 'use strict';
import React from 'react';
import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
var slideCount = React.Children.count(prop... |
client/routes.js | openfocus/HTH-MERN | /* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './modules/App/App';
// require.ensure polyfill for node
if (typeof require.ensure !== 'function') {
require.ensure = function requireModule(deps, callback) {
callback(require);
};
}... |
test/test_helper.js | muscaiu/ReactTesting | 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... |
lib/makeElement.js | raganw/react-lunch-and-learn | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import ReactDOM from 'react-dom';
export default function makeElement(Element, props = {}) {
let element = TestUtils.renderIntoDocument(
<Element {...props} />
);
let node = ReactDOM.findDOMNode(element);
return { element, node };
... |
src/pages/DocsPage.js | ucladevx/website | import React from 'react'
import styled from 'styled-components'
import Spinner from '../components/Spinner'
import Text from '../components/Text'
import { colors, sizes } from '../styles'
const Container = styled.div`
width: 100vw;
height: calc(100vh - ${sizes.navbar.height}px);
position: relative;
`
const Wh... |
src/svg-icons/hardware/scanner.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareScanner = (props) => (
<SvgIcon {...props}>
<path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/>
</... |
src/components/Footer.js | urre/chock.press | import React from 'react'
const Footer = () => (
<footer className="footer">
<p>
A project by <a href="https://urre.me">Urban Sandén.</a> Code on{' '}
<a href="https://github.com/urre/chock.press">Github</a>
</p>
</footer>
)
export default Footer
|
libs/utils/react.js | Hazel54/element-react | import React from 'react'
function firstChild(props) {
const childrenArray = React.Children.toArray(props.children);
return childrenArray[0] || null;
}
export {firstChild} |
js/src/SyncWarning/syncWarning.js | destenson/ethcore--parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: 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
// (at your option) any lat... |
src/components/MultiGraph.js | FiviumAustralia/RNSH-Pilot | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
var d3 = require('d3');
let multiGraphId = 0;
class Graph {
constructor () {
this.parseDate = d3.time.format('%d-%b-%y').parse;
}
getHeight () {
return this.height;
}
getAxisPosition () {
return this.axisP... |
src/svg-icons/image/crop-16-9.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop169 = (props) => (
<SvgIcon {...props}>
<path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/>
</SvgIcon>
);
ImageCrop169 = pure(ImageCrop169);
ImageCr... |
ui/src/containers/Visualisations/components/ContextLabelForm.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
/**
* @param {string} props.visualisationId
* @param {string} propscontextLabel
* @param {(contextLabel: string) => void} props.onChange
*/
const ContextLabelForm = ({
visualisationId,
contextLabel,
onChange,
}) => {
const formId = `visualisati... |
fields/types/password/PasswordColumn.js | cermati/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var PasswordColumn = React.createClass({
displayName: 'PasswordColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue... |
src/configure-feature.js | paralleldrive/react-feature-toggles | import React from 'react';
import curry from './curry';
import { Feature } from './feature';
export const configureFeature = curry(
(InactiveComponent, name, ActiveComponent) => props => (
<Feature
name={name}
inactiveComponent={() => <InactiveComponent {...props} />}
activeComponent={() => <Ac... |
packages/node_modules/@ciscospark/react-component-file-staging-area/src/index.js | Altocloud/alto-react-ciscospark | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {bytesToSize, getFileType} from '@ciscospark/react-component-utils';
import Button from '@ciscospark/react-component-button';
import ChipFile from '@ciscospark/react-component-chip-file';
import styles from './... |
src/svg-icons/maps/local-printshop.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
src/TimePicker/ClockMinutes.spec.js | ArcanisCz/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import {spy} from 'sinon';
import getMuiTheme from '../styles/getMuiTheme';
import ClockMinutes from './ClockMinutes';
describe('<ClockMinutes />', () => {
const muiTheme = getMuiTheme();
const shallowWit... |
docs/src/app/components/pages/components/SvgIcon/Page.js | rhaedes/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import iconReadmeText from './README';
import IconExampleSimple from './ExampleS... |
src/routes.js | bdefore/universal-redux-starter | import React from 'react';
import { Route } from 'react-router';
import App from './containers/App/App';
export default () => {
return (
<Route path="/" component={App} />
);
};
|
src/svg-icons/action/favorite.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFavorite = (props) => (
<SvgIcon {...props}>
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6... |
src/svg-icons/communication/chat.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationChat = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/>
</SvgIcon>
);
Communicatio... |
src/components/App/native/App.js | floschnell/towers | import {
Text,
View,
Dimensions,
Alert,
BackHandler,
StatusBar,
ActivityIndicator,
Modal,
ToastAndroid,
} from 'react-native';
import PropTypes from 'prop-types';
import React from 'react';
import LoginContainer from '../../Login/LoginContainer';
import DashboardContainer from '../../Dashboard/Dashboa... |
app/javascript/mastodon/features/status/index.js | imomix/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchStatus } from '../../actions/statuses';
import MissingIndicator from '../../components/missing_indicator';
import DetailedStatus from './compone... |
internals/templates/containers/NotFoundPage/index.js | talal7860/punch-assignment-react | /**
* 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 necessity for you then you can refactor it... |
src/svg-icons/notification/mms.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationMms = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 14l3.5-4.5 2.5 3.01L14.5 8l4.5 6H5z"/>
</SvgIcon>
);
NotificationMms = ... |
basic_react/helloworld/src/index.js | ezwebcraft/coffee-journals | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
stories/components/form/formEmail/index.js | sethbergman/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import FormEmail from 'shared/components/form/formEmail/formEmail';
storiesOf('shared/components/form/formEmail', module)
.add('Default', () => (
<FormEmail
onChange={action('Change... |
app/javascript/mastodon/features/ui/components/video_modal.js | imomix/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import ExtendedVideoPlayer from '../../../components/extended_video_player';
import { defineMessages, injectIntl } from 'react-intl';
import IconButton from '../../../components/icon_button';
impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.