path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
Paths/React/05.Building Scalable React Apps/7-react-boilerplate-building-scalable-apps-m7-exercise-files/After/app/components/Login/index.js | phiratio/Pluralsight-materials | /**
*
* Login
*
*/
import React from 'react';
import styles from './styles.css';
import validator from 'email-validator';
import classNames from 'classnames';
class Login extends React.Component { // eslint-disable-line react/prefer-stateless-function
static propTypes = {
login: React.PropTypes.func.isRequired... |
lib/cli/src/frameworks/react/js/Button.stories.js | kadirahq/react-storybook | import React from 'react';
import { Button } from './Button';
export default {
title: 'Example/Button',
component: Button,
argTypes: {
backgroundColor: { control: 'color' },
},
};
const Template = (args) => <Button {...args} />;
export const Primary = Template.bind({});
Primary.args = {
primary: true,... |
src/CircularProgress.js | bgryszko/react-native-circular-progress | import React from 'react';
import PropTypes from 'prop-types';
import { Animated, View } from 'react-native';
import { Svg, Path, G } from 'react-native-svg';
export default class CircularProgress extends React.PureComponent {
polarToCartesian(centerX, centerY, radius, angleInDegrees) {
var angleInRadians = ((an... |
stories/EndorseContentLayout/examples/generic.js | nirhart/wix-style-react | import React from 'react';
import EndorseContentLayout from 'wix-style-react/EndorseContentLayout';
import Button from 'wix-style-react/Button';
export default () =>
<EndorseContentLayout
head="Something interesting goes in the title"
content="This is just a generic message. No harm, no pain."
primaryCt... |
packages/icons/src/md/hardware/Memory.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMemory(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M30 18v12H18V18h12zm-4 8v-4h-4v4h4zm16-4h-4v4h4v4h-4v4c0 2.21-1.79 4-4 4h-4v4h-4v-4h-4v4h-4v-4h-4c-2.21 0-4-1.79-4-4v-4H6v-4h4v-4H6v-4h4v-4c0-2.21 1.7... |
src/Parser/Druid/Balance/Modules/Items/LadyAndTheChild.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import Wrapper from 'common/W... |
src/components/like.js | beardalpha/mockmovielists | import React, { Component } from 'react';
class Like extends Component {
constructor(props){
super(props);
this.state = {upvote: true}
}
handleClick = () => {
this.setState({upvote: !this.state.upvote});
}
render(){
return (
<a className="upvote" onClick={this.handleClick}>{this.state.upvote ? 'upvote'... |
src/components/Utils/Affix.js | ryanbaer/busy | import React from 'react';
import PropTypes from 'prop-types';
import ResizeObserver from 'resize-observer-polyfill';
/**
* Affix component
* @description This component provides similar behavior to Facebook sidebar.
* Affix component wraps content with two elements. relativeContainer and affixContainer.
* <relati... |
src/icons/PhoneIphoneIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class PhoneIphoneIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M31 2H15c-2.76 0-5 2.24-5 5v34c0 2.76 2.24 5 5 5h16c2.76 0 5-2.24 5-5V7c0-2.76-2.24-5-5-5zm-8 42c-1.66... |
themes/custom/ocelot_d8/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | sawirah/OD8 | 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'));
|
frontend/src/components/partners/profile/overview/observations/partnerObservationsListFilter.js | unicef/un-partner-portal | import R from 'ramda';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { reduxForm } from 'redux-form';
import { connect } from 'react-redux';
import { browserHistory as history, withRouter } from 'react-router';
import { withStyles } from 'material-ui/styles';
import Grid from 'mat... |
node_modules/rc-slider/es/Handle.js | yhx0634/foodshopfront | 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... |
src/svg-icons/maps/directions-car.js | nathanmarks/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... |
webclient/src/components/App.js | jadiego/bloom | import React, { Component } from 'react';
import { Container } from 'semantic-ui-react';
import { isEmpty } from 'lodash';
//components
import Navbar from './Navbar';
import Footer from './Footer';
//routing components
import { BrowserRouter, Route, Redirect } from 'react-router-dom';
//pages
import Home from '../ho... |
fields/types/code/CodeField.js | mikaoelitiana/keystone | import _ from 'underscore';
import CodeMirror from 'codemirror';
import Field from '../Field';
import React from 'react';
import ReactDOM from 'react-dom';
import { FormInput } from 'elemental';
import classnames from 'classnames';
/**
* TODO:
* - Remove dependency on underscore
*/
// See CodeMirror docs for API:
... |
docs/app/Examples/elements/Reveal/Content/index.js | mohammed88/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealContentExamples = () => (
<ExampleSection title='Content'>
<ComponentExample
title='Visible Content'
des... |
test/integration/prerender/pages/blog/[post]/[comment].js | azukaru/next.js | import React from 'react'
import Link from 'next/link'
export async function getStaticPaths() {
return {
paths: [
'/blog/post-1/comment-1',
{ params: { post: 'post-2', comment: 'comment-2' } },
],
fallback: true,
}
}
export async function getStaticProps({ params }) {
return {
props: ... |
src/Components/StudentProfile/StudentProgress.js | omrisk/mta-hack-project | import React from 'react';
import LinearProgress from 'material-ui/LinearProgress';
import {
blue300,
indigo900,
orange200,
deepOrange300,
pink400,
} from 'material-ui/styles/colors';
export default class StudentProgress extends React.Component {
state = {
completed: this.props.progr... |
src/app/components/media/BulkActionsMove.js | meedan/check-web | import React from 'react';
import PropTypes from 'prop-types';
import { createFragmentContainer, graphql } from 'react-relay/compat';
import { FormattedMessage } from 'react-intl';
import { MultiSelector } from '@meedan/check-ui';
import globalStrings from '../../globalStrings';
const BulkActionsMove = ({
excludePro... |
src/routes.js | santhoshthepro/redux-movies-app | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import MoviesPage from './components/movies/MoviesPage';
import AboutPage from './components/about/AboutPage';
import TicketBookingPage from './components/boo... |
src/app/core/atoms/icon/icons/arrowhead-up.js | blowsys/reservo | import React from 'react'; const ArrowheadUp = (props) => <svg {...props} viewBox="0 0 48 48"><g><path d="M16,0L23.998993,10.740019 32,21.478999 16,21.478999 0,21.478999 8.0010071,10.740019z" transform="rotate(0,24,24) translate(0,7.89075136184692) scale(1.5,1.5)"/></g></svg>; export default ArrowheadUp;
|
RNDemo/RNComment/node_modules/react-navigation/lib-rn/navigators/TabNavigator.js | 995996812/Web | import React from 'react';
import { Platform } from 'react-native';
import createNavigator from './createNavigator';
import createNavigationContainer from '../createNavigationContainer';
import TabRouter from '../routers/TabRouter';
import TabView from '../views/TabView/TabView';
import TabBarTop from '../views/TabVie... |
src/components/run.js | AvraamMavridis/roh-frontend | import React from 'react';
import App from './Main';
// Render the main component into the dom
React.render(<App />, document.getElementById('app'));
|
docs/src/app/components/pages/components/Checkbox/ExampleSimple.js | owencm/material-ui | import React from 'react';
import Checkbox from 'material-ui/Checkbox';
import ActionFavorite from 'material-ui/svg-icons/action/favorite';
import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border';
const styles = {
block: {
maxWidth: 250,
},
checkbox: {
marginBottom: 16,
},
};
c... |
consoles/my-joy-navigation/src/containers/services.js | yldio/joyent-portal | import React from 'react';
import emotion from 'preact-emotion';
import { graphql, compose } from 'react-apollo';
import gql from 'graphql-tag';
import remcalc from 'remcalc';
import { Grid, Row, Col } from 'preact-emotion-flexboxgrid';
import {
ServiceCategory,
ServiceName,
ServiceDescription,
Service,
Ove... |
client/modules/App/__tests__/Components/Header.spec.js | suchostone/ekinder | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';
import { Header } from '../../components/Header/Header';
import { intl } from '../../../../util/react-intl-test-helper';
const intlProp = { ...intl, enabledLang... |
nailgun/static/views/clusters_page.js | eayunstack/fuel-web | /*
* Copyright 2013 Mirantis, 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 ... |
app/components/create/create.js | dfmcphee/pinnr | import React from 'react';
import { browserHistory } from 'react-router'
import Group from '../group/group.js';
import GroupStore from '../../stores/group-store';
import { Label, Form, Input, Button, Container, Header } from 'semantic-ui-react';
export default class Create extends React.Component {
constructor(props... |
app/javascript/mastodon/features/list_editor/components/search.js | clworld/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... |
app/javascript/mastodon/features/status/index.js | ebihara99999/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 Immutable from 'immutable';
import EmbeddedStatus from '../../components/status';
import MissingI... |
modules/Router.js | CivBase/react-router | import React from 'react'
import warning from 'warning'
import createHashHistory from 'history/lib/createHashHistory'
import { createRoutes } from './RouteUtils'
import RoutingContext from './RoutingContext'
import useRoutes from './useRoutes'
import { routes } from './PropTypes'
const { func, object } = React.PropTyp... |
spec/javascripts/jsx/gradebook-history/SearchResultsSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2017 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
docs/app/Examples/elements/Flag/Types/FlagExampleTable.js | ben174/Semantic-UI-React | import React from 'react'
import { Table, Flag } from 'semantic-ui-react'
const countries = [
{ name: 'Afghanistan', countryCode: 'af' },
{ name: 'Aland Islands', countryCode: 'ax' },
{ name: 'Albania', countryCode: 'al' },
{ name: 'Algeria', countryCode: 'dz' },
{ name: 'American Samoa', countryCode: 'as' }... |
lib/views/changed-files-count-view.js | atom/github | import React from 'react';
import PropTypes from 'prop-types';
import Octicon from '../atom/octicon';
import {addEvent} from '../reporter-proxy';
import {autobind} from '../helpers';
export default class ChangedFilesCountView extends React.Component {
static propTypes = {
changedFilesCount: PropTypes.number.isRe... |
src/App/components/Grid100.react.js | Rezmodeus/Multiplikation | import React from 'react';
import immutable from 'immutable';
export default React.createClass({
render() {
let nr = 0;
const cells = this.props.level.get('grid').valueSeq().map(cell => {
return (
<button
className={`grid-btn standard-btn ${!cell.get('enabled')?'disabled':''}`}
key={nr++}
d... |
src/routes/privacy/index.js | OSDLabs/swd | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
examples/cra-kitchen-sink/src/App.js | kadirahq/react-storybook | import React from 'react';
import logo from './logo.svg';
import './App.css';
const App = () => (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</div>
<p className="App-intro">
To get started, edit <code>s... |
app/modules/publishes/utils/list/createCriteria.js | theseushu/runcai | import React from 'react';
import Criteria from 'modules/common/criteria';
export default ({ ...props }) => <Criteria {...props} />;
|
fields/types/email/EmailColumn.js | pr1ntr/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var EmailColumn = React.createClass({
displayName: 'EmailColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue () {
... |
src/containers/SettingPage.js | kfnxu/fantastic-waffle | import React from 'react';
import {Link} from 'react-router';
import RaisedButton from 'material-ui/RaisedButton';
import MenuItem from 'material-ui/MenuItem';
import TextField from 'material-ui/TextField';
import SelectField from 'material-ui/SelectField';
import Toggle from 'material-ui/Toggle';
import DatePicker fro... |
app/containers/PlayerControl/index.js | scampersand/sonos-front | import React from 'react';
import { connect } from 'react-redux';
import { playMusic, pauseMusic, prevSong, nextSong } from 'containers/App/actions';
import { selectCurrentTrackInfo, selectTransportState } from 'containers/App/selectors';
export class PlayerControl extends React.Component { // eslint-disable-line reac... |
src/utils/RDLF.js | yoLUkAsss/DEscrutinio | import React, { Component } from 'react';
import {Header, Button, Form, Input, Icon} from 'semantic-ui-react'
// RefactoredDLF
class RDLF extends Component {
constructor(props){
super(props)
this.state = {
items : props.candidates || [],
type : props.type || "text",
placeholder : props.plac... |
examples/js/advance/edit-type-table.js | powerhome/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const jobs = [];
const jobTypes = [ 'A', 'B', 'C', 'D' ];
function addJobs(quantity) {
const startId = jobs.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
jo... |
client/src/main/Header.js | petertrotman/adventurelookup | import React from 'react';
const Header = props => (
<div className="header">
{ props.children }
</div>
);
Header.propTypes = {
children: React.PropTypes.any,
};
export default Header;
|
js/components/FoodPage/FoodFilter.react.js | ryantang333/react-boilerplate-test | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { asyncSetFoodsFilter } from '../../actions/AppActions';
const FoodFilter = ({
onChange
}) => {
let input;
return (
<input
ref={node => {
input = node;
}}
placeholder="Filter"
onChange={(e... |
src/shared/element-react/dist/npm/es6/src/table/TableBody.js | thundernet8/Elune-WWW | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import ReactDOM from 'react-dom';
import { Component, PropTypes } from '../../l... |
information/blendle-frontend-react-source/app/modules/premiumSignup/components/SignupFooter/index.js | BramscoChill/BlendleParser | import React from 'react';
import { DialogFooterTransparent } from '@blendle/lego';
import { replaceLastPath } from 'helpers/url';
import Link from 'components/Link';
import CSS from './SignupFooter.scss';
const SignupFooter = () => (
<DialogFooterTransparent className={CSS.dialogFooter}>
<p>
Heb je al een... |
app/components/List/index.js | anneback/react-quiz | import React from 'react';
import Ul from './Ul';
import Wrapper from './Wrapper';
function List(props) {
const ComponentToRender = props.component;
let content = (<div></div>);
// If we have items, render them
if (props.items) {
content = props.items.map((item, index) => (
<ComponentToRender key={... |
src/components/Pager/index.js | itsravenous/escape-the-board-room | import React from 'react';
import propTypes from 'prop-types';
import './style.css';
export default class Pager extends React.Component {
constructor(props) {
super(props);
this.state = {
page: 0,
};
this.onClickNext = this.onClickNext.bind(this);
}
onClickNext() {
const nextPage = thi... |
src/app/about/index.js | blobor/buka | import React from 'react'
import { connect } from 'react-redux'
import { List, ListItem, Divider } from 'material-ui'
import { toggleDeveloperMode } from '../core/actions/action-creators/app'
const About = ({ version, enableDeveloperMode }) => {
return (
<article className='about__container'>
<List>
... |
app/javascript/mastodon/components/autosuggest_emoji.js | vahnj/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
const assetHost = process.env.CDN_HOST || '';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequired,
... |
tools/flow/definitions/react.js | wcrowe/makeqachecklist | /* @flow */
// Note: we already have the definitions from
// https://github.com/facebook/flow/blob/master/lib/react.js
// so the below are merely helpful extensions.
import React from 'react';
declare type $React$Element = React.Element<*>;
declare type $React$Node = string | number | $React$Element | Array<$React$... |
src/icons/NotInterestedIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class NotInterestedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16 0-3.... |
examples/Modal.js | jareth/react-materialize | import React from 'react';
import Modal from '../src/Modal';
import Button from '../src/Button';
export default
<Modal
header='Modal Header'
trigger={
<Button waves='light'>MODAL</Button>
}>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mag... |
src/client/js/VariantQuery.js | mlinderm/myseq.js | /**
* @flow
*/
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import VCFSource from '../../lib/js/io/VCFSource';
import VariantTable from './VariantTable';
import { Grid, Row, Col, Form, FormGroup, FormControl, ControlLabel, Button, HelpBlock } from 'react-bootstrap';
class Coordinat... |
example/RNApp/app/routes/Profile/ProfileContainer.js | DesignmanIO/react-native-meteor-redux | import React, { Component } from 'react';
import Meteor, { createContainer } from 'react-native-meteor';
import Profile from './Profile';
class ProfileContainer extends Component {
handleSignOut() {
Meteor.logout();
}
render() {
const { user } = this.props;
return (
<Profile
user={use... |
docs/pages/autocomplete.js | ajainvivek/react-aztec | import React from 'react';
import { Page, ReactSpecimen } from 'catalog';
import JSONTree from 'react-json-tree';
import Highlight from 'react-highlight';
import 'highlight.js/styles/zenburn.css';
import * as MUI from 'material-ui';
import RaisedButton from 'material-ui/RaisedButton';
import { Table, TableBody, TableHe... |
app/containers/HomePage.js | kevyu/ctp_demo | // @flow
import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home {...this.props} />
);
}
}
|
frontend/js/components/ecosystems/ElectionReminderPrompt.js | Code4HR/okcandidate-platform | 'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Card from './../atoms/Card';
class ElectionReminderPrompt extends Component {
render() {
return (
<Card
title="Election Day Reminder" className="prompt-card"
acti... |
src/routes/Study/view/Unauthorized/index.js | aherriot/persian | import React from 'react'
import { Link } from 'react-router-dom'
export default function Unauthorized({ actions }) {
return (
<div className="Study__Unauthorized">
<p>
In order to track your progress studying Persian, you first need to {' '}
<button
className="link"
typ... |
docs/app/Examples/elements/Input/Variations/InputExampleActionDropdown.js | shengnian/shengnian-ui-react | import React from 'react'
import { Dropdown, Input } from 'shengnian-ui-react'
const options = [
{ key: 'page', text: 'This Page', value: 'page' },
{ key: 'org', text: 'This Organization', value: 'org' },
{ key: 'site', text: 'Entire Site', value: 'site' },
]
const InputExampleActionDropdown = () => (
<Input
... |
frontend/src/index.js | jeroen-visser/strava | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, hashHistory } from 'react-router';
import routes from './routes';
ReactDOM.render(
<Router routes={routes} history={hashHistory} />, document.getElementById('root')
);
|
client/src/routes/Draft.js | BenDiuguid/fantasy-fifa | import React, { Component } from 'react';
import { Query } from 'react-apollo';
import styled from 'styled-components';
import { loader } from 'graphql.macro';
import DraftStartButton from '../components/Draft/DraftStartButton';
import DraftCurrentBid from '../components/Draft/DraftCurrentBid';
import DraftPlayerPicker... |
boilerplate/vanity-website/src/components/MonkeyList.js | aarongreenwald/rn-workshop | import React from 'react';
//const images = [1, 2, 3, 4, 5, 6, 7, 8, 9];
export const MonkeyList = () =>
<div className="monkey-list">
<a href="#/">Back to Home Page</a>
/* render a list of images with width 120 each
* clicking on the image should navigate to '#/monkeys/:index'
* Create a dedicated ... |
app/components/Nav/Nav.js | Donluigimx/transporta2_admin | import React from 'react';
import {Link} from 'react-router-dom';
export default (props) => {
return (
<div className="block">
<nav className="navbar">
<div className="navbar-menu is-active">
<div className="navbar-end">
{props.isAuthed
... |
frontend/app/js/components/defaultview.js | serverboards/serverboards | import React from 'react'
import Restricted from 'app/restricted'
import i18n from 'app/utils/i18n'
import { set_modal } from 'app/utils/store'
const img1 = require('app/../imgs/008-Button+.png')
const img2 = require('app/../imgs/009-mid-nocontent-services.png')
const img3 = require('app/../imgs/011-midright-noservice... |
src/components/Input/Textarea.js | titon/toolkit | /**
* @copyright 2010-2017, The Titon Project
* @license http://opensource.org/licenses/BSD-3-Clause
* @link http://titon.io
* @flow
*/
import React from 'react';
import Input from './Input';
import style from '../../styler';
import { INPUT_CLASSES } from './types';
import type { InputProps } from '... |
node_modules/semantic-ui-react/dist/es/collections/Form/FormRadio.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
import Radio from '../../addons/Radio';
import FormField from './FormField';
/**
* Sugar for <Form.Field control={Radio} />.
* @see Form
* @see Radi... |
src/routes/acceptors/edit/index.js | nagucc/jkef-wxe | import React from 'react';
import Registration from '../registration/Registration';
import fetch from '../../../core/fetch';
export default {
path: '/edit/:id',
async action({ params }) { // eslint-disable-line react/prop-types
const { id } = params;
// 提交到服务器进行更新的方法
const action = async data => {
... |
client/page/preset-management/phrase.js | johngodley/search-regex | /**
* External dependencies
*/
import React from 'react';
import { translate as __ } from 'i18n-calypso';
/**
* Internal dependencies
*/
/**
* Replace a tag within a phrase
*
* @param {string} phrase - Phrase to replace
* @param {string} tag - Tag name
* @param {string} title - Tag title
*/
function replac... |
renderer/components/Icon/Logout.js | LN-Zap/zap-desktop | import React from 'react'
const SvgLogout = props => (
<svg height="1em" viewBox="0 0 14 15" width="1em" {...props}>
<g fill="none" fillRule="evenodd">
<path
d="M4.058 2.615C1.562 3.8.078 6.455.598 9.222c.5 2.652 2.69 4.616 5.315 5.052a6.762 6.762 0 0 0 4.252-.69c2.332-1.243 3.69-3.804 3.19-6.47a6.... |
src/Parser/Druid/Feral/Modules/Bleeds/RipUptime.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Enemies from 'Parser/Core/Modules/Enemies';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import StatisticBox, { ST... |
src/components/Fold/Fold.js | eunvanz/handpokemon2 | import React from 'react'
import PropTypes from 'prop-types'
import { Transition } from 'react-transition-group'
const foldDefaultStyle = {
transition: `max-height 300ms ease-in-out`,
maxHeight: '0',
display: 'block',
width: '100%',
overflow: 'hidden'
}
const foldTransitionStyle = {
entering: { maxHeight:... |
packages/material/src/components/IconButton.native.js | wq/wq.app | import React from 'react';
import { useIcon } from '@wq/react';
import { IconButton as PaperIconButton, useTheme } from 'react-native-paper';
import PropTypes from 'prop-types';
export default function IconButton({ icon, onClick, onPress, color, ...rest }) {
const Icon = useIcon(icon),
theme = useTheme();
... |
react/deploy/myapp/src/index.js | fishjar/gabe-study-notes | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import {
BrowserRouter as Router,
Route,
Switch,
} from "react-router-dom";
const NoMatch = ({ location }) => (
<div>
<h3>
No match... |
src/routes.js | giuband/react-router-boilerplate | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import About from './components/About';
import Home from './components/Home';
export default (
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="/about" component... |
app/components/Home.js | espenbjorkeng/Rabagast | // @flow
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import GetScreen from '../containers/GetScreen';
import Screen from './Screen';
import styles from './Home.css';
const Home = (props) => {
let w... |
src/components/Trends.js | kakapo2016-projects/tooth-and-pail | import React from 'react'
import ToggleDisplay from 'react-toggle-display'
import { Chart } from 'react-google-charts'
import getRequest from '../getRequest.js'
// components
import NavBar from './NavBar'
import Header from './Header'
import RaisedButton from 'material-ui/lib/raised-button'
import TrendDonationSize fr... |
docs/app/Examples/elements/Step/Variations/index.js | ben174/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const StepVariationsExamples = () => (
<ExampleSection title='Variations'>
<ComponentExample
title='Stackable'
descri... |
app/javascript/mastodon/features/community_timeline/components/column_settings.js | musashino205/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.... |
server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js | joansmith/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
js/jqwidgets/demos/react/app/treegrid/jsondata/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTreeGrid from '../../../jqwidgets-react/react_jqxtreegrid.js';
class App extends React.Component {
componentDidMount() {
this.refs.myTreeGrid.expandRow(2);
}
render () {
let employees = [
{ "EmployeeID": 1, ... |
examples/CombinedValidations.js | jaredpalmer/formik | import React from 'react';
import { Formik, Field, Form, ErrorMessage } from 'formik';
import * as Yup from 'yup';
import { Debug } from './Debug';
const Schema = Yup.object().shape({
email: Yup.string().required('This field is required'),
});
// Async Validation
const sleep = ms => new Promise(resolve => setTimeou... |
src/svg-icons/device/battery-80.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBattery80 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h10V5.33z"/><path d="M7 9v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1... |
docs/app/Examples/collections/Grid/Variations/GridExampleTextAlignmentMixed.js | ben174/Semantic-UI-React | import React from 'react'
import { Grid, Menu } from 'semantic-ui-react'
const GridExampleTextAlignmentJustified = () => (
<Grid>
<Grid.Row columns={3}>
<Grid.Column>
<Menu fluid vertical>
<Menu.Item className='header'>Cats</Menu.Item>
</Menu>
</Grid.Column>
<Grid.Colu... |
src/ButtonWithOptions/ButtonWithOptions.js | skyiea/wix-style-react | import React from 'react';
import PropTypes from 'prop-types';
import WixComponent from '../BaseComponents/WixComponent';
import omit from 'lodash/omit';
import DropdownLayout from '../DropdownLayout/DropdownLayout';
import Button from '../Button';
import styles from './ButtonWithOptions.scss';
class ButtonWithOptions... |
src/js/screens/Form.js | grommet/next-sample | import React from 'react';
import {
Box, Button, CheckBox, Heading,
Paragraph, Text, TextInput,
} from 'grommet';
import Doc from '../components/Doc';
const Field = ({ children, error, label, help }) => {
let header;
if (label || help || error) {
header = (
<Box
direction='row'
just... |
app/javascript/mastodon/features/account_timeline/components/header.js | haleyashleypraesent/ProjectPrionosuchus | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import InnerHeader from '../../account/components/header';
import ActionBar from '../../account/components/action_bar';
import MissingIndicator from '../../../components/missing_indicator';
import ... |
spec/javascripts/jsx/context_cards/AvatarSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
app/components/Table/Table.js | arnef/ligatool-hamburg | import React from 'react';
import { View } from 'react-native';
import { connect } from 'react-redux';
import { Container, StaticListHeader, Text, Separator } from '../../components';
import * as LeaguesActions from '../../redux/modules/leagues';
import {
getNavigationStateParams,
navigate,
} from '../../redux/modu... |
src/components/image.js | JoshBarr/joshbarr.github.io | import React from 'react'
import { StaticQuery, graphql } from 'gatsby'
import Img from 'gatsby-image'
/*
* This component is built using `gatsby-image` to automatically serve optimized
* images with lazy loading and reduced file sizes. The image is loaded using a
* `StaticQuery`, which allows us to load the image ... |
src/Calendar.js | manishksmd/react-scheduler-smartdata | import PropTypes from 'prop-types';
import React from 'react';
import uncontrollable from 'uncontrollable';
import cn from 'classnames';
import {
accessor
, elementType
, dateFormat
, dateRangeFormat
, views as componentViews } from './utils/propTypes';
import { notify } from './utils/helpers';
import { na... |
node_modules/react-native/Libraries/Text/Text.js | 15chrjef/mobileHackerNews | /**
* 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... |
server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, o... |
app/javascript/mastodon/features/ui/components/media_modal.js | Toootim/mastodon | import React from 'react';
import ReactSwipeable from 'react-swipeable';
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... |
src/components/ProjectList/ProjectList.js | Thieurom/doanthieu.com | import React from 'react';
import styles from './ProjectList.module.sass';
const ProjectItem = ({ project }) => (
<div className={styles.project}>
<figure className={styles.figure}>
<img className={styles.image} src={project.image} alt={project.name} />
</figure>
<div className... |
modules/tribes/client/components/Tribe.js | Trustroots/trustroots | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';
import JoinButton from './JoinButton';
import { getCircleBackgroundStyle } from '../utils';
const Container = styled.div.attrs({
... |
src/pages/index.js | ideyuta/sofar | import React from 'react';
import { Helmet } from 'react-helmet';
import styled from 'styled-components';
import { graphql } from 'gatsby';
import { withPrefix } from 'gatsby-link';
import { colors } from '../assets';
import Header from '../components/Header';
const Anchor = styled.a`
font-size: 1rem;
`;
const Date ... |
js/components/anatomy/data.js | ChiragHindocha/stay_fit | import React from 'react';
import {Image} from 'react-native';
var btnsDefault = [ { text: 'Button' } ];
var btnsTypes = [
{ text: 'Primary', type: 'primary', },
{ text: 'Secondary', type: 'secondary', },
{ text: 'Delete', type: 'delete', }
];
var rows = [
{
text: "Basic Example",
right:... |
lib/commons/exec-view.js | RechInformatica/rech-environment-ide | 'use babel';
import React from 'react'
import ReactDOM from 'react-dom'
import ResizableBox from 'react-resizable-box'
export default class CommandOutputView extends React.Component {
constructor() {
super();
this.state = {entries: []};
}
componentDidMount() {
}
componentWillUnmount(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.