path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/NodeGraph/NodeGraph.js | littlewin-wang/mufly | import React from 'react'
import Line from './Line'
import Node from './Node'
import { isEmpty, compact } from 'lodash'
import './NodeGraph.styl'
export default class NodeGraph extends React.Component {
constructor (props) {
super(props)
this.state = this.calculateNodeAndLinePositions(props)
}
componen... |
client/acp/components/Settings.js | NicolasSiver/nodebb-plugin-ns-twitch-monitor | import React from 'react';
import Actions from '../actions/Actions';
import ClientIdForm from './ClientIdForm';
import connectToStores from 'alt/utils/connectToStores';
import SettingsStore from '../stores/SettingsStore';
import ValidationStore from '../stores/ValidationStore';
class Settings extends React.Component ... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.js | GreenGremlin/create-react-app | /**
* Copyright (c) 2015-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.
*/
import React from 'react';
import aFileWithExtUnknown from './assets/aFileWithExt.unknown';
const text = aFileWithExtUnknown.includes('... |
modules/components/NoMatch.js | mattrei/ghostbike.wien | import React from 'react'
export default React.createClass({
render() {
return (
<div>404</div>
)
}
})
|
src/components/Button/index.js | iris-dni/iris-frontend | import React from 'react';
import styles from './button.scss';
export const getClassname = ({
disabled,
modifier,
block,
size,
brand
}) => ([
styles[disabled ? 'is-disabled' : (modifier || 'default')],
styles[block ? 'display-block' : 'display-inline'],
styles[size ? `size-${size}` : 'size-regular'],
... |
src/components/ButtonGroup/ButtonGroup.js | Landish/react-spectre-css | import React from 'react';
import { bool, element } from 'prop-types';
import classNames from 'classnames';
const ButtonGroup = ({ full, children, ...rest }) => {
return (
<div className={classNames('btn-group', { 'btn-group-block': full })} {...rest}>
{children}
</div>
);
};
/**
* ButtonGroup prop... |
src/scenes/home/header/sideNav/sideNav.js | alexspence/operationcode_frontend | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Drawer from 'shared/components/drawer/drawer';
import NavItem from 'shared/components/nav/navItem/navItem';
import logo from 'images/logos/small-white-logo.png';
import styles from './sideNav.css';
class SideNav extends Component {
... |
docs/src/app/components/pages/components/AutoComplete/ExampleFilters.js | matthewoates/material-ui | import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
const colors = [
'Red',
'Orange',
'Yellow',
'Green',
'Blue',
'Purple',
'Black',
'White',
];
const fruit = [
'Apple', 'Apricot', 'Avocado',
'Banana', 'Bilberry', 'Blackberry', 'Blackcurrant', 'Blueberry',
'Boysenberry... |
src/pages/404/index.js | nai888/langua | import React from 'react'
import { Link } from 'gatsby'
import Layout from '../../components/layout'
import SEO from '../../components/seo'
const NotFound = () => (
<Layout>
<SEO title='404: Not found' />
<h1>404: Not Found</h1>
<p>
Uh oh, you seem to have become lost… Try heading back{' '}... |
packages/flow-runtime-docs/src/components/docs/PragmasPage.js | codemix/flow-runtime | /* @flow */
import React, { Component } from 'react';
import {Link} from 'react-router';
import {observer} from 'mobx-react';
import Example from '../Example';
const suppressTypesCode = `
type Demo = 123;
let oneTwoThree: Demo = 123;
(oneTwoThree: $FlowFixMe);
oneTwoThree = 456;
console.log(123, '=', oneTwoThree)... |
packages/icons/src/md/hardware/Watch.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdWatch(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40 24c0 5.09-2.38 9.62-6.09 12.55L32 48H16l-1.91-11.45C10.38 33.62 8 29.09 8 24c0-5.09 2.38-9.62 6.09-12.55L16 0h16l1.91 11.45C37.62 14.38 40 18.91 40... |
node_modules/react-icons/fa/volume-up.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const FaVolumeUp = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m18.6 7.9v24.2q0 0.6-0.4 1t-1 0.5-1-0.5l-7.4-7.4h-5.9q-0.6 0-1-0.4t-0.4-1v-8.6q0-0.6 0.4-1t1-0.4h5.9l7.4-7.4q0.4-0.5 1-0.5t1 0.5 0.4 1z m8.6 12.1q0 1.7-0.9 3.2t-2.5 ... |
pages/index.js | victorkane/blog-simple-next | import React from 'react'
// change next/link to next/prefetch
import Link from 'next/prefetch'
import 'isomorphic-fetch'
import Header from '../components/header'
import { apiHost } from '../appconfig.js'
export default class extends React.Component {
static async getInitialProps () {
// eslint-disable-next-l... |
app/containers/RegistrationContainer/index.js | rjgreaves/finances | /*
*
* RegistrationContainer
*
*/
import React from 'react';
import { connect } from 'react-redux';
import RegistrationForm from '../../components/RegistrationForm';
import selectRegistrationContainer from './selectors';
import { register } from './actions';
export class RegistrationContainer extends React.Compon... |
src/Slider/Slider.js | gutenye/react-mc | // @flow
import React from 'react'
import cx from 'classnames'
import { MDCSliderFoundation } from '@material/slider/dist/mdc.slider'
import * as helper from '../helper'
import type { PropsC } from '../types'
type PropsT = {
min: number,
max: number,
value: number,
step: number,
disabled: boolean,
discrete... |
client/decorators/Document.js | gasman/wagtaildraftail | import PropTypes from 'prop-types';
import React from 'react';
import { Icon } from 'draftail';
const Document = ({ entityKey, contentState, children }) => {
const { title } = contentState.getEntity(entityKey).getData();
return (
<span data-tooltip={entityKey} className="RichEditor-link" title={title}>
<... |
src/components/MarkerAttack.js | IgorSzyporyn/wwiionline-webmap | import React from 'react';
import PropTypes from 'prop-types';
import { OverlayView } from "react-google-maps";
import getPixelPositionOffset from '../utils/getPixelPositionOffset';
const MarkerAttack = props => (
<OverlayView
bounds={props.bounds}
getPixelPositionOffset={getPixelPositionOffset}
mapPaneN... |
ajax/libs/react-instantsearch/4.0.0-beta.5/Dom.js | jdh8/cdnjs | /*! ReactInstantSearch 4.0.0-beta.5 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof def... |
src/ProfessionalMemberModal.js | escabc/members-search-app | import React from 'react'
import Modal from 'react-modal'
import Avatar from './Avatar'
import Button from './Button'
import MemberName from './MemberName'
import MemberDetailsItem from './MemberDetailsItem'
import MemberCertifications from './MemberCertifications'
import theme from './theme'
const styles = {
root... |
src/components/ExampleTwoDeepComponent.js | jpirsch/jpirsch.github.io | import React from 'react';
import PropTypes from 'prop-types';
import Interactive from 'react-interactive';
import { Link } from 'react-router-dom';
import { Li } from '../styles/style';
import s from '../styles/exampleTwoDeepComponent.style';
const propTypes = {
location: PropTypes.object.isRequired,
};
export def... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | verniy6462/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
export default class SettingToggle extends React.PureComponent {
static propTypes = {
prefix: PropTypes.string,
settings: ImmutablePropTypes.map.isReq... |
ui/src/components/AutoComplete2/Inputs/SingleInput/ModelInput.js | LearningLocker/learninglocker | import React from 'react';
import { mapValues } from 'lodash';
import { fromJS } from 'immutable';
import { compose, withProps, defaultProps, withState } from 'recompose';
import { withModel } from 'ui/utils/hocs';
import SingleInput from 'ui/components/AutoComplete2/Inputs/SingleInput/SingleInput';
import EditableOpti... |
packages/material-ui-icons/legacy/BatteryCharging20TwoTone.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M11 20v-3H7v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17h-4.4L11 20z" /><path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V17h4v-2.5H9L13 7v5.5h2L12.6 1... |
library_js/src/App.js | HoldYourBreath/Library | import React from 'react';
import sessionStore from './stores/Session';
import locationStore from './stores/LocationStore';
import ListBooks from './components/ListBooks';
import LoanBook from './components/LoanBook';
import CheckInBook from './components/CheckInBook';
import LogIn from './components/logIn';
import Add... |
docs/app/Examples/collections/Table/Variations/index.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Message } from 'semantic-ui-react'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
const Variations = () => {
return (
<ExampleSection title='Variations'>
<Compon... |
src/routers/client.js | iris-dni/iris-frontend | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from 'containers/App';
import Home from 'containers/Home';
import Imprint from 'containers/Imprint';
import About from 'containers/About';
import Terms from 'containers/Terms';
import LoginPage from 'containers/Login';
import Logou... |
stories/ToggleSwitch/index.js | nirhart/wix-style-react | import React from 'react';
import {storiesOf} from '@kadira/storybook';
import Markdown from '../utils/Components/Markdown';
import CodeExample from '../utils/Components/CodeExample';
import Readme from '../../src/ToggleSwitch/README.md';
import ExampleStandard from './ExampleStandard';
import ExampleStandardRaw from ... |
client/src/pages/payment/payments/index.js | csleary/nemp3 | import { animated, config, useTransition } from 'react-spring';
import { shallowEqual, useSelector } from 'react-redux';
import DownloadButton from './downloadButton';
import React from 'react';
import Socket from './socket';
import Status from './status';
import Transactions from './transactions';
import styles from '... |
src/routes/index.js | obfk/buildmaster | import React from 'react'
import { Route, IndexRoute, Redirect } from 'react-router'
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to files ... |
ngs.mobile/src/routes/index.js | sherxia92/EliteCRM | import React, { Component } from 'react';
import {
BrowserRouter as Router,
Route,
Link,
NavLink,
Redirect,
withRouter,
Switch
} from 'react-router-dom'
import Page from '../containers/page'
import Login from '../containers/login'
import Home from '../containers/home'
import Menu from '../co... |
src/components/Header.js | theCoolKidsJavaScriptMeetup/cuddlyGuacamole | import React, { Component } from 'react';
import Button from './Button';
export default class Header extends Component {
render() {
return (
<div className="App-header">
<div className="header-wrap">
<div className="header-content">
<h1>Connect. Collaborate. Create.</h... |
client/app/containers/NodeEditorToolbar/index.js | bryanph/Geist | /*
*
* NodeEditorToolbar
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom'
import {HotKeys} from 'react-hotkeys';
import moment from 'moment'
import { FlatButton } from '../../components/button'
import SavedState from '../../containers/SavedState... |
wrappers/md.js | philipnilsson/Badness10k | import React from 'react'
import 'css/markdown-styles.css'
import Helmet from 'react-helmet'
import { config } from 'config'
function formatDate(date) {
var monthNames = [
"January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "... |
app/test/test_helper.js | TCotton/react-reaction | import jsdom from 'jsdom';
import _$ from 'jquery';
import TestUtils from 'react-addons-test-utils';
import ReactDom from 'react-dom';
import { IntlProvider } from 'react-intl';
import chai, { expect } from 'chai';
import React from 'react';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
i... |
js/App/Components/GeoFence/SubViews/TimePicker.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
actor-apps/app-web/src/app/components/activity/GroupProfileMembers.react.js | liuzwei/actor-platform | import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import DialogActionCreators from 'actions/DialogActionCreators';
import LoginStore from 'stores/LoginStore';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { Pure... |
views/prompt.js | bodiam/black-screen | import _ from 'lodash';
import React from 'react';
import Autocomplete from './autocomplete';
import DecorationToggle from './decoration_toggle';
// TODO: Make sure we only update the view when the model changes.
export default React.createClass({
getInitialState() {
return {
suggestions: [],
... |
src/components/Layout/Col.js | LIQIDTechnology/liqid-react-components | import './styles.scss';
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
const classMap = {
// Define width for breakpoints
xs: 'liq_layout-fb-col-xs',
sm: 'liq_layout-fb-col-sm',
md: 'liq_layout-fb-col-md',
lg: 'liq_layout-fb-col-lg',
// Defin... |
fields/components/columns/CloudinaryImageSummary.js | Yaska/keystone | import React from 'react';
const IMAGE_SIZE = 18;
const linkStyle = {
marginRight: 8,
};
const boxStyle = {
borderRadius: 3,
display: 'inline-block',
height: IMAGE_SIZE,
overflow: 'hidden',
verticalAlign: 'middle',
width: IMAGE_SIZE,
};
const imageStyle = {
display: 'block',
height: IMAGE_SIZE,
left: '50%',... |
src/components/video_list.js | williammw/learning-react | //10.1
import React from 'react';
// 11.1
import VideoListItem from './video_list_item';
const VideoList = (props) => {
// 10.3 explain of the props
//(props) const videos = props.videos; <--explaination
// 12.2
const VideoItems = props.videos.map((video) => {
// 12.3 ((.)(.)) we're using goo... |
app/javascript/mastodon/features/pinned_statuses/index.js | res-ac/mstdn.res.ac | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchPinnedStatuses } from '../../actions/pin_statuses';
import Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../compon... |
src/ui/layouts/MainLayout.js | gouxlord/gx-js-starterkit | import React from 'react'
import Header from 'src/ui/views/HeaderView';
import ReduxDevTool from 'src/dev-tools/ReduxDevTool';
var MainLayout = React.createClass({
render: function(){
return (
<div>
<ReduxDevTool/>
<Header/>
<div>
... |
src/components/common_comments.js | YMFL/reactNews | /**
* Created by YangQianHui on 2017/4/9.
*/
import React from 'react';
import {Row, Col, Form, Input, Button, Card,notification} from 'antd'
const FormItem = Form.Item;
class CommonComments extends React.Component {
constructor() {
super();
this.state = {
comments: ''
}
};
componentDidMount(... |
src/blog/flux/views/pages/ArticleNewPage.js | exseed/exseed-boilerplate | import React from 'react';
import connectToStores from 'alt-utils/lib/connectToStores';
import HTML5Backend from 'react-dnd-html5-backend';
import { DragDropContext } from 'react-dnd';
import SampleWidget from '../components/SampleWidget';
import SortableWidget from '../components/SortableWidget';
import WidgetAction f... |
node_modules/react-bootstrap/es/PageHeader.js | Crisa221/Lista-Giocatori | 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 ... |
docs/app/Examples/elements/Rail/Types/RailExampleRail.js | shengnian/shengnian-ui-react | import React from 'react'
import { Grid, Image, Rail, Segment } from 'shengnian-ui-react'
const RailExampleRail = () => (
<Grid centered columns={3}>
<Grid.Column>
<Segment>
<Image src='/assets/images/wireframe/paragraph.png' />
<Rail position='left'>
<Segment>Left Rail Content</... |
src/svg-icons/notification/do-not-disturb-alt.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationDoNotDisturbAlt = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12zm8 8... |
app/components/Toggle/index.js | jdelatorreitrs/react-boilerplate | /**
*
* LocaleToggle
*
*/
import React from 'react';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = (<option>--</option>);
// If we have items, render them
if (props.values) {
content = props.values.map((value) => (
<ToggleOption key... |
src/components/ConfigModal.js | google/stijl | // Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
src/Parser/Hunter/Marksmanship/Modules/Talents/ExplosiveShot.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from "common/SpellIcon";
import SpellLink from 'common/SpellLink';
import ItemDamageDone from 'Main/ItemDamageDone';
/**
* Fires a slo... |
js/components/ByteGroup.js | kevinlitchfield/base64-visualizer | import React from 'react'
export default React.createClass({
showCharacter: function(byte) {
const character = byte.character
if (character) {
return character.replace(' ', '\u00A0')
}
},
colspansFor: function(byteGroup) {
const firstByteColspan = Math.min(8 + 8 * (byteGroup.bytes[0].... |
src/components/controls.js | poshaughnessy/react-three-demo | import React from 'react';
import ReactTHREE from 'react-three';
import RadioGroup from 'react-radio-group';
import Constants from '../constants';
class ControlsComponent extends React.Component {
constructor(props) {
super(props);
this.displayName = 'Controls';
this._onChangeRobot = th... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.js | sigmacomputing/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
examples/huge-apps/routes/Course/routes/Grades/components/Grades.js | amsardesai/react-router | import React from 'react';
class Grades extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//assignments: COURSES[params.courseId].assignments
//});
//}
render () {
//var { assignments } = this.props;
var assignments = COURSES[this.props.params.courseId].assignments... |
src/components/MomentsList/MomentsList.js | ggdiam/storia | import React, { Component } from 'react';
import styles from './MomentsList.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import Location from '../../core/Location';
import dataClient from '../../core/DataClient';
import apiUrls from '../../constants/ApiUrls';
import MomentIt... |
src/svg-icons/notification/airline-seat-flat.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatFlat = (props) => (
<SvgIcon {...props}>
<path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.1... |
app/components/Header/index.js | nathanhood/mmdb | import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import theme from 'theme';
import feather from 'feather-icons';
import Hamburger, { Bar } from '../Hamburger';
import Icon from '../Icon';
import SearchField from '../SearchField';
import { transitionOpacity } from 'm... |
packages/icons/src/dv/CreativeCommons.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvCreativeCommons(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M23.77 20.675c-1.129-2.063-3.06-2.881-5.303-2.881-3.262 0-5.855 2.305-5.855 6.214 0 3.971 2.437 6.214 5.964 6.214 2.266 0 4.19-1.246 5.256-3.... |
dashboard/components/Button.js | MEDIGO/laika | import React from 'react'
import { string, oneOf, func } from 'prop-types'
import './Button.css'
const Button = ({ label, type, onClick }) => {
const state = onClick ? type : 'hidden'
return (
<button className={`lk-button lk-button--${state}`} onClick={onClick}>
{label}
</button>
)
}
Button.pro... |
components/GoogleAnalytics.js | react-community/native-directory | import React from 'react';
const getAnalyticsScript = id => {
return `
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,... |
src/shared/containers/Root.js | AlekseyWW/shop-react-ssr | import PropTypes from 'prop-types';
import React from 'react';
import { Route } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import Layout from 'containers/Layout';
export default function Root({ history }) {
return (
<ConnectedRouter history={history}>
<Route path="/" componen... |
exemple/src/index.js | ipatate/react-router-scroll-memory | import React, { Component } from 'react';
import { render } from 'react-dom';
import {
BrowserRouter
} from 'react-router-dom';
import App from './App';
class Main extends Component {
render() {
return (
<BrowserRouter>
<App />
</BrowserRouter>
);
}
}
render(<Main />, document.getEl... |
public/jspm_packages/npm/react-router@2.0.0/es6/RouteContext.js | nayashooter/ES6_React-Bootstrap | /* */
"format cjs";
'use strict';
import warning from './routerWarning';
import React from 'react';
var object = React.PropTypes.object;
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the... |
src/admin/components/custom_email_section.js | foundersandcoders/sail-back | import React from 'react'
import preview_custom_email from '../components/preview_custom_email.js'
import custom_email_form from '../components/custom_email_form.js'
export default ({ custom_emails: { members, preview, mode }, preview_custom, ...props}) => {
const onSubmit = e => {
e.preventDefault()
previe... |
nodejs/hello-react/app01/src/index.js | jcbryksa/labs | import React from 'react';
import ReactDOM from 'react-dom';
//import App from './App';
//import registerServiceWorker from './registerServiceWorker';
//import './index.css';
//ReactDOM.render(<App />, document.getElementById('root'));
//function Welcome(props) {
// return <h1>Hello, {props.name}</h1>;
//}
cla... |
node_modules/node_modules/recharts/demo/component/Curve.js | SerendpityZOEY/Fixr-RelevantCodeSearch | import React from 'react';
import { Surface, Curve, Layer } from 'recharts';
import { curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen,
curveCatmullRomOpen } from 'd3-shape';
import { scaleOrdinal, schemeCategory10 } from 'd3-scale';
export default React.createClass({
render () {
const point... |
src/js/components/Chart/stories/Gradient.js | grommet/grommet | import React from 'react';
import { Box, Chart } from 'grommet';
const gradient = [
{ value: 0, color: 'status-ok' },
{ value: 25, color: 'status-ok' },
{ value: 27, color: 'status-warning' },
{ value: 30, color: 'status-critical' },
];
export const GradientCharts = () => (
// Uncomment <Grommet> lines whe... |
app/containers/Catalogue/containers/ProduitSelector.js | Proxiweb/react-boilerplate | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { push } from 'react-router-redux';
import uniq from 'lodash/uniq';
import { List, ListItem } from 'material-ui/List';
import CustomSelectField from 'components/Custom... |
src/containers/List.js | hannupekka/cocheck | // @flow
import styles from 'styles/containers/List.less';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { arrayMove } from 'react-sortable-hoc';
import { Helmet } from 'react-helmet';
import { pure } from 'recompose';
import CSSModules from 'react-css-modules';
import Stickyfi... |
web-server/v0.4/src/pages/Exception/404.js | gurbirkalsi/pbench | import React from 'react';
import { Link } from 'dva/router';
import Exception from 'ant-design-pro/lib/Exception';
export default () => (
<Exception
type="404"
desc="Sorry, the page you visited does not exist."
style={{ minHeight: 500, height: '80%' }}
linkElement={Link}
/>
);
|
src/containers/Home/Home.js | hitripod/react-redux-universal-hot-example | import React, { Component } from 'react';
import { Link } from 'react-router';
import { CounterButton, GithubButton } from 'components';
import config from '../../config';
export default class Home extends Component {
render() {
const styles = require('./Home.scss');
// require the logo image both from clien... |
src/components/views/elements/GeminiScrollbarWrapper.js | aperezdc/matrix-react-sdk | /*
Copyright 2018 New Vector Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
scripts/index.js | techctu/reactjs-cui | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
|
fields/types/cloudinaryimage/CloudinaryImageFilter.js | ligson/keystone | import classNames from 'classnames';
import React from 'react';
import { SegmentedControl } from 'elemental';
var PasswordFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || true
};
},
toggleChecked (checked) {
this.setState({
checked: checked
});
},
renderTog... |
fields/types/url/UrlField.js | creynders/keystone | import React from 'react';
import Field from '../Field';
import { Button, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'URLField',
statics: {
type: 'Url',
},
openValue () {
var href = this.props.value;
if (!href) return;
if (!/^(mailto\:)|(\w+\:\/\/)/.test(href)) {
href = '... |
docs/src/Root.js | insionng/react-bootstrap | import React from 'react';
import Router from 'react-router';
const Root = React.createClass({
statics: {
/**
* Get the list of pages that are renderable
*
* @returns {Array}
*/
getPages() {
return [
'index.html',
'introduction.html',
'getting-started.html',... |
app/components/SearchBar.js | Block-and-Frame/block-and-frame | import React, { Component } from 'react';
/*
This component requires the following props
* items - array of objects to search through; should be all data
* updateFiltered - method bound to component handling state that will update list
The component rendering the list should render a filtered set of data and... |
test/test_helper.js | jstowers/ReduxBlogApp | 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... |
src/parser/deathknight/blood/modules/features/BlooddrinkerTicks.js | FaideWW/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import SpellIcon from 'common/SpellIcon';
import { formatThousands... |
src/js/components/icons/base/PlatformUnixware.js | odedre/grommet-final | /**
* @description PlatformUnixware 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.textColo... |
src/components/Title.js | yogakurniawan/phoney-mobile | import React from 'react';
import {
Text,
StyleSheet,
View
} from 'react-native';
export default class Title extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>
{this.props.title}
</Text>
</View>
);
}
}
const ... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | alarky/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
export default class SettingToggle extends React.PureComponent {
static propTypes = {
prefix: PropTypes.string,
settings: ImmutablePropTypes.map.isReq... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SassModulesInclusion.js | GreenGremlin/create-react-app | /**
* Copyright (c) 2015-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.
*/
import React from 'react';
import styles from './assets/sass-styles.module.sass';
import indexStyles from './assets/index.module.sass';
... |
src/svg-icons/places/fitness-center.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesFitnessCenter = (props) => (
<SvgIcon {...props}>
<path d="M20.57 14.86L22 13.43 20.57 12 17 15.57 8.43 7 12 3.43 10.57 2 9.14 3.43 7.71 2 5.57 4.14 4.14 2.71 2.71 4.14l1.43 1.43L2 7.71l1.43 1.43L2 10.57 ... |
packages/editor/src/components/Icons/Heading.js | boldr/boldr | import React from 'react';
import Icon from './Icon';
const Heading = props => (
<Icon viewBox="0 0 448 512" {...props}>
<path d="M300 80h36.703v149.983H111.297V80H148c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v24c0 6.627 5.373 12 12 12h35.841v352H12c-6.627 0-12 5.373-12 12v24c0 6... |
src/interface/statistics/components/BoringResourceValue/index.js | ronaldpereira/WoWAnalyzer | /**
* A simple component that shows the resource icon left and a value right.
*/
import React from 'react';
import PropTypes from 'prop-types';
import ResourceIcon from 'common/ResourceIcon';
import '../BoringValue.scss';
const BoringResourceValue = ({ resource, value, label, extra, className }) => (
<div classN... |
src/components/ViolationCount.js | aepyornis/hpd-violations-web | import React from 'react';
/**
* Total Violation Count Display Component
* @param {String} count
* @returns {React.Component}
*/
export const ViolationCount = ({count}) => (
<h3>Number of Violations: <span className="f2">{count}</span></h3>
);
ViolationCount.propTypes = {
count: React.PropTypes.string
};
... |
frontend/src/App.js | VitaC123/YouTube-Mixtape | import React from 'react';
import { ConnectedRouter } from 'react-router-redux';
import { history } from './redux/store';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as actionCreators from './redux/actionCreators';
import Main from './components/Main/Main';
const App... |
src/parser/warrior/protection/modules/talents/AngerManagement.js | FaideWW/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatDuration } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import RESOURCE_TYPES from 'game/RESOURCE_T... |
examples/src/components/UsersField.js | PetrGlad/react-select | import GravatarOption from './CustomOption';
import GravatarValue from './CustomSingleValue';
import React from 'react';
import Select from 'react-select';
const USERS = require('../data/users');
var UsersField = React.createClass({
propTypes: {
hint: React.PropTypes.string,
label: React.PropTypes.string,
},
r... |
app/javascript/mastodon/components/load_gap.js | tri-star/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import Icon from 'mastodon/components/icon';
const messages = defineMessages({
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
});
export default @injectIntl
class LoadGap exte... |
src/components/CardComponent.js | tjkang/react-native-sample | // Import libraries for making a component
import React from 'react';
import {
StyleSheet,
View,
} from 'react-native';
// Make a component
const Card = props => (
<View style={styles.containerStyle}>
{props.children}
</View>
);
// ========================================================
// PropTypes chec... |
bin/_setup/_demo-src/js/riko.js | dchome/book-sharing-app | /* eslint-env browser */
import App from './components/App';
import React from 'react';
import ReactDOM from 'react-dom';
//Styles
import styles from '../sass/styles.scss';
import stylesCss from '../css/style.css';
import stylesLess from '../less/styles.less';
const root = document.getElementById('root');
ReactDOM.... |
app/containers/App.js | josser/pickler | import React, { Component } from 'react';
import { connect } from "react-redux";
import Window from "components/Window";
import WindowContent from "components/Window/Content";
import Toolbar from "components/Toolbar";
import Panes from "components/Panes";
import Pane from "components/Panes/Item";
import Tabs from "com... |
node_modules/react-icons/fa/volume-down.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const FaVolumeDown = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m24.1 7.9v24.2q0 0.6-0.4 1t-1 0.5-1-0.5l-7.4-7.4h-5.9q-0.6 0-1-0.4t-0.4-1v-8.6q0-0.6 0.4-1t1-0.4h5.9l7.4-7.4q0.4-0.5 1-0.5t1 0.5 0.4 1z m8.6 12.1q0 1.7-0.9 3.2t-2.... |
src/collection/collectionLocation.js | ikanedo/ecommerce-store-locator | import React from 'react';
import PropTypes from 'prop-types';
export default function CollectionLocation(props) {
const {
handleLocationClick,
location,
name,
className,
...inputProps
} = props;
const {
addressLine1,
telephone,
postcodeAfter,
city,
uid,
deliveryMode,... |
days-container.js | limelights/react-dejt | import React, { Component } from 'react';
import Days from './days';
export default class DaysContainer extends Component {
state = {
selectedDay: null
}
onSelectDay = (selectedDay) => {
this.setState({ selectedDay: selectedDay });
}
render() {
const { startDate } = this.props;
return <Da... |
docs/src/pages/components/cards/SimpleCard.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import Typography from '@material-... |
src/components/Form/components/Switch.js | Aus0049/react-component | /**
* Created by Aus on 2017/7/31.
*/
import React from 'react'
import classNames from 'classnames'
import { default as Sw } from '../../DataEntry/Switch/'
import '../style/form.scss'
const Switch = (props) => {
const {required, labelName, readOnly, value, controlled, attachedText, theme, onChange} = props;
... |
src/js/pages/Proposals/Leisure/AvailabilityPage.js | nekuno/client | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import translate from '../../../i18n/Translate';
import TopNavBar from '../../../components/TopNavBar/TopNavBar.js';
import '../../../../scss/pages/proposals/leisure/availability.scss';
import StepsBar from "../../../components/ui/StepsBar/St... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.