path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/renderers/2d/strategies/naiveCanvas/NaiveCanvasRenderView.js | jeffdowdle/l-systems | import React from 'react';
import PropTypes from 'prop-types';
import { expand } from 'modules/lsystem/functions';
import NaiveCanvas from './NaiveCanvas';
class NaiveCanvasRenderView extends React.Component {
constructor(props) {
super(props);
this.canvas = null;
}
shouldComponentUpdate() {
return ... |
docs/src/PropTable.js | mmarcant/react-bootstrap | import merge from 'lodash/merge';
import React from 'react';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
import Table from '../../src/Table';
import capitalize from '../../src/utils/capitalize';
function cleanDocletValue(str) {
return str.trim().replace(/^\{/, '').replace(/\}$/... |
src/parser/core/ParseResults.js | FaideWW/WoWAnalyzer | import React from 'react'; // eslint-disable-line no-unused-vars
import ISSUE_IMPORTANCE from './ISSUE_IMPORTANCE';
const ASSERTION_MODES = {
IS_GREATER_THAN: '>',
IS_GREATER_THAN_OR_EQUAL: '>=',
IS_LESS_THAN: '<',
IS_LESS_THAN_OR_EQUAL: '<=',
IS_TRUE: '==true',
IS_FALSE: '==false',
IS_EQUAL: '===',
};
c... |
src/svg-icons/notification/network-locked.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationNetworkLocked = (props) => (
<SvgIcon {...props}>
<path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 1... |
src/svg-icons/notification/sync.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSync = (props) => (
<SvgIcon {...props}>
<path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25... |
assets/jqwidgets/demos/react/app/grid/columnsresize/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
class App extends React.Component {
componentDidMount() {
this.refs.myGrid.on('columnresized', (event) => {
let column = event.args.columntext;
let newwidth... |
fields/types/select/SelectColumn.js | matthewstyers/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var SelectColumn = React.createClass({
displayName: 'SelectColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
linkTo: React.Prop... |
app/javascript/mastodon/features/search/index.js | yi0713/mastodon | import React from 'react';
import SearchContainer from 'mastodon/features/compose/containers/search_container';
import SearchResultsContainer from 'mastodon/features/compose/containers/search_results_container';
const Search = () => (
<div className='column search-page'>
<SearchContainer />
<div className='... |
definitions/npm/react-redux_v4.x.x/flow_v0.30.x-v0.52.x/test_Provider.js | flowtype/flow-typed | // @flow
import React from 'react'
import { Provider } from 'react-redux'
// $FlowExpectedError
const provider = <Provider />; // missing store
|
src/muiThemeable.js | chrismcv/material-ui | import React from 'react';
import getMuiTheme from './styles/getMuiTheme';
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
export default function muiThemeable(WrappedComponent) {
const MuiComponent = (props, {muiTheme = getMuiTheme()}) =>... |
client/scripts/components/read-only-questionnaire-summary/index.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
Lic... |
src/reactions/ReactionList.js | saketkumar95/zulip-mobile | /* @flow */
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { ReactionType } from '../types';
import Reaction from './Reaction';
import aggregateReactions from './aggregateReactions';
const styles = StyleSheet.create({
reactions: {
flexDirection: 'row',
flexWrap: 'wrap',
... |
src/main.js | Mmzer/redux-demo-calculator | import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import './assets/mobile-reset.scss';
import App from './components/App';
//import reducer from './reducers';
import reducers from './reducers/reducers';
const store = createSto... |
app/javascript/mastodon/components/load_gap.js | MitarashiDango/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/PageHeader.js | azmenak/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const PageHeader = React.createClass({
render() {
return (
<div {...this.props} className={classNames(this.props.className, 'page-header')}>
<h1>{this.props.children}</h1>
</div>
);
}
});
export default PageHeader;
|
test/compare.js | concordancejs/react | import test from 'ava'
import concordance from 'concordance'
import React from 'react'
import renderer from 'react-test-renderer'
import plugin from '..'
import HelloMessage from './fixtures/react/HelloMessage'
const plugins = [plugin]
const render = value => renderer.create(value).toJSON()
const compare = (t, getSa... |
test/focus-first-suggestion/AutosuggestApp.js | fresk-nc/react-autosuggest | import React, { Component } from 'react';
import sinon from 'sinon';
import Autosuggest from '../../src/AutosuggestContainer';
import languages from '../plain-list/languages';
import { escapeRegexCharacters } from '../../demo/src/components/utils/utils.js';
function getMatchingLanguages(value) {
const escapedValue =... |
src/svg-icons/image/tonality.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTonality = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.... |
src/input.js | knledg/react-blur-admin | import _ from 'lodash';
import React from 'react';
export class Input extends React.Component {
static propTypes = {
type: React.PropTypes.string,
id: React.PropTypes.string,
name: React.PropTypes.string,
className: React.PropTypes.string,
placeholder: React.PropTypes.string,
helpLabel: Reac... |
BuyDemo/index.ios.js | HAPENLY/ReactNative-Source-code-Demo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
//导入外部组件
var Main = require('./Component/Main/ZPMain');
export default class BuyDemo extends Component {
render... |
examples/src/components/UsersField.js | lemming/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... |
platform/ui/src/components/studyList/StudyList.js | OHIF/Viewers | import './StudyList.styl';
import React from 'react';
import classNames from 'classnames';
import TableSearchFilter from './TableSearchFilter.js';
import PropTypes from 'prop-types';
import { StudyListLoadingText } from './StudyListLoadingText.js';
import { useTranslation } from 'react-i18next';
const getContentFromU... |
src/routes.js | maquessime/stack-to-issue-ui | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... |
tests/MultiDropdownList/MultiDropdownList.js | divyanshu013/reactivebase | import React from 'react';
import { ReactiveBase, MultiDropdownList, ReactiveList } from '../../app/app.js';
import {config} from './config';
import { mount } from 'enzyme';
function testComponent(cb) {
const onData = function(res, err) {
cb(res, err);
}
const component = mount(
<ReactiveBase
app={config.Re... |
src/components/navBar/MoreComponent.js | Philin-Anton/prototypeApp | 'use strict';
import React from 'react';
import { connect } from 'react-redux'
import { createSelector } from 'reselect'
require('styles/ActionIcons.scss');
require('styles/navBar/More.scss');
import {getContent, clearLocalStore} from '../../api/maggo';
import {handleSave, handlePublish, handleDelete} from '../../api... |
modules/gui/src/app/home/body/process/recipe/classification/panels/inputImagery/recipeSection.js | openforis/sepal | import {Form} from 'widget/form/form'
import {compose} from 'compose'
import {connect, select} from 'store'
import {getRecipeType} from 'app/home/body/process/recipeTypes'
import {msg} from 'translate'
import {recipeAccess} from '../../../../recipeAccess'
import {switchMap} from 'rxjs'
import PropTypes from 'prop-types... |
src/svg-icons/notification/event-busy.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationEventBusy = (props) => (
<SvgIcon {...props}>
<path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V... |
react/src/components/dashboard/spinner/spinner.js | pbca26/EasyDEX-GUI | import React from 'react';
class Spinner extends React.Component {
constructor() {
super();
}
render() {
let _paths = [];
for (let i = 0; i < 4; i++) {
_paths.push(
<circle
className={ i === 0 ? 'path' : `path${i + 1}` }
cx="50"
cy="50"
r="20"
... |
src/components/hoc/OnKeyDownHOC.js | f0zze/rosemary-ui | import React from 'react';
import ReactDOM from 'react-dom';
import {KEY_DOWN} from '../../constant/events';
import {isFunction} from '../../util/utils';
export function enhanceWithKeyDown(ParentClass) {
class Enhance extends ParentClass {
static get displayName() {
return ParentClass.displayNa... |
app/javascript/mastodon/features/ui/components/link_footer.js | Kirishima21/mastodon | import { connect } from 'react-redux';
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom';
import { invitesEnabled, limitedFederationMode, version, repository, source_url } from 'mastodon/initi... |
src/components/maps.js | blanck-space/redux-weather | import React, { Component } from 'react';
import { Sparklines, SparklinesLine } from 'react-sparklines';
export class Map extends Component{
constructor(props){
super(props);
}
componentDidMount(){
new google.maps.Map(this.refs.mapDiv,{
zoom: 12,
center:{
lat: this.props.lat,
... |
src/components/Header/Header.js | TriPSs/react-esc-example | import React from 'react'
import { Link } from 'react-router-dom'
export const Header = () => (
<div>
<h1>React ESC Example Project</h1>
<Link to="/">
Home
</Link>
{' · '}
<Link to="/counter">
Counter
</Link>
{' · '}
<Link to="/async">
Async
</Link>
</div>
)
e... |
packages/react-scripts/fixtures/kitchensink/template/src/features/webpack/ScssModulesInclusion.js | jdcrensh/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/scss-styles.module.scss';
import indexStyles from './assets/index.module.scss';
... |
templates/rubix/laravel/laravel-example/src/common/header.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import classNames from 'classnames';
import { SidebarBtn, Navbar, Nav, NavItem, Icon, Grid, Row, Col } from '@sketchpixy/rubix';
class Brand extends React.Component {
render() {
return (
<Navbar.Header {...this.props}>
<Navbar.Brand tabIndex='-1'>
<a href='#'>
... |
src/client.js | ACPK/react-starter-kit | /**
* 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 'whatwg-fetch';
import React from 'react';
impor... |
src/scripts/views/header.js | earlgreygoo/TwitterClone | import React from 'react'
var Header = React.createClass({
_search: function(event){
if(event.keyCode === 13){
console.log("searching")
location.hash = "search/" + event.target.value
event.target.value = ""
}
},
render: function() {
return (
<header>
<a href="#home">
<h1>Twitter</h1>
... |
docs/src/PageFooter.js | PeterDaveHello/react-bootstrap | import React from 'react';
import packageJSON from '../../package.json';
let version = packageJSON.version;
if (/docs/.test(version)) {
version = version.split('-')[0];
}
const PageHeader = React.createClass({
render() {
return (
<footer className='bs-docs-footer' role='contentinfo'>
<div c... |
app/javascript/mastodon/components/admin/Counter.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedNumber } from 'react-intl';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import classNames from 'classnames';
import Skeleton from 'mastodon/components/skeleton';
const percIncrease = (a,... |
src/index.js | harsh-S/ecomm_review_ui | import React from 'react'
import ReactDOM from 'react-dom'
import {Modal, Button, ButtonGroup, Form, FormGroup, FormControl, ControlLabel,
Col, Table, Panel, ListGroup, ListGroupItem} from 'react-bootstrap'
import StarRatingComponent from 'react-star-rating-component'
import * as constants from './constants.js'
impo... |
docs/src/app/components/pages/components/SelectField/ExampleSimple.js | xmityaz/material-ui | import React from 'react';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
const styles = {
customWidth: {
width: 150,
},
};
export default class SelectFieldExampleSimple extends React.Component {
constructor(props) {
super(props);
this.state = {value... |
third_party/prometheus_ui/base/web/ui/node_modules/eslint-plugin-react/lib/util/propTypes.js | GoogleCloudPlatform/prometheus-engine | /**
* @fileoverview Common propTypes detection functionality.
*/
'use strict';
const flatMap = require('array.prototype.flatmap');
const annotations = require('./annotations');
const propsUtil = require('./props');
const variableUtil = require('./variable');
const testFlowVersion = require('./version').testFlowVer... |
ui/src/components/WorkbenchTabs.js | jliddev/pgBrowse | import React, { Component } from 'react';
class WorkbenchTabs extends Component {
componentWillMount() {
}
render() {
return (
<div className="WorkbenchTabs">
<p>
Workbench Tabs
</p>
</div>
);
}
}
expo... |
src/containers/book-list.js | timseo/tinder_redux | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { selectBook } from '../actions/index';
import { bindActionCreators } from 'redux';
class BookList extends Component {
renderList() {
return this.props.books.map((book) => {
return (
<li
key={book.titl... |
src/components/views/dialogs/SetPasswordDialog.js | martindale/vector | /*
Copyright 2017 Vector Creations 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, sof... |
frontend/components/Login.js | ParroApp/parro | import React from 'react';
import axios from 'axios';
import { Link } from 'react-router-dom'
class Login extends React.Component {
constructor(props) {
super(props);
this.state = {
username: '',
password: ''
}
}
// onSubmit(event) {
// event.preventDefault();
// // axios.post("h... |
src/components/RequiredInput/RequiredInput.js | nicolasmoise/CMC-2 | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import withStyles from '../../decorators/withStyles';
import styles from './RequiredInput.css';
@withStyles(styles)
class RequiredInput extends React.Component {
constructor(props) {
super(props);
this.state... |
src/components/safety/gallery-item-header.js | mozilla/advocacy.mozilla.org | import React from 'react';
import MobileHeader from './mobile-header.js';
var Router = require(`react-router`);
var Link = Router.Link;
var GalleryItemHeader = React.createClass({
contextTypes: {
intl: React.PropTypes.object
},
render: function() {
return (
<div className="gallery-item-header-conta... |
src/pagination/PaginationList.js | opensourcegeek/react-bootstrap-table | import React from 'react';
import PageButton from './PageButton.js';
import Const from '../Const';
class PaginationList extends React.Component {
changePage(page) {
if (page == this.props.prePage) {
page = this.props.currPage - 1 < 1 ? 1 : this.props.currPage - 1;
} else if (page == this.props.nextPag... |
src/svg-icons/editor/vertical-align-bottom.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorVerticalAlignBottom = (props) => (
<SvgIcon {...props}>
<path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/>
</SvgIcon>
);
EditorVerticalAlignBottom = pure(EditorVerticalAlignBottom);
EditorVertical... |
client/src/components/AllBooks.js | elliotjz/book-trading-club | import React from 'react'
import PropTypes from 'prop-types'
import BookGallery from './BookGallery'
import CircularProgress from 'material-ui/CircularProgress'
import Trades from './Trades'
import Divider from 'material-ui/Divider'
class AllBooks extends React.Component {
requestTrade(event) {
event.preventDefaul... |
lavalab/html/node_modules/react-bootstrap/es/MediaBody.js | LavaLabUSC/usclavalab.org | 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 ... |
src/Navbar/auth/Signup/Signup.js | znewton/myxx-client | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import firebase from 'firebase/app';
import 'firebase/auth';
import GoogleButton from '../GoogleButton/GoogleButton';
export default class Signup extends Component {
constructor () {
super();
this.state = {
email: '... |
example/ReactNativeYouTubeExample.js | inProgress-team/react-native-youtube | /**
* @format
* @flow
*/
import React from 'react';
import {
StyleSheet,
View,
Text,
ScrollView,
PixelRatio,
Platform,
Button,
Dimensions,
} from 'react-native';
import YouTube, { YouTubeStandaloneIOS, YouTubeStandaloneAndroid } from 'react-native-youtube';
export default class ReactNativeYouTubeEx... |
packages/material-ui/src/Dialog/Dialog.js | cherniavskii/material-ui | // @inheritedComponent Modal
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import { capitalize } from '../utils/helpers';
import Modal from '../Modal';
import Fade from '../transitions/Fade';
import { duration } from '... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | tecnologiaaxios/produccionXico | import React from 'react';
import { render } from 'react-dom';
// 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';
render(<HelloWorld />, document.getElementById('react-root'));
|
src/components/Organization.js | hozefaj/project-helena | import React, { Component } from 'react';
import { Table, Menu, Header, Input, Button, Icon } from 'semantic-ui-react';
import parse from 'parse-link-header';
import _ from 'lodash';
import { Link } from 'react-router-dom';
let state = {
repos: [],
org: '',
pages: 0,
error: false,
currentPage: 1,
forkAsc: ... |
src/index.js | jasonslyvia/react-anything-sortable | /**
* @file react-anything-sortable
* @author jasonslyvia
*/
/* eslint new-cap:0, consistent-return: 0, react/prefer-es6-class: 0, react/sort-comp: 0 */
/**
* @dependency
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import ReactDOM from 'reac... |
src/svg-icons/action/view-array.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewArray = (props) => (
<SvgIcon {...props}>
<path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/>
</SvgIcon>
);
ActionViewArray = pure(ActionViewArray);
ActionViewArray.displayName = 'ActionViewA... |
React Native/Demos/douApp/index.android.js | AngryLi/note-iOS | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class douApp extends Component {
render() {
return (
<View style={styles.container}>
<Text s... |
src/views/components/formatted-time/index.js | zerubeus/sawt | import React from 'react';
import PropTypes from 'prop-types';
function FormattedTime({value = 0, unit}) {
// HTMLAudioElement provides time in seconds
// SoundCloud provides time in milliseconds
if (unit === 'ms') {
value /= 1000; // convert milliseconds to seconds
}
let hours = Math.floor(value / 360... |
app/helpers/common.js | logful/logful-web | import React from 'react';
var fileSizeLib = require('filesize');
import { formatNow, formatUnix } from '../helpers/datetime';
export function levelToString(level) {
switch (level) {
case 1:
return 'verbose';
case 2:
return 'debug';
case 3:
return 'info';... |
src/svg-icons/places/ac-unit.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesAcUnit = (props) => (
<SvgIcon {...props}>
<path d="M22 11h-4.17l3.24-3.24-1.41-1.42L15 11h-2V9l4.66-4.66-1.42-1.41L13 6.17V2h-2v4.17L7.76 2.93 6.34 4.34 11 9v2H9L4.34 6.34 2.93 7.76 6.17 11H2v2h4.17l-3.2... |
src/js/components/User.js | nicholasodonnell/moonshine | import React from 'react';
class User extends React.Component {
constructor() {
super();
}
componentWillMount() {
}
render() {
return (
<a class="c-user" href="#">
<img class="c-user__gravatar" src="https://www.gravatar.com/avatar/8c9d6e893592ae13f0588... |
packages/side-nav/src/js/react.js | govau/uikit | /*! [replace-name] v[replace-version] */
/***************************************************************************************************************************************************************
*
* sideNav function
*
* A vertical list of links for site navigation typically placed next to the body content.
... |
packages/react/src/components/UIShell/SideNavMenu.js | carbon-design-system/carbon-components | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { ChevronDown20 } from '@carbon/icons-react';
import { settings } from 'carbon-components';
import cx from 'classnames';
import PropTy... |
Realization/frontend/czechidm-core/src/components/advanced/ContractSliceInfo/ContractSliceInfo.js | bcvsolutions/CzechIdMng | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
//
import * as Utils from '../../../utils';
import * as Basic from '../../basic';
import { ContractSliceManager } from '../../../redux';
import AbstractEntityInfo from '../EntityInfo/AbstractEntityInfo';
import DateVal... |
node_modules/react-bootstrap/es/InputGroup.js | WatkinsSoftwareDevelopment/HowardsBarberShop | 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 ... |
ui/src/main/js/components/JobListItem.js | apache/aurora | import React from 'react';
import { Link } from 'react-router-dom';
import Icon from 'components/Icon';
import { TASK_COUNTS } from 'utils/Job';
export function JobTaskStats({ stats }) {
const taskStats = [];
TASK_COUNTS.forEach((k) => {
if (stats[k] > 0) {
const label = k.replace('TaskCount', '');
... |
variations/fix-helper-way/src/components/Button.js | xaviervia/tessellation | import React from 'react'
export default function Button ({children, title, ...props}) {
return <button
className='b--none bg-navy'
{...props}>
{children}
<span className='below'>{title}</span>
</button>
}
|
index.js | NoamELB/shouldComponentUpdate-Children | import React from 'react';
export function useShallowEqual(WrappedComponent) {
class ShallowEqualEnhancer extends WrappedComponent {
shouldComponentUpdate(nextProps, nextState) {
let shouldUpdate = false;
if (!super.shouldComponentUpdate || super.shouldComponentUpdate(nextProps, nex... |
src/index.js | panlu888/small-react-app | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
lib/views/create-dialog-view.js | atom/github | import React from 'react';
import PropTypes from 'prop-types';
import DialogView from './dialog-view';
import RepositoryHomeSelectionView from './repository-home-selection-view';
import DirectorySelect from './directory-select';
import RemoteConfigurationView from './remote-configuration-view';
import TabGroup from '.... |
src/home/Search.js | zhangxin840/mobile-env | import React, { Component } from 'react';
import _ from 'lodash';
var Search = React.createClass({
getInitialState: function() {
return {id: window.location.hash.split("/").pop()};
},
componentDidMount: function() {
window.onpopstate = () => {
var id = window.location.hash.split("/").pop();
t... |
examples/01 Dustbin/Stress Test/index.js | craigklem/react-dnd | import React from 'react';
import Container from './Container';
export default class DustbinStressTest {
render() {
return (
<div>
<p>
<b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/01%20Dustbin/Stress%20Test'>Browse the Source</a></b>
</p>
<p>
... |
examples/sidebar/app.js | maksad/react-router | import React from 'react';
import { Router, Route, Link } from 'react-router';
import data from './data';
var Category = React.createClass({
render() {
var category = data.lookupCategory(this.props.params.category);
return (
<div>
<h1>{category.name}</h1>
{this.props.children || (
... |
app/javascript/mastodon/components/short_number.js | maa123/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers';
import { FormattedMessage, FormattedNumber } from 'react-intl';
// @ts-check
/**
* @callback ShortNumberRenderer
* @param {JSX.Element} displayNumber Number to display
* @para... |
src/routes/Dashboard/components/Map/MapMarker/MapMarker.story.js | leeloo-acme-freight/acme-freight-webui | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import MapMarker from './MapMarker';
storiesOf('MapMarker', module)
.add('distributionCenter', () => (
<MapMarker
type="distributionCenter"
/>
))
.add('retailer', () => (
<MapMarker
type="retailer"
/>
))
.ad... |
src/components/MainView/SocketIOLogTable.js | parkjoon/socketio-log-viewer | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { setApplicationFilter } from '../../actions/filters';
import { TYPE_TO_CLASS } from '../../utils/constants';
class SocketIOLogTable extends Component {
toggleTypeFilter(type) {
this.props.setApplicationFilter({
application:... |
app/components/global/AccountName.js | aaroncox/vessel | // @flow
import React, { Component } from 'react';
const { shell } = require('electron');
export default class AccountName extends Component {
handleLink = () => {
const { name } = this.props;
shell.openExternal(`https://hive.blog/@${name}`);
}
render() {
const { name } = this.props;
return (
... |
samples/react/internals/templates/containers/App/index.js | IntelliSearch/search-client | /**
*
* App.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
... |
spa/src/APITest/APITest.js | santiagorp/auth0-spa-api-ae | import React, { Component } from 'react';
import {Button} from 'react-bootstrap'
import axios from 'axios';
import './APITest.css';
export default class APITest extends Component {
constructor(props, context) {
super(props, context)
this.state = {
pingData: "",
timeSheetData: "",
employeesD... |
src/svg-icons/image/crop.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop = (props) => (
<SvgIcon {...props}>
<path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"/>
</SvgIcon>
);
ImageCrop = pure(ImageCrop);
ImageCrop.displayNam... |
Markup/publisher/src/index.js | wso2-dev-ux/product-apim | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
packages/mineral-ui-icons/src/IconFindReplace.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconFindReplace(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconPr... |
client/src/App.js | andela-emabishi/github-users | import React, { Component } from 'react';
import './App.css';
import UsersContainer from './components/UsersContainer/UsersContainer';
class App extends Component {
render() {
return (
<div className="App">
<UsersContainer />
</div>
);
}
}
export default App;
|
ajax/libs/react-instantsearch/5.2.1/Connectors.js | sufuf3/cdnjs | /*! React InstantSearch 5.2.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports',... |
client/node_modules/uu5g03/doc/main/server/public/data/source/uu5-bricks-lsi.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import BaseMixin from '../common/base-mixin.js';
import ElementaryMixin from '../common/elementary-mixin.js';
import LsiMixin from '../common/lsi-mixin.js';
import Span from './span.js';
import './lsi.less';
export const Lsi = React.createClass({
//@@viewOn:mixins
mixins: [
BaseMix... |
example/index.js | binocarlos/folder-ui | import React from 'react'
import ReactDOM from 'react-dom'
import injectTapEventPlugin from 'react-tap-event-plugin'
import { Provider } from 'react-redux'
import { applyMiddleware, compose, createStore, combineReducers } from 'redux'
import { Router, hashHistory } from 'react-router'
import { syncHistoryWithStore, rou... |
game-new/src/views/skills/diff.js | d07RiV/d3planner | import React from 'react';
import { Link } from 'react-router-dom';
import { ErrorView, withAsync, Icon, Cache, scrollView } from 'utils';
import { lineDiff, multilineDiff, valueDiff } from 'utils/diff';
import { elements, SkillView, PassiveView } from './common';
const runesEqual = (lhs, rhs) => lhs.name === rhs.nam... |
renderer/components/Form/SearchInput.js | LN-Zap/zap-desktop | import React from 'react'
import styled from 'styled-components'
import { themeGet } from '@styled-system/theme-get'
import Input from './Input'
import Search from 'components/Icon/Search'
const Icon = styled(Search)`
cursor: pointer;
height: 16px;
width: 16px;
position: absolute;
left: 16px;
user-select: ... |
src/routes/Oppgave3/components/StarWarsCharacters.js | andreasnc/summer-project-tasks-2017 | import React from 'react';
import PropTypes from 'prop-types';
import StarWarsCharacter from './StarWarsCharacter';
const StarWarsCharacters = ({}) =>
<div className="star-wars-characters">
{/* add missing code here */}
</div>;
StarWarsCharacters.propTypes = {
characters: PropTypes.arrayOf(PropTypes.shape()... |
src/svg-icons/device/gps-fixed.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsFixed = (props) => (
<SvgIcon {...props}>
<path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.1... |
src/frontend/html-renderer.js | simnalamburt/pen | import React from 'react';
import renderHTML from 'react-render-html';
import SocketClient from './socket-client';
class HTMLRenderer extends React.Component {
constructor(props) {
super(props);
this.state = { html: '' };
}
componentDidMount() {
this.socketClient = new SocketClient(this.props.locatio... |
src/svg-icons/toggle/star-border.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleStarBorder = (props) => (
<SvgIcon {...props}>
<path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1... |
app/components/GlobalNav.js | jefferchang/reactApp | import React from 'react'
import { Link } from 'react-router'
import { ButtonToolbar,Button,Navbar,NavbarHeader,NavbarBrand,NavbarToggle,NavbarCollapse ,Nav,NavItem,MenuItem,NavDropdown} from 'react-bootstrap'
const light = '#fff'
const styles = {}
styles.wrapper = {
padding: '10px 10px',
overflow: 'hidden',
... |
App/db/entities/content/FocusedItems.js | neytz/mamasound.fr | /*
* Copyright (c) 2017. Caipi Labs. All rights reserved.
*
* This File is part of Caipi. You can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
... |
example-app/src/components/Todo/Todo.js | tmf/services-example | import React from 'react';
import PropTypes from 'prop-types';
import './Todo.css';
const Todo = ({ onClick, completed, text }) => (
<li
onClick={onClick}
className={completed ? 'completed' : ''}
>
<input type="checkbox" className="toggle" checked={completed} />
<label>{text}</... |
app/containers/LanguageProvider/index.js | ducthong1991/React-Sagas | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
components/AddFoodDialog.js | filbertteo/frontend-challenge | import React from 'react';
import Dialog from 'material-ui/lib/dialog';
import FoodItemNutritionTable from './FoodItemNutritionTable';
import FlatButton from 'material-ui/lib/flat-button';
const AddFoodDialog = ({
open,
foodItem,
onRequestClose,
onRequestAddFoodItem,
}) => {
const actions = [
<FlatButto... |
src/Tooltip.js | tleunen/react-mdl | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import MDLComponent from './utils/MDLComponent';
const Tooltip = (props) => {
const { label, large, children, position, ...otherProps } = props;
const id = Math.random().toString(36).substr(2);
const newLab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.