path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
tests/lib/rules/vars-on-top.js | Jxck/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
* @copyright 2014 Danny Fritz. All rights reserved.
* @copyright 2014 Gyandeep Singh. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requiremen... |
app/components/panel/PanelInfo.js | jendela/jendela | import React from 'react'
import Colors from '../../constants/JendelaColors'
const styles = {
icon: {
width: '25%',
height: 'auto',
paddingBottom: '4px',
paddingTop: '4px'
},
info: {
width: '75%',
paddingLeft: 0
},
text: {
color: Colors.blue,
... |
ukelonn.web.frontend/src/main/frontend/components/AdminJobsEdit.js | steinarb/ukelonn | import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { Link } from 'react-router-dom';
import DatePicker from 'react-datepicker';
import {
JOB_TABLE_ROW_CLICK,
MODIFY_JOB_DATE,
SAVE_CHANGES_TO_JOB_BUTTON_CLICKED,
} from '../actiontypes';
import Locale from './Locale';
im... |
packages/material-ui-icons/src/RemoveFromQueue.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2H8v-2h8z" /></g>
, 'RemoveFromQueue');
|
src/components/common/ComponentUtil.js | lq782655835/ReactDemo | import React from 'react';
import ReactDOM from 'react-dom';
import { DataLoad } from './carcomponent';
//import { Modal } from 'antd';
class ComponentUtil{
constructor(){
this.loaderId = 'mask-loader';
}
showLoading = (loadMsg='Loading...') => {
let loading = document.getElementById(this.... |
examples/src/components/CustomOption.js | lemming/react-select | import React from 'react';
import Gravatar from 'react-gravatar';
var Option = React.createClass({
propTypes: {
addLabelText: React.PropTypes.string,
className: React.PropTypes.string,
mouseDown: React.PropTypes.func,
mouseEnter: React.PropTypes.func,
mouseLeave: React.PropTypes.func,
option: React.PropTy... |
src/AppHeader.js | tvthatsme/yalla-qari | import React, { Component } from 'react';
class AppHeader extends Component {
render() {
return (
<div className="AppHeader">
Yalla Qari
</div>
);
}
}
export default AppHeader;
|
packages/vx-grid/src/grids/Columns.js | Flaque/vx | import React from 'react';
import cx from 'classnames';
import { Line } from '@vx/shape';
import { Group } from '@vx/group';
import { Point } from '@vx/point';
export default function Columns({
top = 0,
left = 0,
scale,
height,
stroke = '#eaf0f6',
strokeWidth = 1,
strokeDasharray,
className,
numTicks... |
src/components/operatorDiagram/transformNote.js | philpl/rxjs-diagrams | import React from 'react'
import { white, black, gray } from '../../constants/colors'
import { fontFamily, fontSize } from '../../constants/font'
const textStyle = height => ({
fontFamily,
fontSize: `${height * 0.24}px`,
lineHeight: `${height * 0.24}px`,
textShadow: 'none'
})
const TransformNote = ({
stroke... |
todos/src/app/App.js | vnsgbt/reduxactdemo | import React from 'react';
import AddTodo from '../addToDo/AddTodo';
const App = () => (
<div>
<AddTodo />
</div>
);
export default App;
|
skm-spa/weather-jsx/src/index.js | krulik/demos | import React from 'react';
import ReactDOM from 'react-dom';
import './index.scss';
import App from './App/App.jsx';
ReactDOM.render(<App />, document.querySelector('main'));
|
src/app/views/projects/components/addProject/index.js | kristjanpikk/things-to-do | import React from 'react';
import './addProject.scss';
// Create AddProject component
export default class AddProject extends React.Component{
render() {
return(
<form className="projects__add-project" onSubmit={this.handleAddProject.bind(this)}>
<fieldset className="projects__add-project-container">
<i... |
src/containers/DevTools/DevTools.js | once-ler/react-fhir | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-H"
changePositionKey="ctrl-Q">
<LogMonitor /... |
app/static/src/diagnostic/EquipmentForm_modules/AditionalEqupmentParameters_modules/PowerSourceParams.js | SnowBeaver/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import ControlLabel from 'react-bootstrap/lib/ControlLabel';
import {findDOMNode} from 'react-dom';
import {hashHistory} from 'react-router';
import {Link} from 'react-router';
im... |
app/components/shared/headerNav.js | nypl-registry/browse | import React from 'react';
import { Router, Route, Link } from 'react-router';
const HeaderNav = React.createClass({
render() {
return (
<nav>
<div className="container">
<div className="row header">
<div className="eight columns">
<a href="http://www.nypl.o... |
src/components/Main.js | jc784999074/study-react | require('normalize.css/normalize.css');
require('styles/App.css');
import React from 'react';
//let yeomanImage = require('../images/yeoman.png');
//获取图片
var imageDatas = require('../data/image.json');
//拉出URL
imageDatas = (function getImages(imageDatas) {
for (var i = 0, j = imageDatas.length; i < j; i++) {
va... |
src/svg-icons/action/thumb-up.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionThumbUp = (props) => (
<SvgIcon {...props}>
<path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-... |
ignite/DevScreens/DevscreensButton.js | TylerKirby/Phrontis | import React from 'react'
import { View, Modal } from 'react-native'
import DebugConfig from '../../App/Config/DebugConfig'
import RoundedButton from '../../App/Components/RoundedButton'
import PresentationScreen from './PresentationScreen'
export default class DevscreensButton extends React.Component {
constructor ... |
packages/material-ui-icons/legacy/Battery50.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V13h10V5.33z" /><path d="M7 13v7.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13H7z" /></React... |
packages/web/src/components/Note/NoteLog.js | hengkx/note | import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import difflib from 'jsdifflib';
import './less/noteLog.less';
class NoteLog extends React.Component {
static propTypes = {
getLogList: PropTypes.func.isRequired,
id: PropTypes.string.isRequired,
getLogListResult:... |
src/interface/layout/NavigationBar/index.js | FaideWW/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { Trans, t } from '@lingui/macro';
import PatreonIcon from 'interface/icons/PatreonTiny';
import DiscordIcon from 'interface/icons/DiscordTiny';
import GitHubIcon from '... |
fields/types/number/NumberFilter.js | snowkeeper/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import { FormField, FormInput, FormRow, FormSelect } from 'elemental';
const MODE_OPTIONS = [
{ label: 'Exactly', value: 'equals' },
{ label: 'Greater Than', value: 'gt' },
{ label: 'Less Than', value: 'lt' },
{ label: 'Between', value: 'between' ... |
source/client/components/App.js | worminer/React.js-Financial-News | import React from 'react'
import UserActions from '../actions/UserActions'
import UserStore from '../stores/UserStore'
import Footer from './Footer'
import Navbar from './Navbar'
export default class App extends React.Component {
constructor (props) {
super(props)
this.state = UserStore.getState()
th... |
src/containers/Root.js | bplabombarda/3on3bot.com | import React from 'react'
import DatePicker from 'react-datepicker'
import { hot } from 'react-hot-loader'
import 'react-datepicker/dist/react-datepicker.css'
import getSchedule from '../utils/getSchedule'
class Root extends React.Component {
state = {
date: new Date(2016, 9, 16),
gamesByDate: {},
load... |
src/svg-icons/image/crop-7-5.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop75 = (props) => (
<SvgIcon {...props}>
<path d="M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"/>
</SvgIcon>
);
ImageCrop75 = pure(ImageCrop75);
ImageCrop75... |
packages/simple-cache-provider/src/SimpleCacheProvider.js | prometheansacrifice/react | /**
* Copyright (c) 2014-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.
*
* @flow
*/
import React from 'react';
import warning from 'fbjs/lib/warning';
function noop() {}
const Empty = 0;
const Pending = 1;
... |
app/javascript/mastodon/features/ui/components/confirmation_modal.js | corzntin/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
@injectIntl
export default class ConfirmationModal extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
... |
docs/app/Examples/elements/List/Variations/ListExampleVeryRelaxed.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Image, List } from 'semantic-ui-react'
const ListExampleVeryRelaxed = () => (
<List relaxed='very'>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar/small/daniel.jpg' />
<List.Content>
<List.Header as='a'>Daniel Louise</List.Header>
... |
src/ui/components/html.js | redcom/aperitive | // @flow
import React from 'react';
type Props = {
content: string,
state: Object,
assetMap: Object,
aphroditeCss: Object,
};
const Html = ({ content, state, assetMap, aphroditeCss }: Props) => {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="wi... |
src/native.js | davidkpiano/redux-simple-form | /* eslint-disable react/prop-types */
import React from 'react';
import {
MapView,
Picker,
DatePickerIOS,
DatePickerAndroid as RNDatePickerAndroid,
Switch,
TextInput,
SegmentedControlIOS,
Slider,
Text,
View,
} from 'react-native';
import SegmentedControlAndroid from 'react-native-segmented-control-t... |
client/src/components/dashboard/Profile/Preferences/common/SaveModal.js | FCC-Alumni/alumni-network | import React from 'react';
import { Button, Modal } from 'semantic-ui-react';
const SaveModal = ({ size, close, open, warning, isValid }) => {
const context = {
buttonColor: isValid ? 'green' : 'red',
header: isValid ? 'Success' : 'Error(s)',
headerColor: isValid ? '#007E00' : '#FF4025',
text: isVal... |
src/svg-icons/places/child-care.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesChildCare = (props) => (
<SvgIcon {...props}>
<circle cx="14.5" cy="10.5" r="1.25"/><circle cx="9.5" cy="10.5" r="1.25"/><path d="M22.94 12.66c.04-.21.06-.43.06-.66s-.02-.45-.06-.66c-.25-1.51-1.36-2.74-2.... |
packages/benchmarks/src/implementations/react-jss/View.js | css-components/styled-components | /* eslint-disable react/prop-types */
import classnames from 'classnames';
import injectSheet from 'react-jss';
import React from 'react';
class View extends React.Component {
render() {
const { classes, className, ...other } = this.props;
return <div {...other} className={classnames(classes.root, className)... |
judge/client/src/Components/ProblemForm.js | istamenov/NodeJS_Judge | import React, { Component } from 'react';
import TestForm from './TestForm';
class ProblemForm extends Component {
constructor(){
super();
this.state = {
problemAuthor : "",
problemDescription : "",
problemTitle : "",
problemTests : []
};
}
handleSubmit(e)
{
e.preventDe... |
step6-serviceapi/node_modules/react-router/es6/RouteContext.js | jintoppy/react-training | '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 Lifecycle
* mixin t... |
app/javascript/mastodon/components/display_name.js | kazh98/social.arnip.org | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { autoPlayGif } from 'mastodon/initial_state';
export default class DisplayName extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
oth... |
react/examples/Code/Redux_Server_Communication/src/components/App.js | jsperts/workshop_unterlagen | import React from 'react';
function App({
onAddData,
onDeleteData,
data,
}) {
return <div>
<h1>Data</h1>
<div>
<button onClick={onAddData} className="btn btn-primary">Add data</button>
</div>
<ul className="list-group">
{
data.map((d) => (<li key={d.id} className="list-group... |
src/components/DynamicForm.js | longyarnz/WelFurnish-E-Commerce | import React, { Component } from 'react';
import UUID from 'uuid';
export default class DynamicForm extends Component {
constructor(props){
super(props);
this.elements = {};
this._getRef = this._getRef.bind(this);
this._onClick = this._onClick.bind(this);
this.state = { restore: "" }
}
_getRe... |
src/js/components/icons/base/TableAdd.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/common/ui/Button/Button.stories.js | MadeInHaus/react-redux-webpack-starter | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { text, boolean, number } from '@storybook/addon-knobs';
import { Button } from '@ui';
storiesOf('Global/Button', module)
.add('default', () => (
<Button
onClick={... |
src/pages/index.js | harrygreen/parlay | import React from 'react';
import { connect } from 'react-redux'
import Nav from '../components/Nav'
import EditionSwitcher from '../components/EditionSwitcher';
import User from '../utils/User'
import LoggedOutModal from '../components/LoggedOutModal';
const App = React.createClass({
getInitialState: function() {
... |
app/javascript/mastodon/containers/card_container.js | honpya/taketodon | import React from 'react';
import PropTypes from 'prop-types';
import Card from '../features/status/components/card';
import { fromJS } from 'immutable';
export default class CardContainer extends React.PureComponent {
static propTypes = {
locale: PropTypes.string,
card: PropTypes.array.isRequired,
};
... |
frontend/src/WorkflowDetailGraph.js | aclowes/yawn | import React from 'react';
// importing from /dist/ because something in dagre-d3 isn't webpack compatible
import * as dagreD3 from 'dagre-d3/dist/dagre-d3'
import Graph from 'graphlib/lib/graph'
import d3 from 'd3'
export default class WorkflowDetailGraph extends React.Component {
shouldComponentUpdate() {
/* N... |
samples/react/app/utils/injectReducer.js | IntelliSearch/search-client | import React from 'react';
import PropTypes from 'prop-types';
import hoistNonReactStatics from 'hoist-non-react-statics';
import getInjectors from './reducerInjectors';
/**
* Dynamically injects a reducer
*
* @param {string} key A key of the reducer
* @param {function} reducer A reducer that will be injected
*
... |
src/FormControls/Static.js | aparticka/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import InputBase from '../InputBase';
import childrenValueValidation from '../utils/childrenValueInputValidation';
class Static extends InputBase {
getValue() {
const {children, value} = this.props;
return children ? children : value;
}
ren... |
webapp/app/components/Navbar/index.js | EIP-SAM/SAM-Solution-Server | //
// Navbar
//
import React from 'react';
import { Navbar, Nav, NavItem, Image, Glyphicon, NavDropdown, MenuItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import Logo from 'components/Navbar/logo_sam_solution.png';
import styles from 'components/Navbar/styles.css';
/* eslint-d... |
src/svg-icons/image/filter-b-and-w.js | lawrence-yu/material-ui | 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... |
src/modules/Tab/TabPane.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
createShorthandFactory,
customPropTypes,
getElementType,
getUnhandledProps,
META,
useKeyOnly,
} from '../../lib'
import Segment from '../../elements/Segment/Segment'
/**
* A tab pane holds t... |
src/svg-icons/action/language.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLanguage = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 ... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js | HelpfulHuman/helpful-react-scripts | /**
* 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 tiniestCat from './assets/tiniest-cat.jpg';
export default () =>
<img id="feature-image-inclusion" ... |
src/index.js | City-Bus-Stops/get-route-components | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory, IndexRedirect } from 'react-router';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
import 'leaflet/dist/leaflet.css';
import '../public/css/index.css';
import '../no... |
src/components/login/LoginForm.js | RanjithNair/FeatureTracker | import React from 'react';
import TextInput from '../common/TextInput';
import {Link, IndexLink} from 'react-router';
const LoginForm = ({user, onSave, onChange, saving}) => {
return (
<div className="test">
<div className="login">
<form>
<h1>Login</h1>
<TextInput
name="email"
... |
information/blendle-frontend-react-source/app/components/login/ResetPassword/index.js | BramscoChill/BlendleParser | import React from 'react';
import PropTypes from 'prop-types';
import BackboneView from 'components/shared/BackboneView';
import Link from 'components/Link';
import { translate } from 'instances/i18n';
import ResetTokenForm from 'views/forms/resettoken';
class ResetPassword extends React.Component {
static propTypes... |
src/svg-icons/action/open-in-new.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenInNew = (props) => (
<SvgIcon {...props}>
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
</SvgIcon>
);... |
js/jqwidgets/demos/react/app/window/keyboardnavigation/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxWindow from '../../../jqwidgets-react/react_jqxwindow.js';
import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDi... |
src/components/pages/demoPage/Register.js | guangqiang-liu/OneM | import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
export default class Register extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Register... |
src/routes/login/index.js | jhlav/mpn-web-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 Layout from '../../co... |
docs/src/components/Demo/EditorWithMentionHashtag/index.js | michalko/draft-wyswig | /* @flow */
import React from 'react';
import { Editor } from 'react-draft-wysiwyg';
import Codemirror from 'react-codemirror';
import sampleEditorContent from '../../../util/sampleEditorContent';
const EditorWithMentionHashtag = () => (
<div className="demo-section">
<h3>8. Editor with mentions and hashtag. Ty... |
packages/@lyra/components/src/progress/story.js | VegaPublish/vega-studio | /* eslint-disable react/no-multi-comp */
import React from 'react'
import ProgressBar from 'part:@lyra/components/progress/bar'
import ProgressCircle from 'part:@lyra/components/progress/circle'
import {
withKnobs,
number,
boolean,
text
} from 'part:@lyra/storybook/addons/knobs'
import {storiesOf} from 'part:@l... |
app/jsx/grading/GradingPeriodSet.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... |
bro/index.js | sullenor/reversi | 'use strict';
import App from 'app/app.jsx';
import React from 'react';
React.render(<App />, document.body);
|
src/routes/Counter/components/Counter.js | markkong318/Girlip | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
asteroids-scoreboard/src/ScoreBoard.js | lachok/asteroids | import React from 'react'
import { connect } from 'react-redux'
import _ from 'lodash'
export class ScoreBoard extends React.Component {
render() {
const renderStat = (name, value, description) => {
return <div>
<h3>{name}</h3>
<h2>{value}</h2>
... |
src/svg-icons/communication/portable-wifi-off.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPortableWifiOff = (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.... |
components/Layout/Navigation.js | knaufk/ultidate-frontend | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
test/helpers/shallowRenderHelper.js | felinewong/PhotoGallery | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/svg-icons/editor/border-vertical.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderVertical = (props) => (
<SvgIcon {...props}>
<path d="M3 9h2V7H3v2zm0-4h2V3H3v2zm4 16h2v-2H7v2zm0-8h2v-2H7v2zm-4 0h2v-2H3v2zm0 8h2v-2H3v2zm0-4h2v-2H3v2zM7 5h2V3H7v2zm12 12h2v-2h-2v2zm-8 4h2V3h-2v18z... |
geonode/contrib/monitoring/frontend/src/components/cels/alert/index.js | ingenieroariel/geonode | import React from 'react';
import PropTypes from 'prop-types';
import HoverPaper from '../../atoms/hover-paper';
import styles from './styles';
class Alert extends React.Component {
static propTypes = {
alert: PropTypes.object.isRequired,
}
constructor(props) {
super(props);
this.state = {
d... |
assets/jqwidgets/demos/react/app/editor/toolsvisibility/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxEditor from '../../../jqwidgets-react/react_jqxeditor.js';
class App extends React.Component {
render() {
return (
<JqxEditor width={800} height={400} tools={'bold italic underline | left center right'}>
<... |
src/index.js | yihan940211/WTFSIGTP | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render(
<Provi... |
code-samples/small-is-beautiful.js | vimto/wdcnz-2015-react-tips-and-tricks | import React from 'react';
export default React.createClass({
displayName: 'ProjectSettings',
getInitialState() {
return { open: false };
},
renameProject(event) {
// Code to rename Project...
},
archiveProject(event) {
// Code to archive Project...
},
openDropdown(event) {
event.p... |
node_modules/react-bootstrap/es/ModalHeader.js | okristian1/react-info | 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 ... |
source/patterns/00-atoms/forms/text-field/docs/text-field.example.js | apparena/patterns | import React from 'react';
// import {TextField} from "apparena-patterns-react";
export default function TextFieldExample() {
return (
<div/>
);
} |
modules/dreamview/frontend/src/components/Dreamview.js | ycool/apollo | import React from 'react';
import { inject, observer } from 'mobx-react';
import SplitPane from 'react-split-pane';
import Header from 'components/Header';
import MainView from 'components/Layouts/MainView';
import ToolView from 'components/Layouts/ToolView';
import MonitorPanel from 'components/Layouts/MonitorPanel';... |
components/PokeListView.js | geremih/PogoMap | import React from 'react';
import {
Text,
View,
Image,
StyleSheet,
} from 'react-native';
import {
MKCheckbox,
} from 'react-native-material-kit';
const styles = StyleSheet.create({
container: {
height: 64,
flexDirection: 'row',
alignItems: 'center',
},
icon: {
width: 50,
height: 50... |
demo13/src/app.js | toyluck/ReactDemo | import React from 'react';
export default class App extends React.Component{
constructor(props) {
super(props);
this.render = this.render.bind(this);
this.state = {
items: this.props.items,
disabled: true
};
}
componentDidMount() {
this.setState({
disabled: false
})
... |
src/dndBattle/Dnd.js | link1900/linkin-games | import React from 'react';
export default class Dnd extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div className="top-margin aligner">
<div className="aligner-item">DND 5e</div>
</div>
... |
code/workspaces/web-app/src/components/common/buttons/DangerButton.js | NERC-CEH/datalab | import React from 'react';
import Button from '@material-ui/core/Button';
import { withStyles } from '@material-ui/core';
const style = theme => ({
button: {
borderColor: theme.palette.dangerColor,
color: theme.palette.dangerColor,
'&:hover': {
backgroundColor: theme.palette.dangerBackgroundColorLi... |
src/routes/Welcome/Welcome.js | rlesniak/tind3r.com | // @flow
import React, { Component } from 'react';
import { Button, Classes } from '@blueprintjs/core';
import DocumentTitle from 'react-document-title';
import Login from 'components/Login';
import './Welcome.scss';
type PropsType = {
isInstalled: boolean,
isOutdated: boolean,
handleConnect: () => void,
}
e... |
src/Axis.js | 4Catalyzer/react-d3-svg | import React from 'react';
import { directionType } from './PropTypes';
import purePlotClass from './utils/purePlotClass';
@purePlotClass({ scale: ({ props }) => props.scale })
export default class Axis extends React.Component {
static propTypes = {
scale: React.PropTypes.func.isRequired,
orient: directionT... |
src/svg-icons/action/card-membership.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCardMembership = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"/>
</SvgIcon>... |
src/svg-icons/hardware/keyboard-return.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardReturn = (props) => (
<SvgIcon {...props}>
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
</SvgIcon>
);
HardwareKeyboardReturn = pure(HardwareKeyboardReturn);
Hardware... |
stories/components/form/formCheckBox/index.js | tal87/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import FormCheckBox from 'shared/components/form/formCheckBox/formCheckBox';
storiesOf('shared/components/form/formCheckBox', module)
.add('Default', () => (
<FormCheckBox
name="che... |
client/src/pages/Login.react.js | wenhao/fixed-asset | import React from 'react'
import {
RaisedButton,
FontIcon,
Paper,
TextField
} from 'material-ui'
import {
State,
Link
} from 'react-router'
import userApi from '../services/user'
var Login = React.createClass({
mixins: [State],
getInitialState() {
return {
title: '',
isDisable: t... |
packages/wix-style-react/src/StatisticsWidget/docs/examples/Descriptions.js | wix/wix-style-react | /* eslint-disable no-undef */
import React from 'react';
import { StatisticsWidget } from 'wix-style-react';
render(
<div style={{ background: '#fff' }}>
<StatisticsWidget
items={[
{
value: '$500',
description: 'Sales',
},
{
value: '$1,500',
},
... |
src/UserInfo.js | porterjamesj/goodreads-vis | import React, { Component } from 'react';
import { extractField } from './utils';
export default class UserInfo extends Component {
render() {
let userName, imageUrl;
if (this.props.info) {
userName = extractField(this.props.info, "user name");
imageUrl = extractField(this.props.info, "user small_... |
src/components/referrals/send-referral-email.js | dylanlott/bridge-gui | import React, { Component } from 'react';
export default class SendReferralEmail extends Component {
render() {
return (
<div className="col-xs-12 col-md-6">
<h2>Refer by email</h2>
<div className="content">
<form acceptCharset="UTF-8" onSubmit={this.props.handleSubmit}>
... |
docs/src/examples/modules/Progress/Content/ProgressExampleLabel.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Progress } from 'semantic-ui-react'
const ProgressExampleLabel = () => <Progress percent={55}>Label</Progress>
export default ProgressExampleLabel
|
app/assets/scripts/main.js | requesto/requesto | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, Route, IndexRoute, useRouterHistory} from 'react-router'
import { createHashHistory } from 'history'
import ReduxPromise from 'redux-promise';
impor... |
client/src/javascript/components/general/form-elements/TextboxRepeater.js | stephdewit/flood | import {FormElementAddon, FormRow, FormRowGroup, Textbox} from 'flood-ui-kit';
import React from 'react';
import AddMini from '../../icons/AddMini';
import RemoveMini from '../../icons/RemoveMini';
export default class TextboxRepeater extends React.PureComponent {
state = {
textboxes: this.props.defaultValues |... |
examples/CollectionBasic.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Collection from '../src/Collection';
import CollectionItem from '../src/CollectionItem';
export default
<Collection>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
<CollectionItem>Alvin</CollectionItem>
</Col... |
node_modules/react-native-svg/elements/Line.js | 15chrjef/mobileHackerNews | import React from 'react';
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
import {LineAttributes} from '../lib/attributes';
import Shape from './Shape';
import {pathProps, numberProp} from '../lib/props';
class Line extends Shape {
static displayName = 'Line';
static ... |
dispatch/static/manager/src/js/pages/ProfilePage.js | ubyssey/dispatch | import React from 'react'
import R from 'ramda'
import { connect } from 'react-redux'
import { Button, Intent } from '@blueprintjs/core'
import userActions from '../actions/UserActions'
import PersonEditor from '../components/PersonEditor'
import { TextInput } from '../components/inputs'
import * as Form from '../com... |
src/router/Routes.js | tedyuen/react-redux-form-v6-example | import React from 'react';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import configureStore from '../store/configureStore';
import { history } from '../router/history';
import { MainRouter } from './MainRouter';
const store = configureStore();
const Routes = () => ... |
react/create-react-app-sample/sample/src/index.js | TakesxiSximada/TIL | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
client/lib/convert-to-print/index.js | OpenWebslides/OpenWebslides | /* eslint-disable no-case-declarations */
import React from 'react';
import { contentItemTypes } from 'constants/contentItemTypes';
import { inlinePropertyTypes } from 'constants/inlinePropertyTypes';
// converters:
import ConversationElement from 'presentationals/components/print-view/ConversationElement';
import ill... |
src/docs/examples/ProgressBar/Example70Percent.js | vonZ/rc-vvz | import React from 'react';
import ProgressBar from 'ps-react/ProgressBar';
/** 70% progress */
export default function Example70Percent() {
return <ProgressBar percent={70} width={150} />
}
|
actor-apps/app-web/src/app/components/modals/InviteUser.react.js | zwensoft/actor-platform | /*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import ActorClient from 'utils/ActorClient';
import { KeyCodes } from 'constan... |
openex-front/src/private/components/exercises/Exercises.js | Luatix/OpenEx | import React from 'react';
import { makeStyles } from '@mui/styles';
import { useDispatch } from 'react-redux';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import { Lin... |
src/js/contexts/ResponsiveContext/stories/CustomBreakpoints.js | HewlettPackard/grommet | import React from 'react';
import { Box, Grommet, Heading, ResponsiveContext } from 'grommet';
const customBreakpoints = {
global: {
breakpoints: {
xsmall: {
value: 375,
},
small: {
value: 568,
edgeSize: {
none: '0px',
small: '6px',
medium:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.