path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
spec/javascripts/jsx/collaborations/DeleteConfirmationSpec.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... |
server/dashboard/js/components/BenchResults.react.js | MrAlone/mzbench | import React from 'react';
import BenchGraphs from './BenchGraphs.react';
class BenchResults extends React.Component {
render() {
if (!this.props.bench.results) return null;
var metricValues = Object.keys(this.props.bench.results).map((key) => {
let data = this.props.bench.results[k... |
app/javascript/mastodon/features/ui/components/column_header.js | yukimochi/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
export default class ColumnHeader extends React.PureComponent {
static propTypes = {
icon: PropTypes.string,
type: PropTypes.string,
active: PropTypes.bool,
... |
components/issues/show/CommentList.js | CarbonStack/carbonstack | import React from 'react'
import {
monospacedFontFamily,
grayColor
} from '../../../lib/styles/variables'
import CommentForm from './CommentForm'
import CommentItem from './CommentItem'
import socket from '../../../lib/socket'
class CommentList extends React.PureComponent {
componentDidMount () {
const { iss... |
packages/mcs-lite-landing-web/src/components/SVG/SVGCode.js | MCS-Lite/mcs-lite | /**
* svgtoreact
*
* @author Michael Hsu
*/
import React from 'react';
export default function SVGCode(props) {
return (
<svg width={152} height={102} viewBox="0 0 152 102" {...props}>
<g>
<rect
id="Rectangle-25"
fill="#fff"
x={1}
y={1}
width={... |
app/main.js | zchen9/DonutTab | import React from 'react';
import ReactDOM from 'react-dom';
import Tab from './components/Tab/Tab.js';
require('./assets/styles/main.scss');
(function main() {
$.material.init();
ReactDOM.render(<Tab />, document.getElementById('donutTab'));
})();
|
src/common/PageIntro/PageIntro.js | Syncano/syncano-dashboard | import React from 'react';
import { colors as Colors } from 'material-ui/styles';
import CloseButton from '../CloseButton/';
const PageIntro = ({ headline, text, actions, onRequestClose, show = 'true' }) => {
const styles = {
main: {
marginBottom: 24,
padding: 32,
background: 'rgba(243, 243, 24... |
client/components/Flass/Lecture/Analysis/AnalysisLoadingHOC.js | Nexters/flass | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import AnalysisLoadingComponent from './AnalysisLoading/AnalysisLoadingComponent';
const {
number, shape, arrayOf, string
} = PropTypes;
export const AnalysisLoadingHOC = WrappedComponent => {
class WithLoading extends Component {
... |
example/index.js | pavkout/reactUI | import React from 'react';
import ReactDOM from 'react-dom';
import App from './app.jsx';
ReactDOM.render(<App />, document.getElementById('app'));
|
manga-reader-web/modules/ui/list_tags.js | gillessed/manga-reader | import React from 'react'
import TagCell from './tag_cell'
import catalogueController from '../controllers/catalogue_controller'
import serverConstants from '../model/server_constants'
import messages from './messages'
export default class AddManga extends React.Component {
constructor() {
super()
this.stat... |
src/components/php/original/PhpOriginal.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './PhpOriginal.svg'
/** PhpOriginal */
function PhpOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'PhpOriginal' + ' ' + className}
... |
packages/react/src/components/ToggleSmall/ToggleSmall-test.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 React from 'react';
import ToggleSmallSkeleton from '../ToggleSmall/ToggleSmall.Skeleton';
import { mount, shallow } from 'enzyme';
im... |
webapp-src/src/Hutch/ModalCoinExport.js | babelouest/hutch | import React, { Component } from 'react';
import i18next from 'i18next';
import ManageExportData from './ManageExportData';
class ModalCoinExport extends Component {
constructor(props) {
super(props);
this.state = {
config: props.config,
cb: props.cb,
safe: props.safe,
coin: props.... |
assets/js/components/separator.js | CandN/eliscore | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
const Separator = ({ text, categories, category_id }) => (
<div className="col-xs-2">
<div className="match__separator">
{text}
</div>
<div className="match__category">
{category_id ? categor... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/node_modules/rc-tabs/es/TabBarMixin.js | bhathiya/test | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _extends from 'babel-runtime/helpers/extends';
import React from 'react';
import classnames from 'classnames';
import warning from 'warning';
var tabBarExtraContentStyle = {
float: 'right'
};
export default {
getDefaultProps: function getD... |
docs/includes/Faq.js | harjeethans/materialistic | import React from 'react';
class Faq extends React.Component {
render() {
return (
<div>
FAQ
</div>
);
}
}
export default Faq;
|
src/components/about/About.js | andgiu/lin.bert | import React, { Component } from 'react';
import * as Config from '../actions/Config';
class About extends Component {
render(){
let about = Config.getAbout();
return (
<div id="about">
<img id="header" src={Config.getImageFromCache("about").src} />
<div id="content">
<h1><s... |
src/app/screens/Anonymous/screens/Contact/index.js | docgecko/react-alt-firebase-starter | /*! React Alt Firebase Starter */
import React from 'react';
import { Route } from 'react-router';
import Contact from './components/Contact';
export default (
<Route name='contact' path='/contact' handler={Contact}/>
);
|
src/TimePicker/TimePicker.spec.js | barakmitz/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import TimePicker from './TimePicker';
import {addHours, formatTime} from './timeUtils';
import getMuiTheme from '../styles/getMuiTheme';
describe('<TimePicker />', () => {
const muiTheme = getMuiTheme();
... |
test/helpers/shallowRenderHelper.js | drudv/react-redux-chat | /**
* 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'... |
client/app/components/graphs/ExploreGraph/index.js | bryanph/Geist |
import _ from 'lodash'
import React from 'react'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import ReactDOM from 'react-dom'
import classNames from 'classnames'
import { drag as d3Drag } from 'd3-drag'
import { select as d3Select } from 'd3-selection'
import { event as currentE... |
ajax/libs/react-instantsearch/4.3.0/Connectors.js | wout/cdnjs | /*! ReactInstantSearch 4.3.0 | © 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', 'react'], factory) :
... |
packages/mineral-ui-icons/src/IconPhotoLibrary.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 IconPhotoLibrary(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconP... |
pathfinder/architecturestack/src/common/Link.js | leanix/leanix-custom-reports | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class Link extends Component {
constructor(props) {
super(props);
this._handleClick = this._handleClick.bind(this);
}
_handleClick(e) {
e.preventDefault();
lx.openLink(this.props.link, this.props.target);
}
render() {
if (!... |
test/test_helper.js | kors-mk5/react-starter | 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/Table.js | xuorig/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Table = React.createClass({
propTypes: {
striped: React.PropTypes.bool,
bordered: React.PropTypes.bool,
condensed: React.PropTypes.bool,
hover: React.PropTypes.bool,
responsive: React.PropTypes.bool
},
getDefaultProps() {
... |
frontend/src/index.js | OwenRay/Remote-MediaServer | /* global document,navigator,window */
import React from 'react';
import ReactDOM from 'react-dom';
import history from './helpers/history';
import { Router, Switch } from 'react-router-dom';
// these two lines overwrite the serialization of redux-jsonapi
// eslint-disable-next-line
import serializer from "./helpers/st... |
docs/src/app/components/pages/components/Menu/ExampleSimple.js | mtsandeep/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
const style = {
display: 'inline-block',
margin: '16px 32px 16px 0',
};
const MenuExampleSimple = () => (
<div>
<Paper style={style}>
<Menu>
<Menu... |
src/vendor/recharts/demo/component/Rectangle.js | donal-crotty/fuzzy-telegram | import React, { Component } from 'react';
import { Surface, Rectangle } from 'recharts';
class RectangleDemo extends Component {
state = {
x: 50,
y: 50,
width: 80,
height: 100,
};
changeSize() {
this.setState({
x: Math.random() * 50,
y: Math.random() * 50,
width: Math.rando... |
src/routes/private/Private.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types'
import List, { ListItem, ListItemIcon, ListItemText } from '../../components/List'
// import { Switch, Route } from 'react-router-dom';
import {Key, SignIn, SignOut, Dividers, EllipsisHorizontal, Bars, UserCircle, Gear, Comment, Plus} from '../../components/... |
UI/Buttons/ButtonAddListItem.js | Datasilk/Dedicate | import React from 'react';
import {View, StyleSheet, Alert} from 'react-native';
import AppStyles from 'dedicate/AppStyles';
import Text from 'text/Text';
import Textbox from 'fields/Textbox';
import Button from 'buttons/Button';
import ButtonPlus from 'buttons/ButtonPlus';
export default class ButtonAddListItem exten... |
node_modules/react-bootstrap/es/NavbarHeader.js | mohammed52/something.pk | 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 ... |
CreateBookingForm.js | CaptainSadaf/codeignitor | import React, { Component } from 'react';
import { Card, Row, Col, Modal, Radio, Select, Menu, Dropdown, message, TimePicker, DatePicker, Icon, Form, Input, Button, Checkbox } from 'antd';
import BookingTransfer from './CreateBookingFormComponents/BookingTransfer.js'
import moment from 'moment';
import SearchAddres... |
techCurriculum/ui/starter_code/cards-app/src/App.js | AnxChow/EngineeringEssentials-group | /**
* Copyright 2017 Goldman Sachs.
* 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 writ... |
webpack/move_to_foreman/components/common/table/formatters/cellFormatter.js | cfouant/katello | import React from 'react';
import { Table as PfTable } from 'patternfly-react';
export default value => <PfTable.Cell>{value}</PfTable.Cell>;
|
stories/Drawer.js | Talend/react-talend-components | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { Layout, Drawer } from '../src/index';
const content = (
<div>
<h1>Welcome to the content for testing scroll</h1>
<ul>
<li>one</li>
<li>one</li>
<li>one</li>
<li>one</li>
<li>one</li>
<li>one</li>
<li>o... |
src/components/common/forms/LoggentForm.js | seyade/loggent | import React, { Component } from 'react';
import createFragment from 'react-addons-create-fragment';
import TextInput from './TextInput';
import TextAreaInput from './TextAreaInput';
import Button from './Button';
import './Forms.scss';
/**
* FAKE DATA
*
Head of front end development
Miu Furinji
Vivid Resou... |
fields/types/number/NumberFilter.js | naustudio/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import {
Form,
FormField,
FormInput,
FormSelect,
Grid,
} from '../../../admin/client/App/elemental';
const MODE_OPTIONS = [
{ label: 'Exactly', value: 'equals' },
{ label: 'Greater Than', value: 'gt' },
{ label: 'Less Than', value: 'lt' },
{ ... |
docs/src/app/components/pages/components/GridList/ExampleComplex.js | owencm/material-ui | import React from 'react';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
const styles = {
root: {
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'space-around',
},
gridLi... |
src/index.js | ricardojrgpimentel/emojieshelter | import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(<App />, document.getElementById('root'))
|
src/main.js | saitodisse/md-list | import 'babel-polyfill';
import React from 'react';
import {render} from 'react-dom';
import {Container} from 'cerebral-view-react';
import controller from './controller';
import Main from './components/Main';
require('!style!css!highlight.js/styles/github.css');
require('!style!css!highlight.js/styles/default.css');
... |
docs/app/Examples/collections/Table/Variations/TableExampleBasic.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleBasic = () => {
return (
<Table basic>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Table.... |
app/components/ShowProfile/index.js | theClubhouse-Augusta/JobWeasel-FrontEnd | /**
*
* ShowProfile
*
*/
import React from 'react';
import './style.css';
import './styleM.css';
export default class ShowProfile extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
user: {},
skills: [],
links: []
}
}
componentWillMount() {
this.g... |
src/components/hidden-comment.js | marcusdarmstrong/cloth-io | import React from 'react';
import CommentFrame from './comment-frame';
import CommentIndent from './comment-indent';
export default class HiddenComment extends React.Component {
static propTypes = {
comment: React.PropTypes.shape({
id: React.PropTypes.number.isRequired,
user: React.PropTypes.shape({
... |
examples/huge-apps/routes/Course/routes/Announcements/components/Announcements.js | littlefoot32/react-router | import React from 'react';
class Announcements extends React.Component {
render () {
return (
<div>
<h3>Announcements</h3>
{this.props.children || <p>Choose an announcement from the sidebar.</p>}
</div>
);
}
}
export default Announcements;
|
app/javascript/mastodon/features/explore/statuses.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusList from 'mastodon/components/status_list';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { fetchTrendingStatuses, expandTrendingStatuse... |
src/Winner.js | PixelPlayoffs/playoff_app | import React, { Component } from 'react';
class Winner extends Component {
render(){
return (<div className="winner">Winner is {this.props.winner}</div>);
}
}
export default Winner; |
src/svg-icons/image/panorama-vertical.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaVertical = (props) => (
<SvgIcon {...props}>
<path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02... |
test/PopoverSpec.js | sheep902/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Popover from '../src/Popover';
describe('Popover', () => {
it('Should output a popover title and content', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Popover title="Popover title">
<strong>Popov... |
src/Karika/CoreBundle/Resources/js/components/App.js | Qeti/Karika | "use strict";
import React from 'react';
import Header from './Header.js';
import {} from 'bootstrap/dist/css/bootstrap.css';
import {} from '../../css/app.css';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import darkBaseTheme from 'mate... |
src/App.js | kishorevalluri/react-experiments | import React, { Component } from 'react';
import { NICE, SUPER_NICE } from './colors';
class Counter extends Component {
constructor(props) {
super(props);
this.state = { counter: 0 };
this.interval = setInterval(() => this.tick(), 1000);
}
tick() {
this.setState({
counter: this.state.coun... |
js/components/blankPage/index.js | gectorat/react-native-app |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Text, Button, Icon } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import { popRoute } from '../../actions/route';
import styles from './styles';
class BlankPage exten... |
src/routes/register/index.js | cmosguy/react-redux-auth0 | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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 Register from './Registe... |
src/docs/examples/ProgressBar/Example70Percent.js | StudentOfJS/ps-react-rod | import React from 'react';
import ProgressBar from 'ps-react-rod/ProgressBar';
/** 70% Progress */
export default function Example70Percent() {
return <ProgressBar percent={70} width={150} />;
} |
src/components/Login.js | cedjud/nst-prototype | import React, { Component } from 'react';
import {
Segment,
Button,
Header,
Divider,
Form,
Icon
} from 'semantic-ui-react';
import fire from '../fire.js';
import { Redirect, Link } from 'react-router-dom';
import './Login.css';
class Login extends Component {
constructor(props){
super(props);
thi... |
client/src/components/Signup.js | JetRunner/epictodo | import React, { Component } from 'react';
import jQuery from 'jquery';
import { hashHistory } from 'react-router';
class Signup extends Component {
constructor(props) {
super(props);
this.state = {
hint: ''
};
}
render() {
return (
<div className="sign-up">
<table>
<... |
src/client/AppWrapper.js | EdgeJay/web-starterkit | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { AppContainer } from 'react-hot-loader';
import { AsyncComponentProvider } from 'react-async-component';
import asyncBootstrapper from 'react-asy... |
client/router.js | wilywallabies/wilyVideo | import React from 'react';
import {render} from 'react-dom';
import Main from './components/App';
render(<Main />, document.getElementById('root'));
//will hold router
|
src/svg-icons/av/volume-up.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvVolumeUp = (props) => (
<SvgIcon {...props}>
<path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91... |
src/pages/404.js | aravindballa/website2017 | import React from 'react';
import Layout from '../components/Layout';
class NotFoundPage extends React.Component {
render() {
return (
<Layout location={this.props.location}>
<h1>Not Found</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</Layout>
);
}
}
... |
example/index.ios.js | callstack-io/react-native-material-palette | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class TestPalette extends Component {
render() {
return (
<View style={styles.contain... |
examples/_drag-around-naive/index.js | prometheusresearch/react-dnd | 'use strict';
import React from 'react';
import LinkedStateMixin from 'react/lib/LinkedStateMixin';
import Container from './Container';
import { Link } from 'react-router';
const DragAroundNaive = React.createClass({
mixins: [LinkedStateMixin],
getInitialState() {
return {
hideSourceOnDrag: false
... |
src/svg-icons/av/repeat.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvRepeat = (props) => (
<SvgIcon {...props}>
<path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/>
</SvgIcon>
);
AvRepeat = pure(AvRepeat);
AvRepeat.displayName = 'AvRepeat';
AvRepeat.mu... |
react-redux-todo/src/components/Footer.js | okutani-t/javascript-code | import React from 'react'
import FilterLink from '../containers/FilterLink'
const Footer = () => (
<footer>
<span>SHOW:</span>
<FilterLink filter='SHOW_ALL'>ALL</FilterLink>
<FilterLink filter='SHOW_ACTIVE'>ACTIVE</FilterLink>
<FilterLink filter='SHOW_COMPLETED'>COMPLETED</FilterLink>
</footer>
)
... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | magharn/learning-angular2 | 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/svg-icons/image/filter-drama.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterDrama = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4... |
src/Add.js | robreczarek/clouds-stepone-app | import React, { Component } from 'react';
import { withRouter } from 'react-router';
import Formsy from 'formsy-react';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
i... |
example/src/scripts/pages/UIKit/Navigation/index.js | vyorkin-personal/erlyeditor | import React from 'react';
import { Link } from 'react-router';
import css from 'react-css-modules';
import styles from './styles';
export const Navigation = () => (
<ul styleName='navigation'>
<li><Link to='/ui-kit/badges'>{`badges`}</Link></li>
<li><Link to='/ui-kit/buttons'>{`buttons`}</Link></li>
<l... |
src/routes.js | Bartekus/r3 | import React from 'react';
import { Route, IndexRedirect } from 'react-router';
import { requireAuthentication as restrict } from './containers/AuthenticatedComponent';
import AppContainer from './containers/AppContainer';
import HeroPageLayout from './containers/HeroPageLayout';
import AdminPageLayout from './contain... |
docs/pages/api-docs/backdrop.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/backdrop';
const requireRaw = require.context('!raw-loader!./', false, /\/backdrop\.md$/);
export default function Page({ do... |
packages/app/app/components/Dashboard/BestNewMusicTab/BestNewMusicMenu/BestNewMusicCard/index.js | nukeop/nuclear | import React from 'react';
import PropTypes from 'prop-types';
import { Icon } from 'semantic-ui-react';
import { createLastFMLink } from '../../../../../utils';
import { favoriteTrackShape } from '../../../../../constants/propTypes';
import styles from './styles.scss';
function toFavoriteTrack({ artist, title, thumb... |
src/index.js | jamzi/balistos-react | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import App from './components/App';
import reducer from './reducers';
import rootSaga from './sagas';
const sagaMidd... |
bemuse/src/game/index.js | bemusic/bemuse | import BemusePackageResources from 'bemuse/resources/bemuse-package'
import React from 'react'
import SCENE_MANAGER from 'bemuse/scene-manager'
import URLResource from 'bemuse/resources/url'
import audioContext from 'bemuse/audio-context'
import query from 'bemuse/utils/query'
import { resolveUrl } from 'url'
import { ... |
src/app/containers/SerialComponent.js | UrgBenri/UrgBenriWeb | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import SerialConnection from '../components/SerialConnection';
export const SerialComponent = () => (
<div>
<SerialConnection />
</div>
)
SerialComponent.propTypes = {... |
src/clincoded/static/components/publication.js | ClinGen/clincoded | 'use strict';
import React, { Component } from 'react';
import createReactClass from 'create-react-class';
import { content_views, listing_views, itemClass, truncateString } from './globals';
import { AuditMixin, AuditIndicators, AuditDetail } from './audit';
import { DbxrefList, Dbxref } from './dbxref';
var search =... |
packages/icons/src/md/device/SignalWifi1BarLock.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdSignalWifi1BarLock(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<g>
<path
d="M40.3 18c.7 0 1.4.1 2.1.2l4.2-5.2c-.9-.7-9.8-8-23.3-8S.9 12.3 0 13l23.3 29 7-8.7V28c0-5.5 4.5-10 10-10z"
o... |
packages/es-components/src/components/patterns/callToAction/LightCallToAction.js | TWExchangeSolutions/es-components | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import LightNotification from '../../containers/notification/LightNotification';
import { getCallToActionChildren } from './getCallToActionChildren';
const Container = styled.div`
flex-basis: 100%;
`;
const CallT... |
client/utils/index.js | eventhough/react-redux-starter-kit | import assign from 'object-assign';
import React from 'react';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
export function createConstants(...constants) {
return constants.reduce((acc, constant) => {
return assign(acc, {
[constant]: constant,
});
}, {});
}
export fun... |
examples/huge-apps/components/App.js | trotzig/react-router | import React from 'react';
import Dashboard from './Dashboard';
import GlobalNav from './GlobalNav';
class App extends React.Component {
render() {
var courses = COURSES;
return (
<div>
<GlobalNav />
<div style={{ padding: 20 }}>
{this.props.children || <Dashboard courses={co... |
1-React-Basic/src/app/index.js | ekaaditiac/React-Basic-API | import React from 'react';
import ReactDOM from 'react-dom';
import Request from 'superagent';
import _ from 'lodash';
class App extends React.Component{
constructor(){
super();
this.state = {};
}
componentDidMount(){
// Component yang setelah di render di dalam halaman
// var url = "http://o... |
react-app/src/components/Race.js | tanykim/swimmers-history | import React, { Component } from 'react';
import ReactResizeDetector from 'react-resize-detector';
import * as d3 from 'd3';
import _ from 'lodash';
import Tippy from 'tippy.js';
class RaceComponent extends Component {
drawAthlete(g, a, x, y, halfL, strokeW, isOutside, props, raceId) {
g.append('line')
.a... |
admin/client/components/FormHeading.js | mikaoelitiana/keystone | import React from 'react';
import evalDependsOn from '../../../fields/utils/evalDependsOn';
module.exports = React.createClass({
displayName: 'FormHeading',
propTypes: {
options: React.PropTypes.object
},
render () {
if (!evalDependsOn(this.props.options.dependsOn, this.props.options.values)) {
return nu... |
src/components/MainNav/AppList/components/ResizeContainer/ResizeContainer.js | folio-org/stripes-core | /**
* AppList -> ResizeContainer
*/
import React from 'react';
import classnames from 'classnames';
import debounce from 'lodash/debounce';
import PropTypes from 'prop-types';
import css from './ResizeContainer.css';
class ResizeContainer extends React.Component {
static propTypes = {
children: PropTypes.func... |
node_modules/react-bootstrap/es/MenuItem.js | saltypaul/SnipTodo | 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 ... |
test/integration/link-ref/pages/function.js | JeromeFitz/next.js | import React from 'react'
import Link from 'next/link'
const MyLink = React.forwardRef((props, ref) => (
<a {...props} ref={ref}>
Click me
</a>
))
export default () => (
<Link href="/" passHref>
<MyLink />
</Link>
)
|
src/components/Header/Header.js | jahrlin/visual-regression-testing | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.scss';
import withStyles from '../../decorators/withStyles';
import Link from '../../utils/Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header {
render() {
... |
src/components/SearchBox/SearchBox.js | divyanshu013/impulse-tabs | import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
class SearchBox extends React.Component {
constructor() {
super();
this.state = {
searchText: ''
};
this.search = this.search.bind(this);
this.handleUpdateInput = this.handleUpdateInput.bind(this);
}
searc... |
src/BlurryImage.js | ErezNagar/Blurry-Image-Loader | // import React from 'react'
class BlurryImage extends React.Component {
constructor(props) {
super(props);
this.state = {
style: {
overflow: "hidden",
backgroundImage: "url(" + this.props.placeholder + ")",
backgroundSize: "cover",
... |
OleksiiOnSoftware.Apps.Blog/client/components/ShortPost/index.js | boades/PpmSystem | /* @flow */
// React
import React from 'react'
// UI
import { Item } from 'semantic-ui-react'
import ReactDisqusThread from 'react-disqus-thread'
// Custom UI
import {
PostDate,
PostCategory,
PostTag,
PostComments
} from 'components'
// Types
import type { Post, Tag, Category } from 'types'
type Props = {
... |
pages/decal/lesson-6/index.js | jubearsun/innovative-design | import React from 'react';
import DocumentTitle from 'react-document-title';
import { prefixLink } from 'gatsby-helpers';
import $ from 'jquery';
import _ from 'lodash';
export default class Index extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {}
render () {
retur... |
src/components/Card/Card.js | IFS49F/poker | import React from 'react';
import classNames from 'classnames';
import './Card.css';
const Card = ({ highlight, voted, show, suit, score }) => {
const cardClass = classNames('Card', { highlight, voted, show });
return (
<div className={cardClass}>
<div className="front face">
{
!show
... |
src/containers/UsersAdd.js | lukin-deema/FileSystem | import React from 'react';
import {connect} from 'react-redux';
import UsersAdd from '../components/UsersAdd';
const calculateNextIndex = (state) => {
return Math.max(0, ...state.users.map(x => x.id)) + 1;
};
const mapStateToProps = (state) => ({
nextIndex: calculateNextIndex(state)
});
export default connec... |
stories/components/pages/application-list/index.js | one-love/storybook | import React from 'react';
import Application from '../../molecules/application';
import List from '../../layouts/list';
export default function ApplicationList() {
return (
<List title="Applications" service="active">
<Application name="Docker" />
<Application name="Flask" />
<Application nam... |
src/components/ContestList.js | bdkay/node-that-band | import React from 'react';
import ContestPreview from './ContestPreview';
const ContestList = ({ contests, onContestClick }) => (
<div className="ContestList">
{Object.keys(contests).map(contestId =>
<ContestPreview
key={contestId}
onClick={onContestClick}
{...contests[contestId]} /... |
src/components/__tests__/Routes-test.js | bjacobel/rak | import React from 'react';
import { shallow, mount } from 'enzyme';
import Routes from 'components/Routes';
import Analytics from 'services/Analytics';
jest.mock('components/Main');
jest.mock('components/Child');
jest.mock('components/NotFound');
jest.mock('services/Analytics');
const setPath = value => {
global.h... |
demo/src/models/posts/List.js | shrimpliu/shradmin | import React from 'react';
import truncate from 'lodash/truncate';
import { Link } from 'mirrorx';
import { List, DataTable, TextField, BelongsToField } from '../../../../src';
import Filters from './Filters';
export default (props) => (
<List model="posts" filters={<Filters />} {...props}>
<DataTable>
<Te... |
app/Pages/SettlementViewNew/MoneyInfo/Coupon.js | jd-daojia/DaojiaRN | /* @flow */
import React, { Component } from 'react';
import MoneyItem from './MoneyItem'
export default class Coupon extends Component {
render() {
let {couponInfo, couponName} = this.props
let couponValue = ''
let couponColor = undefined
if(!couponInfo.promoteType) {
couponValue = couponInf... |
tests/client/core/components/TestNotFound.js | mstriemer/usetopscore-widgets | import React from 'react';
import { renderIntoDocument } from 'react-addons-test-utils';
import NotFound from 'core/components/NotFound';
describe('<NotFound />', () => {
const root = renderIntoDocument(<NotFound />);
it('sets a heading', () => {
assert.equal(
root.refs.heading.textContent, "We're sorry... |
src/js/components/ui/Modals/CloseModal.js | knowncitizen/tripleo-ui | /**
* Copyright 2017 Red Hat 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... |
src-client/modules/generator/containers/ComponentNameForm/index.js | ipselon/structor | /*
* Copyright 2017 Alexander Pustovalov
*
* 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 a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.