commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
0a1ea1e9f56343d4643f88636acf0bac6ff38753 | src/components/semver-feedback.jsx | src/components/semver-feedback.jsx | var React = require('react');
var SemverFeedback = React.createClass({
render: function() {
if (true === this.props.satisfies) {
return (
<div className="well success">
<code>{ this.props.version }</code> satisfies contraint <code>{ this.p... | var React = require('react');
var SemverFeedback = React.createClass({
render: function() {
if (true === this.props.satisfies) {
return (
<div className="well success">
<code>{ this.props.version }</code> satisfies constraint <code>{ this.... | Fix typo in "constraint" feedback | Fix typo in "constraint" feedback
| JSX | mit | jubianchi/semver-check,jubianchi/semver-check | ---
+++
@@ -5,7 +5,7 @@
if (true === this.props.satisfies) {
return (
<div className="well success">
- <code>{ this.props.version }</code> satisfies contraint <code>{ this.props.constraint }</code>
+ <code>{ this.props.ve... |
bfe3e04fe12d6a890d05edaf4a45025821dbcb48 | packages/lesswrong/components/editor/CommentEditor.jsx | packages/lesswrong/components/editor/CommentEditor.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Components, registerComponent, getDynamicComponent, withCurrentUser } from 'meteor/vulcan:core';
import Users from 'meteor/vulcan:users';
class CommentEditor extends Component {
constructor (props,context) {
super(props,contex... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Components, registerComponent, getDynamicComponent, withCurrentUser } from 'meteor/vulcan:core';
import Users from 'meteor/vulcan:users';
class CommentEditor extends Component {
constructor (props,context) {
super(props,contex... | Make Bloopsquatch slightly less werid | Make Bloopsquatch slightly less werid
| JSX | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -7,7 +7,7 @@
constructor (props,context) {
super(props,context);
this.state = {
- editor: (props) => <Components.Loading />
+ editor: (props) => <div> Editor.Loading... </div>
}
}
@@ -25,8 +25,8 @@
<Components.MuiTextField
{...this.props}
... |
471eb0a196d396804f3553caa1a5e66a8e27f702 | public/components/Details.jsx | public/components/Details.jsx | import React from 'react';
import glassDetails from './../../glassDetails.js';
import beerPair from './../../pairList.js';
class Details extends React.Component {
constructor(props){
super(props);
}
render(){
return(
<div>
{this.props.updateGlass ? `${glassDetails[this.props.updateGlass]}` : ... | import React from 'react';
import glassDetails from './../../glassDetails.js';
import beerPair from './../../pairList.js';
const Details = (props) => {
return (
<div>
{props.updateGlass ? `${glassDetails[props.updateGlass]}` : ''}
</div>
);
}
export default Details; | Refactor details component to stateless component | Refactor details component to stateless component
| JSX | mit | joeylaguna/tankard.io,joeylaguna/tankard.io | ---
+++
@@ -2,19 +2,12 @@
import glassDetails from './../../glassDetails.js';
import beerPair from './../../pairList.js';
-class Details extends React.Component {
- constructor(props){
- super(props);
- }
-
- render(){
- return(
- <div>
- {this.props.updateGlass ? `${glassDetails[this.props.upda... |
a10b1e8a2bfc032663fea8d9585020c55d17cfbc | app/javascript/app/components/about/about-contact/about-contact-component.jsx | app/javascript/app/components/about/about-contact/about-contact-component.jsx | import React from 'react';
import cx from 'classnames';
import layout from 'styles/layout';
import styles from './about-contact-styles.scss';
const AboutContact = () => (
<div className={cx(styles.aboutContact, layout.content)}>
<p>
We’d love to hear from you. Please submit questions, comments or feedback
... | import React, { useState } from 'react';
import cx from 'classnames';
import layout from 'styles/layout';
import Loading from 'components/loading';
import styles from './about-contact-styles.scss';
const AboutContact = () => {
const [iframeLoaded, setIframeLoaded] = useState(false);
return (
<div className={cx... | Add loader until iframe loads | Add loader until iframe loads
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -1,26 +1,34 @@
-import React from 'react';
+import React, { useState } from 'react';
import cx from 'classnames';
import layout from 'styles/layout';
+import Loading from 'components/loading';
import styles from './about-contact-styles.scss';
-const AboutContact = () => (
- <div className={cx(styles.... |
eb1f7e5f20d7eee71eea6578b555f87f00761c99 | src/modules/content/components/searchResult.jsx | src/modules/content/components/searchResult.jsx | import ReactPlayer from 'react-player';
require('../styles/search.scss');
class SearchResult extends React.Component {
constructor(props) {
super(props);
}
render() {
const attributes = this.props.result.attributes;
return (
<div className="col-sm-4">
<div className="card">
{attributes.type == "O... | import ReactPlayer from 'react-player';
require('../styles/search.scss');
class SearchResult extends React.Component {
constructor(props) {
super(props);
}
getContentView(attributes) {
if(attributes.type == "Online-Video") {
return (<ReactPlayer url={attributes.url} className="card-img-top"
youtubeCo... | Fix for missing image if content has none | Fix for missing image if content has none
| JSX | agpl-3.0 | schul-cloud/schulcloud-client,schul-cloud/schulcloud-client,schul-cloud/schulcloud-client | ---
+++
@@ -6,17 +6,22 @@
super(props);
}
+ getContentView(attributes) {
+ if(attributes.type == "Online-Video") {
+ return (<ReactPlayer url={attributes.url} className="card-img-top"
+ youtubeConfig={{preload: true}} playing={false}
+ controls={true}/>);
+ } else if(attributes.image) {
+ ret... |
4d8624b4b168c6c0a323c781cfb308d8378e66ec | src/components/Forecast.jsx | src/components/Forecast.jsx | import React from 'react';
import { connect } from 'react-redux';
import BarChart from 'BarChart';
import { selectConditions } from 'selectConditionsActions';
class Forecast extends React.Component {
constructor(props) {
super(props);
this.state = {selectedInfo: {}};
this.displayConditions = this.displa... | import React from 'react';
import { connect } from 'react-redux';
import BarChart from 'BarChart';
import { selectConditions } from 'selectConditionsActions';
class Forecast extends React.Component {
constructor(props) {
super(props);
this.state = {selectedInfo: {}};
this.displayConditions = this.displa... | Fix so unit type set once instead of for every forecast datapoint | Fix so unit type set once instead of for every forecast datapoint
| JSX | mit | JavierPDev/Weather-D3,JavierPDev/Weather-D3 | ---
+++
@@ -18,12 +18,13 @@
renderBarChart() {
if (!this.props.forecast.length) return null;
+ const unitType = this.props.app.unitType === 'imperial'
+ ? 'fahrenheit' : 'celsius';
+
const barData = this.props.forecast.map(d => {
return {
xValue: d.date.weekday,
- yValue:... |
05c831792efe2b9e8b38caaee54a290b947c85a2 | examples/components/Example.jsx | examples/components/Example.jsx | var React = require('react');
var Example = React.createClass({
propTypes: {
title: React.PropTypes.string.isRequired,
code: React.PropTypes.element.isRequired,
state: React.PropTypes.object.isRequired,
jsx: React.PropTypes.string.isRequired,
js: React.PropTypes.string.isRequired
},
render:... | var React = require('react');
var Example = React.createClass({
propTypes: {
title: React.PropTypes.string.isRequired,
code: React.PropTypes.element.isRequired,
state: React.PropTypes.object.isRequired,
jsx: React.PropTypes.string.isRequired,
js: React.PropTypes.string.isRequired
},
render:... | Add the space argument to JSON.stringify() | Add the space argument to JSON.stringify()
| JSX | mit | seanlin0800/react-editable,seanlin0800/react-editable | ---
+++
@@ -19,7 +19,7 @@
{this.props.code}
</div>
<pre>
- {JSON.stringify(this.props.state)}
+ {JSON.stringify(this.props.state, null, 2)}
</pre>
<h3>jsx</h3>
<pre> |
d4929926f7fdf0ca5956f0fbbb82d833df344bb4 | js/timeago.jsx | js/timeago.jsx | /* The equivalent to jQuery.timeago for react.
*
* TimeAgo returns a span containing the amount of time (in English) that has
* passed since `time`.
*
* Takes:
* time: an ISO 8601 timestamp
* refreshMillis: how often to update, in milliseconds
*
* Example:
*
* return <a href={khanAcademy}><TimeAg... | /* The equivalent to jQuery.timeago for react.
*
* TimeAgo returns a span containing the amount of time (in English) that has
* passed since `time`.
*
* Takes:
* time: an ISO 8601 timestamp
* refreshMillis: how often to update, in milliseconds
*
* Example:
*
* return <a href={khanAcademy}><TimeAg... | Use refreshMillis to set the interval in TimeAgo | Use refreshMillis to set the interval in TimeAgo
Previously it had been set to the `props.time` value. | JSX | mit | vasanthk/react-components,sloria/react-components,Khan/react-components,vasanthk/react-components,sloria/react-components,Khan/react-components,jepezi/react-components,Khan/react-components,jepezi/react-components,sloria/react-components,quicktoolbox/react-components,vasanthk/react-components,quicktoolbox/react-compone... | ---
+++
@@ -23,7 +23,7 @@
return <span>{moment(this.props.time).fromNow()}</span>;
},
componentDidMount: function() {
- var interval = this.props.time || 60000;
+ var interval = this.props.refreshMillis || 60000;
// TODO(joel) why did I have to bind forceUpdate?
this... |
b9853d5e244fa1ce99890f944ac57e0ba13ad905 | src/structuredFieldComponents/DropdownStructuredComponent.jsx | src/structuredFieldComponents/DropdownStructuredComponent.jsx | import React, { Component } from 'react';
class DropdownStructuredComponent extends Component {
onChange = (state) => {
console.log('onChange to Dropdown component')
}
render = () => {
return (
<span className='sf-subfield' {...this.props.attributes}>
<select onFocus={this.props.handleDropdownFocus}... | import React, { Component } from 'react';
class DropdownStructuredComponent extends Component {
onChange = (state) => {
console.log('onChange to Dropdown component')
}
render = () => {
return (
<span className='sf-subfield' {...this.props.attributes}>
<select onFocus={this.props.handleDropdownFocus}... | Set initial state of drop down to be placeholder text (this fixes the issue of not being able to select the first entry in the list when the first entry is the default value on initial page render) | Set initial state of drop down to be placeholder text (this fixes the issue of not being able to select the first entry in the list when the first entry is the default value on initial page render)
| JSX | apache-2.0 | standardhealth/flux,standardhealth/flux | ---
+++
@@ -9,6 +9,7 @@
return (
<span className='sf-subfield' {...this.props.attributes}>
<select onFocus={this.props.handleDropdownFocus} onChange={this.props.handleDropdownSelection}>
+ <option selected disabled hidden>Select</option>
{this.props.items.map(function(item, index) {
r... |
3a127792e48715741d57bcd0181e1e2c7de92c68 | jsx/header.jsx | jsx/header.jsx | /* @flow */
import Flexbox from 'flexbox-react';
import RaisedButton from 'material-ui/RaisedButton';
import React from 'react';
export default function Header(
props: {
style: ?Object,
},
) {
return (
<Flexbox
alignItems="center"
flexDirection="row"
flexWrap="wrap"
justifyConten... | /* @flow */
import Flexbox from 'flexbox-react';
import React from 'react';
export default function Header(
props: {
style: ?Object,
},
) {
return (
<Flexbox
alignItems="center"
flexDirection="row"
flexWrap="wrap"
justifyContent="space-between"
style={props.style}
>
... | Remove join the fun button | [fitbit] Remove join the fun button
| JSX | mit | dbharris2/fitbit,dbharris2/fitbit | ---
+++
@@ -1,7 +1,6 @@
/* @flow */
import Flexbox from 'flexbox-react';
-import RaisedButton from 'material-ui/RaisedButton';
import React from 'react';
export default function Header(
@@ -18,7 +17,6 @@
style={props.style}
>
<h1 style={{color: '#333333'}}>Fitbit Pie Challenge</h1>
- <... |
e9c58341a623c5f98ae31260aa1530b87fded376 | app/assets/javascripts/components/GroupListItem.js.jsx | app/assets/javascripts/components/GroupListItem.js.jsx | class GroupListItem extends React.Component {
constructor () {
super()
this.handler = this.handler.bind(this)
this.deleteHandler = this.deleteHandler.bind(this)
}
handler (event) {
event.preventDefault()
let groupId = this.props.group.id
if(this.props.sessionID == this.props.group.admin_... | class GroupListItem extends React.Component {
constructor () {
super()
this.handler = this.handler.bind(this)
this.deleteHandler = this.deleteHandler.bind(this)
}
handler (event) {
event.preventDefault()
let groupId = this.props.group.id
if(this.props.sessionID == this.props.group.admin_... | Fix merge conflict in group-list-item | Fix merge conflict in group-list-item
| JSX | mit | mattgfisch/meal,mattgfisch/meal,mattgfisch/meal | ---
+++
@@ -35,11 +35,7 @@
return (
<div>
-<<<<<<< HEAD
- <a className='joined-link' href='#' onClick={this.handler}> {this.props.group.name} </a>
-=======
- <a id='joined' href='#' onClick={this.handler}> {this.props.group.name} </a><button onClick={this.deleteHandler} className='btn btn-... |
1ac1d8166f886d5d40ac2117df2a6cc954b18a60 | src/app/components/change-password/ChangePasswordForm.jsx | src/app/components/change-password/ChangePasswordForm.jsx | import React, { Component } from 'react';
import Input from '../Input'
import PropTypes from 'prop-types';
const propTypes = {
formData: PropTypes.shape({
inputs: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string.isRequired,
value: PropTypes.string,
label: PropTyp... | import React, { Component } from 'react';
import Input from '../Input'
import PropTypes from 'prop-types';
const propTypes = {
formData: PropTypes.shape({
inputs: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string.isRequired,
value: PropTypes.string,
label: PropTyp... | Add isSubmitting check and disable input and buttons and show loader if true | Add isSubmitting check and disable input and buttons and show loader if true
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -13,7 +13,8 @@
error: PropTypes.string
})),
onSubmit: PropTypes.func.isRequired,
- onCancel: PropTypes.func.isRequired
+ onCancel: PropTypes.func.isRequired,
+ isSubmitting: PropTypes.bool
}).isRequired
};
@@ -25,7 +26,8 @@
}
render() ... |
7c729f9c6452d12c3bf47176479f5ab5f15c4b12 | src/components/elements/paginated-view.jsx | src/components/elements/paginated-view.jsx | import React from 'react';
import { connect } from 'react-redux';
import { bindRouteActions } from '../../redux/route-actions';
import PaginationLinks from './pagination-links';
import { getCurrentRouteName } from '../../utils';
const PaginatedView = props => (
<div className="box-body">
{props.showPaginationHea... | import React from 'react';
import { connect } from 'react-redux';
import { bindRouteActions } from '../../redux/route-actions';
import PaginationLinks from './pagination-links';
const PaginatedView = props => (
<div className="box-body">
{props.showPaginationHeader ? (
<h4 className="user-subheader">
... | Remove unused prop from PaginatedView | Remove unused prop from PaginatedView
| JSX | mit | clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma | ---
+++
@@ -2,7 +2,6 @@
import { connect } from 'react-redux';
import { bindRouteActions } from '../../redux/route-actions';
import PaginationLinks from './pagination-links';
-import { getCurrentRouteName } from '../../utils';
const PaginatedView = props => (
<div className="box-body">
@@ -24,11 +23,10 @@
... |
4dc37bcaf894a31cb4e84fc9aca947203fb6a541 | src/stores/TimezoneStore.jsx | src/stores/TimezoneStore.jsx | 'use strict';
import Reflux from 'reflux';
import Immutable from 'immutable';
import Moment from 'moment-timezone';
const TimezoneStore = Reflux.createStore({
init() {
const meta = require('moment-timezone/data/meta/latest.json');
const now = Date.now();
const zoneList = Object.keys(meta.zones)
... | 'use strict';
import Immutable from 'immutable';
import Reflux from 'reflux';
import Moment from 'moment-timezone';
import UserActions from 'actions/UserActionCreators';
const TimezoneStore = Reflux.createStore({
listenables: UserActions,
init() {
const meta = require('moment-timezone/data/meta/latest.json... | Add method for each List construction step ; Add onSearchByName callback | Add method for each List construction step ; Add onSearchByName callback
| JSX | mit | rhumlover/clockette,rhumlover/clockette | ---
+++
@@ -1,38 +1,54 @@
'use strict';
+import Immutable from 'immutable';
import Reflux from 'reflux';
-import Immutable from 'immutable';
import Moment from 'moment-timezone';
+import UserActions from 'actions/UserActionCreators';
const TimezoneStore = Reflux.createStore({
+ listenables: UserActions,
... |
e3d224cd3ddd70f8b1e95867b07c066f5557ebe7 | src/operator/visitors/index.jsx | src/operator/visitors/index.jsx | import React from 'react';
import Visitor from './visitor';
import * as actions from '../actions'
export default React.createClass({
propTypes: {
visitors: React.PropTypes.arrayOf(React.PropTypes.shape({
id: React.PropTypes.string.isRequired
})).isRequired,
dispatch: React.PropT... | import React from 'react';
import Visitor from './visitor';
import * as actions from '../actions'
export default class Visitors extends React.Component {
handleInvite(visitorId) {
this.props.dispatch(actions.inviteVisitor(visitorId));
}
render() {
let visitors = this.props.visitors.map(vis... | Convert <Visitors /> to ES6 class | Convert <Visitors /> to ES6 class | JSX | apache-2.0 | JustBlackBird/mibew-ui,JustBlackBird/mibew-ui | ---
+++
@@ -2,23 +2,16 @@
import Visitor from './visitor';
import * as actions from '../actions'
-export default React.createClass({
- propTypes: {
- visitors: React.PropTypes.arrayOf(React.PropTypes.shape({
- id: React.PropTypes.string.isRequired
- })).isRequired,
- dispatch: R... |
cd4a055bb7497668c7404bcaa55de0351a53cd3a | src/containers/error-boundary.jsx | src/containers/error-boundary.jsx | import React from 'react';
import PropTypes from 'prop-types';
import platform from 'platform';
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';
import CrashMessageComponent from '../components/crash-message/crash-message.jsx';
import log from '../lib/log.js';
import analytics from '..... | import React from 'react';
import PropTypes from 'prop-types';
import platform from 'platform';
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';
import CrashMessageComponent from '../components/crash-message/crash-message.jsx';
import log from '../lib/log.js';
import analytics from '..... | Add more information to error boundary messages | Add more information to error boundary messages
While working on the menubar, I couldn't find the source of an error. This adds more stack info to the error messages emitted by the error boundary.
| JSX | bsd-3-clause | LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui | ---
+++
@@ -17,7 +17,7 @@
componentDidCatch (error, info) {
// Display fallback UI
this.setState({hasError: true});
- log.error(`Unhandled Error: ${error}, info: ${info}`);
+ log.error(`Unhandled Error: ${error}\n${error.stack}\nComponent stack: ${info.componentStack}`);
... |
ab059941d3b699dace5143a228b17b12d9ec595e | client/js/scorm.jsx | client/js/scorm.jsx | "use strict";
import 'babel-polyfill';
import es6Promise from 'es6-promise';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import routes from './routes';
import DevTools ... | "use strict";
import 'babel-polyfill';
import es6Promise from 'es6-promise';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import routes from './routes';
import DevTools ... | Fix user id from settings | Fix user id from settings
| JSX | mit | atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion | ---
+++
@@ -40,7 +40,7 @@
const settings = getInitialSettings(window.DEFAULT_SETTINGS);
const store = configureStore({settings, jwt: window.DEFAULT_JWT});
if (window.DEFAULT_JWT){ // Setup JWT refresh
- jwt(store.dispatch, settings.user_id);
+ jwt(store.dispatch, settings.userId);
}
ReactDOM.render( |
5c8182b825ae7218b3d1731c6ac22984c3fd57f0 | generators/app/templates/src/modules/app/components/GreetForm.jsx | generators/app/templates/src/modules/app/components/GreetForm.jsx | import React, { PropTypes } from 'react'
import pure from 'recompose/pure'
import { compose } from 'redux'
import { reduxForm } from 'redux-form'
import * as select from '../selectors'
const propTypes = {
fields: PropTypes.object,
handleSubmit: PropTypes.func,
loading: PropTypes.boolean,
}
const formConfig = {... | import React, { PropTypes } from 'react'
import pure from 'recompose/pure'
import { compose } from 'redux'
import { reduxForm } from 'redux-form'
const propTypes = {
fields: PropTypes.object,
handleSubmit: PropTypes.func,
loading: PropTypes.boolean,
}
const formConfig = {
form: 'greet',
fields: ['name'],
}
... | Fix form to be a presentational component | Fix form to be a presentational component
| JSX | mit | 127labs/generator-duxedo,127labs/generator-duxedo | ---
+++
@@ -2,8 +2,6 @@
import pure from 'recompose/pure'
import { compose } from 'redux'
import { reduxForm } from 'redux-form'
-
-import * as select from '../selectors'
const propTypes = {
fields: PropTypes.object,
@@ -24,11 +22,7 @@
GreetForm.propTypes = propTypes
-const mapStateToProps = (state) => ... |
2abb6b71606497a4cad386656f13388a36e48ad8 | packages/mwp-app-render/src/components/uxcapture/UXCaptureFont.jsx | packages/mwp-app-render/src/components/uxcapture/UXCaptureFont.jsx | // @flow
import React from 'react';
type Props = {
fontFamily: string,
mark: string,
};
export const fontLoaderSrc =
'https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js';
const generateUXCaptureFontJS = (fontFamily: string, mark: string) => `
WebFont.load({
custom: {
families:... | // @flow
import React from 'react';
type Props = {
fontFamily: string,
mark: string,
};
export const fontLoaderSrc =
'https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js';
const generateUXCaptureFontJS = (fontFamily: string, mark: string) => `
WebFont.load({
custom: {
families:... | Use new UXCapture API for the marks | Use new UXCapture API for the marks
| JSX | mit | meetup/meetup-web-platform | ---
+++
@@ -15,8 +15,8 @@
families: ['${fontFamily}']
},
active: function() {
- if (window.UX) {
- window.UX.mark('${mark}');
+ if(window.UXCapture) {
+ window.UXCapture.mark("${mark}");
}
}
}); |
dd5d654a09614f3e54201060d7016b197e976ca5 | src/components/input/InputFile.jsx | src/components/input/InputFile.jsx | import React from 'react';
import PropTypes from 'prop-types';
import Input from './Input';
import Button from '../button/Button';
function InputFile (props) {
const input =
<Input
name={props.name}
type="file"
/>;
return (
<>
<div>
{props.label ? <label>{pro... | import React from 'react';
import PropTypes from 'prop-types';
import Input from './Input';
function InputFile (props) {
const input =
<Input
name={props.name}
type="file"
/>;
return (
<>
<div>
{props.label ? <label>{props.label}:{input}</label> : { input }}
... | Remove not used cancel read button | Remove not used cancel read button
| JSX | mit | krajvy/nearest-coordinates,krajvy/nearest-coordinates,krajvy/nearest-coordinates | ---
+++
@@ -2,7 +2,6 @@
import PropTypes from 'prop-types';
import Input from './Input';
-import Button from '../button/Button';
function InputFile (props) {
const input =
@@ -15,14 +14,10 @@
<>
<div>
{props.label ? <label>{props.label}:{input}</label> : { input }}
- <Button
- ... |
7756749da448ea3a91ca9c0237f6a9fcf122c69a | imports/containers/AppContainer.jsx | imports/containers/AppContainer.jsx | import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import App from '../ui/layouts/App.jsx';
import { getLastMonth } from '../api/helpers/date-helpers';
// Pass meteor data to the App component
export default createContainer(() => {
if (!Meteor.user()) return {};
co... | import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import App from '../ui/layouts/App.jsx';
// Pass meteor data to the App component
export default createContainer(() => {
if (!Meteor.user()) return {};
const { name, picture } = Meteor.user().profile;
return {
... | Stop sending reports sent counter to App component | Stop sending reports sent counter to App component
- It won't be used anymore (we won't disable the share button)
Signed-off-by: Felipe Milani <6def120dcec8fcb28aed4723fac713cfff66d853@gmail.com>
| JSX | mit | fmilani/contatempo,fmilani/contatempo | ---
+++
@@ -1,23 +1,17 @@
import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import App from '../ui/layouts/App.jsx';
-import { getLastMonth } from '../api/helpers/date-helpers';
// Pass meteor data to the App component
export default createContainer(() => {
... |
7339fd17bc415048004a536550078be3a7fa590a | app/components/add-item/index.jsx | app/components/add-item/index.jsx | require("./add-item.styl")
import React from "react"
import {Button} from "react-bootstrap"
const ENTER_KEYCODE = 13;
export default class AddItem extends React.Component {
constructor() {
this.state = {
newItem: ""
}
}
updateNewItem(event) {
this.setState({
newItem: event.target.value... | require("./add-item.styl")
import React from "react"
import {Button} from "react-bootstrap"
const ENTER_KEYCODE = 13;
export default class AddItem extends React.Component {
constructor() {
this.state = {
newItem: ""
}
}
updateNewItem(event) {
this.setState({
newItem: event.target.value... | Fix issue where input events are not bound to component. | Fix issue where input events are not bound to component.
| JSX | unlicense | babadoozep/ema,babadoozep/ema | ---
+++
@@ -42,7 +42,12 @@
render() {
return <div>
- <input type="text" value={this.state.newItem} onChange={this.updateNewItem} onKeyUp={this.handleKeyUp} />
+ <input
+ type="text" value={this.state.newItem}
+ onChange={this.updateNewItem.bind(this)}
+ onKeyUp={this.handleKey... |
8cd1083614aaa6a1377d18c77f6e8ca86a632d41 | client/auth/login-required.jsx | client/auth/login-required.jsx | import React from 'react'
import { connect } from 'react-redux'
import { stringify } from 'query-string'
import { isLoggedIn } from './auth-utils'
import { pushPath } from 'redux-simple-router'
@connect(state => ({ auth: state.auth }))
class LoginRequired extends React.Component {
_ensureAuthed(props) {
if (!isL... | import React from 'react'
import { connect } from 'react-redux'
import { stringify } from 'query-string'
import { isLoggedIn } from './auth-utils'
import { pushPath } from 'redux-simple-router'
@connect(state => ({ auth: state.auth }))
class LoginRequired extends React.Component {
_ensureAuthed(props) {
if (!isL... | Fix error when a redirect occurs on the first page load due to an auth redirect being batched to after the first render. | Fix error when a redirect occurs on the first page load due to an auth redirect being batched to after the first render.
| JSX | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | ---
+++
@@ -25,8 +25,12 @@
}
render() {
- const children = this.props.children
- return !Array.isArray(children) ? children : <div>children</div>
+ if (isLoggedIn(this.props.auth)) {
+ const children = this.props.children
+ return !Array.isArray(children) ? children : <div>children</div>
+ ... |
06eca4fcf397cc296e0886e8b6fe035a11b76195 | app/assets/javascripts/components/UserShowComponents/UserShow.js.jsx | app/assets/javascripts/components/UserShowComponents/UserShow.js.jsx | var UserShow = React.createClass({
render: function(){
return (
<div className="user_show_wrapper">
<br/>
<div className="ui stackable three column centered grid">
<div className="column">
<h3 className="ui horizontal divider header"> About Me </h3>
< UserPr... | var UserShow = React.createClass({
componentWillMount: function() {
document.title ="FixStart | "+ this.props.user.first_name +" "+ this.props.user.last_name;
},
render: function(){
return (
<div className="user_show_wrapper">
<br/>
<div className="ui stackable three column centere... | Add personalized first name for a given user | Add personalized first name for a given user
| JSX | mit | ShadyLogic/fixstarter,TimCannady/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter | ---
+++
@@ -1,4 +1,9 @@
var UserShow = React.createClass({
+
+ componentWillMount: function() {
+ document.title ="FixStart | "+ this.props.user.first_name +" "+ this.props.user.last_name;
+ },
+
render: function(){
return (
<div className="user_show_wrapper"> |
9cc390246c632585a7fefe111d45e1a545bb264d | src/sentry/static/sentry/app/components/events/interfaces/breadcrumbComponents/summaryLine.jsx | src/sentry/static/sentry/app/components/events/interfaces/breadcrumbComponents/summaryLine.jsx | import React from 'react';
import Duration from '../../../duration';
const SummaryLine = React.createClass({
propTypes: {
crumb: React.PropTypes.object.isRequired
},
render() {
let {crumb} = this.props;
return (
<div className="summary">
{this.props.children}
{crumb.duration ... | import React from 'react';
import Duration from '../../../duration';
const SummaryLine = React.createClass({
propTypes: {
crumb: React.PropTypes.object.isRequired
},
render() {
let {crumb} = this.props;
// this is where we can later also show other interesting
// information (maybe duration?)
... | Remove unused duration from summary line | Remove unused duration from summary line
| JSX | bsd-3-clause | jean/sentry,JackDanger/sentry,beeftornado/sentry,mvaled/sentry,mvaled/sentry,mvaled/sentry,zenefits/sentry,fotinakis/sentry,alexm92/sentry,jean/sentry,alexm92/sentry,BuildingLink/sentry,gencer/sentry,BuildingLink/sentry,beeftornado/sentry,ifduyue/sentry,jean/sentry,fotinakis/sentry,mvaled/sentry,gencer/sentry,looker/se... | ---
+++
@@ -10,14 +10,11 @@
render() {
let {crumb} = this.props;
+ // this is where we can later also show other interesting
+ // information (maybe duration?)
return (
<div className="summary">
{this.props.children}
- {crumb.duration &&
- <span className="crumb-ti... |
dc0e5cd1ebaf01b312e3a4d71535c9160a38f321 | src/passwordless-email/render.jsx | src/passwordless-email/render.jsx | import React from 'react';
import Lock from '../lock/lock';
import AskEmail from './ask_email';
import AskVerificationCode from './ask_verification_code';
import Done from './done';
import { LockStates } from '../control/constants';
import { requestPasswordlessEmail, signIn } from './actions';
export default function ... | import React from 'react';
import Lock from '../lock/lock';
import AskEmail from './ask_email';
import AskVerificationCode from './ask_verification_code';
import Done from './done';
import { LockStates } from '../control/constants';
import { requestPasswordlessEmail, signIn } from './actions';
export default function ... | Disable passwordless email code support for now | Disable passwordless email code support for now
| JSX | mit | mike-casas/lock,auth0/lock-passwordless,auth0/lock-passwordless,auth0/lock-passwordless,mike-casas/lock,mike-casas/lock | ---
+++
@@ -9,12 +9,12 @@
export default function render(lock) {
const state = lock.get("state");
switch(state) {
- case LockStates.ASK_VERIFICATION_CODE:
- return (
- <Lock lock={lock} showHeader={true} submitHandler={askVerificationCodeSubmitHandler}>
- <AskVerificationCode />
- </Lock>
... |
c438158c89720166fcf9e0f8cf07a70c541e312a | src/js/components/AppBreadcrumbsComponent.jsx | src/js/components/AppBreadcrumbsComponent.jsx | var classNames = require("classnames");
var React = require("react/addons");
var AppBreadcrumbsComponent = React.createClass({
displayName: "AppBreadcrumbsComponent",
propTypes: {
activeTaskId: React.PropTypes.string,
activeViewIndex: React.PropTypes.number.isRequired,
appId: React.PropTypes.string.is... | var classNames = require("classnames");
var React = require("react/addons");
var AppBreadcrumbsComponent = React.createClass({
displayName: "AppBreadcrumbsComponent",
propTypes: {
activeTaskId: React.PropTypes.string,
activeViewIndex: React.PropTypes.number.isRequired,
appId: React.PropTypes.string.is... | Refactor AppBreadcrumbs to prevent empty list items | Refactor AppBreadcrumbs to prevent empty list items
Return null when null is due
| JSX | apache-2.0 | cribalik/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui | ---
+++
@@ -16,45 +16,54 @@
};
},
- render: function () {
+ getAppName: function () {
var props = this.props;
var activeViewIndex = props.activeViewIndex;
var appName = props.appId;
var appUri = "#apps/" + encodeURIComponent(props.appId);
- var taskName;
+ if (activeViewIndex =... |
7bd2cdb201cfc19542258aa3bc87c2738d74689c | app/assets/javascripts/components/alert.js.jsx | app/assets/javascripts/components/alert.js.jsx | var Alert = React.createClass({
render: function () {
return (
<div className="u-bg-blue-light u-c-white u-t-align-center u-py-3 u-px-2 u-fw-100 u-br-3">
<span className="u-fw-700">Click a tag</span> to start filtering. You can <span className="u-fw-700">combine multiple</span> ta... | var Alert = React.createClass({
render: function () {
return (
<div className="u-bg-blue-light u-c-white u-t-align-center u-py-3 u-px-2 u-fw-100 u-br-3">
No lists with this tag combination found.
</div>
)
}
});
| Add different copy to alert. | Add different copy to alert.
| JSX | mit | krisimmig/mytopten,krisimmig/mytopten,kirillis/mytopten,krisimmig/mytopten,kirillis/mytopten,kirillis/mytopten | ---
+++
@@ -3,7 +3,7 @@
render: function () {
return (
<div className="u-bg-blue-light u-c-white u-t-align-center u-py-3 u-px-2 u-fw-100 u-br-3">
- <span className="u-fw-700">Click a tag</span> to start filtering. You can <span className="u-fw-700">combine multiple</span> tags ... |
c5d6cd103d2d03da1caf9238ec222219856f8020 | kanban_app/app/components/Note.jsx | kanban_app/app/components/Note.jsx | import React from 'react';
import {compose} from 'redux';
import {DragSource, DropTarget} from 'react-dnd';
import ItemTypes from '../constants/itemTypes';
const noteSource = {
beginDrag(props) {
return {
id: props.id
};
}
};
const noteTarget = {
hover(targetProps, monitor) {
const targetId = ... | import React from 'react';
import {compose} from 'redux';
import {DragSource, DropTarget} from 'react-dnd';
import ItemTypes from '../constants/itemTypes';
const noteSource = {
beginDrag(props) {
return {
id: props.id
};
},
isDragging(props, monitor) {
return props.id === monitor.getItem().id
... | Implement custom isDragging for notes | Implement custom isDragging for notes
DragSources should have opacity 0 even when we change lanes
| JSX | mit | survivejs/redux-demo,survivejs-demos/redux-demo | ---
+++
@@ -8,6 +8,9 @@
return {
id: props.id
};
+ },
+ isDragging(props, monitor) {
+ return props.id === monitor.getItem().id
}
};
|
ea883496f7702f05badad880737668cd2f66c3ed | app/assets/javascripts/components/UserShowComponents/UserShow.js.jsx | app/assets/javascripts/components/UserShowComponents/UserShow.js.jsx | var UserShow = React.createClass({
render: function(){
return (
<div className="user_show_wrapper">
<br/>
<div className="ui stackable three column centered grid">
<div className="column">
<h3 className="ui horizontal divider header"> About Me </h3>
< UserPr... | var UserShow = React.createClass({
render: function(){
return (
<div className="user_show_wrapper">
<br/>
<div className="ui stackable three column centered grid">
<div className="column">
<h3 className="ui horizontal divider header"> About Me </h3>
< UserPr... | Update formatting on sublime text with divs | Update formatting on sublime text with divs
| JSX | mit | TimCannady/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter | ---
+++
@@ -16,7 +16,7 @@
</div>
<div className=" column">
- < UserActivity user={this.props.user} issues={this.props.issues} fixes={this.props.fixes} watches={this.props.watches} same_user={this.props.same_user} />
+ < UserActivity user={this.props.user} issues={this.props... |
36f8eb963ed88949526e3a6a600d2469215bc5e3 | src/Flex.jsx | src/Flex.jsx | import React from 'react';
import PropTypes from 'prop-types';
const toPercent = num => `${num}%`;
const Flex = ({
children,
className,
direction,
count,
offset,
style,
wrap,
...otherProps
}) => (
<div
className={className}
style={{
display: 'flex',
flexDirection: direction,
... | import React from 'react';
import PropTypes from 'prop-types';
const toPercent = num => `${num}%`;
const Flex = ({
children,
className,
direction,
count,
offset,
style,
wrap,
...otherProps
}) => (
<div
className={className}
style={{
display: 'flex',
flexDirection: direction,
... | Add max-width to flex items to ensure IE doesn't overscale them | Add max-width to flex items to ensure IE doesn't overscale them
| JSX | mit | wojtekmaj/react-calendar,wojtekmaj/react-calendar,wojtekmaj/react-calendar | ---
+++
@@ -30,6 +30,7 @@
...child.props,
style: {
flexBasis: toPercent(100 / count),
+ maxWidth: toPercent(100 / count),
overflow: 'hidden',
marginLeft: offset && (index === 0) ? toPercent((100 * offset) / count) : null,
}, |
376f5a856fd970cbb6ddfe7f19f83d4a88a691bc | src/field/email/email_pane.jsx | src/field/email/email_pane.jsx | import React from 'react';
import EmailInput from '../../ui/input/email_input';
import * as c from '../index';
import { swap, updateEntity } from '../../store/index';
import * as l from '../../core/index';
import { setEmail } from '../email';
import { debouncedRequestAvatar, requestAvatar } from '../../avatar';
export... | import React from 'react';
import EmailInput from '../../ui/input/email_input';
import * as c from '../index';
import { swap, updateEntity } from '../../store/index';
import * as l from '../../core/index';
import { setEmail } from '../email';
import { debouncedRequestAvatar, requestAvatar } from '../../avatar';
export... | Add instructions prop to EmailPane | Add instructions prop to EmailPane
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -25,22 +25,28 @@
}
render() {
- const { lock, placeholder } = this.props;
+ const { instructions, lock, placeholder } = this.props;
+ const headerText = instructions || null;
+ const header = headerText && <p>{headerText}</p>;
return (
- <EmailInput value={c.email(lock)}
- ... |
f4012022a461f59ed54cd50e04b570d5848fbe76 | client/index.jsx | client/index.jsx | import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { Provider } from 'react-redux';
import createStore from '_store/createStore';
import routes from '_components/routes';
export defaul... | import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory, createMemoryHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { Provider } from 'react-redux';
import createStore from '_store/createStore';
import routes from '_components/ro... | Use memoryHistory for non-DOM clients | Use memoryHistory for non-DOM clients
| JSX | mit | Satyam/RoxyMusic,Satyam/RoxyMusic | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from 'react-dom';
-import { Router, browserHistory } from 'react-router';
+import { Router, browserHistory, createMemoryHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { Provider } from 'react-red... |
eb06c5db97c6943bdb4b6a2379d5e9f1de74b38a | client/packages/bulma-dashboard-theme-worona/src/dashboard/components/SiteHome/index.jsx | client/packages/bulma-dashboard-theme-worona/src/dashboard/components/SiteHome/index.jsx | import React from 'react';
import { connect } from 'react-redux';
import Header from '../Header';
import Footer from '../Footer';
import FooterLinks from '../Footer/FooterLinks';
import Body from '../Body';
import Main from '../Main';
import Hero from '../elements/Hero';
import * as deps from '../../deps';
import Ser... | import React from 'react';
import { connect } from 'react-redux';
import Header from '../Header';
import Footer from '../Footer';
import FooterLinks from '../Footer/FooterLinks';
import Body from '../Body';
import Main from '../Main';
import Hero from '../elements/Hero';
import * as deps from '../../deps';
import Ser... | Use Header component in SiteHome | Use Header component in SiteHome
| JSX | mit | worona/worona-core,worona/worona,worona/worona-dashboard,worona/worona,worona/worona-dashboard,worona/worona,worona/worona-core | ---
+++
@@ -12,15 +12,36 @@
import ServiceTabs from './ServiceTabs';
import AsideMenu from './AsideMenu';
-const SiteHome = ({ site }) => (
+/* Header */
+let SiteHomeHeader = ({ site }) => (
+ <div>
+ <Hero title={site.name}>
+ <small>{site.id}</small>
+ <br />
+ <small>{site.url}</small>
+ ... |
85beabad193bd0f61abfbdf971dfb9f75eecad24 | src/views/studio/studio-info-box.jsx | src/views/studio/studio-info-box.jsx | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import Button from '../../components/forms/button.jsx';
const StudioInfoBox = ({showInfoBox, onClose, ...props}) => {
if (!showInfoBox) return null;
return (
<div className="studio-invitation studio-inf... | import React from 'react';
import PropTypes from 'prop-types';
import Button from '../../components/forms/button.jsx';
const StudioInfoBox = ({showInfoBox, onClose, ...props}) => {
if (!showInfoBox) return null;
return (
<div className="studio-invitation studio-info-box"> {/* TODO move more styling in... | Remove unneded redux connect code | Remove unneded redux connect code
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
-import {connect} from 'react-redux';
import Button from '../../components/forms/button.jsx';
const StudioInfoBox = ({showInfoBox, onClose, ...props}) => {
@@ -24,8 +23,4 @@
children: PropTypes.node
};
-const mapState... |
fa128f699c0d3e9477ce69e31105bd4386d0b6a7 | imports/ui/components/header/index.jsx | imports/ui/components/header/index.jsx | import React from 'react'
import Sports from '../sports'
import Countries from '../countries'
import PlacardLink from '../placard-link/index'
export default (props) => (
<header>
<nav>
<PlacardLink />
{
!props.loadingSports &&
<Sports sports={props.sports} hideChildren>
<Co... | import React from 'react'
import { NavLink } from 'react-router-dom'
import Sports from '../sports'
import Countries from '../countries'
import PlacardLink from '../placard-link/index'
export default (props) => (
<header>
<nav>
<NavLink exact to='/' className='to-right'>Home</NavLink>
<PlacardLink /... | Add a link to the home page in order to list all the events that happen within the next 24 hours. | Add a link to the home page in order to list all the events that happen within the next 24 hours.
| JSX | mit | LuisLoureiro/placard-wrapper | ---
+++
@@ -1,4 +1,5 @@
import React from 'react'
+import { NavLink } from 'react-router-dom'
import Sports from '../sports'
import Countries from '../countries'
@@ -7,6 +8,7 @@
export default (props) => (
<header>
<nav>
+ <NavLink exact to='/' className='to-right'>Home</NavLink>
<PlacardLin... |
40d88702a978da807cdb89a9a757944edb7e5352 | encrypt-main.jsx | encrypt-main.jsx | /* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-disable no-unused-vars */
import { Router, browserHistory, Route, IndexRedirect, Redirect } from 'react-router';
function redirect(state, replace) {
if (state.location.query.video === '1') {
replace('/encrypt/direct/1');
}
}
module.expor... | /* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-disable no-unused-vars */
import { Router, browserHistory, Route, IndexRedirect, Redirect, IndexRoute } from 'react-router';
import encryptVideos from './data/encryptVideos';
function redirect(state, replace) {
var pageType;
switch(state.locati... | Add query handling for routing | Add query handling for routing
| JSX | mpl-2.0 | mozilla/advocacy.mozilla.org | ---
+++
@@ -1,25 +1,47 @@
/* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-disable no-unused-vars */
-import { Router, browserHistory, Route, IndexRedirect, Redirect } from 'react-router';
+import { Router, browserHistory, Route, IndexRedirect, Redirect, IndexRoute } from 'react-router';
+i... |
b7a4970f11c6d31c406be57148da7c94000f1b2d | js/ClientApp.jsx | js/ClientApp.jsx | const React = require('react')
const ReactDOM = require('react-dom')
const MyTitle = require('./MyTitle')
var MyFirstComponent = function () {
return (
<div>
<MyTitle title="Trying out JSX!" color="rebeccapurple" />
<MyTitle title="It's not that awkward!" color="mediumaquamarine" />
<MyTitle ti... | const React = require('react')
const ReactDOM = require('react-dom')
const MyTitle = require('./MyTitle')
const MyFirstComponent = () => (
<div>
<MyTitle title="Trying out JSX!" color="rebeccapurple" />
<MyTitle title="It's not that awkward!" color="mediumaquamarine" />
<MyTitle title="Starting to grow o... | Use new ES6 syntax for declaring functions | Use new ES6 syntax for declaring functions
| JSX | mit | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt | ---
+++
@@ -2,14 +2,12 @@
const ReactDOM = require('react-dom')
const MyTitle = require('./MyTitle')
-var MyFirstComponent = function () {
- return (
- <div>
- <MyTitle title="Trying out JSX!" color="rebeccapurple" />
- <MyTitle title="It's not that awkward!" color="mediumaquamarine" />
- <MyTi... |
70b00ef9e2504522c36132a719f40085d817c251 | app/renderer-jsx/schema-form/utils.jsx | app/renderer-jsx/schema-form/utils.jsx | 'use strict';
const lo_isString = require('lodash.isstring');
const textutil = require('../../main/utils/textutil');
function wrapDescription(description) {
if (description === undefined)
return undefined;
return (<p style={{ color: '#999' }} dangerouslySetInnerHTML={{ __html: textutil.sanitize(description) }... | 'use strict';
import React from 'react'; // DO NOT REMOVE THIS LINE, JSX USES THIS LIBRARY
const lo_isString = require('lodash.isstring');
const textutil = require('../../main/utils/textutil');
function wrapDescription(description) {
if (description === undefined)
return undefined;
return (<p style={{ color:... | Fix preferences not working (becauseof JSX) | Fix preferences not working (becauseof JSX)
| JSX | mit | appetizermonster/hain,appetizermonster/hain,hainproject/hain,appetizermonster/hain,hainproject/hain,hainproject/hain,hainproject/hain,appetizermonster/hain | ---
+++
@@ -1,4 +1,6 @@
'use strict';
+
+import React from 'react'; // DO NOT REMOVE THIS LINE, JSX USES THIS LIBRARY
const lo_isString = require('lodash.isstring');
const textutil = require('../../main/utils/textutil'); |
58e698fcac3228ca11366e132ec807810246543e | src/components/vmOverviewProperties.jsx | src/components/vmOverviewProperties.jsx | import { getReact } from '../react.js';
import { logError } from '../helpers';
const _ = (m) => m; // TODO: add translation
const exportedComponents = {}; // to be filled by lazy created and exported components
/**
* Build React components not before the React context is available.
*/
export function lazyCreateVmO... | import { getReact } from '../react.js';
import { logError } from '../helpers';
const _ = (m) => m; // TODO: add translation
const exportedComponents = {}; // to be filled by lazy created and exported components
/**
* Build React components not before the React context is available.
*/
export function lazyCreateVmO... | Disable rendering of provider's properties on the Overview subtab | Disable rendering of provider's properties on the Overview subtab
since they are not yet ready.
| JSX | apache-2.0 | mareklibra/cockpit-machines-ovirt-provider,mareklibra/cockpit-machines-ovirt-provider,mareklibra/cockpit-machines-ovirt-provider | ---
+++
@@ -21,7 +21,7 @@
}
let content = null;
- if (true) { // Recently not used. Icon and addition props are planed.
+ if (false) { // Recently not used. Icon and addition props are planed.
content = 'Hello from Provider';
}
|
cb28a6a43cac29de4d25d82f1da26b8ae6fec9b7 | app/containers/ProductContainer.jsx | app/containers/ProductContainer.jsx | import React from 'react';
import {connect} from 'react-redux';
import {Product} from '../components/Product';
const mapStateToProps = state => {
return {
product: state.products.currentProduct,
reviews: state.reviews
};
};
//temporary function for adding to cart
//what will the cart route be?
const mapD... | import React from 'react';
import {connect} from 'react-redux';
import {Product} from '../components/Product';
const mapStateToProps = state => {
return {
product: state.products.currentProduct
};
};
//temporary function for adding to cart
//what will the cart route be?
const mapDispatchToProps = dispatch =>... | Remove reviews from state. (Review now on product.) | Remove reviews from state. (Review now on product.) | JSX | mit | cvglass/Lair-Depot,cvglass/Lair-Depot,cvglass/Lair-Depot | ---
+++
@@ -5,8 +5,7 @@
const mapStateToProps = state => {
return {
- product: state.products.currentProduct,
- reviews: state.reviews
+ product: state.products.currentProduct
};
};
|
adb556283ee430ddd2c7711aec75fabdd732f295 | imports/ui/components/DrawerButton.jsx | imports/ui/components/DrawerButton.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';
// Material-UI imports
import { ListItem, ListItemText, ListItemIcon } from 'material-ui/List';
const DrawerButton = props => (
<ListItem button>
<NavLink
to={props.to}
activeStyle={{
... | import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';
// Material-UI imports
import { ListItem, ListItemText, ListItemIcon } from 'material-ui/List';
import { grey } from 'material-ui/styles/colors';
const DrawerButton = props => (
<ListItem button>
<NavLink... | Fix for current route button | Fix for current route button
| JSX | apache-2.0 | AmaralGuincho/connected-client,AmaralGuincho/connected-client | ---
+++
@@ -5,13 +5,19 @@
// Material-UI imports
import { ListItem, ListItemText, ListItemIcon } from 'material-ui/List';
+import { grey } from 'material-ui/styles/colors';
const DrawerButton = props => (
<ListItem button>
<NavLink
to={props.to}
+ style={{
+ textDecoration: 'none',
+... |
895e1284467277fe9ba10674012a6ee456c6178b | src/components/adminPages/ChatPage.jsx | src/components/adminPages/ChatPage.jsx | import React from 'react';
import ChatMessageForm from '../chat/ChatMessageForm.jsx';
import ChatMessageList from '../chat/ChatMessageList.jsx';
import ChatMenu from '../chat/ChatMenu.jsx';
require('../../styles/chat/Chat.scss');
/**
* This component will print thet chat page for the admin panel
* @param {object} ... | import React from 'react';
import ChatMessageForm from '../chat/ChatMessageForm.jsx';
import ChatMessageList from '../chat/ChatMessageList.jsx';
import ChatMenu from '../chat/ChatMenu.jsx';
require('../../styles/chat/Chat.scss');
/**
* This component will print thet chat page for the admin panel
* @param {object} ... | Fix default channel on admin interface | Fix default channel on admin interface
| JSX | mit | ungdev/flux2-client,ungdev/flux2-client,ungdev/flux2-client | ---
+++
@@ -27,7 +27,7 @@
}
render() {
- let channel = this.state.route.name == 'chat.channel' ? this.state.route.params.channel : null;
+ let channel = this.state.route.name == 'chat.channel' ? this.state.route.params.channel : false;
return (
<div className={this.prop... |
d3f81c6bbba154a83619b1d182db5759bc5aeb55 | src/GoogleMap.jsx | src/GoogleMap.jsx | import React from 'react';
import {
withGoogleMap,
GoogleMap,
Marker,
Circle
} from 'react-google-maps';
/* Create map with withGoogleMap HOC */
/* https://github.com/tomchentw/react-google-maps */
const Map = withGoogleMap((props) => {
const {
position,
defaultZoom,
handleMarkerDragEnd,
onZ... | import React from 'react';
import {
withGoogleMap,
GoogleMap,
Marker,
Circle
} from 'react-google-maps';
/* Create map with withGoogleMap HOC */
/* https://github.com/tomchentw/react-google-maps */
const Map = withGoogleMap((props) => {
const {
position,
defaultZoom,
handleMarkerDragEnd,
onZ... | Allow circle to be hidden | Allow circle to be hidden
| JSX | mit | rameshsyn/react-location-picker | ---
+++
@@ -18,12 +18,14 @@
radius,
circleOptions
} = props;
- let circle = (radius == -1) ?
- <Circle
- center={position}
- radius={radius}
- options={circleOptions}
- /> : "";
+
+ const circle = (radius !== -1) ?
+ <Circle
+ ... |
6d913236e13841bf9f09cdc7e9aef37c4db3ca44 | ui/js/component/router/view.jsx | ui/js/component/router/view.jsx | import React from 'react';
import SettingsPage from 'page/settings.js';
import HelpPage from 'page/help';
import ReportPage from 'page/report.js';
import StartPage from 'page/start.js';
import WalletPage from 'page/wallet';
import ShowPage from 'page/showPage';
import PublishPage from 'page/publish.js';
import Discover... | import React from 'react';
import SettingsPage from 'page/settings.js';
import HelpPage from 'page/help';
import ReportPage from 'page/report.js';
import StartPage from 'page/start.js';
import WalletPage from 'page/wallet';
import ShowPage from 'page/showPage';
import PublishPage from 'page/publish';
import DiscoverPag... | Fix publish page link in router | Fix publish page link in router
| JSX | mit | lbryio/lbry-electron,lbryio/lbry-electron,akinwale/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,lbryio/lbry-app,jsigwart/lbry-app,lbryio/lbry-electron,jsigwart/lbry-app,lbryio/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,MaxiBoether/lbry-app,MaxiBoether/lbry-app,MaxiBoether/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-a... | ---
+++
@@ -5,7 +5,7 @@
import StartPage from 'page/start.js';
import WalletPage from 'page/wallet';
import ShowPage from 'page/showPage';
-import PublishPage from 'page/publish.js';
+import PublishPage from 'page/publish';
import DiscoverPage from 'page/discover';
import SplashScreen from 'component/splash.js';... |
db1ad1d254dd56d004dc443fa44684f93f49e391 | src/renderer/containers/app.jsx | src/renderer/containers/app.jsx | import React, { Component, PropTypes } from 'react';
import { withRouter } from 'react-router';
import { connect } from 'react-redux';
import * as ConfigActions from '../actions/config.js';
import '../vendor/semantic-ui/semantic';
require('../vendor/lato/latofonts.css');
require('../vendor/semantic-ui/semantic.css');... | import { webFrame } from 'electron'; // eslint-disable-line import/no-unresolved
import React, { Component, PropTypes } from 'react';
import { withRouter } from 'react-router';
import { connect } from 'react-redux';
import * as ConfigActions from '../actions/config.js';
import '../vendor/semantic-ui/semantic';
requir... | Add support to set the zoom factor | Add support to set the zoom factor
This should improve the HiDPI support.
Close #276.
| JSX | mit | sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui | ---
+++
@@ -1,3 +1,4 @@
+import { webFrame } from 'electron'; // eslint-disable-line import/no-unresolved
import React, { Component, PropTypes } from 'react';
import { withRouter } from 'react-router';
import { connect } from 'react-redux';
@@ -26,6 +27,18 @@
this.props.dispatch(ConfigActions.loadConfig());
... |
88e65699977d6c9d15ce8a6c5a2d72147662c097 | templates/javascript.jsx | templates/javascript.jsx | import React, { Component } from 'react'
import PropTypes from 'prop-types'
/*
const ThisClass = ({prop1, prop2}) => (
<div key={prop1}>{ prop2 }</div>
)
// or:
*/
export default class ThisClass extends Component {
// componentWillMount () { } // Only for server-side rendering
constructor (props) {
super(p... | import React, { Component } from 'react'
import PropTypes from 'prop-types'
/*
const ThisClass = ({prop1, prop2}) => (
<div key={prop1}>{ prop2 }</div>
)
// or:
*/
export default class ThisClass extends Component {
// componentWillMount () { } // Only for server-side rendering
constructor (props) {
super(p... | Correct order of life cycle methods in React template | Correct order of life cycle methods in React template
| JSX | unlicense | chris-kobrzak/js-dev-vim-setup | ---
+++
@@ -23,9 +23,6 @@
methods.forEach((method) => { this[method] = this[method].bind(this) })
}
- componentDidMount () {
- }
-
componentWillReceiveProps (nextProps) {
}
@@ -44,6 +41,9 @@
)
}
+ componentDidMount () {
+ }
+
componentDidUpdate (prevProps, prevState) {
}
|
efa89d081aaf8253f3052c42c6c9965fba3546f3 | src/app/components/drawer/Drawer.jsx | src/app/components/drawer/Drawer.jsx | import React, {Component} from 'react';
import PropTypes from 'prop-types';
const propTypes = {
isVisible: PropTypes.bool,
isAnimatable: PropTypes.bool,
handleTransitionEnd: PropTypes.func,
children: PropTypes.node
}
const defaultProps = {
handleTransitionEnd: () => {}
}
class Drawer extends Comp... | import React, {Component} from 'react';
import PropTypes from 'prop-types';
const propTypes = {
isVisible: PropTypes.bool,
isAnimatable: PropTypes.bool,
handleTransitionEnd: PropTypes.func,
children: PropTypes.node
}
const defaultProps = {
handleTransitionEnd: () => {}
}
class Drawer extends Comp... | Add class to animatable on drawer on animation end - useful for acceptance tests | Add class to animatable on drawer on animation end - useful for acceptance tests
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -16,11 +16,19 @@
constructor(props) {
super(props);
+ this.state = {
+ // This classes is added because it's useful for testing to have something in the DOM
+ // that signifies when the animation is finished. It means we don't have to inputs timeouts
+ ... |
01b3c313cdb383ae890999d3b7e83d3299e3fb21 | src/index.jsx | src/index.jsx | import { h, render } from 'preact';
import { Provider } from 'preact-redux';
import App from './preact/App';
import registerServiceWorker from './registerServiceWorker';
import store from './redux/store';
import './styles/index.scss';
const rootElement = document.getElementById('root');
root.removeChild(rootElement.c... | import { h, render } from 'preact';
import { Provider } from 'preact-redux';
import App from './preact/App';
import registerServiceWorker from './registerServiceWorker';
import store from './redux/store';
import './styles/index.scss';
const rootElement = document.getElementById('root');
root.removeChild(rootElement.c... | Use rootElement instead of getting again | Use rootElement instead of getting again
| JSX | apache-2.0 | carloseduardosx/github-profile-search,carloseduardosx/github-profile-search,carloseduardosx/github-profile-search | ---
+++
@@ -13,5 +13,5 @@
<Provider store={store}>
<App />
</Provider>,
- document.getElementById('root')
+ rootElement
); |
52ef37685cb9acf34ea2188ff3713e6d41b481b5 | common/app/routes/settings/components/Social-Settings.jsx | common/app/routes/settings/components/Social-Settings.jsx | import React, { PropTypes } from 'react';
import { Button } from 'react-bootstrap';
import FA from 'react-fontawesome';
export default function SocialSettings({
isGithubCool,
isTwitter,
isLinkedIn
}) {
const githubCopy = isGithubCool ?
'Update my portfolio from GitHub' :
'Link my GitHub to unlock my po... | import React, { PropTypes } from 'react';
import { Button } from 'react-bootstrap';
import FA from 'react-fontawesome';
export default function SocialSettings({
isGithubCool,
isTwitter,
isLinkedIn
}) {
const githubCopy = isGithubCool ?
'Update my portfolio from GitHub' :
'Link my GitHub to unlock my po... | Fix (settings) : Duplicate social labels | Fix (settings) : Duplicate social labels
closes #9848
| JSX | bsd-3-clause | techstonia/FreeCodeCamp,otavioarc/freeCodeCamp,no-stack-dub-sack/freeCodeCamp,pahosler/freecodecamp,BrendanSweeny/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,TheeMattOliver/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,HKuz/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,raisedadead/FreeCodeCamp,codeman869/FreeCodeCamp,jonathanihm/freeCo... | ---
+++
@@ -32,7 +32,7 @@
key='twitter'
>
<FA name='twitter' />
- Add my LinkedIn to my portfolio
+ Add my Twitter to my portfolio
</Button>
));
} |
da870d47f8448b4c5d3431f1f349c869df35a3cc | src/drive/web/modules/filelist/FileOpener.jsx | src/drive/web/modules/filelist/FileOpener.jsx | import React, { Component } from 'react'
import Hammer from '@egjs/hammerjs'
import propagating from 'propagating-hammerjs'
import { enableTouchEvents } from './File'
import styles from './fileopener.styl'
class FileOpener extends Component {
constructor(props) {
super(props)
this.myRef = React.createRef()
... | import React, { Component } from 'react'
import Hammer from '@egjs/hammerjs'
import propagating from 'propagating-hammerjs'
import { enableTouchEvents } from './File'
import styles from './fileopener.styl'
class FileOpener extends Component {
constructor(props) {
super(props)
this.myRef = React.createRef()
... | Read props during the callback, not before, props can change... | fix: Read props during the callback, not before, props can change...
Had issue when clicking on a <File /> when the selectionbar was
active.
| JSX | agpl-3.0 | nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3 | ---
+++
@@ -12,17 +12,18 @@
}
componentDidMount() {
- const {
- file,
- disabled,
- actionMenuVisible,
- toggle,
- open,
- selectionModeActive,
- isRenaming
- } = this.props
this.gesturesHandler = propagating(new Hammer(this.myRef.current))
this.gesturesHandl... |
670113c75624172469d873c957cfa0c539090071 | index.jsx | index.jsx | import React from 'react';
import AutoLayout from 'autolayout';
var AutoLayoutSVG = React.createClass({
propTypes: {
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
format: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
spacing: React.PropTypes.numbe... | import React from 'react';
import AutoLayout from 'autolayout';
var AutoLayoutSVG = React.createClass({
propTypes: {
width: React.PropTypes.number.isRequired,
height: React.PropTypes.number.isRequired,
format: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
spacing: React.PropTypes.numbe... | Change export method to accommodate Babel changes | Change export method to accommodate Babel changes
| JSX | mit | joshuahhh/react-autolayout-svg | ---
+++
@@ -22,7 +22,7 @@
const {children, width, height, format, spacing, extended} = this.props;
const constraints = AutoLayout.VisualFormat.parse(format, {extended});
-
+
var view = new AutoLayout.View({
constraints,
spacing,
@@ -66,4 +66,4 @@
});
-export default AutoLayoutS... |
953d4e44e7eeed2917a4c589f31b8ebbf9b052a5 | src/components/sidebar/sidebar.jsx | src/components/sidebar/sidebar.jsx | import React, {PropTypes} from 'react';
import PanelElementEditor from './panel-element-editor/panel-element-editor';
import PanelLayers from './panel-layers';
import PanelGuides from './panel-guides';
import PanelLayerElements from './panel-layer-elements';
const STYLE = {
backgroundColor: "#28292D",
display: "bl... | import React, {PropTypes} from 'react';
import PanelElementEditor from './panel-element-editor/panel-element-editor';
import PanelLayers from './panel-layers';
import PanelGuides from './panel-guides';
import PanelLayerElements from './panel-layer-elements';
const STYLE = {
backgroundColor: "#28292D",
display: "bl... | Fix another bug with style | Fix another bug with style
| JSX | mit | vovance/3d-demo,cvdlab/react-planner,dearkaran/react-planner | ---
+++
@@ -15,7 +15,7 @@
return (
<aside
- style={{minWidth: width, maxWidth: width, maxHeight: height, ...STYLE}}
+ style={{width, width, height, ...STYLE}}
onKeyDown={event => event.stopPropagation()}
onKeyUp={event => event.stopPropagation()}
className="sidebar" |
9d03968b5e225cd1a133443312dca8c1a7a5028c | ui/component/fileViewerEmbeddedTitle/view.jsx | ui/component/fileViewerEmbeddedTitle/view.jsx | // @flow
import React from 'react';
import Button from 'component/button';
import FilePrice from 'component/filePrice';
import { formatLbryUrlForWeb } from 'util/url';
import { withRouter } from 'react-router';
import { URL } from 'config';
import * as ICONS from 'constants/icons';
type Props = {
uri: string,
titl... | // @flow
import React from 'react';
import Button from 'component/button';
import FilePrice from 'component/filePrice';
import { formatLbryUrlForWeb } from 'util/url';
import { withRouter } from 'react-router';
import { URL } from 'config';
import * as ICONS from 'constants/icons';
type Props = {
uri: string,
titl... | Add tooltip to embed's Title and Home button | Add tooltip to embed's Title and Home button
## Issue
- Most titles don't fit the embed container width. I wish to know what the title is without having to click on it first.
- Also, add clarity that the LBRY icon brings you Home.
| JSX | mit | lbryio/lbry-app,lbryio/lbry-app | ---
+++
@@ -28,9 +28,15 @@
return (
<div className="file-viewer__embedded-header">
<div className="file-viewer__embedded-gradient" />
- <Button label={title} button="link" className="file-viewer__embedded-title" {...contentLinkProps} />
+ <Button
+ label={title}
+ aria-label={ti... |
6ffe043c187c764c43b2945708321a89f16881f4 | source/setup/js/AddLastLogin.jsx | source/setup/js/AddLastLogin.jsx | import React from "react";
import AddLastLoginForm from "./AddLastLoginForm";
class UnlockArchive extends React.Component {
render() {
return <div>
<h3>Add new entry</h3>
<AddLastLoginForm />
</div>
}
}
export default UnlockArchive;
| import React from "react";
import HeaderBar from "./HeaderBar";
import AddLastLoginForm from "./AddLastLoginForm";
class AddLastLogin extends React.Component {
render() {
return (
<div>
<HeaderBar />
<h3>Add new entry</h3>
<AddLastLoginForm />
... | Add styles to Last login page | Add styles to Last login page
| JSX | mit | buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension | ---
+++
@@ -1,16 +1,20 @@
import React from "react";
+import HeaderBar from "./HeaderBar";
import AddLastLoginForm from "./AddLastLoginForm";
-class UnlockArchive extends React.Component {
+class AddLastLogin extends React.Component {
render() {
- return <div>
- <h3>Add new entry</h3>
-... |
c1005f42e895eebfa3ec475bbeb0f6ae3a3f3a06 | src/request/components/request-summary-list-item-view.jsx | src/request/components/request-summary-list-item-view.jsx | var glimpse = require('glimpse'),
React = require('react'),
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var summary = this.props.summary;
return (
<div className="request-summary-item-holder" onClick={this.onSe... | var glimpse = require('glimpse'),
React = require('react'),
Timeago = require('../../lib/components/timeago.jsx'),
cx = React.addons.classSet;
module.exports = React.createClass({
render: function() {
var summary = this.props.summary,
containerClass = cx({
'table tab... | Update which highlights the selected request row | Update which highlights the selected request row
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -1,13 +1,19 @@
var glimpse = require('glimpse'),
React = require('react'),
- Timeago = require('../../lib/components/timeago.jsx');
+ Timeago = require('../../lib/components/timeago.jsx'),
+ cx = React.addons.classSet;
module.exports = React.createClass({
render: function() {
- ... |
efe902041ad4ec73cfb1fef67539b966706a8f13 | src/components/DurationInput.jsx | src/components/DurationInput.jsx | const DurationInput = ({onChange, value}) => (
<input
min={1}
onChange={(event) => { onChange(event.target.valueAsNumber) }}
type="number"
value={value}
/>
)
export default DurationInput
| const DurationInput = ({onChange, value}) => (
<input
min={1}
onChange={(event) => { onChange(event.target.valueAsNumber) }}
style={{
width: "3em",
}}
type="number"
value={value}
/>
)
export default DurationInput
| Add width to duration input | Add width to duration input
| JSX | agpl-3.0 | openchordcharts/openchordcharts-sample-data,openchordcharts/sample-data,openchordcharts/openchordcharts-sample-data,openchordcharts/sample-data | ---
+++
@@ -2,6 +2,9 @@
<input
min={1}
onChange={(event) => { onChange(event.target.valueAsNumber) }}
+ style={{
+ width: "3em",
+ }}
type="number"
value={value}
/> |
e17b5f599f416aa1d385d4574e11abf5f522589b | components/dropdown/dropdown.jsx | components/dropdown/dropdown.jsx | import React from 'react';
import Dropdown from 'rc-dropdown';
export default React.createClass({
getDefaultProps() {
return {
transitionName: 'slide-up',
prefixCls: 'ant-dropdown',
};
},
render() {
const { overlay, ...otherProps } = this.props;
const menu = React.cloneElement(overlay... | import React from 'react';
import Dropdown from 'rc-dropdown';
export default React.createClass({
getDefaultProps() {
return {
transitionName: 'slide-up',
prefixCls: 'ant-dropdown',
mouseEnterDelay: 0.15,
mouseLeaveDelay: 0.1,
};
},
render() {
const { overlay, ...otherProps } ... | Add hover delay for Dropdown | Add hover delay for Dropdown
| JSX | mit | RaoHai/ant-design,ddcat1115/ant-design,hjin-me/ant-design,superRaytin/ant-design,vgeyi/ant-design,mitchelldemler/ant-design,havefive/ant-design,vgeyi/ant-design,havefive/ant-design,waywardmonkeys/ant-design,hotoo/ant-design,mitchelldemler/ant-design,vgeyi/ant-design,RaoHai/ant-design,marswong/ant-design,liekkas/ant-des... | ---
+++
@@ -6,6 +6,8 @@
return {
transitionName: 'slide-up',
prefixCls: 'ant-dropdown',
+ mouseEnterDelay: 0.15,
+ mouseLeaveDelay: 0.1,
};
},
render() { |
fdd7af0d6dfc37bb27baef29e44f4b045ee6f86e | test/components/Notebok_spec.jsx | test/components/Notebok_spec.jsx | import React from 'react';
import { expect } from 'chai';
import immutableNotebook from '../dummyNotebook_helper';
import {
renderIntoDocument,
} from 'react-addons-test-utils';
import Notebook from '../../src/components/Notebook';
// Boilerplate test to make sure the testing setup is configured
describe('Notebo... | import React from 'react';
import { expect } from 'chai';
import immutableNotebook from '../dummyNotebook_helper';
import {
renderIntoDocument,
} from 'react-addons-test-utils';
import Notebook from '../../src/components/Notebook';
// Boilerplate test to make sure the testing setup is configured
describe('Notebo... | Make the test match the current Notebook interface. | Make the test match the current Notebook interface.
| JSX | bsd-3-clause | nteract/nteract,rgbkrk/nteract,nteract/nteract,jdfreder/nteract,nteract/nteract,nteract/composition,jdfreder/nteract,temogen/nteract,nteract/composition,temogen/nteract,captainsafia/nteract,jdfreder/nteract,rgbkrk/nteract,captainsafia/nteract,captainsafia/nteract,jdfreder/nteract,nteract/nteract,rgbkrk/nteract,nteract/... | ---
+++
@@ -15,11 +15,9 @@
it('accepts an Immutable.List of cells', () => {
const component = renderIntoDocument(
- <Notebook cells={immutableNotebook.get('cells')}
- language={immutableNotebook.getIn(['metadata', 'language_info', 'name'])} />
+ <Notebook notebook={immutableNotebook... |
c194013b91a5204cfd512e97b378da27d1cedc41 | src/jsx/components/Header.jsx | src/jsx/components/Header.jsx | import React, { Component } from 'react';
import PrimaryNav from './navigation/PrimaryNav';
export default class Header extends Component {
render() {
return (
<header className="Header Grid">
<div className="Grid-fullColumn">
<PrimaryNav />
</div>
</header>
);
}
}
| import React, { Component } from 'react';
import { Link } from 'react-router';
import PrimaryNav from './navigation/PrimaryNav';
export default class Header extends Component {
render() {
return (
<header className="Header Grid">
<div className="Grid-halfColumn">
<Link to="/" className="... | Add my name to the navigation | Add my name to the navigation
While I describe who I am on the homepage, if you're linked directly to a project page with no prior knowledge, you can't tell who's site this is unless you look at the address bar.
Having your name visible is something I've seen a lot and come to expect. It will likely be the same for o... | JSX | mit | VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website | ---
+++
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import { Link } from 'react-router';
import PrimaryNav from './navigation/PrimaryNav';
@@ -6,7 +7,11 @@
render() {
return (
<header className="Header Grid">
- <div className="Grid-fullColumn">
+ <div className="Grid-... |
6eeffe1afa99134fb56f31be1955259d9172480e | src/views/ServerSelection.jsx | src/views/ServerSelection.jsx | import React from 'react';
import { withStore } from 'fluorine-lib';
import {
connection,
} from 'pipboylib';
const {
createDiscovery,
} = connection;
@withStore(createDiscovery()
.filter(s => s.info && s.info.address)
.map(s => s.info.address)
.scan((state, servers) => state.concat(servers), [])
, 'serve... | import React from 'react';
import { withStore } from 'fluorine-lib';
import {
connection,
} from 'pipboylib';
const {
createDiscovery,
} = connection;
@withStore(createDiscovery()
.filter(s => s.info && s.info.address)
.map(s => s.info.address)
.scan((state, servers) => state.concat(servers), [])
, 'serve... | Set the key as the server (address) | Set the key as the server (address)
| JSX | bsd-3-clause | RobCoIndustries/pipboy,RobCoIndustries/pipboy | ---
+++
@@ -22,11 +22,15 @@
servers: React.PropTypes.any,
}
+ selectServer(server) {
+ console.log(server);
+ }
+
render() {
return (
(this.props.servers && this.props.servers.length > 0) ?
<div>{this.props.servers.map(server =>
- <h1>{server}</h1>
+ <h1 key={s... |
6c264a840336e2d4a046814def9365a18783d53a | src/components/footer/CompanyName.jsx | src/components/footer/CompanyName.jsx | import React from 'react'
import { Col } from 'react-bootstrap'
import './CompanyName.css'
class CompanyName extends React.Component {
render() {
return (
<Col xs={12} sm={12} md={6} lg={6} className="company-name">
<h4>© 2016 Nextzy Technologies Co., Ltd.</h4>
</Col>
)
}
}
export... | import React from 'react'
import { Col } from 'react-bootstrap'
import './CompanyName.css'
class CompanyName extends React.Component {
render() {
return (
<Col xs={12} sm={12} md={6} lg={6} className="company-name">
<h4>© 2017 Nextzy Technologies Co., Ltd.</h4>
</Col>
)
}
}
export... | Update copyright from 2016 to 2017 | Update copyright from 2016 to 2017
| JSX | mit | Nextzy/client-nextzy-landing-page-2017,Nextzy/client-nextzy-landing-page-2017 | ---
+++
@@ -6,7 +6,7 @@
render() {
return (
<Col xs={12} sm={12} md={6} lg={6} className="company-name">
- <h4>© 2016 Nextzy Technologies Co., Ltd.</h4>
+ <h4>© 2017 Nextzy Technologies Co., Ltd.</h4>
</Col>
)
} |
8edad59b55d162ee9429c2f04fca25689f42a023 | src/js/index.jsx | src/js/index.jsx | /* global document, window */
/* eslint-disable no-unused-vars */
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import reducer from './reducers/index';
import App from './components/App.jsx';
import ini... | /* global document, window */
/* eslint-disable no-unused-vars */
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import reducer from './reducers/index';
import App from './components/App.jsx';
import ini... | Reorder middleware to fix 'lagged' uri | Reorder middleware to fix 'lagged' uri
| JSX | mit | adamgiese/react-beat-map,adamgiese/react-beat-map | ---
+++
@@ -13,9 +13,9 @@
require('./../scss/styles.scss');
const uriMiddleware = ({ getState }) => next => (action) => {
+ next(action);
const state = getState();
stateToUrl(state);
- next(action);
};
|
ea0b0558042ff3b09f130c40a08538289a6c6d50 | addons/viewport/src/manager.jsx | addons/viewport/src/manager.jsx | import React from 'react';
import addons from '@storybook/addons';
import { Panel } from './components/Panel';
const ADDON_ID = 'storybook-addon-viewport';
const PANEL_ID = `${ADDON_ID}/addon-panel`;
function addChannel(api) {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Viewport... | import React from 'react';
import addons from '@storybook/addons';
import { Panel } from './components/Panel';
const ADDON_ID = 'storybook-addon-viewport';
const PANEL_ID = `${ADDON_ID}/addon-panel`;
const addChannel = (api) => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Viewp... | Move to arrow functions instead of named function declrations | Move to arrow functions instead of named function declrations
| JSX | mit | rhalff/storybook,rhalff/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,rhalff/storybook,rhalff/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-sto... | ---
+++
@@ -6,7 +6,7 @@
const ADDON_ID = 'storybook-addon-viewport';
const PANEL_ID = `${ADDON_ID}/addon-panel`;
-function addChannel(api) {
+const addChannel = (api) => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
@@ -17,7 +17,7 @@
});
}
-function init() {
+const init = () => ... |
5f8705c8b35a85c3ef50bceaf1aa62e4e90a3225 | client/components/app/Footer.jsx | client/components/app/Footer.jsx | import React, { Component } from 'react';
Footer = class Footer extends Component {
render() {
return (
<div className="ui basic small container segment center aligned">
<div className="ui three column grid">
<div className="dark-blue column">
Great Puzzle Hunt © 2017
... | import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
const { eventYear } = Meteor.settings.public;
Footer = class Footer extends Component {
render() {
return (
<div className="ui basic small container segment center aligned">
<div className="ui three column grid">
... | Update footer copyrgith to use eventYear | Update footer copyrgith to use eventYear
| JSX | mit | kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt | ---
+++
@@ -1,4 +1,7 @@
+import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
+
+const { eventYear } = Meteor.settings.public;
Footer = class Footer extends Component {
render() {
@@ -6,7 +9,7 @@
<div className="ui basic small container segment center aligned">
<div... |
038ce93819655852c051e7ccf93e72abb3960b9b | src/pages/home.jsx | src/pages/home.jsx | import React from 'react';
import Header from '../components/header.jsx';
export default class Home extends React.Component {
constructor(props) {
super(props);
this.onClickButton = this.onClickButton.bind(this);
this.state = {
name: props.name,
counter: 0
};
}
onClickButton () {
... | import React from 'react';
import Header from '../components/header.jsx';
export default class Home extends React.Component {
constructor(props) {
super(props);
this.onClickButton = this.onClickButton.bind(this);
this.state = {
name: props.name,
counter: 0
};
}
onClickButton () {
... | Change script to JSX notation | Change script to JSX notation
| JSX | mit | Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render | ---
+++
@@ -30,12 +30,8 @@
<span> {this.state.counter} Clicks</span>
<p><noscript><strong>You don't have Javascript enabled in your browser</strong></noscript></p>
</main>
- {
- React.DOM.script({dangerouslySetInnerHTML: {
- __htm... |
f3b224f07beb177bde4ecd8dd7dd19a723087c19 | src/components/ProjectDetail.jsx | src/components/ProjectDetail.jsx | import React from 'react';
import { useParams } from 'react-router-dom';
import projects from 'projects';
import style from './ProjectDetail.scss';
import bulma from 'bulma.scss';
const ProjectDetail = () => {
const { projectId } = useParams();
const project = projects.find(project => project.slug == projectId);
... | import React from 'react';
import { Link, useParams } from 'react-router-dom';
import HorizontalList from './HorizontalList';
import projects from 'projects';
import style from './ProjectDetail.scss';
const getProjectLink = (index, text) => {
const project = projects[index];
if (project) {
return <Link to={`/proje... | Add prev/next links on project details | Add prev/next links on project details
| JSX | mit | vocksel/my-website,VoxelDavid/voxeldavid-website,vocksel/my-website,VoxelDavid/voxeldavid-website | ---
+++
@@ -1,13 +1,23 @@
import React from 'react';
-import { useParams } from 'react-router-dom';
+import { Link, useParams } from 'react-router-dom';
+import HorizontalList from './HorizontalList';
import projects from 'projects';
import style from './ProjectDetail.scss';
-import bulma from 'bulma.scss';
+
+con... |
f7112d2d5776656a5dcee2b4452514761320a96a | app/AmountSpent.jsx | app/AmountSpent.jsx | import React, { Component, PropTypes } from 'react';
class AmountSpent extends Component {
static propTypes = {
amountEarned: PropTypes.number,
amountSpent: PropTypes.number
};
render() {
const { amountEarned, amountSpent } = this.props;
return (
<div>
<p>Total amount spent: ${amo... | import React, { Component, PropTypes } from 'react';
class AmountSpent extends Component {
static propTypes = {
amountEarned: PropTypes.number,
amountSpent: PropTypes.number
};
render() {
const { amountEarned, amountSpent } = this.props;
const balance = amountEarned - amountSpent;
return (... | Fix Balance amount calculation logic | Fix Balance amount calculation logic
| JSX | mit | kwonghow/toto-app,kwonghow/toto-app | ---
+++
@@ -9,11 +9,13 @@
render() {
const { amountEarned, amountSpent } = this.props;
+ const balance = amountEarned - amountSpent;
+
return (
<div>
<p>Total amount spent: ${amountSpent}</p>
<p>Total amount earned: ${amountEarned}</p>
- <p>Balance: ${amountSpent - am... |
249b4bce303c53438d5a0fe6c4907072bcef75fa | app/pages/Articles/ArticlePage.jsx | app/pages/Articles/ArticlePage.jsx | var React = require('react');
var Immstruct = require('immstruct');
var ArticleComponent = require('../../components/articles/Article');
var { GetStores } = require('flux/bootstrap');
var ArticlePage = React.createClass({
displayName: 'ArticlePage',
statics: {
getAsyncProps: (params) => GetStores(params, ['ar... | var React = require('react');
var Immstruct = require('immstruct');
var ArticleComponent = require('../../components/articles/Article');
var { GetStores } = require('flux/bootstrap');
var ArticlePage = React.createClass({
displayName: 'ArticlePage',
statics: {
getAsyncProps: (params) => GetStores(params, ['ar... | Fix new bug on articlePage | Fix new bug on articlePage
| JSX | mit | reapp/reapp-ui,oToUC/reapp-ui,srounce/reapp-ui,zackp30/reapp-ui,Lupino/reapp-ui,jhopper28/reapp-ui,zenlambda/reapp-ui | ---
+++
@@ -23,7 +23,8 @@
render() {
if (!this.structure) return <span />;
- return ArticleComponent(`Article-${article.get('id')}`, this.structure.cursor());
+ var cursor = this.structure.cursor();
+ return ArticleComponent(`Article-${cursor.get('article', 'id')}`, cursor);
}
});
|
753405a619b3166696ff0cc1189b46eb51a1a320 | src/sentry/static/sentry/app/views/routeNotFound.jsx | src/sentry/static/sentry/app/views/routeNotFound.jsx | import React from "react";
import DocumentTitle from "react-document-title";
import Footer from "../components/footer";
import Header from "../components/header";
var RouteNotFound = React.createClass({
statics: {
// Try and append a trailing slash to the route when we "404".
//
// Reference:
// ht... | import React from "react";
import DocumentTitle from "react-document-title";
import Footer from "../components/footer";
import Header from "../components/header";
var RouteNotFound = React.createClass({
statics: {
// Try and append a trailing slash to the route when we "404".
//
// Reference:
// ht... | Add note for this behavior changing in react-router 1.0 | Add note for this behavior changing in react-router 1.0
| JSX | bsd-3-clause | BuildingLink/sentry,looker/sentry,alexm92/sentry,nicholasserra/sentry,JamesMura/sentry,ifduyue/sentry,JackDanger/sentry,mvaled/sentry,jean/sentry,jean/sentry,daevaorn/sentry,ifduyue/sentry,JackDanger/sentry,mitsuhiko/sentry,zenefits/sentry,zenefits/sentry,zenefits/sentry,JamesMura/sentry,JackDanger/sentry,BayanGroup/se... | ---
+++
@@ -9,9 +9,12 @@
//
// Reference:
// https://github.com/rackt/react-router/blob/0.13.x/examples/auth-flow/app.js#L46-L50
+ //
+ // NOTE: This behavior changes in react-router 1.0:
+ // https://github.com/rackt/react-router/blob/v1.0.0-rc1/UPGRADE_GUIDE.md#willtransitionto-and-willt... |
3771edabf091a5149cce3d983c951c698296fb68 | app/scripts/components/router.jsx | app/scripts/components/router.jsx | "use strict";
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var Routes = Router.Routes;
var DefaultRoute = Router.DefaultRoute;
var NotFoundRoute = Router.NotFoundRoute;
var NotFound = require('./not-found/not-found.jsx');
var Payments = require('../modules/payments/co... | "use strict";
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var Routes = Router.Routes;
var DefaultRoute = Router.DefaultRoute;
var NotFoundRoute = Router.NotFoundRoute;
var NotFound = require('./not-found/not-found.jsx');
var Payments = require('../modules/payments/co... | Set default route to /payments/outgoing | [TASK] Set default route to /payments/outgoing
| JSX | isc | dabibbit/dream-stack-seed,dabibbit/dream-stack-seed | ---
+++
@@ -21,7 +21,7 @@
var routes = (
<Routes>
<Route name="app" path="/" handler={App}>
- <DefaultRoute handler={Payments} />
+ <DefaultRoute handler={Payments} path="payments/outgoing" />
<Route name="login" handler={Session} />
<Route name="logout" handler={Session} />
<R... |
02da4cebd2a63cf81d203c2dd99a5f3ffcf95af6 | web-server/app/assets/javascripts/components/filters/filters-page-component.jsx | web-server/app/assets/javascripts/components/filters/filters-page-component.jsx | define(function(require) {
var React = require('react'),
SearchBar = require('../search-bar'),
FiltersComponent = require('./filters-component'),
FiltersStore = require('../../stores/filters'),
FiltersHeader = require('./filters-header-component');
var FiltersPageComponent = React.createCl... | define(function(require) {
var React = require('react'),
SearchBar = require('../search-bar'),
FiltersComponent = require('./filters-component'),
FiltersStore = require('../../stores/filters'),
FiltersHeader = require('./filters-header-component');
var FiltersPageComponent = React.createCl... | Fix search box label for filter page | Fix search box label for filter page
| JSX | mpl-2.0 | PDXostc/rvi_sota_server,PDXostc/rvi_sota_server,PDXostc/rvi_sota_server | ---
+++
@@ -11,7 +11,7 @@
return (
<div>
<FiltersHeader/>
- <SearchBar label="Search filters by regex" event="search-filters"/>
+ <SearchBar label="Filter" event="search-filters"/>
<FiltersComponent Store={FiltersStore}/>
</div>
);} |
20314f682c7e918d20b631760daea4bdeb8b9b3e | js/pages/UserApp.react.jsx | js/pages/UserApp.react.jsx | 'use strict';
var React = require('react');
var {PropTypes} = React;
var {Grid,Row,Col} = require('react-bootstrap');
var Header = require('../components/Header.react');
var UserApp = React.createClass({
propTypes: {
children: PropTypes.node,
session: PropTypes.oneOfType([PropTypes.object, PropTypes.bool])... | 'use strict';
var React = require('react');
var {PropTypes} = React;
var {Grid,Row,Col} = require('react-bootstrap');
var Header = require('../components/Header.react');
var NotificationView = require('../components/NotificationView.react');
var UserApp = React.createClass({
propTypes: {
children: PropTypes.no... | Add notification view to UserApp | Add notification view to UserApp
| JSX | mit | mapster/tdl-frontend | ---
+++
@@ -5,6 +5,7 @@
var {Grid,Row,Col} = require('react-bootstrap');
var Header = require('../components/Header.react');
+var NotificationView = require('../components/NotificationView.react');
var UserApp = React.createClass({
propTypes: {
@@ -26,6 +27,9 @@
</Col>
</Row>
... |
bd972ecc2e5fd9fe70c436f5cc5b23e29222a218 | src/request/components/request-entry-item-view.jsx | src/request/components/request-entry-item-view.jsx | var React = require('react');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
<tr>
<td rowSpa... | var React = require('react');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
<tr>
<td rowSpa... | Fix property that was missed in refactoring request to use summary | Fix property that was missed in refactoring request to use summary
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -16,7 +16,7 @@
<td>{entry.summary.networkTime}ms</td>
<td>{entry.summary.serverTime}ms</td>
<td>{entry.summary.clientTime}ms</td>
- <td>{entry.summary.controller}.{entry.action}(...)</td>
+ ... |
2e5fac1b087d8c069b759743e9348aba5e2854d5 | src/client/components/MyInvestmentProjects/InvestmentList.jsx | src/client/components/MyInvestmentProjects/InvestmentList.jsx | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { SPACING } from '@govuk-react/constants'
import { GREY_1 } from 'govuk-colours'
import InvestmentListItem from './InvestmentListItem'
const StyledOrderedList = styled('ol')`
margin-top: ${SPACING.SCALE_3};
... | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { SPACING } from '@govuk-react/constants'
import { GREY_1 } from 'govuk-colours'
import InvestmentListItem from './InvestmentListItem'
const StyledOrderedList = styled('ol')`
margin-top: ${SPACING.SCALE_3};
... | Change 'Add horizontal line to investment projects list | Change 'Add horizontal line to investment projects list
| JSX | mit | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | ---
+++
@@ -8,6 +8,7 @@
const StyledOrderedList = styled('ol')`
margin-top: ${SPACING.SCALE_3};
+ border-top: 2px solid ${GREY_1};
${({ isPaginated }) => isPaginated && `border-bottom: 2px solid ${GREY_1};`}
`
|
14d9949a1bf5900e5e951c5d8889b96cfd53aca9 | app/classifier/tasks/drawing/components/DrawingToolInputIcon/DrawingToolInputIcon.jsx | app/classifier/tasks/drawing/components/DrawingToolInputIcon/DrawingToolInputIcon.jsx | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import icons from '../../icons';
export const StyledDrawingToolInputIcon = styled.span`
color: ${props => props.color};
margin-right: 1ch;
> svg {
fill-opacity: 0.1;
height: 1.5em;
stroke: current... | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import icons from '../../icons';
export const StyledDrawingToolInputIcon = styled.span`
color: ${props => props.color};
&::after {
content: " ";
margin-right: 1ch;
white-space: pre;
}
> svg {
... | Fix drawing tool icon spacing Use ::after rather than margin-right for spacing. | Fix drawing tool icon spacing
Use ::after rather than margin-right for spacing.
| JSX | apache-2.0 | zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End | ---
+++
@@ -6,7 +6,12 @@
export const StyledDrawingToolInputIcon = styled.span`
color: ${props => props.color};
- margin-right: 1ch;
+
+ &::after {
+ content: " ";
+ margin-right: 1ch;
+ white-space: pre;
+ }
> svg {
fill-opacity: 0.1; |
69b85478cba68b76cea88a8c9120245e908b7719 | src/Badge.jsx | src/Badge.jsx | import React from 'react';
import classNames from 'classnames';
import { Badge as BsBadge } from 'react-bootstrap';
const propTypes = {
background: React.PropTypes.oneOf(['light-blue', 'red', 'green', 'yellow']),
className: React.PropTypes.string,
children: React.PropTypes.node,
};
const Badge = ({
background... | import React from 'react';
import classNames from 'classnames';
import { Badge as BsBadge } from 'react-bootstrap';
const propTypes = {
background: React.PropTypes.oneOf(['light-blue', 'red', 'green', 'yellow']),
className: React.PropTypes.string,
children: React.PropTypes.node,
};
const Badge = ({
background... | Remove assumption that background is supplied | Remove assumption that background is supplied
| JSX | mit | jonmpqts/reactjs-admin-lte,react-admin-lte/react-admin-lte,react-admin-lte/react-admin-lte | ---
+++
@@ -16,7 +16,10 @@
const classes = {
badge: true,
};
- classes[`bg-${background}`] = true;
+
+ if (background) {
+ classes[`bg-${background}`] = true;
+ }
return (
<BsBadge bsClass={classNames(className, classes)}>{children}</BsBadge> |
031530cabcb70412992589f98abc4b1e251e6a1e | src/components/Big2App.jsx | src/components/Big2App.jsx | import React from 'react';
import { connect } from 'react-redux';
import * as a from './../actions';
const mapStateToProps = state => ({
username: state.username,
});
const mapDispatchToProps = dispatch => ({
changeUsername: newUsername =>
dispatch(a.changeUsername(newUsername)),
});
class Big2App extends Re... | import React from 'react';
import { connect } from 'react-redux';
import * as a from './../actions';
const mapStateToProps = state => ({
username: state.username,
});
const mapDispatchToProps = dispatch => ({
changeUsername: newUsername =>
dispatch(a.changeUsername(newUsername)),
});
class Big2App extends Re... | Fix PropTypes to have lower case values for typeof portion | Fix PropTypes to have lower case values for typeof portion
| JSX | mit | jon-is-learning/big2,jon-is-learning/big2 | ---
+++
@@ -27,8 +27,8 @@
}
Big2App.propTypes = {
- username: React.PropTypes.String,
- changeUsername: React.PropTypes.Func,
+ username: React.PropTypes.string,
+ changeUsername: React.PropTypes.func,
};
const Big2AppContainer = connect( |
3bede4754f37495ca183e44619f56fba7c280574 | src/App.jsx | src/App.jsx | import React from 'react';
const App = React.createClass({
render: function() {
return (
<h1>Hello React :)</h1>
);
}
});
export default App;
| import React, {Component} from 'react';
class App extends Component {
render() {
return (
<h1>Hello React :)</h1>
);
}
}
export default App;
| Switch back to class based component definition. | Switch back to class based component definition.
Our tutorial asks students to go from this to createClass | JSX | mit | ehdwn1212/personalWebsite2,reinhardtcgr/ChattyApp,nghuman/now-playing-challenge,davidbpaul/LHL-Final-GetGO-web,KyleFlemington/CHATi,takng/REACT-STOCK,Waundr/Waundr.github.io,ChrisBotCodes/chatty-app,claytonschroeder/energy_portfolio_builder,patriciomase/react-m-f-carousel,MichaelMansourati/colourscape-react,laurmuresan... | ---
+++
@@ -1,10 +1,10 @@
-import React from 'react';
+import React, {Component} from 'react';
-const App = React.createClass({
- render: function() {
+class App extends Component {
+ render() {
return (
<h1>Hello React :)</h1>
);
}
-});
+}
export default App; |
7f3b0c2acec3224786e58a9ebb3b124e3d2cac0c | src/components/Navigation.jsx | src/components/Navigation.jsx | // react
import React from 'react';
import ReactRouter from 'react-router';
class Navigation extends React.Component {
render() {
return (
<div className="navbar navbar-default navbar-fixed-top" role="navigation">
<div className="container">
<div className="n... | // react
import React from 'react';
import ReactRouter from 'react-router';
class Navigation extends React.Component {
constructor(props) {
super(props);
this.state = {
navCollapse: 'collapse'
};
}
toggleCollapse() {
const navCollapse = this.state.navCollapse ? ... | Implement navbar show/hide (narrow widths) | :iphone: Implement navbar show/hide (narrow widths)
Makes .navbar-toggle functional
| JSX | cc0-1.0 | acusti/primal-multiplication,acusti/primal-multiplication | ---
+++
@@ -3,12 +3,24 @@
import ReactRouter from 'react-router';
class Navigation extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ navCollapse: 'collapse'
+ };
+ }
+
+ toggleCollapse() {
+ const navCollapse = this.state.navCollaps... |
8378cdc990639675a98c224a1b8907948746c51b | frontend/realtime_client/realtime_client.jsx | frontend/realtime_client/realtime_client.jsx | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatClient = {
_realtimeUrl: null,
_socket: null,
_clientId: null,
_roomId: 'room1',
_canSendMessages: false,
init(realtimeUrl) {
this._realtimeUrl = realtimeUrl;
this._socket = io.connect(th... | const io = require('socket.io-client'),
config = require('./config.js');
const UnichatClient = {
_realtimeUrl: null,
_socket: null,
_clientId: null,
_roomId: 'room1',
_canSendMessages: false,
init(realtimeUrl) {
this._realtimeUrl = realtimeUrl;
this._socket = io.connect(th... | Add naive send_message realtime client function | Add naive send_message realtime client function
| JSX | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | ---
+++
@@ -21,6 +21,7 @@
roomId: this._roomId
});
this._canSendMessages = true;
+ this.send_message();
});
this._socket.on('message', (message) => {
console.log('Received message:');
@@ -30,6 +31,23 @@
console.log('Real... |
159b44bda196f1d3a7aa747ed86fa6acf82b5ca3 | frontend/src/components/profile/Profile.react.jsx | frontend/src/components/profile/Profile.react.jsx | import React from 'react';
import Radium from 'radium';
import {Card} from 'belle';
@Radium
export default class Profile extends React.Component {
static propTypes = {
children: React.PropTypes.array.isRequired,
title: React.PropTypes.string.isRequired,
twitterHandle: React.PropTypes.string.isRequired
... | import React from 'react';
import Radium from 'radium';
import {Card} from 'belle';
@Radium
export default class Profile extends React.Component {
static propTypes = {
children: React.PropTypes.any.isRequired,
title: React.PropTypes.string.isRequired,
twitterHandle: React.PropTypes.string.isRequired
}... | Fix bad prop type on Profile | Fix bad prop type on Profile
| JSX | agpl-3.0 | jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi | ---
+++
@@ -6,7 +6,7 @@
@Radium
export default class Profile extends React.Component {
static propTypes = {
- children: React.PropTypes.array.isRequired,
+ children: React.PropTypes.any.isRequired,
title: React.PropTypes.string.isRequired,
twitterHandle: React.PropTypes.string.isRequired
} |
ad6f79c3e70ca13824197658e7ea6f8822ebbe89 | client/components/Events/EventDetails.jsx | client/components/Events/EventDetails.jsx | import React from 'react';
import { Link } from 'react-router';
const EventDetails = ({params: { eventName }, location: { query }}) => (
<div>
<img src="http://tctechcrunch2011.files.wordpress.com/2008/04/linux-penguin-small.png" />
<h4>Event Name: {eventName}</h4>
<h4>Contract Address: {query.eventContr... | import React from 'react';
import { Link } from 'react-router';
const EventDetails = ({params: { eventName }, location: { query }}) => (
<div>
<img src="http://tctechcrunch2011.files.wordpress.com/2008/04/linux-penguin-small.png" />
<h4>Event Name: {eventName}</h4>
<h4>Contract Address: {query.eventContr... | Add back event contract address | Add back event contract address
| JSX | mit | kevinbrosamle/ticket-sherpa,digitalsherpas/ticket-sherpa,chrispicato/ticket-sherpa,chrispicato/ticket-sherpa,andrewk17/ticket-sherpa,kevinbrosamle/ticket-sherpa,andrewk17/ticket-sherpa,digitalsherpas/ticket-sherpa | ---
+++
@@ -16,6 +16,7 @@
<p>State: {query.state}</p>
<p>Zip/Postal Code: {query.zipPostalCode}</p>
<p>Country: {query.country}</p>
+ <p>Contract Address: {query.eventContractAddress}</p>
<h4><Link
to={{ pathname:
'/buyevent/' + eventName, |
8997adfa4ebbc09f8b03f8b16cc5b1ab8825a806 | imports/ui/measure-view/measure-explorer.jsx | imports/ui/measure-view/measure-explorer.jsx | import React from 'react';
import { Panel, ListGroup, ListGroupItem } from 'react-bootstrap';
const MeasureExplorer = (props) => (
<Panel header="Measures">
<ListGroup>
<ListGroupItem>My first item</ListGroupItem>
</ListGroup>
</Panel>
);
export default MeasureExplorer;
| import React, { PropTypes } from 'react';
import Measures from '../../api/measures/measures.js';
import { Button, Panel, ListGroup, ListGroupItem } from 'react-bootstrap';
import { createContainer } from 'meteor/react-meteor-data';
const panelHeader = (props) => (
<div>
Measures
<Button
className="glyp... | Add measure collection to measure explorer | Add measure collection to measure explorer
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -1,13 +1,37 @@
-import React from 'react';
-import { Panel, ListGroup, ListGroupItem } from 'react-bootstrap';
+import React, { PropTypes } from 'react';
+import Measures from '../../api/measures/measures.js';
+import { Button, Panel, ListGroup, ListGroupItem } from 'react-bootstrap';
+import { createConta... |
8d032d84a2535bf40a0729832deb9f395df0129e | src/mb/containers/LoMoCoversContainer.jsx | src/mb/containers/LoMoCoversContainer.jsx | import { connect } from 'react-redux';
import React from 'react';
import LoMoCovers from '../components/LoMoCovers';
import actionCreators from '../actions/lolomo-action-creators';
export default connect(
(state, ownProps) => ({
subjects: state.getIn(['models', ownProps.modelKey, 'subjects']),
selectedSub... | import { connect } from 'react-redux';
import React from 'react';
import LoMoCovers from '../components/LoMoCovers';
import actionCreators from '../actions/lolomo-action-creators';
export default connect(
(state, ownProps) => ({
subjects: state.getIn(['models', ownProps.modelKey, 'subjects']),
selectedSub... | Use selectedSubject.id instead of selectedSubjectId. | Use selectedSubject.id instead of selectedSubjectId.
| JSX | mit | MagicCube/movie-board,MagicCube/movie-board,MagicCube/movie-board | ---
+++
@@ -9,7 +9,7 @@
export default connect(
(state, ownProps) => ({
subjects: state.getIn(['models', ownProps.modelKey, 'subjects']),
- selectedSubjectId: state.getIn(['lolomo', 'selectedSubjectId']),
+ selectedSubjectId: state.getIn(['lolomo', 'selectedSubject', 'id']),
hasSelection: state.ge... |
5f9d67408c243d5bf40709cc778852a2a57ebe1a | src/js/letters/routes.jsx | src/js/letters/routes.jsx | import React from 'react';
import { Route } from 'react-router';
import DownloadLetters from './containers/DownloadLetters.jsx';
import AddressSection from './containers/AddressSection.jsx';
import LetterList from './containers/LetterList.jsx';
import Main from './containers/Main.jsx';
const routes = [
<Route
c... | import React from 'react';
import { Route, IndexRedirect } from 'react-router';
import DownloadLetters from './containers/DownloadLetters.jsx';
import AddressSection from './containers/AddressSection.jsx';
import LetterList from './containers/LetterList.jsx';
import Main from './containers/Main.jsx';
const routes = [... | Add redirect to first page | Add redirect to first page
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import { Route } from 'react-router';
+import { Route, IndexRedirect } from 'react-router';
import DownloadLetters from './containers/DownloadLetters.jsx';
import AddressSection from './containers/AddressSection.jsx';
@@ -14,6 +14,7 @@
component={Downloa... |
9f9af95e6dda5e6cc104b5c191f761417066db1f | client/src/components/sub/LectureTitle.jsx | client/src/components/sub/LectureTitle.jsx | import React from 'react';
import Connection from '../../Connection';
const LectureTitle = (props) => {
var roomInfo = props.getState().room.roomInfo;
var lecturer = roomInfo.lecturer;
var topic = roomInfo.topic;
var createdAt = moment(roomInfo.createdAt);
return (
<h3 className="lectureTitle">{topic} by... | import React from 'react';
import Connection from '../../Connection';
const LectureTitle = (props) => {
var roomInfo = props.getState().room.roomInfo;
//** UNCOMMENT BELOW
// var lecturer = roomInfo.lecturer;
// var topic = roomInfo.topic;
// var createdAt = moment(roomInfo.createdAt);
//** DELETE BELOW
... | Add dummy data to master | Add dummy data to master
| JSX | mit | derektliu/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes | ---
+++
@@ -2,9 +2,16 @@
import Connection from '../../Connection';
const LectureTitle = (props) => {
var roomInfo = props.getState().room.roomInfo;
- var lecturer = roomInfo.lecturer;
- var topic = roomInfo.topic;
- var createdAt = moment(roomInfo.createdAt);
+
+ //** UNCOMMENT BELOW
+ // var lecturer = ro... |
b7bd719593412b6f3a2b927d0a099282320bf681 | src/request/components/request-detail-panel-messages.jsx | src/request/components/request-detail-panel-messages.jsx | 'use strict';
var _ = require('lodash');
var React = require('react');
var PanelGeneric = require('./request-detail-panel-generic');
module.exports = React.createClass({
render: function () {
var request = this.props.request;
var payload = _.values(request.messages).sort(function(a, b) { return a... | 'use strict';
var _ = require('lodash');
var React = require('react');
var PanelGeneric = require('./request-detail-panel-generic');
module.exports = React.createClass({
render: function () {
var request = this.props.request;
var payload = _.values(request.messages).sort(function(a, b) { return (... | Make sure message tab sort has a ordinal to work with | Make sure message tab sort has a ordinal to work with
| JSX | unknown | avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -7,7 +7,7 @@
module.exports = React.createClass({
render: function () {
var request = this.props.request;
- var payload = _.values(request.messages).sort(function(a, b) { return a.ordinal - b.ordinal; });
+ var payload = _.values(request.messages).sort(function(a, b) { return (a.... |
2549cef8a3e6bdf8a3fbbff9b05f0cde02e40bd9 | js/Details.jsx | js/Details.jsx | const React = require('react')
class Details extends React.Component {
render() {
return (
<div style={{textAlign: 'left'}} className='container'>
<pre><code>
{JSON.stringify(this.props.params, null, 4)}
</code></pre>
</div>
)
}
}
const { object } = React.PropTypes
D... | const React = require('react')
class Details extends React.Component {
render() {
const params = this.props.params || {}
const { title, description, year, poster, trailer } = params
return (
<div className='container'>
<header className='header'>
<h1 className='brand'>svideo</h1>
... | Add details for each move through reac component | Add details for each move through reac component
| JSX | mit | michaeldumalag/ReactSelfLearning,michaeldumalag/ReactSelfLearning | ---
+++
@@ -2,11 +2,22 @@
class Details extends React.Component {
render() {
+ const params = this.props.params || {}
+ const { title, description, year, poster, trailer } = params
return (
- <div style={{textAlign: 'left'}} className='container'>
- <pre><code>
- {JSON.stringify(... |
f50bdf4d14cf01eb28ff07c06c3e6fe138ccb491 | src/renderer/components/footer.jsx | src/renderer/components/footer.jsx | import React, { PropTypes } from 'react';
const STYLE = {
footer: { minHeight: 'auto' },
};
const Footer = ({ status }) => {
return (
<div className="ui bottom fixed menu borderless" style={STYLE.footer}>
{status}
</div>
);
};
Footer.propTypes = {
status: PropTypes.string.isRequired,
};
ex... | import React, { PropTypes } from 'react';
import shell from 'shell';
const STYLE = {
footer: { minHeight: 'auto' },
status: { paddingLeft: '0.5em' },
};
function onGithubClick(event) {
event.preventDefault();
shell.openExternal('https://github.com/sqlectron/sqlectron-gui');
}
const Footer = ({ status }) =... | Add link to the project in the Github | Add link to the project in the Github | JSX | mit | sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui | ---
+++
@@ -1,15 +1,26 @@
import React, { PropTypes } from 'react';
+import shell from 'shell';
const STYLE = {
footer: { minHeight: 'auto' },
+ status: { paddingLeft: '0.5em' },
};
+
+
+function onGithubClick(event) {
+ event.preventDefault();
+ shell.openExternal('https://github.com/sqlectron/sqlectron... |
92529d942da9d4d96cbd10a9d0365ddccce31d26 | imports/ui/report-view/report-table.jsx | imports/ui/report-view/report-table.jsx | import React, { PropTypes } from 'react';
import { Table } from 'react-bootstrap';
import Measures from '../../api/measures/measures.js';
import Elements from '../../api/elements/elements.js';
const ReportTable = (props) => (
<Table bordered="true" >
<thead>
{props.report.columns.map((column) => {
... | import React, { PropTypes } from 'react';
import { Table } from 'react-bootstrap';
import Measures from '../../api/measures/measures.js';
import Elements from '../../api/elements/elements.js';
import Reports from '../../api/reports/reports.js';
const ReportTable = (props) => (
<Table>
<thead>
{props.report... | Add drop zone to table as well | Add drop zone to table as well
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -2,15 +2,25 @@
import { Table } from 'react-bootstrap';
import Measures from '../../api/measures/measures.js';
import Elements from '../../api/elements/elements.js';
+import Reports from '../../api/reports/reports.js';
const ReportTable = (props) => (
- <Table bordered="true" >
+ <Table>
<thea... |
fe82861567c2ff8e39c61b9b06ff33890908ef30 | app/pages/lab/media.jsx | app/pages/lab/media.jsx | import PropTypes from 'prop-types';
import React from 'react';
import MediaArea from './media-area';
export default class EditMediaPage extends React.Component {
constructor(props) {
super(props);
this.renderValidExtensions = this.renderValidExtensions.bind(this);
}
renderValidExtensions() {
return... | import PropTypes from 'prop-types';
import React from 'react';
import MediaArea from './media-area';
export default class EditMediaPage extends React.Component {
constructor(props) {
super(props);
this.renderValidExtensions = this.renderValidExtensions.bind(this);
}
renderValidExtensions() {
return... | Change 'images' to 'files' in instructions | Change 'images' to 'files' in instructions
| JSX | apache-2.0 | amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End | ---
+++
@@ -25,8 +25,8 @@
<div className="edit-media-page">
<div className="content-container">
<p>
- <strong>You can add images here to use in your project’s content.</strong><br />
- Just copy and paste the image’s Markdown code: <code></code>. Images ca... |
bf2886d41cada8e54afe53f6cf63e82e5353ffa5 | app/views/Home/Home.jsx | app/views/Home/Home.jsx | import React from 'react'
import './Home.scss'
const Home = () => (
<div className='home'>
<h1 className='home__title'>The React Client</h1>
<p className='home__description'>
The simplest and the cleanest client boilerplate using React.
</p>
</div>
)
export default Home
| import React from 'react'
// import User from '../../components/User'
import './Home.scss'
const Home = () => (
<div className='home'>
<h1 className='home__title'>The React Client</h1>
<p className='home__description'>
The simplest and the cleanest client boilerplate using React.
</p>
</div>
)
... | Add a comment with an example of importing a component. | Add a comment with an example of importing a component.
| JSX | mit | rhberro/the-react-client,rhberro/the-react-client | ---
+++
@@ -1,4 +1,6 @@
import React from 'react'
+
+// import User from '../../components/User'
import './Home.scss'
|
e00e8c39a3ed6f1f1b8af2ff5d7fc3b78dceae52 | src/ActionPreviewHeader.jsx | src/ActionPreviewHeader.jsx | import React from 'react';
const ActionPreviewHeader =
({ styling, inspectedPath, onInspectPath, tabName, onSelectTab, tabs }) =>
<div key='previewHeader' {...styling('previewHeader')}>
<div {...styling('tabSelector')}>
{tabs.map(tab =>
<div onClick={() => onSelectTab(tab.name)}
key=... | import React from 'react';
const ActionPreviewHeader =
({ styling, inspectedPath, onInspectPath, tabName, onSelectTab, tabs }) =>
<div key='previewHeader' {...styling('previewHeader')}>
<div {...styling('tabSelector')}>
{tabs.map(tab =>
<div onClick={() => onSelectTab(tab.name)}
key=... | Fix React warning about unique "key" | Fix React warning about unique "key" | JSX | mit | zalmoxisus/remotedev-inspector-monitor | ---
+++
@@ -25,7 +25,7 @@
</span> : tabName
}
{inspectedPath.map((key, idx) =>
- idx === inspectedPath.length - 1 ? <span>{key}</span> :
+ idx === inspectedPath.length - 1 ? <span key={key}>{key}</span> :
<span key={key}
{...styling('inspectedPathKey')}>
... |
b10fc99d4f7023ba569a9028ef8a84c1e50da30d | lib/src/utils/MuiPickersUtilsProvider.jsx | lib/src/utils/MuiPickersUtilsProvider.jsx | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
const { Consumer, Provider } = React.createContext();
export const MuiPickersContextConsumer = Consumer;
export default class MuiPickersUtilsProvider extends PureComponent {
static propTypes = {
utils: PropTypes.func.isRequired,
... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
const { Consumer, Provider } = React.createContext();
export const MuiPickersContextConsumer = Consumer;
export default class MuiPickersUtilsProvider extends PureComponent {
static propTypes = {
/* eslint-disable react/no-unused-p... | Move utils creation to getDerivedStateFromProps | Move utils creation to getDerivedStateFromProps
| JSX | mit | dmtrKovalenko/material-ui-pickers,callemall/material-ui,rscnt/material-ui,dmtrKovalenko/material-ui-pickers,mui-org/material-ui,rscnt/material-ui,oliviertassinari/material-ui,oliviertassinari/material-ui,rscnt/material-ui,oliviertassinari/material-ui,mbrookes/material-ui,mbrookes/material-ui,callemall/material-ui,calle... | ---
+++
@@ -6,9 +6,13 @@
export default class MuiPickersUtilsProvider extends PureComponent {
static propTypes = {
+ /* eslint-disable react/no-unused-prop-types */
utils: PropTypes.func.isRequired,
locale: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
- children: PropTypes.element.... |
ac0e159c83f14463cd457999667d1fbad982a8d1 | walldash/src/recent_observations.jsx | walldash/src/recent_observations.jsx | import React, { PropTypes } from 'react';
const RecentObservations = ( { observations } ) => (
<div className="RecentObservations">
<div className="observations">
{ observations.map( o => {
const p = o.photos[0];
const size = "small";
const dims = p.dimensions( );
if ( !dims... | import React, { PropTypes } from 'react';
const RecentObservations = ( { observations } ) => (
<div className="RecentObservations">
<div className="observations">
{ observations.map( o => {
const p = o.photos[0];
let size = "small";
const dims = p.dimensions( );
if ( !dims |... | Load larger image sizes for larger images. | Load larger image sizes for larger images.
| JSX | mit | inaturalist/inaturalist.github.io,inaturalist/inaturalist.github.io | ---
+++
@@ -5,7 +5,7 @@
<div className="observations">
{ observations.map( o => {
const p = o.photos[0];
- const size = "small";
+ let size = "small";
const dims = p.dimensions( );
if ( !dims || !dims.width ) {
return;
@@ -21,11 +21,13 @@
if ( o... |
ed1fd869aeccc9e5f028825a4f09efb341924539 | src/query_key.jsx | src/query_key.jsx | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
import React from 'react';
export class QueryKey extends React.Component {
render() {
const renderItem = (item, index) => {
const color = this.context.colorScale.scale(ite... | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
import React from 'react';
export class QueryKey extends React.Component {
render() {
const renderItem = (item, index) => {
const color = this.context.colorScale.scale(ite... | Allow expanding queries by clicking on labels. | Allow expanding queries by clicking on labels.
| JSX | apache-2.0 | devnev/boardwalk,devnev/boardwalk | ---
+++
@@ -7,11 +7,14 @@
render() {
const renderItem = (item, index) => {
const color = this.context.colorScale.scale(item.title);
+ const select = () => this.props.onSelectMetric(item.queryIndex, item.metric);
return (
<li key={index+"-"+item.title}>
- <span style={{colo... |
1bcd7b7383626e4fa22cf53bf3438fa43b3390a8 | src/components/pagination-links.jsx | src/components/pagination-links.jsx | import React from 'react';
import {Link} from 'react-router';
const PAGE_SIZE = 30;
const offsetObject = offset => offset ? ({offset}) : undefined;
const minOffset = offset => Math.max(offset - PAGE_SIZE, 0);
const maxOffset = offset => offset + PAGE_SIZE;
export default (props) => (
<ul className="pager">
{pr... | import React from 'react';
import {Link} from 'react-router';
const PAGE_SIZE = 30;
const offsetObject = offset => offset ? ({offset}) : undefined;
const minOffset = offset => Math.max(offset - PAGE_SIZE, 0);
const maxOffset = offset => offset + PAGE_SIZE;
export default (props) => {
const allParams = {...props.lo... | Fix pagination for additional query params | Fix pagination for additional query params
Only change offset and keep other existing parameters intact.
| JSX | mit | clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma | ---
+++
@@ -7,20 +7,28 @@
const minOffset = offset => Math.max(offset - PAGE_SIZE, 0);
const maxOffset = offset => offset + PAGE_SIZE;
-export default (props) => (
- <ul className="pager">
- {props.offset > 0 ? (
- <li className="previous">
- <Link to={{pathname: props.location.pathname, query: of... |
c04a8aef9a4e0b6d3daca1e7b84f737cbaa269ee | src/app.jsx | src/app.jsx | // Load styles
require('./stylesheets/main.sass')
// Imports
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, hashHistory } from 'react-router'
import { Provider } from 'react-redux';
import store from './stores/store';
// Containers
import MyContainer from './containers/MyCo... | // Load styles
require('./stylesheets/main.sass')
// Imports
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, browserHistory } from 'react-router'
import { Provider } from 'react-redux';
import store from './stores/store';
// Containers
import MyContainer from './containers/M... | Change the history mode to browser | Change the history mode to browser
| JSX | mit | Angelmmiguel/docker-react-redux-boilerplate,Angelmmiguel/docker-react-redux-boilerplate,Angelmmiguel/docker-react-redux-boilerplate | ---
+++
@@ -4,7 +4,7 @@
// Imports
import React from 'react';
import ReactDOM from 'react-dom';
-import { Router, Route, Link, hashHistory } from 'react-router'
+import { Router, Route, Link, browserHistory } from 'react-router'
import { Provider } from 'react-redux';
import store from './stores/store';
@@ -13... |
64d6f8abdd1180e124ed21a2db60b8ceb3dbc53d | app/components/DedicatedExample.jsx | app/components/DedicatedExample.jsx | import React from 'react';
import {Link} from 'react-router';
import Marked from './Marked';
import dedicatedExampleMark from '../marked/Dedicated/DedicatedExample.md';
import script from '!!raw!../marked/Dedicated/script.js';
import html from '!!html!../marked/Dedicated/example.html';
import '!!file?name=js/[name].[... | import React from 'react';
import {Link} from 'react-router';
import Marked from './Marked';
import dedicatedExampleMark from '../marked/Dedicated/DedicatedExample.md';
import script from '!!raw!../marked/Dedicated/script.js';
import html from '!!html!../marked/Dedicated/example.html';
import '!!file?name=js/[name].[... | Fix steps-navigation links in nested routes | fix(links): Fix steps-navigation links in nested routes
| JSX | mit | Velenir/workers-journey,Velenir/workers-journey | ---
+++
@@ -25,8 +25,8 @@
<Marked mark={dedicatedExampleMark}/>
<div className="worker-display" dangerouslySetInnerHTML={{__html: html}} ref={c => this.display = c}/>
<div className="steps-navigation">
- <Link to="dedicated_worker" className="arrow" title="Dedicated Worker"/>
- <Link to="shared... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.