path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
cloud/dashboard/src/components/MainAppBar.js | iotivity/iotivity | /*
* //******************************************************************
* //
* // Copyright 2017 Samsung Electronics All Rights Reserved.
* //
* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* //
* // Licensed under the Apache License, Version 2.0 (the "License");
* // you may not use thi... |
packages/cf-component-tooltip/src/TooltipRegion.js | mdno/mdno.github.io | import React from 'react';
import PropTypes from 'prop-types';
import createTooltip from './createTooltip';
class TooltipRegion extends React.Component {
componentDidMount() {
const els = this.tooltipRegion.querySelectorAll(this.props.querySelector);
this.destroyTooltips = [].map.call(els, el => {
ret... |
src/js/components/icons/base/Star.js | odedre/grommet-final | /**
* @description Star SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* @prope... |
assets/js/application/src/photos/components/Photo.js | ominidi/ominidi-web | import React from 'react';
import PropTypes from 'prop-types';
/**
* Photo render a single photo.
*
* @author Gabriele D'Arrigo <darrigo.g@gmail.com>
* @param props
* @returns {XML}
* @constructor
*/
const Photo = (props) => {
return (
<div className="photos__item" data-id={ props.id }>... |
src/chapters/defaults.js | sm-react/storybook-chapters | import React from 'react';
import PropTypes from 'prop-types';
import { linkTo } from '@storybook/addon-links';
import { chapterSelect } from './navigate';
import { breadcrumbs } from './utils';
export const BADGES = {
up: '⤴️',
toc: 'ℹ️',
bookmarks: '🔖',
tags: ':hash:',
}
const styles = {
toc: {
... |
app/pages/RulesPage/index.js | bluce1017/betterthangoodell | /**
* RulesPage
*
*/
import React from 'react';
import styles from './styles.css';
function RulesPage() {
return (
<article>
<div className={styles.rules}>
<p>Top 6 teams will be determined by win/loss record. Tiebreaker is total points scored for the season.
<em>The divisions will no... |
monkey/monkey_island/cc/ui/src/components/ui-components/ChildCheckbox.js | guardicore/monkey | import React from 'react';
import {Button, Form} from 'react-bootstrap';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faCheckSquare} from '@fortawesome/free-solid-svg-icons';
import {faSquare} from '@fortawesome/free-regular-svg-icons';
import {getComponentHeight} from './utils/HeightCalcul... |
src/Label.js | pombredanne/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import bootstrapUtils, { bsStyles, bsClass } from './utils/bootstrapUtils';
import { State, DEFAULT, PRIMARY } from './styleMaps';
@bsClass('label')
@bsStyles(State.values().concat(DEFAULT, PRIMARY), DEFAULT)
class Label extends React.Component {
rende... |
frontend/src/System/Backup/RestoreBackupModalContent.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import TextInput from 'Components/Form/TextInput';
import Icon from 'Components/Icon';
import Button from 'Components/Link/Button';
import SpinnerButton from 'Components/Link/SpinnerButton';
import ModalBody from 'Components/Modal/ModalBody';... |
public/assets/node_modules/browser-sync/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | manakuro/my_portfolio | import React from 'react';
// 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';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
assets/javascript/components/progress/skillCard.js | colinjeanne/learning-site | import {
ageClasses,
ageClassNames,
benchmarkText,
nextBenchmark,
skillClass,
skillClasses,
skillName
} from './skillMethods';
import React from 'react';
const getClass = skill => ({
'className': skillClass(skill),
'title': skillName(skill)
});
const getAgeClass = skill => {
re... |
src/components/MusicBgCanvas/index.js | liang869219658/Music | import React, { Component } from 'react';
import $ from 'jquery';
import './index.less';
class BgCanvas extends Component {
componentDidMount(){
function project3D(x, y, z, vars) {
var p, d;
x -= vars.camX;
y -= vars.camY;
z -= vars.camZ;
p = Math.atan2(x, z);
d = Math.sqrt... |
app/components/agents/agentImage.js | nypl-registry/browse | import React from 'react'
import { randomColorFor } from '../../utils.js'
import ImageLoadMixin from '../../lib/imageLoadMixin.js'
const AgentImage = React.createClass({
mixins: [ImageLoadMixin],
propTypes () {
return {
agent: React.PropTypes.object.isRequired
}
},
getInitialState () {
re... |
src/components/AuthenticatedRoute.js | Shashank1706/olep-serverless | import React from 'react';
import { Route, Redirect } from 'react-router-dom';
export default ({ component: C, props: cProps, ...rest }) => (
<Route {...rest} render={props => (
cProps.userToken !== null
? <C {...props} {...cProps} />
: <Redirect to={`/login?redirect=${props.location.pathname}${props... |
src/frontend/modules/web/components/home-page.js | pr0fedt/react-basic-template | 'use strict';
import React from 'react';
import {Dialog, Paper, RaisedButton, Styles} from 'material-ui';
import {MaterialMixin} from 'modules/core/mixins';
const {Colors} = Styles;
const HomePage = React.createClass({
mixins: [
MaterialMixin
],
componentWillMount(){
let accent1Color = Colors.deepOrange500;
... |
src/components/home/HomePage.js | DaniAkash/AdminPanel-with-React-on-ES6 | import React from 'react';
import {Link} from 'react-router';
class HomePage extends React.Component {
render() {
return (
<div className="jumbotron">
<h1>Admin Panel</h1>
<p>Made with react and redux in ES6!</p>
<Link to="about" className="btn btn-primary btn-lg">Learn More</Link>
... |
src/components/post/brief.js | Lokiedu/libertysoil-site | /*
This file is a part of libertysoil.org website
Copyright (C) 2016 Loki Education (Social Enterprise)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, o... |
packages/react/src/views/OutboxList.js | wq/wq.app | import React from 'react';
import {
useApp,
useReverse,
useRouteTitle,
useComponents,
useOutbox
} from '../hooks';
import PropTypes from 'prop-types';
export default function OutboxList({ modelConf }) {
const app = useApp(),
reverse = useReverse(),
routeTitle = useRouteTitle(),
... |
src/views/Comment/CommentActions.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
/**
* A comment can contain an list of actions a user may perform related to this comment.
*/
function CommentAction... |
src/components/Arc/Arc.js | k2data/svg-react-playground |
import React from 'react'
import * as d3 from 'd3'
import { Col, Row } from 'antd'
import styles from './Arc.css'
class Arc extends React.Component {
constructor (props) {
super(props)
this.rainbow = this.rainbow.bind(this)
}
componentDidMount () {
this.rainbow()
this.ColorClock()
this.pie(... |
webpack/react_app/components/HostKebab/KebabItems.js | theforeman/foreman_remote_execution | import React from 'react';
import { useSelector } from 'react-redux';
import { DropdownItem } from '@patternfly/react-core';
import { CodeIcon } from '@patternfly/react-icons';
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
import { translate as __ } from 'foremanReact/common/I18n';
import { H... |
mobile/app/module/common/BasePage.js | liyangwood/DreamCup | import React from 'react';
import {Container, Header, Left, Body, Title, Right} from 'native-base';
import KG from 'kg';
import {Loading} from 'app/module/ui';
const style = KG.Style.create({
box : {
backgroundColor: '$mainBG'
},
header : {
backgroundColor: '$primary_color',
borderColor: '$primary_co... |
src/components/Notice/Notice.js | pmg1989/lms_mobile | import React from 'react'
import PropTypes from 'prop-types'
import Immutable from 'immutable'
import classnames from 'classnames'
import { NoticeBar } from 'antd-mobile'
import styles from './Notice.less'
const Notice = ({ notice, className }) => {
const noticeBarProps = {
className: styles.content,
icon: n... |
redux-demo/todos-with-undo/src/containers/UndoRedo.js | zhangjunhd/react-examples | import React from 'react'
import { ActionCreators as UndoActionCreators } from 'redux-undo'
import { connect } from 'react-redux'
let UndoRedo = ({ canUndo, canRedo, onUndo, onRedo }) => (
<p>
<button onClick={onUndo} disabled={!canUndo}>
Undo
</button>
<button onClick={onRedo} disabled={!canRedo}>... |
examples/sidebar/app.js | skevy/react-router | import React from 'react';
import { Router, Route, Link } from 'react-router';
import data from './data';
var Category = React.createClass({
render() {
var category = data.lookupCategory(this.props.params.category);
return (
<div>
<h1>{category.name}</h1>
{this.props.children || (
... |
services/ui/src/components/Backups/index.js | amazeeio/lagoon | import React from 'react';
import css from 'styled-jsx/css';
import moment from 'moment';
import RestoreButton from 'components/RestoreButton';
import { bp, color, fontSize } from 'lib/variables';
const Backups = ({ backups }) => (
<div className="backups">
<div className="header">
<label className="source... |
data-browser-ui/public/app/components/RowModalSwitcher.js | CloudBoost/cloudboost | import React from 'react';
import ArrowIcon from './ArrowIcon';
const RowModalSwitcher = (props) => (
<span>
<button
className="row-modal-switcher-btn"
onClick={props.switchToNextRow}
disabled={props.nextExists ? '' : 'disabled'}
>
<ArrowIcon
direction="down"
size={pro... |
src/interface/statistics/components/BoringValueText/index.js | sMteX/WoWAnalyzer | /**
* A simple component that shows a value in the most plain way possible.
* Use this only as the very last resort.
*/
import React from 'react';
import PropTypes from 'prop-types';
const BoringValue = ({ label, children, className }) => (
<div className={`pad boring-text ${className || ''}`}>
<label>
... |
imports/ui/components/resident-details/accounts/private-account/edit-pa-bill/phd-hra.js | gagpmr/app-met | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import * as Styles from '/imports/modules/styles.js';
import { UpdateResident } from '/imports/api/residents/methods.js';
export class PhdHraTableBody extends React.Component {
constructor(props) {
super(pr... |
analysis/paladinholy/src/modules/beacons/DirectBeaconHealing.js | anom0ly/WoWAnalyzer | import { Trans } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import { SpellIcon } from 'interface';
import PlusIcon from 'interface/icons/Plus';
import UpArrowIcon from 'interface/icons/UpArrow';
import Analyzer from 'parser/core/Analyzer';
import Statisti... |
src/routes.js | rodrigorm/tw-timers | import React from 'react';
import { Route } from 'react-router';
import App from './containers/App';
import * as containers from './containers';
const {
TimerPage
} = containers;
export default (
<Route component={App}>
<Route path="/*" component={TimerPage} />
</Route>
);
|
app/javascript/mastodon/features/ui/components/compose_panel.js | im-in-space/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import SearchContainer from 'mastodon/features/compose/containers/search_container';
import ComposeFormContainer from 'mastodon/features/compose/containers/compose_form_container';
import NavigationContainer from 'mast... |
gui/src/app/containers/dashboard-plot-container.js | mbonvini/LambdaSim | import React from 'react';
import { connect } from 'react-redux';
import DashboardPlot from '../components/dashboard-plot';
import log from 'loglevel';
import store from '../store';
class DashboardPlotContainer extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<Da... |
app/javascript/mastodon/features/ui/components/column.js | yi0713/mastodon | import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from '../../../scroll';
import { isMobile } from '../../../is_mobile';
export default class Column extends React.PureComponent {
static propTypes = {
... |
2.Reactive/src/scripts/components/options.js | TravelingTechGuy/svcc-chrome-extension | import React from 'react';
import Footer from './footer';
import './options.css';
export default class Options extends React.Component {
constructor(props) {
super(props);
this.state = {items: []};
this._addItem = this.addItem.bind(this);
this._removeItem = this.removeItem.bind(this);
this._saveI... |
app/javascript/mastodon/features/status/components/detailed_status.js | Toootim/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from... |
src/components/HeaderBanner.js | laurentzziu/color-gems-react | import React, { Component } from 'react';
import autoBind from 'react-autobind';
import tinyColor from 'tinycolor2';
export default class HeaderBanner extends Component {
constructor(props) {
super(props);
autoBind(this);
}
render() {
const color = this.props.color;
const isHex = this.props.isH... |
node_modules/@material-ui/core/es/MenuItem/MenuItem.js | pcclarke/civ-techs | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import ListItem from '../ListItem... |
react/src/Tabs.js | Chalarangelo/react-mini.css | import React from 'react';
import generateUniqueId from './util/idGenerator';
// Module constants (change according to your flavor file)
var tabsClassName = 'tabs';
var tabsStackedClassName = 'stacked';
// Technically speaking, the Tab is a non-component, meaning it should not be
// rendered on its own. It depends on... |
packages/material-ui-icons/src/Memory.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Memory = props =>
<SvgIcon {...props}>
<path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9... |
src/scenes/feed/post-link/post-link.js | mattmischuk/m1x | // @flow
import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import theme from 'styled-theming'
import hexToRgba from 'hex-to-rgba'
import Arrow from '../arrow'
import { myTheme } from '../../../styles'
const {
space, color, borderRadii, breakpoint,
} = myTheme
const tit... |
client/src/index.js | Okisa/heroes-card | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import { Router, browserHistory } from 'react-router';
import {Provider} from 'react-redux';
import routes from './routes';
import HomeContainer from './home/HomeContainer';
import registerServiceWorker from './r... |
src/jp-trade/JpTradePage.js | qingweibinary/binary-next-gen | import React from 'react';
import WebPage from '../containers/WebPage';
import JpTradeContainer from './JpTradeContainer';
export default props => (
<WebPage>
<JpTradeContainer {...props} />
</WebPage>
);
|
app/javascript/mastodon/components/autosuggest_emoji.js | lindwurm/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
import { assetHost } from 'mastodon/utils/config';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequire... |
src/client/main.js | Tzitzian/Oppex | import React from 'react';
import Router from 'react-router';
import routes from './routes';
const app = document.getElementById('app');
const initialState = window._initialState;
Router.run(routes, Router.HistoryLocation, (Handler) => {
React.render(<Handler initialState={initialState} />, app);
});
|
src/Accordion.js | pandoraui/react-bootstrap | import React from 'react';
import PanelGroup from './PanelGroup';
const Accordion = React.createClass({
render() {
return (
<PanelGroup {...this.props} accordion>
{this.props.children}
</PanelGroup>
);
}
});
export default Accordion;
|
src/containers/Root.js | thehig/arpggio-firebase-client | import React from 'react';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routeConfig from '../common/routeConfig';
// NOTE: 'this.routeConfig' is my workaround to dismiss 'You cannot change <Router routes>' warning.
// See: https://github.com/gaearon/react-hot-loader/issues/298
... |
src/routes/post/index.js | oct16/Blog-FE | import React from 'react';
import Layout from 'components/Layout';
const title = 'Post';
export default {
path: '/post/:title',
async action({ fetch, params }) {
const title = params.title
const resp = await fetch(`/api/v1/post/title/${encodeURIComponent(title)}`, {
method: "GET"
})
if (r... |
src/CardSearch.js | PAK90/cardcrunch | import React from 'react';
import ReactDOM from 'react-dom';
import {Button, IconButton} from 'react-toolbox/lib/button';
import style from './style';
var VelocityTransitionGroup = require('velocity-react/velocity-transition-group.js');
var VelocityComponent = require('velocity-react/velocity-component.js');
var Veloc... |
example/app.js | stockulus/pouchdb-react-native | 'use strict'
import React from 'react'
import {
AsyncStorage,
ListView,
StyleSheet,
Text,
TextInput,
TouchableHighlight,
View
} from 'react-native'
import ActionButton from 'react-native-action-button'
import PouchDB from 'pouchdb-react-native'
import NavigationExperimental from 'react-native-deprecated... |
examples/DisabledButton.js | jsbranco/react-materialize | import React from 'react';
import Button from '../src/Button';
import Icon from '../src/Icon';
export default
<div>
<Button large disabled>Button</Button>
<Button disabled>Button</Button>
<Button flat disabled>Button</Button>
<Button floating disabled><Icon>add</Icon></Button>
</div>;
|
src/svg-icons/action/settings-remote.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsRemote = (props) => (
<SvgIcon {...props}>
<path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41... |
src/svg-icons/editor/space-bar.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorSpaceBar = (props) => (
<SvgIcon {...props}>
<path d="M18 9v4H6V9H4v6h16V9z"/>
</SvgIcon>
);
EditorSpaceBar = pure(EditorSpaceBar);
EditorSpaceBar.displayName = 'EditorSpaceBar';
EditorSpaceBar.muiName ... |
backend/modules/content/src/main/browser/views/Form/Create.js | savantly-net/sprout-platform | import React from 'react';
import { connect } from 'react-redux';
import { saveForm, selectError, FormEdit, Errors } from 'react-formio';
import {push} from 'connected-react-router';
const Create = props => {
return (
<div>
<h2>Create Form</h2>
<hr />
<Errors errors={props.errors} />
<For... |
js/jqwidgets/demos/react/app/grid/cellsselection/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
import JqxCheckBox from '../../../jqwidgets-react/react_jqxcheckbox.js';
import JqxDropDownList from '../../../jqwidgets-re... |
components/PopUpComponent.js | heisenbuggers/story-writer | import React from 'react';
export default React.createClass({
getInitialState() {
return {
user : ''
}
},
handleClick(e) {
let name = this.refs.name.props.value;
if(name.length > 0){
this.props.handleUserNameEntered(name);
}else{
alert('Enter a Name');
}
},
handleChange(e) {
this.set... |
src/components/ContactUs.js | arthur-cen/arthur-cen.github.io | import React, { Component } from 'react';
export default class ContactUs extends Component {
render() {
let resumeData = this.props.resumeData;
return (
<section id="contact">
<div className="row section-head">
<div className="ten columns">
<p className="lead">
... |
src/components/MovieGroup/MovieGroup.js | tinwaisi/take-home | /**
* 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 cx from 'classnames';... |
src/js/components/Link.js | ejoreo/portfolio-site | import React, { Component } from 'react';
class Link extends Component {
render() {
return (
<div className="Link">
<span>
<a href='http://www.google.com'>Link</a>
</span>
</div>
);
}
}
export default Link;
|
examples/js/remote/remote-store-delete-row.js | powerhome/react-bootstrap-table | import React from 'react';
import RemoteDeleteRow from './remote-delete-row';
function getProducts() {
const products = [];
const startId = products.length;
for (let i = 0; i < 12; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item name ' + id,
price: Math.floor((Math.ra... |
client/src/components/Dashboard.js | CodeDraken/Mail-Draken | import React from 'react'
import { Link } from 'react-router-dom'
import SurveyList from './surveys/SurveyList'
export const Dashboard = () => {
return (
<div>
<h2>Dashboard</h2>
<SurveyList />
<div className='fixed-action-btn'>
<Link to='/surveys/new' className='btn-floating btn-large ... |
src/svg-icons/action/announcement.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAnnouncement = (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-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/>
</SvgIcon>
);
ActionAnnouncement = pu... |
resources/react/components/CounterApp.js | fetus-hina/stat.ink | import Counter from './parts/Counter';
import React from 'react';
export default function App () {
return <Counter />;
}
App.propTypes = {};
|
src/components/fieldComponents/Lookup.js | gearz-lab/react-metaform | import React from 'react';
import Select2 from 'react-select';
import FormGroup from './FormGroup.js';
const Lookup = React.createClass({
propTypes: {
name: React.PropTypes.string.isRequired,
value: React.PropTypes.node,
displayName: React.PropTypes.string,
options: React.PropTypes... |
src/server.js | FamilyPlanerTeam/family-planner | /**
* 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 path from 'path';
import express from 'express';... |
src/svg-icons/file/folder-shared.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolderShared = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-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-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/PropsInline.js | samwgoldman/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: {a: number, b: number, c: number};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: {a: number, b: numbe... |
src/Toolbar/ToolbarSeparator.js | skarnecki/material-ui | import React from 'react';
function getStyles(props, context) {
const {
baseTheme,
toolbar,
} = context.muiTheme;
return {
root: {
backgroundColor: toolbar.separatorColor,
display: 'inline-block',
height: baseTheme.spacing.desktopGutterMore,
marginLeft: baseTheme.spacing.desk... |
src/components/createMockComponent.js | omeid/react-native-mock | import React from 'react';
function createMockComponent(displayName) {
return React.createClass({
displayName,
render() {
return null;
},
});
}
module.exports = createMockComponent;
|
src/common/components/ToggleBaseline.js | chad099/react-native-boilerplate | // @flow
import type { State } from '../types';
import Box from './Box';
import OutlineButton from './OutlineButton';
import React from 'react';
import { compose } from 'ramda';
import { connect } from 'react-redux';
import { toggleBaseline } from '../app/actions';
// Test vertical rhythm visually. Inspired by basehol... |
app/containers/App/index.js | JonathanMerklin/react-boilerplate | /**
*
* 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... |
components/react-semantify/src/elements/image.js | react-douban/douban-book-web | import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import {Unit} from '../commons/unit';
let defaultClassName = 'ui image';
const Image = React.createClass({
mixins: [ClassGenerator, StateSelector],
render: function () {
le... |
src/svg-icons/action/assignment-return.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAssignmentReturn = (props) => (
<SvgIcon {...props}>
<path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45... |
app/javascript/flavours/glitch/features/ui/components/column_link.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Icon from 'flavours/glitch/components/icon';
const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badg... |
examples/shared-root/app.js | Sirlon/react-router | import React from 'react';
import { history } from 'react-router/lib/HashHistory';
import { Router, Route, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<p>
This illustrates how routes can share UI w/o sharing the url,
when routes have no pa... |
CalcApp/src/components/header.js | michelmarcondes/ReactNativeStudies | import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
export default props => (
<View style={styles.top}>
<Text style={styles.title}>Calculadora 1.0</Text>
</View>
);
const styles = StyleSheet.create({
top: {
backgroundColor: '#2196f3',
paddi... |
src/svg-icons/image/filter-b-and-w.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterBAndW = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/>
</SvgIcon>
);
ImageFilterBAndW = pure(Im... |
packages/wix-style-react/src/Themes/editorX/test/editorX.visual.js | wix/wix-style-react | import React from 'react';
import ThemeProvider from '../../../ThemeProvider';
import editorXTheme from '../editorX';
import { runTests as CustomModalLayoutTests } from '../../../CustomModalLayout/test/CustomModalLayout.visual';
const themeName = 'Editor-X';
const testWithTheme = test => {
return (
<ThemeProvide... |
packages/material-ui-icons/legacy/SignalCellularConnectedNoInternet2BarTwoTone.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M22 8V2L2 22h16V8h4z" /><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z" /></React.Fragment>
, 'SignalCellularConnectedNoInternet2BarTwoTone');
|
packages/material-ui-icons/src/PortableWifiOff.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PortableWifiOff = props =>
<SvgIcon {...props}>
<path d="M17.56 14.24c.28-.69.44-1.45.44-2.24 0-3.31-2.69-6-6-6-.79 0-1.55.16-2.24.44l1.62 1.62c.2-.03.41-.06.62-.06 2.21 0 4 1.79 4 4 0 .21-.02.42-.05.63l1... |
src/mention/test-pages/advanced.js | Kindling/react-tinymce-mention | import React from 'react';
import ReactDOM from 'react-dom';
import Editor from './components/Editor';
import Mention from '../Mention';
import CustomList from './components/CustomList';
import CustomRTEMention from './components/CustomRTEMention';
import complexDataSource from './api/complexDataSource';
ReactDOM.rend... |
app/components/layout/newProject/types/Branding.js | communicode-source/communicode | import React from 'react';
import PropTypes from 'prop-types';
function handleTypeSelect(e, selectProjectType) {
if(e.target.value === 'Select...') {
return selectProjectType('');
}
return selectProjectType(e.target.value);
}
const Branding = ({ selectProjectType, type }) => (
<div>
<s... |
docs-ui/components/pills.stories.js | beeftornado/sentry | import React from 'react';
import {withInfo} from '@storybook/addon-info';
import Pills from 'app/components/pills';
import Pill from 'app/components/pill';
export default {
title: 'Core/Badges+Tags/Pills',
};
export const All = withInfo('When you have key/value data but are tight on space.')(
() => (
<Pills... |
app/javascript/mastodon/components/hashtag.js | hugogameiro/mastodon | import React from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { Link } from 'react-router-dom';
import { FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { shortNumberFormat } from '../utils/numbers';
const Hashtag = ({ hashtag... |
assets/scripts/src/components/GameControls.js | jshjohnson/NumberRush | // React
import React, { Component } from 'react';
class GameControls extends Component {
render() {
let { controls } = this.props;
return (
<controls>
<ul className="header__controls list-unstyled">
{
controls.map(function(con... |
src/js/components/DateInput/stories/Inline.js | HewlettPackard/grommet | import React from 'react';
import { Box, DateInput } from 'grommet';
export const Inline = () => {
const [value, setValue] = React.useState('');
const onChange = (event) => {
const nextValue = event.value;
console.log('onChange', nextValue);
setValue(nextValue);
};
return (
<Box align="center"... |
src/Google/index.js | canvaskisa/react-share-icons | import React from 'react';
const Google = (props: any) => (
<svg {...props} viewBox="0 0 48 48">
<path d="M14 22v4.8h7.94c-.32 2.06-2.4 6.04-7.94 6.04a8.84 8.84 0 0 1 0-17.68 7.88 7.88 0 0 1 5.58 2.16l3.8-3.66A13.418 13.418 0 0 0 14 10a14 14 0 0 0 0 28c8.08 0 13.44-5.68 13.44-13.68a12.776 12.776 0 0 0-.22-2.32H14zm... |
src/app/components/GitHub/Repo/index.js | nhardy/web-scaffold | import PropTypes from 'prop-types';
import React from 'react';
import cx from 'classnames';
import FontAwesome from 'app/components/FontAwesome';
import Icon from 'app/components/Icon';
import styles from './styles.styl';
const GitHubRepo = ({ repo }) => {
const {
name,
html_url: url,
owner: {
av... |
src/components/home-header.js | Dmidify/mlblog | import React, { Component } from 'react';
class HomeHeader extends Component {
render() {
return (
<header className="intro-header home">
<div className="container">
<div className="row">
<div className="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
... |
src/ui/form/text-field/text-field-story.js | josmardias/react-redux-boilerplate | import React from 'react'
import { storiesOf } from '@kadira/storybook'
import TextField from '.'
storiesOf('ui.Form.TextField', module)
.add('Default', () => (
<TextField label="Type here..." />
))
.add('Secure', () => (
<TextField label="Type secret..." secure />
))
|
app/scripts/src/history-sync/components/activity-list.js | MrMamen/traktNRK | import React from 'react';
import ActivityListItem from './activity-list-item';
export default class ActivityList extends React.Component {
render() {
let {activities, imageHost, imageWidth} = this.props;
let items = activities.map((activity, index) => {
return(
<ActivityListItem
act... |
src/routes/home/Home.js | devcharleneg/twitter-react-app | /**
* 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 Twit from 'twit';
imp... |
app/containers/File-container.js | Git-Together/GitTogether | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as file from '../actions/file-actions.js';
import * as watch from '../actions/watch-actions.js'
import * as ui from '../actions/ui-actions.js';
import PanelPage from '../components/_shar... |
app/javascript/mastodon/components/column_back_button.js | esetomo/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class ColumnBackButton extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
handleClick = () => {
if (window.history && window.history.length === 1)... |
js/components/card/card-header-and-footer.js | ChiragHindocha/stay_fit |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Card, CardItem, Text, Body, Left, Right, IconNB } from 'native-base';
import { Actions } from 'react-native-router-... |
react-native/Electronik/index.ios.js | tiagofumo/react-sample-projects | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class Electronik extends Component {
render() {
return (
<View style={styles.container}>
<Te... |
www/src/pages/404.js | yangshun/react | /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
'use strict';
import Container from 'components/Container';
import Header from 'components/Header';
import Reac... |
app/containers/EditorContainer/EditorContainer.js | realgvard/telegram_theme_customizer | import React, { Component } from 'react';
import CSSModules from 'react-css-modules';
import { connect } from 'react-redux';
import {
grey100,
grey500,
} from 'material-ui/styles/colors';
// Components
import Preview from 'components/Preview';
import SidebarEditor from 'components/SidebarEditor';
import TopToo... |
index.js | jefflau/react-dropdown | 'use strict';
import React from 'react';
import classNames from 'classnames';
class Dropdown extends React.Component {
displayName: 'Dropdown'
constructor(props) {
super(props);
this.state = {
selected: props.value || { label: props.placeholder || 'Select...', value: '' },
isOpen: false
... |
client/components/Dynamic/AuthUI/HomePage.js | Treeeater/expresshome | import React from 'react';
import { LocalStorage } from '../LocalStorage';
import { Card, CardTitle } from '@material-ui/core/Card';
export const HomePage = () => (
<div>
{ LocalStorage.isUserAuthenticated() ?
<CardTitle title="Application homepage" subtitle="Please pick one of the applications on the lef... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.