path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/jsx/navigation_header/trays/CoursesTray.js | venturehive/canvas-lms | /*
* Copyright (C) 2015 - 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... |
examples/Home.js | t-obi/react-simple-resize | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import css from './styles.css';
class Home extends Component {
render() {
return (
<div className={css.Home}>
<h2>What is this? </h2>
A react component rendering a resizable box.
<h2> Why? </h2>
... |
app/js/components/pages/ReadmePage.react.js | Kielan/kielan-com | /*
* ReadmePage
*
* This is the page users see when they click the "Setup" button on the HomePage
*/
import React, { Component } from 'react';
import { Link } from 'react-router';
export default class ReadmePage extends Component {
render() {
return (
<div>
<h2>Further Setup</h2>
<p>As... |
modules/Redirect.js | AnSavvides/react-router | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL path a client should b... |
templates/frontOffice/modern/components/React/Loader/index.js | lopes-vincent/thelia | import React from 'react';
function Loader({ size, color, className = '', style = {} }) {
return (
<div className={className} style={style}>
<svg
className={`${size ? size : 'w-24 h-24'} stroke-current ${
color ? color : ''
} mx-auto`}
viewBox="0 0 38 38"
xmlns="ht... |
src/stories/label/label-colors.js | kemuridama/rectangle | import React from 'react';
export default class LabelColors extends React.Component {
render() {
return (
<div className="con">
<div className="p">
<div className="p__body">
<span className="lbl lbl--red">Red</span>
<span className="lbl lbl--blue">Blue</span>
... |
dash/dash-renderer/src/components/core/Toolbar.react.js | plotly/dash | import {connect} from 'react-redux';
import React from 'react';
import PropTypes from 'prop-types';
import {redo, undo} from '../../actions/index.js';
import './Toolbar.css';
function UnconnectedToolbar(props) {
const {dispatch, history} = props;
const undoLink = (
<span
key='undoLink'
... |
client/src/app/components/footer.js | FrontSmith/FSFramework | import React from 'react';
export default React.createClass({
shouldComponentUpdate() {
return false;
},
render() {
return (
<footer className="footer hidden-print">
<div className="container">
<div className="row">
... |
app/components/NoticePoint.js | Toreant/monster_web | /**
* Created by apache on 15-12-5.
*/
import React from 'react';
import NoticePointActions from '../actions/NoticePointActions';
import NoticePointStore from '../stores/NoticePointStore';
class NoticePoint extends React.Component {
constructor(props) {
super(props);
this.state = NoticePointStore... |
packages/icons/src/md/maps/MyLocation.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMyLocation(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 16c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm17.88 6H46v4h-4.12c-.92 8.34-7.54 14.96-15.88 15.88V46h-4v-4.12C13.66 40.96 7.04 34.34... |
packages/material-ui-icons/src/BrandingWatermark.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let BrandingWatermark = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-9v-6h9v6z" />
</SvgIcon>;
BrandingWatermark = pure(Branding... |
src/containers/ItemView.js | hui-w/events-vanilla | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import SubMenu from '../components/common/SubMenu';
import BusyIcon from '../components/common/BusyIcon';
import EventItem from '../components/item/EventIt... |
src/components/ContactPage/index.js | sioked/ecomchicago | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
import {
Field,
Label,
Control,
Input,
TextArea,
Container,
Title,
Subtitle,
Section,
Hero,
HeroBody,
Button,
Notification,
} from 'bloomer';
function ContactPage({ isSubmitted = false }) {
/* esli... |
actor-apps/app-web/src/app/components/dialog/MessagesSection.react.js | KitoHo/actor-platform | import React from 'react';
import _ from 'lodash';
import VisibilityStore from 'stores/VisibilityStore';
import MessageActionCreators from 'actions/MessageActionCreators';
import MessageItem from 'components/common/MessageItem.react';
let _delayed = [];
let flushDelayed = () => {
_.forEach(_delayed, (p) => {
... |
modules/gui/src/app/home/body/process/createRecipeRLCMS.js | openforis/sepal | import React from 'react'
export default class CreateRecipeRLCMS extends React.Component {
render() {
return (
<div style={{margin: '1rem 2rem', display: 'grid', gridGap: '1rem', color: '#ccc'}}>
<div>
Monitoring land cover and land use change is important fo... |
src/routes/content/index.js | arolla/Arollydays | /**
* 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 Content from './Content'... |
tests/lib/rules/vars-on-top.js | beatobongco/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/javascript/mastodon/features/compose/components/upload_form.js | Toootim/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import UploadProgressContainer from '../containers/upload_progress_container';
imp... |
react-flux-mui/js/material-ui/src/svg-icons/av/playlist-add-check.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlaylistAddCheck = (props) => (
<SvgIcon {...props}>
<path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zM2 16h8v-2H2v2zm19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/>
</SvgIcon>
);
AvPlaylistAddCheck = pure... |
admin/src/components/PrimaryNavigation.js | geminiyellow/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
var PrimaryNavItem = React.createClass({
displayName: 'PrimaryNavItem',
propTypes: {
className: React.PropTypes.string,
children: React.PropTypes.node.isRequired,
href: Reac... |
fields/types/file/FileColumn.js | sendyhalim/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var LocalFileColumn = React.createClass({
renderValue: function () {
var value = this.props.data.fields[this.props.col.path];
if (!value || !value.filename) ret... |
react-flux-mui/js/material-ui/src/svg-icons/image/crop-16-9.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop169 = (props) => (
<SvgIcon {...props}>
<path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/>
</SvgIcon>
);
ImageCrop169 = pure(ImageCrop169);
ImageCr... |
screens/SchoolInfoScreen.js | Helena-High/school-app | import React from 'react';
import {
Linking,
StyleSheet,
ScrollView,
TouchableOpacity,
Image,
Text,
View,
} from 'react-native';
import {
Ionicons,
Entypo,
EvilIcons,
} from '@exponent/vector-icons';
import Router from '../navigation/Router';
export default class SchoolInfoScreen extends React.Comp... |
src/higher_order_components/focusable.js | TouchBistro/frig | import React from 'react'
import ReactDOM from 'react-dom'
/*
* A higher order component that passes a focused attribute to it's child
* component. The focused is true when the component should be focused
* (ie. when it is clicked on or tabbed into) and false when it is not (ie.
* initially, when it is clicked off... |
client/patch-react.js | nikvm/next.js | // monkeypatch React for fixing https://github.com/facebook/react/issues/2461
// based on https://gist.github.com/Aldredcz/4d63b0a9049b00f54439f8780be7f0d8
import React from 'react'
let patched = false
export default (handleError = () => {}) => {
if (patched) {
throw new Error('React is already monkeypatched')... |
src/index.js | scottjbarr/blinky | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import { Router, browserHistory } from 'react-router'
import App from './components/app';
import reducers from './reducers';
import routes from './routes'
... |
src/Information.js | haroldhues/kkblueberries | import React from 'react'
export default () => (
<div id="about">
<h1>What do I bring with me?</h1>
<ul>
<li>
We have large and small buckets available to pick into, or you may bring
your own. Stop by the shed to weigh your bucket and get a row
assignment. If you are picking int... |
website/icons/GitHub.js | rofrischmann/fela | import React from 'react'
export default function GitHub(props) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" {...props}>
<path d="M16 0.395c-8.836 0-16 7.163-16 16 0 7.069 4.585 13.067 10.942 15.182 0.8 0.148 1.094-0.347 1.094-0.77 0-0.381-0.015-1.642-0.022-2.979-4.452 0.968-5.391... |
frontend/app/components/App.js | mcwright/heartattack_scheduler | /**
* Created by orel- on 06/Dec/15.
*/
import React from 'react';
import Navbar from './Navbar';
/**
* This class should be mainly left as-is.
* Main purpose is to form the general markup for all the "pages".
* So you have a "static" navbar which is always present,
* and then all the content is inside a contai... |
app/javascript/mastodon/features/following/index.js | ebihara99999/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import {
fetchAccount,
fetchFollowing,
expandFollowing,
} from '../../actions/account... |
docs/src/app/components/pages/components/DatePicker/ExampleSimple.js | nathanmarks/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
/**
* The Date Picker defaults to a portrait dialog. The `mode` property can be set to `landscape`.
* You can also disable the Dialog passing `true` to the `disabled` property.
*/
const DatePickerExampleSimple = () => (
<div>
<DatePic... |
client/components/Where.js | TobiahRex/reactTravelApp | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import ClientActions from '../actions/ClientActions';
import ClientStore from '../stores/ClientStore';
import { Panel, Container, Row, Col, Form, Input, Button } from 'muicss/react';
export default class Where extends Component {
... |
packages/material-ui-icons/src/SignalCellularConnectedNoInternet0BarRounded.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M22 8V4.41c0-.89-1.08-1.34-1.71-.71L3.71 20.29c-.63.63-.19 1.71.7 1.71H18V11c0-1.66 1.34-3 3-3h1z" /><path d="M20 22h2v-2h-2v2zm0-11v6c0 .55.45 1 1 1s1-.45 1-1v-6c0-.5... |
examples/huge-apps/components/GlobalNav.js | bmathews/react-router | import React from 'react';
import { Link } from 'react-router';
const styles = {};
class GlobalNav extends React.Component {
static defaultProps = {
user: {
id: 1,
name: 'Ryan Florence'
}
};
constructor (props, context) {
super(props, context);
this.logOut = this.logOut.bind(this);... |
newclient/scripts/components/user/revise/questionnaire-section/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/pages/surveys/Questions.js | nick/boulder-vote | import React from 'react'
import { Link } from 'react-router-dom'
import { Helmet } from 'react-helmet'
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import SideBarLink from '../../components/SideBarLink'
import QuestionLinks from './_QuestionLinks';
const Questions = (props) => {
if (prop... |
client/src/AppEntry.js | 15thnight/15thnight | import { Promise } from 'es6-promise/auto';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import 'lib/bootstrap3/dist/css/bootstrap.min.css';... |
pootle/static/js/admin/components/Project/ProjectForm.js | evernote/zing | /*
* Copyright (C) Pootle contributors.
* Copyright (C) Zing contributors.
*
* This file is a part of the Zing project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react... |
Board.js | imsolost/Set-React | import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View, Button } from 'react-native'
import Dimensions from 'Dimensions'
import Game from './classes/Game'
import Grid from './components/Grid'
import ScoreCard from './components/ScoreCard'
import Timer from './components/Timer'
import Pop... |
examples/redirect-using-index/app.js | frankleng/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... |
docs/src/app/components/pages/components/Stepper/HorizontalLinearStepper.js | skarnecki/material-ui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* Horizontal steppers are ideal when the contents of one step depend on an earlier step.
* Avoid using long step ... |
app/assets/scripts/views/country.js | openaq/openaq.github.io | 'use strict';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import config from '../config';
import { formatThousands } from '../utils/format';
import { fetchLocations, invalidateAllLocationData, fetchLatestMeasurements, openDownloadModal } from '../actions/action-creators';
... |
app/react-icons/fa/assistive-listening-systems.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaAssistiveListeningSystems extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m2.9 38.6q0 0.5-0.5 1t-1 0.4-1-0.4-0.4-1 0.4-1 1-0.5 1 0.5... |
examples/links/index.js | AlbertHilb/slate |
import { Editor, getEventTransfer } from 'slate-react'
import { State } from 'slate'
import React from 'react'
import initialState from './state.json'
import isUrl from 'is-url'
/**
* Define a schema.
*
* @type {Object}
*/
const schema = {
nodes: {
paragraph: props => <p>{props.children}</p>,
link: (p... |
app/node_modules/react-router/es6/Link.js | lycha/masters-thesis | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
packages/icons/src/md/action/OfflinePin.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdOfflinePin(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 4c11 0 20 9 20 20s-9 20-20 20S4 35 4 24 13 4 24 4zm10 32v-4H14v4h20zm-13.4-8L34 14.6l-2.8-2.8-10.6 10.6-3.8-3.8-2.8 2.8 6.6 6.6z" />
</Ico... |
src/views/music_visualizer/music_visualizer.js | MillerDix/me.beating.io | import React, { Component } from 'react';
import {Rounded} from '../../common/button/button.js';
import request from '../../common/utils/request.js';
import api from '../../common/utils/api.js';
import style from './music_visualizer.css';
let el_player = null;
class MusicVisualizer extends Component {
constructor(... |
src/components/topic/provider/TopicTagUseContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedHTMLMessage, FormattedMessage, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import MenuItem from '@material-ui/core/MenuItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListItemIcon from '@... |
src/containers/Home/Home.js | Nuriddinkhuja/photoshare | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import * as postsActions from 'redux/modules/posts';
import { asyncConnect } from 'redux-connect';
import { connect } from 'react-redux';
import ListPosts from '../Posts/ListPosts';
@asyncConnect([{
deferred: __SERVER__,
promise: ({ sto... |
imports/ui/components/resident-details/accounts/mess-canteen/edit-mc-bill/edit-mc-bill.js | gagpmr/app-met | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import * as Styles from '/imports/modules/styles.js';
import { FullBill } from './full-bill.js';
import { ReduceCanteen } from './reduce-canteen.js';
import { ReduceMessOne } from './reduce-mess-one.js';
import {... |
app/javascript/mastodon/components/modal_root.js | kirakiratter/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import 'wicg-inert';
export default class ModalRoot extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
onClose: PropTypes.func.isRequired,
};
state = {
revealed: !!this.props.children,
};
activeElement = t... |
opentech/static_src/src/app/src/components/ReviewBlock/index.js | OpenTechFund/WebApp | import React from 'react'
import PropTypes from 'prop-types'
import './styles.scss';
export const Opinion = ({ author, icon, opinion }) => (
<li className="reviews-sidebar__item reviews-sidebar__item--decision">
<div className="reviews-sidebar__name">
<span>{author}</span><img src={icon} />
... |
setup/src/universal/features/common_ui/app/Footer/index.js | ch-apptitude/goomi | /**
*
* Footer
*
*/
import React from 'react';
import { Row } from 'react-flexbox-grid';
import styled from 'styled-components';
const FooterContainer = styled(Row)`
background-color: white;
`;
const Footer = () => <FooterContainer tagName="footer" />;
Footer.defaultProps = {};
Footer.propTypes = {};
export def... |
examples/js/advance/demo.js | neelvadgama-hailo/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import EditTypeTable from './edit-type-table';
import DataInsertTypeTable from './insert-type-table';
import AutoRowKeyTable from './auto-rowkey-table';
import ValidatorTable from './validator-table';
import HideOnInsertTable from './hide-on-insert-table';
import rend... |
src/components/ResistanceCalculator/BandSelector.js | mtharrison/react-resistance-calculator | import React, { Component } from 'react';
class BandSelector extends Component {
constructor(props) {
super(props);
}
handleChange() {
this.props.onChange(this.props.band, parseInt(this.refs.menu.value));
}
render(){
const { band, options, value } = this.props;
retur... |
client/modules/Post/__tests__/components/PostList.spec.js | svolkov92/TextStreams | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... |
blueocean-material-icons/src/js/components/svg-icons/image/flash-auto.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageFlashAuto = (props) => (
<SvgIcon {...props}>
<path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/>
</SvgIcon>
);
ImageFlashAuto.displayName = 'ImageFlashAuto';
ImageFlashAuto.m... |
src/default.js | nlhuykhang/react-switchcase-condition | import React from 'react';
import PropTypes from 'prop-types';
const Default = ({ component: C, componentProps, }) => <C {...componentProps} />;
Default.componentName = 'Default';
Default.propTypes = {
component: PropTypes.func.isRequired,
// eslint-disable-next-line react/forbid-prop-types
componentProps: Prop... |
demo/src/components/App/components/Example12/Example12.js | moroshko/react-autowhatever | import styles from './Example12.less';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { updateInputValue, updateHighlightedItem } from '../../redux';
import Autowhatever from 'Autowhatever';
import SourceCodeLink from 'SourceCodeLink/SourceCo... |
pages/about.js | etaiklein/gameghost | import React from 'react'
import AboutUs from './aboutUs'
import AboutGM from './aboutGM'
import {baseValLarge} from '../components/Item'
export default class Index extends React.Component {
render() {
return (
<div>
<div style={{padding: `0 ${2 * baseValLarge}px 1px`, backgroundColor: "lightgray",... |
lib/FocusLink/stories/BasicUsage.js | folio-org/stripes-components | /**
* FocusLink: Basic Usage
*/
/* eslint-disable */
import React, { Component } from 'react';
import FocusLink from '../FocusLink';
import Icon from '../../Icon';
import Headline from '../../Headline';
import css from './FocusLinkExample.css';
export default class BasicUsage extends Component {
constructor(prop... |
examples/huge-apps/routes/Course/components/Dashboard.js | kurayama/react-router | import React from 'react'
class Dashboard extends React.Component {
render() {
return (
<div>
<h3>Course Dashboard</h3>
</div>
)
}
}
export default Dashboard
|
src/components/MainPage/FormTable/FormTableContainer.js | coolshare/ReactReduxStarterKit | import React from 'react';
import RightPane from './RightPane';
import LeftPane from './LeftPane';
import { Grid, Row, Col } from 'react-bootstrap';
/**
*
*/
export default class FormTableContainer extends React.Component{
/**
* render
* @return {ReactElement} markup
*/
render(){
return (
<div id="F... |
packages/strapi-admin/files/public/app/containers/LanguageProvider/index.js | skelpook/strapi | /*
*
* 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... |
web/src/components/statistics.js | frafra/is-osm-uptodate | import React from 'react';
import { maxZoom } from '../constants';
function flyAndOpen(marker, event) {
const { map } = marker;
map.once('moveend zoomend', (_) => marker.openPopup());
map.flyTo(marker._latlng, maxZoom);
}
function Statistics({ statistics }) {
return (
<table className="table table-stripe... |
js/common/PyMap.js | weihanglo/pycontw-mobile | import React from 'react'
import PropTypes from 'prop-types'
import {
Dimensions,
Image,
ScrollView,
StatusBar,
StyleSheet,
TouchableOpacity,
View,
ViewPropTypes
} from 'react-native'
import Header from './PyHeader'
import {LargeText} from './PyText'
import * as Colors from './PyColors'
import I18n fro... |
src/svg-icons/notification/do-not-disturb-on.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationDoNotDisturbOn = (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 2zm5 11H7v-2h10v2z"/>
</SvgIcon>
);
NotificationDoNotDisturbOn = pure(No... |
src/index.js | cpennington/yomibase | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import App from './yomibase.jsx';
ReactDOM.render(<App />, document.getElementById('root'));
|
classic/src/scenes/mailboxes/src/Scenes/LinuxSetupScene/LinuxSetupSceneContent.js | wavebox/waveboxapp | import React from 'react'
import { DialogTitle, DialogContent, DialogActions, Button } from '@material-ui/core'
import shallowCompare from 'react-addons-shallow-compare'
import { settingsActions } from 'stores/settings'
import Resolver from 'Runtime/Resolver'
import { withStyles } from '@material-ui/core/styles'
import... |
app/components/Table.js | JakubMusik/where-your-money-goes | /**
* Created by jakub on 08.07.2017.
*/
import React from 'react';
import {connect} from 'react-redux';
import {RESPONSE_STATUS} from '../helpers/Enum';
import {showModal} from '../actions/showModal';
import {PoundIcon} from '../components/PoundIcon';
import {formatValue} from '../helpers/formatValue';
import {perf... |
examples/universal/src/render.js | 4Catalyzer/found | import createRender from 'found/createRender';
import React from 'react';
export default createRender({
/* eslint-disable react/prop-types */
renderError: ({ error }) => (
<div>{error.status === 404 ? 'Not found' : 'Error'}</div>
),
/* eslint-enable react/prop-types */
});
|
internals/templates/app.js | guruganeshm/ReactJs | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
/* eslint-disable import/no-unresolved, import/extensions */
// Load the manifest.json file and the .htaccess file
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].... |
web/components/common/Loader/index.js | xontab/basic-node-ci | import React, { Component } from 'react';
import CircularProgress from 'material-ui/CircularProgress';
import styles from './styles.scss';
export default class Loader extends Component {
render() {
return (
<div className={styles.loading}>
<CircularProgress size={60} thickness={5} />
</div>... |
src/ComboBox/ComboBox.stories.js | resmio/mantecao | import React from 'react'
import { storiesOf } from '@storybook/react'
import ComboBox from './ComboBox'
storiesOf('ComboBox', module).add('default', () =>
<ComboBox
placeHolder="example combobox"
options={[
'option 1',
'option 2',
'option 3',
'option 4',
'option 5',
'opti... |
test/regressions/tests/TextField/TextFieldRequired.js | cherniavskii/material-ui | // @flow
import React from 'react';
import TextField from 'material-ui/TextField';
export default function TextFieldRequired() {
return (
<div>
<TextField required label="Foo" />
<TextField required label="Foo" value="Hello world" />
</div>
);
}
|
examples/huge-apps/routes/Course/routes/Assignments/components/Sidebar.js | arbas/react-router | import React from 'react';
import { Link } from 'react-router';
class Sidebar extends React.Component {
render () {
var assignments = COURSES[this.props.params.courseId].assignments
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{assignments.map(assignment => (
... |
src/components/DefaultLayout.js | zebras-filming-videos/streamr-web | import React from 'react'
import Header from './Header'
import Footer from './Footer'
import Bundle from './Bundle'
import loadMainRoutes from 'bundle-loader!./MainRoutes'
export default () => (
<div>
<Header />
<main>
<Bundle load={loadMainRoutes}>
{(MainRoutes) => MainRoutes ? <MainRoutes... |
src/svg-icons/social/cake.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialCake = (props) => (
<SvgIcon {...props}>
<path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l... |
frontend/src/Components/InfoLabel.js | Radarr/Radarr | import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { kinds, sizes } from 'Helpers/Props';
import styles from './InfoLabel.css';
function InfoLabel(props) {
const {
className,
title,
kind,
size,
outline,
children,
...otherProps
} = ... |
src/main.js | hack-duke/hackduke-portal | import React from 'react'
import ReactDOM from 'react-dom'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { useRouterHistory } from 'react-router'
import { syncHistoryWithStore, push } from 'react-router-redux'
import createStore from './store/createStore'
import AppContainer from './contain... |
src/ActivitySummary.js | siiptuo/tiima-spa | import React from 'react';
import PropTypes from 'prop-types';
import ActivityList from './ActivityList';
import { duration } from './filters';
import { propType as activityPropType } from './activity';
const shortDateFormat = new Intl.DateTimeFormat(navigator.language, {
weekday: 'short',
day: 'numeric',
mont... |
src/App.js | Tectract/EthDeployer | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
src/components/services/service-list.js | adrienlozano/stephaniewebsite | import React from 'react';
import styled from 'styled-components';
import ServiceCard from './service-card';
import { Flex } from 'rebass';
import { width, space } from 'styled-system';
const CardWrapper = ({children, className}) => (<div className={className}>{children}</div>)
const StyledCardWrapper = styled(CardWr... |
es6/test.js | yurizhang/ishow | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
fmi-2022-03-react-todos/src/components/TodoFilter.js | iproduct/course-node-express-react |
import React from 'react';
import PropTypes from 'prop-types';
import { ACTIVE, ALL_STATUSES, CANCELED, COMPLETED } from '../model/todo-model';
import './TodoFilter.css';
const TodoFilter = ({ filter, onFilterChange }) => {
function handleFilterChange(event) {
onFilterChange(Number.parseInt(event.target.v... |
app/containers/WellKnownEndpointListItem/index.js | darrellesh/redux-react-boilerplate | /**
* WellKnownEndpointListItem
*
* Lists the name and id from the item
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import ListItem from 'components/ListItem';
export class WellKnownEndpointListItem extends React.PureComponent { // esli... |
src/svg-icons/image/straighten.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageStraighten = (props) => (
<SvgIcon {...props}>
<path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/>
</SvgIcon>
);
ImageStr... |
node_modules/native-base/Components/Widgets/Thumbnail.js | crod93/googlePlacesEx-react-native | /* @flow */
'use strict';
import React from 'react';
import {Image} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import _ from 'lodash';
export default class ThumbnailNB extends NativeBaseComponent {
getInitialStyle() {
... |
examples/huge-apps/components/Dashboard.js | nhunzaker/react-router | import React from 'react'
import { Link } from 'react-router'
class Dashboard extends React.Component {
render() {
const { courses } = this.props
return (
<div>
<h2>Super Scalable Apps</h2>
<p>
Open the network tab as you navigate. Notice that only the amount of
you... |
examples/with-flow/pages/_app.js | BlancheXu/test | import App from 'next/app'
import Link from 'next/link'
import React from 'react'
export default class MyApp extends App {
static async getInitialProps ({ Component, router, ctx }) {
let pageProps = {}
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}
return ... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | mecab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
class SettingToggle extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequ... |
src/views/Another.js | bfollington/react-redux-isomorphic-boilerplate | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as CounterActions from 'actions/CounterActions';
import Counter from 'components/Counter';
export default class Another extends React.Component {
/**
* Runs on server and client.
*/
componen... |
imports/ui/components/CurrencyInput.js | ctagroup/home-app | import React, { Component } from 'react';
import curr from 'currency.js';
const formatCurrency = (value = 0, code = 'USD', displayOptions = {}) => {
const config = {
symbol: '$',
precision: 2,
decimal: '.',
separator: ',',
};
if (!config) {
throw new Error(`You need to provide a currencyCon... |
src/svg-icons/content/redo.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRedo = (props) => (
<SvgIcon {...props}>
<path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/>
</Sv... |
example/index.js | adrianleb/sullivan | import React from 'react'
import {render} from 'react-dom'
import Sullivan from 'sullivan';
import Styleguide from './styleguide';
import {StyleSheet, css} from 'aphrodite';
const styles = new Sullivan({
aphroditeStylesheet: StyleSheet,
styleguide: Styleguide
});
const {utils, rawUtils: raw, inline, mq, z, styleg... |
src/routes/index.js | mattroid/turboiep | /**
* 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 App from '../components/... |
app/packs/src/components/ScreenWellplates.js | ComPlat/chemotion_ELN | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
import { DropTarget } from 'react-dnd';
import DragDropItemTypes from './DragDropItemTypes';
import UIStore from './stores/UIStore';
import { wellplateShowOrNew } from './routesUtils';
import QuillVie... |
src/components/icons/fork.js | mding5692/mding5692.github.io | import React from 'react';
const IconFork = () => (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="feather feather-git-branch">
<title>Git Fork</title>
<line x1="6" y1="3" x2="6" y2="15"></line>
... |
test/helpers/shallowRenderHelper.js | wangweida/gallery-by-react | /**
* 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'... |
app/containers/Spa/SpaHelp/index.js | vollmerr/app-hub | import React from 'react';
import PropTypes from 'prop-types';
import { compose } from 'redux';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import toJS from '../../../hocs/toJS';
import Help from '../../../components/Help';
import * as selectors from '../selectors';
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.