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 |
|---|---|---|---|---|---|---|---|---|---|---|
7858325abc93519c83009167cd3966e6b57c60d6 | app/scripts/components/entry_form.jsx | app/scripts/components/entry_form.jsx | import React from 'react'
class EntryForm extends React.Component {
handleAddButtonClick() {
const node = React.findDOMNode(this.refs.input)
const text = node.value.trim()
this.props.onEntry(text)
node.value = ''
}
render() {
return (
<section className="form">
<input type="text" id="link" ref="i... | import React from 'react'
class EntryForm extends React.Component {
handleAddButtonClick = () => {
const node = React.findDOMNode(this.refs.input)
const text = node.value.trim()
this.props.onEntry(text)
node.value = ''
}
render() {
return (
<section className="form">
<input type="text" id="link" ... | Use bound function instead of binding | Use bound function instead of binding | JSX | mit | adelgado/linkbag,adelgado/linkbag | ---
+++
@@ -2,7 +2,7 @@
class EntryForm extends React.Component {
- handleAddButtonClick() {
+ handleAddButtonClick = () => {
const node = React.findDOMNode(this.refs.input)
const text = node.value.trim()
this.props.onEntry(text)
@@ -13,7 +13,7 @@
return (
<section className="form">
<input t... |
ec184a369c63dde9585d1e01c73a0676685e5132 | src/components/note_section/note_reference.jsx | src/components/note_section/note_reference.jsx | "use strict";
var React = require('react')
module.exports = React.createClass({
displayName: 'NoteReferenceSection',
render: function () {
return (
<h1>FIXME</h1>
{/*
<div className="note-section note-reference-section">
<div className="note-reference-note">
<i className=... | "use strict";
var React = require('react')
module.exports = React.createClass({
displayName: 'NoteReferenceSection',
render: function () {
return <h1>FIXME</h1>
/*
<div className="note-section note-reference-section">
<div className="note-reference-note">
<i className="fa fa-penc... | Fix type in note reference section | Fix type in note reference section
| JSX | agpl-3.0 | editorsnotes/editorsnotes-renderer | ---
+++
@@ -5,9 +5,8 @@
module.exports = React.createClass({
displayName: 'NoteReferenceSection',
render: function () {
- return (
- <h1>FIXME</h1>
- {/*
+ return <h1>FIXME</h1>
+ /*
<div className="note-section note-reference-section">
<div className="note-reference-note... |
f4e4212b037e3ca841bec6a9e643c52f2bdf63d0 | client/src/houseInventory.jsx | client/src/houseInventory.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import HouseInventoryList from './HouseInventoryList.jsx';
import Nav from './Nav.jsx';
class HouseInventory extends React.Component {
constructor(props) {
super(props);
this.state({
items: []
});
}
component... | import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import HouseInventoryList from './HouseInventoryList.jsx';
import Nav from './Nav.jsx';
class HouseInventory extends React.Component {
constructor(props) {
super(props);
this.state = {
items: []
};
}
componen... | Fix syntax error in this.state | Fix syntax error in this.state
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -8,9 +8,9 @@
constructor(props) {
super(props);
- this.state({
+ this.state = {
items: []
- });
+ };
}
componentDidMount() {
@@ -48,4 +48,4 @@
}
}
-ReactDOM.render(<Inventory />, document.getElementById('inventory'));
+ReactDOM.render(<HouseInventory />, document.... |
e0705e6b4b23ce697462204d1a21810453c0b44c | app/client/routes.jsx | app/client/routes.jsx | FlowRouter.route("/", {
name: 'Home',
subscriptions(params) {
},
action(params) {
renderMainLayoutWith(<Camino.Home />);
}
});
FlowRouter.route("/login", {
name: "Login",
subscriptions(params) {
},
action(params) {
renderMainLayoutWith(<Camino.UserLogin />);
}
... | FlowRouter.route("/", {
name: 'Home',
subscriptions(params) {
},
action(params) {
renderMainLayoutWith(<Camino.Home />);
}
});
FlowRouter.route("/login", {
name: "Login",
subscriptions(params) {
},
action(params) {
renderMainLayoutWith(<Camino.UserLogin />);
}
... | Add redirect to Login if the user is not logged in | Add redirect to Login if the user is not logged in
| JSX | mit | fjaguero/camino,fjaguero/camino | ---
+++
@@ -18,6 +18,8 @@
}
});
+FlowRouter.triggers.enter([checkIsLoggedIn]);
+
function renderMainLayoutWith(component) {
ReactLayout.render(Camino.MainLayout, {
header: <Camino.MainHeader />,
@@ -25,3 +27,9 @@
footer: <Camino.MainFooter />
});
}
+
+function checkIsLoggedIn() {... |
3c627f8f7e3cbf3574ecb800f9af686dabbf7721 | imports/ui/components/authenticatedNavigation.jsx | imports/ui/components/authenticatedNavigation.jsx | import { Meteor } from 'meteor/meteor';
import React from 'react';
import { PropTypes } from 'prop-types';
import { withRouter } from 'react-router-dom';
import { LinkContainer } from 'react-router-bootstrap';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
import NavDropdo... | import { Meteor } from 'meteor/meteor';
import React from 'react';
import { PropTypes } from 'prop-types';
import { LinkContainer } from 'react-router-bootstrap';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
import NavDropdown from 'react-bootstrap/lib/NavDropdown';
impo... | Update UI AuthenticatedNavigation with name props | Update UI AuthenticatedNavigation with name props
| JSX | mit | ggallon/rock,ggallon/rock | ---
+++
@@ -1,20 +1,13 @@
import { Meteor } from 'meteor/meteor';
import React from 'react';
import { PropTypes } from 'prop-types';
-import { withRouter } from 'react-router-dom';
import { LinkContainer } from 'react-router-bootstrap';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-boots... |
726cdb48a2589e2ba4dcd5047512e7dce5aeffd9 | packages/cmpd-fe-nominations/src/app/dashboard/household/components/ErrorModal.jsx | packages/cmpd-fe-nominations/src/app/dashboard/household/components/ErrorModal.jsx | import * as React from 'react';
import { Button, Modal } from 'react-bootstrap';
import { flatten } from 'rambda';
const ValidationError = ({ error }) => <li>{error}</li>;
const ValidationErrorSummary = ({ errors = [] }) => {
const errorList = flatten(errors.map(({ constraints }) => Object.values(constraints)));
... | import * as React from 'react';
import { Button, Modal } from 'react-bootstrap';
import { flatten } from 'rambda';
const ValidationError = ({ error }) => <li>{error}</li>;
const ValidationErrorSummary = ({ errors = [] }) => {
const errorList = flatten(errors.map(({ constraints }) => Object.values(constraints)));
... | Remove erorr list log statement | Remove erorr list log statement
| JSX | mit | CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend | ---
+++
@@ -7,7 +7,6 @@
const ValidationErrorSummary = ({ errors = [] }) => {
const errorList = flatten(errors.map(({ constraints }) => Object.values(constraints)));
- console.log(errorList);
return <ul>{errorList.map(error => <ValidationError error={error} />)}</ul>;
};
|
b03c9b03a55d7bcdc741df69d78a99e908e3fd4d | src/containers/home/home.jsx | src/containers/home/home.jsx | import React from 'react';
var LogoVerticalWhite = require('../../components/logo/logo');
var Geolocalizer = require('../../components/geolocalizer/geolocalizer');
var Slider = require('../../components/slider/slider');
var Home = React.createClass ({
getInitialState: function () {
return {
meters: "50"
... | import React from 'react';
var LogoVerticalWhite = require('../../components/logo/logo');
var Geolocalizer = require('../../components/geolocalizer/geolocalizer');
var Slider = require('../../components/slider/slider');
var Results = require('../results/results');
var Home = React.createClass ({
getInitialState: fu... | Remove this commit: for testing purpose | Remove this commit: for testing purpose
| JSX | apache-2.0 | swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend,swcraftersclm/katangapp-frontend | ---
+++
@@ -3,6 +3,7 @@
var LogoVerticalWhite = require('../../components/logo/logo');
var Geolocalizer = require('../../components/geolocalizer/geolocalizer');
var Slider = require('../../components/slider/slider');
+var Results = require('../results/results');
var Home = React.createClass ({
getInitialStat... |
46e6fd9e01dd11640d1a6d86a5262e9374dbdf40 | src/year_dropdown.jsx | src/year_dropdown.jsx | import React from 'react'
import YearDropdownOptions from './year_dropdown_options.jsx'
var YearDropdown = React.createClass({
displayName: 'YearDropdown',
propTypes: {
onChange: React.PropTypes.func.isRequired,
year: React.PropTypes.number.isRequired
},
getInitialState () {
return {
dropdo... | import React from 'react'
import YearDropdownOptions from './year_dropdown_options'
var YearDropdown = React.createClass({
displayName: 'YearDropdown',
propTypes: {
onChange: React.PropTypes.func.isRequired,
year: React.PropTypes.number.isRequired
},
getInitialState () {
return {
dropdownVi... | Remove .jsx from import line | Remove .jsx from import line
This isn't needed now that webpack is set up to work with `.jsx` files.
It's problematic because it causes imports to break after babel
transforms the file from `.jsx` -> `.js`.
| JSX | mit | mitchrosu/react-datepicker,Hacker0x01/react-datepicker,bekerov/react-datepicker-roco,flexport/react-datepicker,BrunoAlcides/react-datepicker,lmenus/react-datepicker,lmenus/react-datepicker,BrunoAlcides/react-datepicker,bekerov/react-datepicker-roco,lmenus/react-datepicker,bekerov/react-datepicker-roco,flexport/react-da... | ---
+++
@@ -1,5 +1,5 @@
import React from 'react'
-import YearDropdownOptions from './year_dropdown_options.jsx'
+import YearDropdownOptions from './year_dropdown_options'
var YearDropdown = React.createClass({
displayName: 'YearDropdown', |
64ebf9591b7baa90a5a6c134699964cab2f79f72 | src/main/webapp/resources/js/pages/projects/linelist/components/LineList/LineList.jsx | src/main/webapp/resources/js/pages/projects/linelist/components/LineList/LineList.jsx | import React from "react";
import PropTypes from "prop-types";
import { Loader } from "../Loader";
import { LineListLayoutComponent } from "./LineListLayoutComponent";
import { ErrorAlert } from "../../../../../components/alerts/ErrorAlert";
/**
* Container class for the higher level states of the page:
* 1. Loading... | import React from "react";
import PropTypes from "prop-types";
import { Loader } from "../Loader";
import { LineListLayoutComponent } from "./LineListLayoutComponent";
import { ErrorAlert } from "../../../../../components/alerts/ErrorAlert";
const { project } = window.PAGE;
/**
* Container class for the higher level... | Update linelist ErrorAlert to use correct message with replacement of project name | Update linelist ErrorAlert to use correct message with replacement of project name
| JSX | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida | ---
+++
@@ -3,6 +3,8 @@
import { Loader } from "../Loader";
import { LineListLayoutComponent } from "./LineListLayoutComponent";
import { ErrorAlert } from "../../../../../components/alerts/ErrorAlert";
+
+const { project } = window.PAGE;
/**
* Container class for the higher level states of the page:
@@ -15,7... |
ce3ee990d8b565907917c0f1a26a255a4284f06e | js/src/Chat.jsx | js/src/Chat.jsx | var React = require('react');
var util = require('./util');
var Chat = React.createClass({
render: function() {
var chat = this.props.chat,
dateString = util.convertFromEpoch(chat.time),
output = false;
var serializedChat = chat.msg.map(function(curr){
var outpu... | var React = require('react');
var util = require('./util');
var Chat = React.createClass({
render: function() {
var chat = this.props.chat,
dateString = util.convertFromEpoch(chat.time),
output = false;
var serializedChat = chat.msg.map(function(curr, idx){
var ... | Add keys to chat items | Add keys to chat items
| JSX | mit | ebenpack/chatblast,ebenpack/chatblast,ebenpack/chatblast | ---
+++
@@ -7,14 +7,14 @@
dateString = util.convertFromEpoch(chat.time),
output = false;
- var serializedChat = chat.msg.map(function(curr){
+ var serializedChat = chat.msg.map(function(curr, idx){
var output = false;
if (curr.text){
- ... |
3bc9e4029aa59a7a425a6aa4a620aedd1e25b14f | pages/schedule.jsx | pages/schedule.jsx | import React from 'react'
import BoxPage from '../components/box-page'
import * as schedule from '../data/schedule'
import Waypoint from 'react-waypoint'
import Events from '../components/events'
class Schedule extends React.Component {
constructor (props) {
super(props)
this.state = { footerPosition: Waypoi... | import React from 'react'
import Helmet from 'react-helmet'
import BoxPage from '../components/box-page'
import * as schedule from '../data/schedule'
import Waypoint from 'react-waypoint'
import Events from '../components/events'
class Schedule extends React.Component {
constructor (props) {
super(props)
thi... | Set correct meta titles for Schedule | Set correct meta titles for Schedule
| JSX | mit | jsis/jsconf.is,jsis/jsconf.is | ---
+++
@@ -1,4 +1,5 @@
import React from 'react'
+import Helmet from 'react-helmet'
import BoxPage from '../components/box-page'
import * as schedule from '../data/schedule'
import Waypoint from 'react-waypoint'
@@ -17,6 +18,19 @@
const { footerPosition } = this.state
return (
<BoxPage expanded ... |
d54d5f5d299533b4a456a4a07ef0ae00a4a52dfc | app/classifier/restart-button.jsx | app/classifier/restart-button.jsx | import React from 'react';
class RestartButton extends React.Component {
constructor(props) {
super(props);
}
getCallback() {
// override in sub-class
return () => {};
}
shouldRender() {
// override in sub-class
return true;
}
render() {
// state and props are passed into getCa... | import React from 'react';
class RestartButton extends React.Component {
constructor(props) {
super(props);
}
getCallback() {
// override in sub-class
return () => {};
}
shouldRender() {
// override in sub-class
return true;
}
render() {
// state and props are passed into getCa... | Fix unknown props warning on restart button | Fix unknown props warning on restart button
| JSX | apache-2.0 | parrish/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,parrish/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,parrish/Panoptes-Front-End,jelliotartz/Panoptes-Front-End | ---
+++
@@ -19,9 +19,10 @@
// state and props are passed into getCallback and shouldRender
// to avoind binding a sub-class function to the parent class `this`
const onClick = this.getCallback(this.state, this.props);
+ const {className, style} = this.props;
if (this.shouldRender(this.state, th... |
64e5b355afbff053514a13b4b7f6c8e5943ab4e9 | public/src/components/header.jsx | public/src/components/header.jsx | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Navbar, Row, Col } from 'react-bootstrap';
import Navigation from './navigation';
export default class Header extends Component {
constructor(props) {
super(props);
// Bind
this.getLinks = this.getLinks.bind(this)... | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Navbar, Row, Col } from 'react-bootstrap';
import Navigation from './navigation';
export default class Header extends Component {
constructor(props) {
super(props);
// Bind
this.getLinks = this.getLinks.bind(this)... | Clean up getLinks() and pass logout action and store history to Navigation | Clean up getLinks() and pass logout action and store history to Navigation
| JSX | mit | Twilio-org/phonebank,Twilio-org/phonebank | ---
+++
@@ -11,11 +11,11 @@
}
getLinks() {
// links to pass into the navigation based on session info
- const currentUser = this.props.userId;
+ const { userId } = this.props;
let links = [];
- if (currentUser) { // user is logged in aka id present
+ if (userId) { // user is logged in aka ... |
32a1f53817c4bea796c71cf5dbcf9a11f4584b80 | src/application/HelloWorld/index.jsx | src/application/HelloWorld/index.jsx | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory, RouterContext } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import store from './store';
import routes from './routes';
// Hot Reload!
if (module.h... | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory, RouterContext } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import store from './store';
import routes from './routes';
// Hot Reload!
if (module.h... | Put routes, store, and app in separate files. | Put routes, store, and app in separate files.
| JSX | mit | eddyw/mern-workflow | ---
+++
@@ -28,9 +28,7 @@
return (
<Provider store={store}>
{process.env.BROWSER ? // Client-Side / Server-Side rendering
- <Router
- history={syncHistoryWithStore(browserHistory, store)}
- >
+ <Router history={syncHistoryWithStore(browserHistory, store)}>
... |
e9390bd325f777dd443bfb6ef18abd0f44faf619 | js/src/Commands.jsx | js/src/Commands.jsx | var React = require('react');
var Reflux = require('reflux');
var Store = require('./Store');
var Actions = require('./Actions');
var Connect = require('./Connect.jsx');
var Chatblast = React.createClass({
render: function() {
return (
<div>
<Connect className={this.props.conne... | var React = require('react');
var Reflux = require('reflux');
var Store = require('./Store');
var Actions = require('./Actions');
var Connect = require('./Connect.jsx');
var Chatblast = React.createClass({
render: function() {
if (this.props.readyState !== 1) {
return (
<div>
... | Hide login when already logged in | Hide login when already logged in
| JSX | mit | ebenpack/chatblast,ebenpack/chatblast,ebenpack/chatblast | ---
+++
@@ -7,12 +7,16 @@
var Chatblast = React.createClass({
render: function() {
- return (
- <div>
- <Connect className={this.props.connectClass} readyState={this.props.readyState} />
- </div>
-
- );
+ if (this.props.readyState !== 1) {
... |
180b85fc7c59438e45c93b52aa42b289c2e00240 | src/component/canvas/Scatter.jsx | src/component/canvas/Scatter.jsx | // @flow
import type {Node} from 'react';
import type {Dimension} from '../../useScales';
import type {ComponentType} from 'react';
import React from 'react';
const defaultDot = (props: Object): Node => {
return <circle fill='black' r={3} {...props.position}/>;
};
const isNumber = (value) => typeof value === '... | // @flow
import type {Node} from 'react';
import type {Dimension} from '../../useScales';
import type {ComponentType} from 'react';
import React from 'react';
const defaultDot = (props: Object): Node => {
return <circle fill='black' r={3} {...props.position}/>;
};
const isNumber = (value) => typeof value === '... | Add color to scatter charts | Add color to scatter charts
| JSX | mit | bigdatr/pnut,bigdatr/pnut | ---
+++
@@ -23,6 +23,7 @@
export default function Scatter(props: Props) {
const {y} = props;
const {x} = props;
+ const {color} = props;
const {Dot = defaultDot} = props;
@@ -34,6 +35,7 @@
if(!isNumber(yValue) || !isNumber(xValue)) return null;
return <Dot
... |
fa49b2b2cb898923a618ba7f795733fe4b41af37 | www/app/script/component/TextStatusSelect.jsx | www/app/script/component/TextStatusSelect.jsx | var React = require('react');
var ReactIntl = require('react-intl');
var ReactBootstrap = require('react-bootstrap');
var ReactRouter = require('react-router');
var Link = ReactRouter.Link;
var TextAction = require('../action/TextAction');
var TextStatusSelect = React.createClass({
mixins: [ReactIntl.IntlMixin]... | var React = require('react');
var ReactIntl = require('react-intl');
var ReactBootstrap = require('react-bootstrap');
var ReactRouter = require('react-router');
var Link = ReactRouter.Link;
var TextAction = require('../action/TextAction');
var TextStatusSelect = React.createClass({
mixins: [ReactIntl.IntlMixin]... | Fix React missing id/key attribute warnings. | Fix React missing id/key attribute warnings.
| JSX | mit | promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico | ---
+++
@@ -31,7 +31,7 @@
value={this.props.text.status}>
{Object.keys(this.options).map((key) => {
return (
- <option value={key}>
+ <option value={key} key={key}>
{this.options[key]}... |
02bf1cc016f60939ca13d738d24d1d290071ffac | app/feedback/FeedbackControls.jsx | app/feedback/FeedbackControls.jsx | import "feedback/FeedbackControls.styl";
import { h, Component } from "preact";
export default class FeedbackControls extends Component {
openFeedbackModal(type) {
this.props.openModal("feedback", {
type: type
});
}
render(props, state) {
return <div class="feedbackControls">
<button class="btn btn-de... | import "feedback/FeedbackControls.styl";
import { h, Component } from "preact";
export default class FeedbackControls extends Component {
openFeedbackModal(type) {
this.props.openModal("feedback", {
type: type
});
}
render(props, state) {
return <div class="feedbackControls">
<button class="btn btn-de... | Make feedback buttons at the bottom the same size | Make feedback buttons at the bottom the same size
| JSX | mit | ULTIMATHEXERS/DaltonTab | ---
+++
@@ -11,9 +11,9 @@
render(props, state) {
return <div class="feedbackControls">
- <button class="btn btn-default" onClick={this.openFeedbackModal.bind(this, "smile")}><i class="fa fa-smile-o" /></button>
- <button class="btn btn-default" onClick={this.openFeedbackModal.bind(this, "frown")}><i class=... |
db5a999a13f6a7192ee2d41517f90e14346a59e2 | components/ExamplePluginComponent.jsx | components/ExamplePluginComponent.jsx | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var PluginDispatcher = global.MarathonUIPluginAPI.PluginDispatcher;
var ExamplePluginComponent = React.createClass({
getInitialState: function () {
... | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var MarathonUIPluginAPI = global.MarathonUIPluginAPI;
var PluginActions = MarathonUIPluginAPI.PluginActions;
var PluginDispatcher = MarathonUIPluginAPI.Plug... | Introduce read-only plugin actions contant file | Introduce read-only plugin actions contant file | JSX | apache-2.0 | mesosphere/marathon-ui-example-plugin | ---
+++
@@ -3,7 +3,10 @@
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
-var PluginDispatcher = global.MarathonUIPluginAPI.PluginDispatcher;
+var MarathonUIPluginAPI = global.MarathonUIPluginAPI;
+var PluginActions = MarathonUIPlugin... |
d677875a644d817a59915e42012a8de911fd288c | app/javascript/app/components/tag/tag-component.jsx | app/javascript/app/components/tag/tag-component.jsx | import React, { PureComponent } from 'react';
import Proptypes from 'prop-types';
import Icon from 'components/icon';
import cx from 'classnames';
import closeIcon from 'assets/icons/legend-close.svg';
import styles from './tag-styles.scss';
class Tag extends PureComponent {
render() {
const { data, onRemove, c... | import React, { PureComponent } from 'react';
import Proptypes from 'prop-types';
import Icon from 'components/icon';
import cx from 'classnames';
import { Link } from 'react-router-dom';
import closeIcon from 'assets/icons/legend-close.svg';
import styles from './tag-styles.scss';
class Tag extends PureComponent {
... | Add link to tag component | Add link to tag component
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -2,6 +2,7 @@
import Proptypes from 'prop-types';
import Icon from 'components/icon';
import cx from 'classnames';
+import { Link } from 'react-router-dom';
import closeIcon from 'assets/icons/legend-close.svg';
import styles from './tag-styles.scss';
@@ -9,7 +10,17 @@
class Tag extends PureComponen... |
6c534ea468ae0651a7a4f95cec8e2159fbde08bf | components/InputRow.jsx | components/InputRow.jsx |
var React = require('react');
var Label = require('./Label.jsx');
var ClassBuilder = require('../utils/ClassBuilder');
var InputRow = React.createClass({
displayName: 'InputRow',
propTypes: {
label: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object
... |
var React = require('react');
var Label = require('./Label.jsx');
var ClassBuilder = require('../utils/ClassBuilder');
var InputRow = React.createClass({
displayName: 'InputRow',
propTypes: {
label: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object
... | Remove inline widths from 'input row' component | Remove inline widths from 'input row' component
| JSX | bsd-3-clause | bigdatr/bd-stampy | ---
+++
@@ -15,7 +15,6 @@
},
getDefaultProps: function() {
return {
- width: 70,
visible: true
};
},
@@ -23,19 +22,12 @@
var classes = new ClassBuilder('InputRow');
classes.add(!this.props.visible, 'is-disabled');
classes.add(this.pro... |
6f76f1bc779f09b1ca9b90fb40f5d066281a201e | src/app.jsx | src/app.jsx | // Core JS Array.from polyfill
import 'core-js/fn/array/from';
// React
import React from 'react';
import ReactRouter from 'react-router';
// App core
import App from './app/index.js';
// User routes
import routes from './routes.js';
const appInstance = (
<ReactRouter.Route name="app" path="/" handler={App}>
... | // Core JS Array.from polyfill
import 'core-js/fn/array/from';
// Symbol polyfill
import 'core-js/es6/symbol';
// React
import React from 'react';
import ReactRouter from 'react-router';
// App core
import App from './app/index.js';
// User routes
import routes from './routes.js';
const appInstance = (
<ReactRoute... | Add ES6 Symbol polyfill (for Safari) | Add ES6 Symbol polyfill (for Safari)
| JSX | cc0-1.0 | acusti/primal-multiplication,acusti/primal-multiplication | ---
+++
@@ -1,5 +1,7 @@
// Core JS Array.from polyfill
import 'core-js/fn/array/from';
+// Symbol polyfill
+import 'core-js/es6/symbol';
// React
import React from 'react';
import ReactRouter from 'react-router'; |
24f90683383b308f6930686fbc2fcffb63317338 | client/app/bundles/course/user-notification/components/Popup.jsx | client/app/bundles/course/user-notification/components/Popup.jsx | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import translations from 'lib/translations/form';
const styles = {
dialog: {
width: 400,
},
centralise: {
... | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import translations from 'lib/translations/form';
const styles = {
dialog: {
width: 400,
},
centralise: {
... | Allow popup notification to be dismiss when ‘Dismiss’ button is obscured | Allow popup notification to be dismiss when ‘Dismiss’ button is obscured
| JSX | mit | Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2 | ---
+++
@@ -41,6 +41,7 @@
contentStyle={styles.dialog}
titleStyle={styles.centralise}
bodyStyle={styles.centralise}
+ onRequestClose={this.props.onDismiss}
>
{ children }
</Dialog> |
e0a19e87a328c41adfd51c7e2cdcd29d0412e916 | src/js/post-911-gib-status/containers/PrintPage.jsx | src/js/post-911-gib-status/containers/PrintPage.jsx | import React from 'react';
import { connect } from 'react-redux';
import UserInfoSection from '../components/UserInfoSection';
import { formatDateLong } from '../../common/utils/helpers';
class PrintPage extends React.Component {
render() {
const enrollmentData = this.props.enrollmentData || {};
const tod... | import React from 'react';
import { connect } from 'react-redux';
import UserInfoSection from '../components/UserInfoSection';
import { formatDateLong } from '../../common/utils/helpers';
class PrintPage extends React.Component {
render() {
const enrollmentData = this.props.enrollmentData || {};
const tod... | Add trademark symbol to print page | Add trademark symbol to print page
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -12,21 +12,18 @@
const todayFormatted = formatDateLong(new Date());
return (
- <div className="usa-width-two-thirds medium-8 columns gib-info">
- <div className="print-status">
- <div className="print-screen">
- <img src="/img/design/logo/va-logo.png" alt="VA log... |
4678731fa949f3c9d499fa6d9b8d9aa3bd9ec33b | assets/js/components/active-learning-circles-list.jsx | assets/js/components/active-learning-circles-list.jsx | import React from 'react'
import PagedTable from './paged-table'
import moment from 'moment'
export default class ActiveLearningCircleList extends React.Component {
render(){
var heading = (
<tr>
<th>{gettext("Details")}</th>
<th>{gettext("Signups")}</th>
... | import React from 'react'
import PagedTable from './paged-table'
import moment from 'moment'
export default class ActiveLearningCircleList extends React.Component {
render(){
var heading = (
<tr>
<th>{gettext("Details")}</th>
<th>{gettext("Signups")}</th>
... | Fix display error when there is not next meeting for an active learning circle | Fix display error when there is not next meeting for an active learning circle
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -28,7 +28,7 @@
{ lc.facilitator.first_name } { lc.facilitator }
</td>
<td>
- { moment(lc.next_meeting_date).format('ddd, D MMM') }
+ { lc.next_meeting_date && moment(lc.next_meeting_date).format('ddd, D MMM') }
... |
ecbebfbfc87c813fe4487eda2b3a0918e89155e8 | js/__tests__/Search.spec.jsx | js/__tests__/Search.spec.jsx | import React from 'react';
import { shallow } from 'enzyme';
import Search from '../Search';
test('Search renders correctly', () => {
const component = shallow(<Search />);
expect(component).toMatchSnapshot();
});
````;
| import React from 'react';
import { shallow } from 'enzyme';
import Search from '../Search';
test('Search renders correctly', () => {
const component = shallow(<Search />);
expect(component).toMatchSnapshot();
});
| Remove a bunch of backticks | Remove a bunch of backticks
| JSX | mit | mikestephens/complete-intro-to-react,mikestephens/complete-intro-to-react | ---
+++
@@ -6,4 +6,3 @@
const component = shallow(<Search />);
expect(component).toMatchSnapshot();
});
-````; |
ea3c2ec561c0dd80dbc4f39cf81616cf7caa544e | src/client/scripts/app.jsx | src/client/scripts/app.jsx | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import reducer from './reducers/combine_reducers';
impo... | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { syncHistoryWithStore, routerMiddleware } from '... | Update Router with middleware to handle state changes | Update Router with middleware to handle state changes
| JSX | mit | Tropical-Raptor/trip-raptor,theredspoon/trip-raptor | ---
+++
@@ -4,6 +4,7 @@
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
+import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux';
import reducer from './reducers/combine_reducers';
import PlaceInput from './compo... |
ad9b655a7bc9cd69d457676be8583a51bdcd48c4 | client/app/bundles/DenpaioApp/components/SearchBar.jsx | client/app/bundles/DenpaioApp/components/SearchBar.jsx | import React from 'react';
export default class SearchBar extends React.Component {
handleSubmit = (e) => {
e.preventDefault();
let searchbar = e.target.searchbar;
let keyword = searchbar.value;
searchbar.value = '';
searchbar.blur();
this.props.onSearch(keyword);
};
render() {
retur... | import React from 'react';
import Radium from 'radium';
@Radium
export default class SearchBar extends React.Component {
handleSubmit = (e) => {
e.preventDefault();
let searchbar = e.target.searchbar;
let keyword = searchbar.value;
searchbar.value = '';
searchbar.blur();
this.props.onSearch(k... | Add a border line at bottom of search bar | Add a border line at bottom of search bar
| JSX | mit | denpaio/denpaio,denpaio/denpaio,denpaio/denpaio,denpaio/denpaio | ---
+++
@@ -1,5 +1,7 @@
import React from 'react';
+import Radium from 'radium';
+@Radium
export default class SearchBar extends React.Component {
handleSubmit = (e) => {
e.preventDefault();
@@ -38,4 +40,8 @@
border: 'none',
maxWidth: '300px',
height: '2em',
+ boxShadow: '0px 2px 0px #cc4b37',
+... |
e34d349f52972d0fa001b16537cb2f3cc2f87002 | client/javascript/pages/SignIn.jsx | client/javascript/pages/SignIn.jsx | import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { replace } from 'react-router-redux';
import serialize from 'form-serialize';
import { signIn } from '../actions';
import { allFormFieldsComplete } from '../utils';
import routes from '../constants/routes';
class Sig... | import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { replace } from 'react-router-redux';
import serialize from 'form-serialize';
import { signIn } from '../actions';
import { allFormFieldsComplete } from '../utils';
import routes from '../constants/routes';
class Sig... | Update the sign in instruction | CSRA-000: Update the sign in instruction
| JSX | mit | noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app | ---
+++
@@ -23,7 +23,7 @@
render() {
return (
<form action="/" method="POST" className="form" onSubmit={event => this.handleSubmit(event)}>
- <h1 className="form-title heading-large">Enter your full name</h1>
+ <h1 className="form-title heading-large">Your full name</h1>
<div c... |
0d3185eb6f733b6c06bf9236a000ea44d9f493fe | examples/forms/checkbox/default.jsx | examples/forms/checkbox/default.jsx | import React from 'react';
import Checkbox from '~/components/checkbox'; // `~` is replaced with design-system-react at runtime
const Example = React.createClass({
displayName: 'CheckboxExample',
render () {
return (
<div className="slds-grid slds-grid--pull-padded slds-grid--vertical-align-center">
<div c... | import React from 'react';
import Checkbox from '~/components/forms/checkbox'; // `~` is replaced with design-system-react at runtime
const Example = React.createClass({
displayName: 'CheckboxExample',
render () {
return (
<div className="slds-grid slds-grid--pull-padded slds-grid--vertical-align-center">
... | Update doc site example checkbox import | Update doc site example checkbox import
| JSX | bsd-3-clause | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import Checkbox from '~/components/checkbox'; // `~` is replaced with design-system-react at runtime
+import Checkbox from '~/components/forms/checkbox'; // `~` is replaced with design-system-react at runtime
const Example = React.createClass({
displayName: 'C... |
6072c763d88f102c5f887b82f5978289aaae1090 | ui/js/component/NavMenu.jsx | ui/js/component/NavMenu.jsx | 'use strict';
var React = require('react');
var MenuControl = require('mixin/MenuControl');
var NavMenu = React.createClass({
mixins : [
require('mixin/MenuControl')
],
propTypes : {
text : React.PropTypes.string.isRequired,
icon : React.PropTypes.string
},
render : function () {
var disp... | 'use strict';
var React = require('react');
var MenuControl = require('mixin/MenuControl');
var NavMenu = React.createClass({
mixins : [
require('mixin/MenuControl')
],
propTypes : {
text : React.PropTypes.string.isRequired,
icon : React.PropTypes.string
},
render : function () {
var disp... | Use blur to close open menus | Use blur to close open menus
| JSX | agpl-3.0 | SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,unicef/polio,unicef/polio,unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/polio,SeedScientific/polio,unicef/rhizome,SeedScientific/polio,unicef/polio | ---
+++
@@ -20,12 +20,20 @@
(<span>{this.props.text}</span>);
return (
- <span>
- <a onClick={this._toggleMenu}>
- {display} <i className='fa fa-chevron-down'></i>
- </a>
- </span>
+ <a onClick={this._toggleMenu} onBlur={this._onBlur} tabIndex='-1'>
+ {d... |
f24ff717b6167eccde85aab9ecba974cdd2ba36b | src/components/ContactForm.jsx | src/components/ContactForm.jsx | import React from 'react';
export default () => (
<form name="contact" method="POST" data-netlify="true" action="/">
<p>
<label>Your Name: <input type="text" name="name" /></label>
</p>
<p>
<label>Your Email: <input type="email" name="email" /></label>
</p>
<p>
<label>Message... | import React from 'react';
export default () => (
<form name="contact" method="POST" data-netlify="true" action="/">
<input type="hidden" name="contact" value="contact" />
<p>
<label>Your Name: <input type="text" name="name" /></label>
</p>
<p>
<label>Your Email: <input type="email" ... | Add hidden input w/ name | Add hidden input w/ name
| JSX | mit | snirp/royprins.com | ---
+++
@@ -2,6 +2,7 @@
export default () => (
<form name="contact" method="POST" data-netlify="true" action="/">
+ <input type="hidden" name="contact" value="contact" />
<p>
<label>Your Name: <input type="text" name="name" /></label>
</p> |
1ffb9723869013998a9795ebd64ce497fb269e83 | src/DayHeader.jsx | src/DayHeader.jsx | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import withAvailableWidth from 'react-with-available-width';
import day from './Day';
import styles from './DayHeader.css';
class DayHeader extends Component {
render() {
const {
day,
availableWidth,
} = this.props;
... | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import withAvailableWidth from 'react-with-available-width';
import day from './Day';
import styles from './DayHeader.css';
class DayHeader extends Component {
render() {
const {
day,
availableWidth,
} = this.props;
... | Adjust breakpoint for day names in header | Adjust breakpoint for day names in header
So that Wednesday fits.
| JSX | mit | trotzig/react-available-times,trotzig/react-available-times | ---
+++
@@ -16,8 +16,8 @@
<div
className={styles.component}
>
- {availableWidth > 40 && day.name}
- {availableWidth < 40 && day.abbreviated}
+ {availableWidth >= 80 && day.name}
+ {availableWidth < 80 && day.abbreviated}
</div>
)
} |
5f3a1aa872300e62c0fdec893dd2c21d1328b034 | src/js/hca-rjsf/hca-rjsf-entry.jsx | src/js/hca-rjsf/hca-rjsf-entry.jsx | import React from 'react';
import ReactDOM from 'react-dom';
import { createHistory } from 'history';
import { Router, useRouterHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import initReact from '.... | import React from 'react';
import ReactDOM from 'react-dom';
import { createHistory } from 'history';
import { Router, useRouterHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import initReact from '.... | Remove TODO because code climate failure bothers me | Remove TODO because code climate failure bothers me
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -23,7 +23,7 @@
store = createStore(reducer, compose(applyMiddleware(thunk)));
}
-// TODO: Change the basename path once we replace hca with this form
+// Change the basename path once we replace hca with this form
// (should be 'healthcare/appy/application')
const browserHistory = useRouterHistory(... |
6e7b54f91416b073aa8def4907384d2e9d375108 | public/app/screens/main/sections/device-list/devices.jsx | public/app/screens/main/sections/device-list/devices.jsx | var React = require('react');
var Reflux = require('reflux');
var Room = require('./room');
var DeviceFinder = require('./device-finder');
var Button = require('common/components/controls/button');
var roomStore = require('stores/room');
var roomActions = require('actions/room');
var styleMixin = require('mixins/sty... | var React = require('react');
var Reflux = require('reflux');
var Room = require('./room');
var DeviceFinder = require('./device-finder');
var Button = require('common/components/controls/button');
var roomStore = require('stores/room');
var roomActions = require('actions/room');
var styleMixin = require('mixins/sty... | Add keys to the Rooms list | Add keys to the Rooms list
| JSX | mit | yetu/controlcenter,yetu/controlcenter,yetu/controlcenter | ---
+++
@@ -26,8 +26,8 @@
</div>
</div>
{
- this.state.rooms.map((room) =>
- <Room title={ room.title } />
+ this.state.rooms.map((room, index) =>
+ <Room title={room.title} key={index} />
)
}
</div> |
8b4293dcb97f2c7b423897a3dac8ae404a761871 | app/assets/javascripts/components/quilleditor.js.jsx | app/assets/javascripts/components/quilleditor.js.jsx | var QuillEditor = React.createClass({
componentDidMount: function () {
let self = this;
// Add getHtml function to get html from editor textarea.
Quill.prototype.getHtml = function () {
return this.container.querySelector('.ql-editor').innerHTML;
};
this.initQuillEditor();
this.quill.c... | var QuillEditor = React.createClass({
componentDidMount: function () {
let self = this;
// Add getHtml function to get html from editor textarea.
Quill.prototype.getHtml = function () {
return this.container.querySelector('.ql-editor').innerHTML;
};
this.initQuillEditor();
this.quill.c... | Clear content on empty string. | Clear content on empty string.
| JSX | mit | kirillis/mytopten,kirillis/mytopten,krisimmig/mytopten,krisimmig/mytopten,krisimmig/mytopten,kirillis/mytopten | ---
+++
@@ -10,6 +10,12 @@
this.initQuillEditor();
this.quill.clipboard.dangerouslyPasteHTML(this.props.text);
this.bindQuillEditorEvent();
+ },
+
+ componentWillUpdate: function (nextProps) {
+ if(nextProps.text == '') {
+ this.quill.setContents([{ insert: '\n' }]);
+ }
},
initQ... |
c20db55f734cede42488a3d85c2e2a6f1cf5d956 | client/src/index.jsx | client/src/index.jsx | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './containers/App';
import LandingPage from './containers/LandingPage';
import Nav from './containers/Nav';
im... | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './containers/App';
import LandingPage from './containers/LandingPage';
import Nav from './containers/Nav';... | Use browserHistory instead of hashHistory | Use browserHistory instead of hashHistory
| JSX | mit | NerdDiffer/reprise,NerdDiffer/reprise,NerdDiffer/reprise | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from 'react-dom';
-import { Router, Route, IndexRoute, hashHistory } from 'react-router';
+import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import App from './... |
36e44ec49092eb17a8a4100ee532ad3221d2bb44 | src/page-viewer/index.jsx | src/page-viewer/index.jsx | import React, { PropTypes } from 'react'
export const localVersionAvailable = ({page}) => (
!!page.html
)
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
href={`data:text/html;charset=UTF-8,${page.html}`}
title='Stored text version available'
{...props}
>
... | import React, { PropTypes } from 'react'
export const localVersionAvailable = ({page}) => (
!!page.html
)
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
href={URL.createObjectURL(new Blob([page.html], {type: 'text/html;charset=UTF-8'}))}
title='Stored text version avail... | Use blob URI for saved version href. | Use blob URI for saved version href.
| JSX | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -6,7 +6,7 @@
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
- href={`data:text/html;charset=UTF-8,${page.html}`}
+ href={URL.createObjectURL(new Blob([page.html], {type: 'text/html;charset=UTF-8'}))}
title='Stored text version available'
{...p... |
3b023bb0e36352378b779c658ee2c18eb4d48acd | src/request/components/request-detail-panel-execution.jsx | src/request/components/request-detail-panel-execution.jsx | 'use strict';
var React = require('react');
var subItem = function (data, title, level) {
var results = {};
for (var key in data) {
var value = data[key] || '--';
if (key == 'type' && level == 0) {
title = value;
}
else if (typeof value === 'object') {
r... | 'use strict';
var React = require('react');
var subItem = function (data, title, level) {
var results = [];
for (var key in data) {
var value = data[key] || '--';
if (key == 'type' && level == 0) {
title = value;
}
else if (typeof value === 'object') {
r... | Fix bug warning from react about usage of dict | Fix bug warning from react about usage of dict
| JSX | unknown | avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -3,17 +3,17 @@
var React = require('react');
var subItem = function (data, title, level) {
- var results = {};
+ var results = [];
for (var key in data) {
var value = data[key] || '--';
if (key == 'type' && level == 0) {
title = value;
}
else ... |
bb378932a7e7eda8db5fe3fe5d13bdc267e60d52 | client/src/components/UserNameInputBox.jsx | client/src/components/UserNameInputBox.jsx | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import { Card } from 'material-ui/Card';
import TextField from 'material-ui/TextField';
class UserNameInputBox extends React.Component {
constructor (props) {
super(props);
this.state = {
userName: '',
userNameExists:... | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import { Card } from 'material-ui/Card';
import TextField from 'material-ui/TextField';
class UserNameInputBox extends React.Component {
constructor (props) {
super(props);
this.state = {
userName: '',
userNameExists:... | Update InputField to empty on submit button click | Update InputField to empty on submit button click
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -26,6 +26,9 @@
passDataToCreateUser() {
this.props.dataFromInputBox({userName: this.state.userName, userNameExists: this.state.userNameExists});
+ this.setState({
+ userName: ''
+ });
this.props.buttonClicked(true);
}
@@ -33,7 +36,7 @@
return (
<div>
- <Te... |
04236e881e760a95077deec46a60fedada2a7a31 | lib/Root.jsx | lib/Root.jsx | import React, { PropTypes } from 'react'
//import { Redirect, Router, Route } from 'react-router'
import { Provider } from 'redux/react'
//import { createDispatcher, createRedux, composeStores } from 'redux'
//import { loggerMiddleware, thunkMiddleware } from './middleware'
//import * as components from './components'
... | import React, { PropTypes } from 'react'
import { Redirect, Router, Route } from 'react-router'
import { Provider } from 'redux/react'
import { createDispatcher, createRedux, composeStores } from 'redux'
import { loggerMiddleware, thunkMiddleware } from './middleware'
import * as components from './components'
import *... | Revert "chore(lib): comment out unnecessary code" | Revert "chore(lib): comment out unnecessary code"
This reverts commit eb84f62ec9a654f4d01d58b8283bfd91d36d0307.
| JSX | mit | lyrictenor/nwjs-emoji-app,togusafish/lyrictenor-_-nwjs-emoji-app,togusafish/lyrictenor-_-nwjs-emoji-app,lyrictenor/nwjs-emoji-app | ---
+++
@@ -1,56 +1,51 @@
import React, { PropTypes } from 'react'
-//import { Redirect, Router, Route } from 'react-router'
+import { Redirect, Router, Route } from 'react-router'
import { Provider } from 'redux/react'
-//import { createDispatcher, createRedux, composeStores } from 'redux'
-//import { loggerMiddle... |
0dc6a3149732fb86bcc81dc78117e136bfb1da8f | templates/PaginationPage.jsx | templates/PaginationPage.jsx | import React from "react"
import BlogPostSummary from "../../components/BlogPostSummary"
import Link from "../../components/Link"
const pageData = {}
export default () => (
<div>
{
pageData.blogPosts && pageData.blogPosts.map(({ file, formattedDate, path, title }, index) => (
<BlogPostSummary
... | import React from "react"
import BlogPostSummary from "../../components/BlogPostSummary"
import Link from "../../components/Link"
const pageData = {}
export default () => (
<div>
{
pageData.blogPosts && pageData.blogPosts.map(({ file, formattedDate, path, title }, index) => (
<BlogPostSummary
... | Tweak older and newer links | Tweak older and newer links
| JSX | mit | lparry/blog-3.0 | ---
+++
@@ -17,8 +17,11 @@
/>
))
}
+ {pageData.previousPage &&
+ <div className="previousLink"><Link to={pageData.previousPage}>{"< Newer Stories"}</Link></div>
+ }
{pageData.nextPage &&
- <div className="moreLink"><Link to={pageData.nextPage}>Older Stories...</Link></div>
+ ... |
2fe732f943f2333efc34f312fc9127532c02211b | src/app/routes/routes.jsx | src/app/routes/routes.jsx | 'use strict';
import App from '../components/app.jsx';
import HomeContainer from '../components/home-container.jsx';
import MapContainer from '../components/map-container.jsx';
const Routes = {
path: '/',
component: App,
indexRoute: { component: HomeContainer },
childRoutes: [
{ path: 'maps/', component: ... | 'use strict';
import App from '../components/app.jsx';
import HomeContainer from '../components/home-container.jsx';
import MapContainer from '../components/map-container.jsx';
const Routes = {
path: '/',
component: App,
indexRoute: { component: HomeContainer },
childRoutes: [
{ path: 'maps/', component: ... | Change route param to ID | Change route param to ID
| JSX | mit | jkrayer/poc-map-points,jkrayer/poc-map-points | ---
+++
@@ -10,7 +10,7 @@
indexRoute: { component: HomeContainer },
childRoutes: [
{ path: 'maps/', component: HomeContainer },
- { path: 'maps/:urlString', component: MapContainer }
+ { path: 'maps/:mapId', component: MapContainer }
]
};
|
f363dd94d468e00ca7d5a61d0f031d3e76e2dbe8 | app/scripts/components/Partners/index.jsx | app/scripts/components/Partners/index.jsx | import React from 'react';
import Article from '../Content/Article';
import Thumbnail from '../Thumbnails/Thumbnail';
function Partners(props) {
return (
<div className="c-partners">
<Article grid="small-12">
<div className="row align-stretch">
{props.data.map((partner, i)=>{
... | import React from 'react';
import Article from '../Content/Article';
import Thumbnail from '../Thumbnails/Thumbnail';
function Partners(props) {
return (
<div className="c-partners">
<Article grid="small-12">
<div className="row align-stretch">
{props.data.map((partner, i)=>{
... | Use logo large in partners page | Use logo large in partners page
| JSX | mit | resource-watch/prep-app,resource-watch/prep-app | ---
+++
@@ -15,7 +15,7 @@
<div className="c-article-module">
<Thumbnail
url={partner.url}
- src={config.apiUrl + partner.logo_medium}
+ src={config.apiUrl + partner.logo_large}
alt={partner.name}
... |
b00c732570ed4cfad5587811f32c30e98d087a24 | web/static/js/components/stage_change_info_action_items.jsx | web/static/js/components/stage_change_info_action_items.jsx | import React from "react"
export default () => (
<div>
The skinny on Action-Item Generation:
<div className="ui basic segment">
<ul className="ui list">
<li>Discuss the highest-voted items on the board.
<ul>
<li>
<small>
<strong>Protip: </stro... | import React from "react"
export default () => (
<div>
The skinny on Action-Item Generation:
<div className="ui basic segment">
<ul className="ui list">
<li>Discuss the highest-voted items on the board.</li>
<li>Generate action-items aimed at:
<ul>
<li>exploding th... | Update action items stage prompt such that folks put their laptops away | Update action items stage prompt such that folks put their laptops away
| JSX | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro | ---
+++
@@ -5,22 +5,17 @@
The skinny on Action-Item Generation:
<div className="ui basic segment">
<ul className="ui list">
- <li>Discuss the highest-voted items on the board.
- <ul>
- <li>
- <small>
- <strong>Protip: </strong>
- l... |
96e0cf9af7b49c4cfc2131f9ab1581190292b405 | src/shell/components/shell-view.jsx | src/shell/components/shell-view.jsx | var React = require('react'),
glimpse = require('glimpse');
module.exports = React.createClass({
_applicationAdded: function() {
this.forceUpdate();
},
componentDidMount: function() {
this._applicationAddedOn = glimpse.on('shell.application.added', this._applicationAdded);
},
co... | var React = require('react'),
glimpse = require('glimpse');
module.exports = React.createClass({
_applicationAdded: function() {
this.forceUpdate();
},
componentDidMount: function() {
this._applicationAddedOn = glimpse.on('shell.application.added', this._applicationAdded);
},
co... | Remove dud class on app container | Remove dud class on app container
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -13,7 +13,7 @@
},
render: function() {
return (
- <div className="application-holder hjhjh">
+ <div className="application-holder">
{this.props.applications}
</div>
); |
2f9a4ae19408792eb0a1a99ac6616e87bec8fb85 | client/components/pages/HomePage.jsx | client/components/pages/HomePage.jsx | import React, { Component } from 'react';
import NavBar from '../includes/navbar';
import AuthForm from '../auth/AuthForm';
import { connect } from 'react-redux';
class HomePage extends Component {
render() {
if(localStorage.getItem('token')){
window.location.href='/dashboard'
}
return (
<... | import React, { Component } from 'react';
import NavBar from '../includes/NavBar';
import AuthForm from '../auth/AuthForm';
import { connect } from 'react-redux';
class HomePage extends Component {
render() {
if(localStorage.getItem('token')){
window.location.href='/dashboard'
}
return (
<... | Fix heroku build from failing | Fix heroku build from failing
| JSX | mit | nosisky/Hello-Books,nosisky/Hello-Books | ---
+++
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import NavBar from '../includes/navbar';
+import NavBar from '../includes/NavBar';
import AuthForm from '../auth/AuthForm';
import { connect } from 'react-redux';
|
743280ef8aef1ccbeb6ed800db17ba59a65ca354 | 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 InvestmentListItem from './InvestmentListItem'
const StyledOrderedList = styled('ol')`
margin-top: 0;
${({ isPaginated }) => isPaginated && `border-bottom: 2px solid red;`}
`
const InvestmentList = ({ items... | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { GREY_1 } from 'govuk-colours'
import InvestmentListItem from './InvestmentListItem'
const StyledOrderedList = styled('ol')`
margin-top: 0;
${({ isPaginated }) => isPaginated && `border-bottom: 2px solid ${... | Change horizontal line colour from red to grey | Change horizontal line colour from red to grey
| JSX | mit | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | ---
+++
@@ -1,12 +1,13 @@
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
+import { GREY_1 } from 'govuk-colours'
import InvestmentListItem from './InvestmentListItem'
const StyledOrderedList = styled('ol')`
margin-top: 0;
- ${({ isPaginated }) => isPag... |
77ea78e309949695c780840f4c5da477844833e0 | client/libs/react-app-context.jsx | client/libs/react-app-context.jsx | // XXX: Move this into a NPM module
import {React} from 'meteor/react-runtime';
export function applyContext(context, _actions) {
const actions = {};
for (let key in _actions) {
if (_actions.hasOwnProperty(key)) {
const actionMap = _actions[key];
for (let actionName in actionMap) {
if (acti... | // XXX: Move this into a NPM module
import {React} from 'meteor/react-runtime';
export function applyContext(context, _actions) {
const actions = {};
for (let key in _actions) {
if (_actions.hasOwnProperty(key)) {
const actionMap = _actions[key];
for (let actionName in actionMap) {
if (acti... | Fix a simple eslint issue | Fix a simple eslint issue
| JSX | mit | LikeJasper/mantra-plus,warehouseman/meteor-mantra-kickstarter,TheAncientGoat/mantra-sample-blog-coffee,Entropy03/jianwei,mantrajs/mantra-sample-blog-app,hacksong2016/angel,mantrajs/mantra-dialogue,mantrajs/meteor-mantra-kickstarter,warehouseman/meteor-mantra-kickstarter,worldwidejamie/silicon-basement,markoshust/mantra... | |
756be5f810ea027f3933221ab2da7e196de33896 | web-server/app/assets/javascripts/components/packages-component.jsx | web-server/app/assets/javascripts/components/packages-component.jsx | define(['jquery', 'react', '../mixins/serialize-form', '../mixins/fluxbone', '../mixins/request-status', './package-component', 'sota-dispatcher'], function($, React, serializeForm, Fluxbone, RequestStatus, PackageComponent, SotaDispatcher) {
var Packages = React.createClass({
mixins: [
Fluxbone.Mixin("Pac... | define(['jquery', 'react', '../mixins/serialize-form', '../mixins/fluxbone', '../mixins/request-status', './package-component', 'sota-dispatcher'], function($, React, serializeForm, Fluxbone, RequestStatus, PackageComponent, SotaDispatcher) {
var Packages = React.createClass({
mixins: [
Fluxbone.Mixin("Pac... | Fix packages component rendering too often | Fix packages component rendering too often
| JSX | mpl-2.0 | PDXostc/rvi_sota_server,PDXostc/rvi_sota_server,PDXostc/rvi_sota_server | ---
+++
@@ -2,7 +2,7 @@
var Packages = React.createClass({
mixins: [
- Fluxbone.Mixin("PackageStore")
+ Fluxbone.Mixin("PackageStore", "sync change")
],
render: function() {
var packages = this.props.PackageStore.models.map(function(package) { |
f630da669b4c1437bc9048d1b8ac9c7e13fbf803 | src/drive/web/modules/trash/components/DestroyConfirm.jsx | src/drive/web/modules/trash/components/DestroyConfirm.jsx | import React from 'react'
import classNames from 'classnames'
import { useClient } from 'cozy-client'
import Modal from 'cozy-ui/transpiled/react/Modal'
import { translate } from 'cozy-ui/transpiled/react/I18n'
import { deleteFilesPermanently } from 'drive/web/modules/actions/utils'
import styles from 'drive/styles/con... | import React from 'react'
import classNames from 'classnames'
import { useClient } from 'cozy-client'
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
import Button from 'cozy-ui/transpiled/react/Button'
import { translate } from 'cozy-ui/transpiled/react/I18n'
import { deleteFilesPermanently } fr... | Use CozyDialog instead of Modal | feat: Use CozyDialog instead of Modal
| JSX | agpl-3.0 | nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3 | ---
+++
@@ -1,8 +1,11 @@
import React from 'react'
import classNames from 'classnames'
+
import { useClient } from 'cozy-client'
-import Modal from 'cozy-ui/transpiled/react/Modal'
+import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
+import Button from 'cozy-ui/transpiled/react/Button'
import { ... |
b75f2c8719b8c27e392e3ffb21b3106801840dde | ui/src/message_popup/mobile_prototype/message_components_story.jsx | ui/src/message_popup/mobile_prototype/message_components_story.jsx | import React from 'react';
import _ from 'lodash';
import {storiesOf} from '@kadira/storybook';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import {StudentMessage, UserMessage, InfoMessage} from './message_components.jsx';
import {allStudents} from '../../data/virtual_school.js';
const student... | import React from 'react';
import _ from 'lodash';
import {storiesOf} from '@kadira/storybook';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import {StudentMessage, UserMessage, InfoMessage} from './message_components.jsx';
import {allStudents} from '../../data/virtual_school.js';
const student... | Fix bug with InfoMessage and linting | Fix bug with InfoMessage and linting
| JSX | mit | kesiena115/threeflows,kesiena115/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows | ---
+++
@@ -20,6 +20,6 @@
))
.add('InfoMessage', () => (
<MuiThemeProvider>
- <UserMessage text="Info message." />
+ <InfoMessage text="Info message." />
</MuiThemeProvider>
- ))
+ )); |
cd2ece6c1d2c73842d9ecc5a53723509a3eb77bd | client/download/download-page.jsx | client/download/download-page.jsx | import React from 'react'
import { makeServerUrl } from '../network/server-url'
import styles from './download.css'
import Download from './download.jsx'
import LogoText from '../logos/logotext-640x100.svg'
export default class DownloadPage extends React.Component {
render() {
return (<div className={styles.bac... | import React from 'react'
import { makeServerUrl } from '../network/server-url'
import styles from './download.css'
import Download from './download.jsx'
import LogoText from '../logos/logotext-640x100.svg'
export default class DownloadPage extends React.Component {
render() {
return (<div>
<div className... | Remove unnecessary/undefined style from DownloadPage body. | Remove unnecessary/undefined style from DownloadPage body.
| JSX | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | ---
+++
@@ -7,7 +7,7 @@
export default class DownloadPage extends React.Component {
render() {
- return (<div className={styles.background}>
+ return (<div>
<div className={styles.wrapper}>
<img className={styles.logo} src={makeServerUrl('/images/logo.svg')} />
<div className={sty... |
117f171a5217c545835f2e0a8e8eef0ce303d091 | src/main/resources/assets/js/components/AppVersionListComponent.jsx | src/main/resources/assets/js/components/AppVersionListComponent.jsx | /** @jsx React.DOM */
define([
"React",
"jsx!components/AppVersionListItemComponent",
], function(React, AppVersionListItemComponent) {
return React.createClass({
displayName: "AppVersionListComponent",
propTypes: {
app: React.PropTypes.object.isRequired,
appVersions: React.PropTypes.array,
... | /** @jsx React.DOM */
define([
"React",
"jsx!components/AppVersionListItemComponent",
], function(React, AppVersionListItemComponent) {
return React.createClass({
displayName: "AppVersionListComponent",
propTypes: {
app: React.PropTypes.object.isRequired,
appVersions: React.PropTypes.array,
... | Use `map` to render app versions | Use `map` to render app versions | JSX | apache-2.0 | yp-engineering/marathon,pugna0/marathon,guenter/marathon,drewrobb/marathon,rtward/marathon,EasonYi/marathon,manojlds/marathon,cherrydocker/marathon-1,bobrik/marathon,Yhgenomics/marathon,felixb/marathon,okuryu/marathon,bsideup/marathon,mikejihbe/marathon,bobrik/marathon,Caerostris/marathon,14Zen/marathon,EvanKrall/marat... | ---
+++
@@ -27,8 +27,7 @@
);
} else {
if (this.props.appVersions.length > 0) {
- listItems = [];
- this.props.appVersions.forEach(function(v) {
+ listItems = this.props.appVersions.map(function(v) {
return (
<AppVersionListItemComponent
... |
7c2148b5acec7145079fa907eed88a555e95700a | src/components/side-panel/add-swatches/AddSwatchesPanel.jsx | src/components/side-panel/add-swatches/AddSwatchesPanel.jsx | // @flow
import React from 'react';
import AddSwatchForm from './AddSwatchForm';
import Palette from './Palette';
import type { PaletteType } from '../../../../types';
type Props = {
palettes: Array<PaletteType>,
addNewSwatch: Function,
deleteSwatches: Function
}
const AddSwatchesPanel = (props: Props): React$... | // @flow
import React from 'react';
import AddSwatchForm from './AddSwatchForm';
import Palette from './Palette';
import type { PaletteType } from '../../../../types';
type Props = {
palettes: Array<PaletteType>,
addNewSwatch: Function,
deleteSwatches: Function
}
const AddSwatchesPanel = (props: Props): React$... | Add titles to swatch panel | [Style] Add titles to swatch panel
| JSX | isc | eddyerburgh/palette-picker,eddyerburgh/palette-picker | ---
+++
@@ -13,13 +13,16 @@
const AddSwatchesPanel = (props: Props): React$Element<any> => (
<div>
+ <h4>Custom swatch</h4>
<AddSwatchForm addNewSwatch={props.addNewSwatch} />
+ <h4 className="mt-10">Pre-made palettes</h4>
{props.palettes.map((palette, i) =>
<Palette
{...palette}... |
425fc80d6c78e42dd2dcf73f76d2c0866f2537a9 | client/app/bundles/RentersRights/components/ResourceIndexItem.jsx | client/app/bundles/RentersRights/components/ResourceIndexItem.jsx | import React from 'react';
export default class ResourceIndexItem extends React.Component {
constructor(props) {
super(props);
}
render() {
const {
organization,
phone,
email,
website,
region,
description,
address,
} = this.props.resource;
return (
... | import React from 'react';
export default class ResourceIndexItem extends React.Component {
constructor(props) {
super(props);
}
render() {
const {
organization,
phone,
email,
website,
region,
description,
address,
} = this.props.resource;
return (
... | Add target=_blank to a tags to open link in new window | Add target=_blank to a tags to open link in new window
| JSX | mit | codeforsanjose/renters-rights,codeforsanjose/renters-rights,codeforsanjose/renters-rights | ---
+++
@@ -18,7 +18,7 @@
return (
<div>
- <a href={website}><h3>{organization}</h3></a>
+ <a href={website} target="_blank"><h3>{organization}</h3></a>
<p>{description}</p>
<p>Contact: </p>
<p><span className="glyphicon glyphicon-earphone"></span> Phone: {phon... |
63a669312c94ccddee1b733874109dc815851659 | app/layout/Navbar.jsx | app/layout/Navbar.jsx | import React from 'react'
let Navbar = React.createClass({
render: function () {
return <nav className="navbar navbar-default navbar-static-top" role="navigation">
<div className="navbar-header">
<button type="button" className="navbar-toggle" data-toggle="collapse" data-target=".... | import React from 'react'
let Navbar = React.createClass({
renderNavEntry: function(entry, i) {
return <li className="dropdown">
</li>
},
render: function () {
return <nav className="navbar navbar-default navbar-static-top" role="navigation">
<div className="navbar-heade... | Add dropdown function for navigation bar | Add dropdown function for navigation bar
| JSX | agpl-3.0 | mbrossard/go-experiments,mbrossard/go-experiments,mbrossard/go-experiments | ---
+++
@@ -1,6 +1,10 @@
import React from 'react'
let Navbar = React.createClass({
+ renderNavEntry: function(entry, i) {
+ return <li className="dropdown">
+ </li>
+ },
render: function () {
return <nav className="navbar navbar-default navbar-static-top" role="navigation">
... |
cda77c6a8e21767600e7103db234d7adda9d2e36 | frontend/src/components/print/print-react/components/program/Program.jsx | frontend/src/components/print/print-react/components/program/Program.jsx | // eslint-disable-next-line no-unused-vars
import React from 'react'
import { Page, View } from '@react-pdf/renderer'
import styles from '../styles.js'
import sortBy from 'lodash/sortBy.js'
import ScheduleEntry from '../scheduleEntry/ScheduleEntry.jsx'
function Program(props) {
const periods = props.content.options.... | // eslint-disable-next-line no-unused-vars
import React from 'react'
import { Page, View } from '@react-pdf/renderer'
import styles from '../styles.js'
import sortBy from 'lodash/sortBy.js'
import ScheduleEntry from '../scheduleEntry/ScheduleEntry.jsx'
function Program(props) {
const periods = props.content.options.... | Fix program bookmark jumping to the last instead of the first page of the program | Fix program bookmark jumping to the last instead of the first page of the program
| JSX | agpl-3.0 | usu/ecamp3,ecamp/ecamp3,ecamp/ecamp3,usu/ecamp3,ecamp/ecamp3,usu/ecamp3,ecamp/ecamp3,usu/ecamp3 | ---
+++
@@ -19,11 +19,11 @@
return <React.Fragment key={`${props.id}-${period.id}`} />
}
return (
- <View
- key={`${props.id}-${period.id}`}
- id={`${props.id}-${period.id}`}
- bookmark={{ title: period.description, fit: true }}
- >
+ ... |
17a4a02c718b067504fc41beb35ff0c4755b9d0f | src/app/components/Messages/Header.jsx | src/app/components/Messages/Header.jsx | import './Header.less';
import React from 'react';
// import { Anchor } from '@r/platform/components';
export default function MessagesHeader() {
return (
<div className='MessageHeader'>
<div className='MessageHeader__title'>Inbox</div>
{/*Don't allow access to messager composition until that feature... | import './Header.less';
import React from 'react';
import { Anchor } from '@r/platform/components';
export default function MessagesHeader() {
return (
<div className='MessageHeader'>
<div className='MessageHeader__title'>Inbox</div>
<Anchor
className='MessageHeader__compose icon icon-message... | Enable showing the link to message compose | Enable showing the link to message compose
This was previously working but hidden due to a
captcha-related issue. This should now be working,
so we can unhide the link. | JSX | mit | ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile | ---
+++
@@ -1,16 +1,15 @@
import './Header.less';
import React from 'react';
-// import { Anchor } from '@r/platform/components';
+import { Anchor } from '@r/platform/components';
export default function MessagesHeader() {
return (
<div className='MessageHeader'>
<div className='MessageHeader__tit... |
77e70ff2b90b0cd6a2be69a278996840f48f9e50 | src/Filters.jsx | src/Filters.jsx | import React, { Component } from 'react';
import PropTypes from 'proptypes';
import Filter from './Filter.jsx';
import filterData from './filter-data.js';
class Filters extends Component {
static propTypes = {
filters: PropTypes.array,
addFilter: PropTypes.func,
removeFilter: PropTypes.func,
updateF... | import React, { Component } from 'react';
import PropTypes from 'proptypes';
import Filter from './Filter.jsx';
import axios from 'axios';
class Filters extends Component {
componentWillMount = () => {
this.setState({ filterTypes: [] });
axios.get('http://localhost:8080/filters')
.then(({ data }) => {... | Load filter types from database | Load filter types from database
| JSX | mit | ivallee/lhl-final-project,ivallee/lhl-final-project | ---
+++
@@ -1,9 +1,17 @@
import React, { Component } from 'react';
import PropTypes from 'proptypes';
import Filter from './Filter.jsx';
-import filterData from './filter-data.js';
+import axios from 'axios';
class Filters extends Component {
+
+ componentWillMount = () => {
+ this.setState({ filterTypes: [... |
9ea1e39a615d9cd61a28574e8d51f750424a6091 | client/components/inputs/TextField.jsx | client/components/inputs/TextField.jsx | var cn = require('classnames'),
React = require('react/addons'),
{PureRenderMixin} = React.addons.PureRenderMixin
var TextField = React.createClass({
mixins: [PureRenderMixin],
propTypes: {
label: React.PropTypes.string,
errorText: React.PropTypes.string,
name: React.PropTypes.string.isRequired,
... | var cn = require('classnames')
var React = require('react/addons')
var {PureRenderMixin} = React.addons.PureRenderMixin
var TextField = React.createClass({
mixins: [PureRenderMixin],
propTypes: {
label: React.PropTypes.string,
errorText: React.PropTypes.string,
name: React.PropTypes.string.isRequired,... | Use var for each line | Use var for each line
| JSX | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed | ---
+++
@@ -1,6 +1,6 @@
-var cn = require('classnames'),
- React = require('react/addons'),
- {PureRenderMixin} = React.addons.PureRenderMixin
+var cn = require('classnames')
+var React = require('react/addons')
+var {PureRenderMixin} = React.addons.PureRenderMixin
var TextField = React.createClass({
mixins: ... |
81cd3f2d78f4c2c85cfe66f892dec71c04590469 | src/app/views/login/LoginForm.jsx | src/app/views/login/LoginForm.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Input from '../../components/Input';
const propTypes = {
formData: PropTypes.shape({
inputs: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string,
label: PropTypes.string,
type: Pro... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Input from '../../components/Input';
const propTypes = {
formData: PropTypes.shape({
inputs: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string,
label: PropTypes.string,
type: Pro... | Set login fields to allow auto complete | Set login fields to allow auto complete
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -36,7 +36,7 @@
{
inputs.map((input, index) => {
- return <Input key={index} {...input} disabled={isSubmitting}/>
+ return <Input key={index} {...input} disabled={isSubmitting} allowAutoComp... |
02112086c07c406dfbcb18d57189d0a218e293c9 | frontend/components/topic-input.jsx | frontend/components/topic-input.jsx | import React, { useState } from 'react'
import Select from 'react-select';
const TopicInput = (props) => {
const [selectedGuides, setSelectedGuides] = useState(props.value || []);
const handleSelect = (selected) => {
setSelectedGuides(selected);
}
const topicOptions = Array.from(props.topics);
topicOpt... | import React, { useState } from 'react'
import Select from 'react-select';
const TopicInput = (props) => {
const [selectedGuides, setSelectedGuides] = useState(props.value || []);
const handleSelect = (selected) => {
setSelectedGuides(selected);
}
const topicOptions = Array.from(props.topics);
topicOpt... | Stop react from complaining about option tags with selected attribute | Stop react from complaining about option tags with selected attribute
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -13,15 +13,22 @@
return(
<span>
- <select type="hidden" name="topic_guides" multiple style={{display:"none"}}>
+ <select
+ type="hidden"
+ name="topic_guides"
+ multiple
+ style={{display:"none"}}
+ value={selectedGuides.map( t => t.value )}
+ >
... |
bdedfbf9445659c0561963b3ec111fa38955b4f0 | src/shared/components/index.jsx | src/shared/components/index.jsx | /**
* Created by hhj on 12/23/15.
*/
import React from 'react'
export default class AppView extends React.Component {
render() {
return (
<div id="app-view">
<h1>Dohlestr</h1>
<hr />
{this.props.children}
</div>
)
}
}
| /**
* Created by hhj on 12/23/15.
*/
import React from 'react'
export default class AppView extends React.Component {
render() {
return (
<div id="app-view">
<h1>Dohlestr</h1>
<hr />
{this.props.children}
<hr />
<div>hhj - based on <a href="https://medium.com/... | Add source tutorial link to footer | Add source tutorial link to footer
| JSX | mit | hhjcz/too-simple-react-skeleton | ---
+++
@@ -13,6 +13,13 @@
<hr />
{this.props.children}
+
+ <hr />
+
+ <div>hhj - based on <a href="https://medium.com/front-end-developers/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4#.dyjo0n2px">
+ tutorial
+ </a>
+ </div>
</... |
8137bd05d5c6263d32b23f0be32318e7859de5fe | examples/menu/index.jsx | examples/menu/index.jsx | import React from 'react'
import ReactDOM from 'react-dom'
import Menu from 'menu'
import Logger from 'utils/logger'
export default class FormExamples extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
<div>
<h1>Menu</h1>
<Menu menu={this.getMenu()}/>
... | import React from 'react'
import ReactDOM from 'react-dom'
import Menu from 'menu'
import Logger from 'utils/logger'
export default class MenuExamples extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
<div>
<h1>Menu</h1>
<Menu menu={this.getMenu()}/>
... | Fix small typo with component name | Fix small typo with component name
| JSX | mit | thinktopography/reframe,thinktopography/reframe | ---
+++
@@ -3,7 +3,7 @@
import Menu from 'menu'
import Logger from 'utils/logger'
-export default class FormExamples extends React.Component {
+export default class MenuExamples extends React.Component {
constructor(props) {
super(props)
} |
cc7e11516be56b33aca1be34884c23912fc175e1 | src/common/components/code-renderer.jsx | src/common/components/code-renderer.jsx | import React, { PropTypes as P } from 'react';
import Lowlight from 'react-lowlight';
import shallowCompare from 'react-addons-shallow-compare';
// import js from 'highlight.js/lib/languages/javascript';
import cpp from 'highlight.js/lib/languages/cpp';
// Lowlight.registerLanguage('js', js);
Lowlight.registerLanguage... | import React, { PropTypes as P } from 'react';
import Lowlight from 'react-lowlight';
// import shallowCompare from 'react-addons-shallow-compare';
// import js from 'highlight.js/lib/languages/javascript';
import cpp from 'highlight.js/lib/languages/cpp';
// Lowlight.registerLanguage('js', js);
Lowlight.registerLangu... | Use pure component instead of deprecated shallow compare | Use pure component instead of deprecated shallow compare
| JSX | mit | sse2016-peer-grading/TJLMS-FE,sse2016-peer-grading/TJLMS-FE | ---
+++
@@ -1,13 +1,13 @@
import React, { PropTypes as P } from 'react';
import Lowlight from 'react-lowlight';
-import shallowCompare from 'react-addons-shallow-compare';
+// import shallowCompare from 'react-addons-shallow-compare';
// import js from 'highlight.js/lib/languages/javascript';
import cpp from 'hig... |
7328173834c93faaeb6c35028939f1efefb9f68f | src/lib/components/timeago.jsx | src/lib/components/timeago.jsx | 'use strict';
var React = require('react');
var SetIntervalMixin = require('./set-interval-mixin');
var moment = require('moment');
module.exports = React.createClass({
mixins: [ SetIntervalMixin ],
render: function () {
var time = moment(this.props.time);
return <span title={time.format('MMM ... | 'use strict';
var _ = require('lodash');
var React = require('react');
var SetIntervalMixin = require('./set-interval-mixin');
var moment = require('moment');
var items = [
{ target: 'a few seconds', replace: '1s' },
{ target: ' minutes', replace: 'm' },
{ target: 'a minute', replace: '1m' },
{ target... | Update time ago with a temp hack to shorten the value we render out | Update time ago with a temp hack to shorten the value we render out
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -1,14 +1,40 @@
'use strict';
+var _ = require('lodash');
var React = require('react');
var SetIntervalMixin = require('./set-interval-mixin');
var moment = require('moment');
+
+var items = [
+ { target: 'a few seconds', replace: '1s' },
+ { target: ' minutes', replace: 'm' },
+ { target: 'a... |
7136201e62c4876728dafd3f725b9c07668f1d5c | src/js/components/next-up/index.jsx | src/js/components/next-up/index.jsx | import debug from "debug";
import React, { Component } from "react";
import Track from "../track";
const log = debug("schedule:components:next-up");
export class NextUp extends Component {
updateNextSessions(props) {
const { getState } = props;
const { upcoming, tracks, sessions } = getState();
... | import debug from "debug";
import React, { Component } from "react";
import Track from "../track";
const log = debug("schedule:components:next-up");
export class NextUp extends Component {
updateNextSessions(props) {
const { getState } = props;
const { upcoming, tracks, sessions } = getState();
... | Add cure for empty next up page | Add cure for empty next up page
| JSX | mit | nikcorg/schedule,nikcorg/schedule,nikcorg/schedule | ---
+++
@@ -32,13 +32,15 @@
return (
<div className="next-up">
{
- sessions.map(t => {
+ 0 < sessions.length
+ ? sessions.map(t => {
return (
- <div key={t.name} classNam... |
b8634e1657b592d8010074a49e90c928a18a76b7 | client/src/components/WorkoutOptions.jsx | client/src/components/WorkoutOptions.jsx | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { allWorkouts } from '../utils.js';
class WorkoutOptions extends Component {
constructor(props) {
super(props);
}
render() {
const { currentWorkout } = this.props;
return (
<div className="ui seven item me... | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { allWorkouts } from '../utils.js';
import { changeWorkout } from '../actions.js';
class WorkoutOptions extends Component {
constructor(props) {
super(props);
}
render() {
const { currentWorkout, changeWorkout } = th... | Allow user to choose different workouts | Allow user to choose different workouts
| JSX | mit | smclendening/nfl-draft,smclendening/nfl-draft | ---
+++
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { allWorkouts } from '../utils.js';
+import { changeWorkout } from '../actions.js';
class WorkoutOptions extends Component {
constructor(props) {
@@ -8,12 +9,16 @@
}
render() {
- const {... |
6c13452a756c26b6d24576da2fb42919e10524a1 | public/jsx/sc_selector.jsx | public/jsx/sc_selector.jsx | class ScSelector extends React.Component {
constructor(props) {
super(props);
this.state = {
firstName: "Index"
}
this.activate = this.activate.bind(this);
}
activate(name, setActiveTab) {
console.log("ScSelector.activate " + name);
if (name == this.state.firstName) {
ReactDOM.... | class ScSelector extends React.Component {
constructor(props) {
super(props);
this.activate = this.activate.bind(this);
}
activate(name, setActiveTab) {
console.log("ScSelector.activate " + name);
if (name == this.props.firstName) {
ReactDOM.render(
<SupportConfigIndex setActiveTab={... | Make firstName a prop if sc_index, not a state | Make firstName a prop if sc_index, not a state
| JSX | bsd-3-clause | kkaempf/Ongorora,kkaempf/Ongorora,kkaempf/Ongorora | ---
+++
@@ -1,14 +1,11 @@
class ScSelector extends React.Component {
constructor(props) {
super(props);
- this.state = {
- firstName: "Index"
- }
this.activate = this.activate.bind(this);
}
activate(name, setActiveTab) {
console.log("ScSelector.activate " + name);
- if (name == ... |
61a98d30528d08c6085340fbdd94e55d64e63e8d | app/src/components/LeftNav/index.jsx | app/src/components/LeftNav/index.jsx | import React, { PropTypes } from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import { CLOSE_LEFT_NAV, OPEN_SETTINGS, OPEN_SYNC_STATUS } from '../../constants';
// TODO add icons
const LeftNav = ({ open, handleAction }) => <Drawer open={open}>
<MenuItem onTouchTap={... | import React, { PropTypes } from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import ArrowBack from 'material-ui/svg-icons/navigation/arrow-back';
import Settings from 'material-ui/svg-icons/action/settings';
import Backup from 'material-ui/svg-icons/action/backup';
im... | Add icons to left nav | Add icons to left nav
| JSX | mit | nponiros/bookmarks_manager,nponiros/bookmarks_manager | ---
+++
@@ -1,13 +1,21 @@
import React, { PropTypes } from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
+import ArrowBack from 'material-ui/svg-icons/navigation/arrow-back';
+import Settings from 'material-ui/svg-icons/action/settings';
+import Backup from 'materia... |
cecdaa4aa9ad48a1d5cc2901e85e7367d2c623ad | app/pages/lab/translations/index.jsx | app/pages/lab/translations/index.jsx | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as translationsActions from '../../../redux/ducks/translations';
class TranslationsManager extends React.Component {
render() {
return (
<p>Manage your project translations here.</p>
)... | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router';
import * as translationsActions from '../../../redux/ducks/translations';
class TranslationsManager extends React.Component {
componen... | Add a basic list of languages for the project List the available project language codes, each linked to the project in that language. | Add a basic list of languages for the project
List the available project language codes, each linked to the project in that language.
| JSX | apache-2.0 | amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End | ---
+++
@@ -1,12 +1,30 @@
import React from 'react';
+import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
+import { Link } from 'react-router';
import * as translationsActions from '../../../redux/ducks/translations';
class TranslationsManager ... |
b5e06aae3b54187b3e859ea248ca98b46313175e | src/components/parts/Header.jsx | src/components/parts/Header.jsx | // This component renders a nav bar which has dropdowns for the card selection
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import NavBar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import DropdownButto... | // This component renders a nav bar which has dropdowns for the card selection
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import NavBar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import DropdownButto... | Change dropdown title to Choose Expansion | Change dropdown title to Choose Expansion
| JSX | mit | mdiehr/dominion,mdiehr/dominion | ---
+++
@@ -26,7 +26,7 @@
<Nav>
<div className='navbar-header'><span className='navbar-brand'>{siteName}</span></div>
{ SetStore.length > 0 ? (
- <DropdownButton id="set-dropdown" eventKey={1} title='Set'>
+ <Drop... |
f1805c2a81f6379cc130da51fe962948a4c89f13 | shared/components/table-of-contents.jsx | shared/components/table-of-contents.jsx | /** @jsx React.DOM */
export default React.createClass({
displayName: 'TableOfContents',
selectors: [
'.secs > h2',
'.secs > h3',
'.secs > h4'
],
getLists: function (target, selectorIndex, maxDepth) {
var data = [];
var headers = target.querySelectorAll(this.se... | /** @jsx React.DOM */
export default React.createClass({
displayName: 'TableOfContents',
selectors: [
'.secs > h2',
'.secs > h3',
'.secs > h4'
],
getLists: function (target, selectorIndex, maxDepth) {
var data = [];
var headers = target.querySelectorAll(this.se... | Fix TOC component's `maxDepth` comparison | Fix TOC component's `maxDepth` comparison
This changes the interpretation of the TOC component's `maxDepth`. A
`maxDepth = 2`, should mean two levels of headings in the TOC, not
three.
| JSX | bsd-3-clause | ericf/formatjs-site,ericf/formatjs-site | ---
+++
@@ -23,7 +23,7 @@
anchor = <a href={'#' + header.id}>{header.textContent}</a>;
section = header.parentNode;
childHeaders = section.querySelectorAll(this.selectors[nextSelector]);
- if (childHeaders.length > 0 && nextSelector <= maxDepth) {
+ if (chi... |
a67354b3a975177fccf3e75aafcc3b41b461a839 | src/app/components/simple-selectable-list/SimpleSelectableListItem.jsx | src/app/components/simple-selectable-list/SimpleSelectableListItem.jsx | import React, { Component } from "react";
import PropTypes from "prop-types";
import { Link } from "react-router";
const propTypes = {
title: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
externalLink: PropTypes.bool.isRequired,
details: PropTypes.a... | import React, { Component } from "react";
import PropTypes from "prop-types";
import { Link } from "react-router";
const propTypes = {
title: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
externalLink: PropTypes.bool.isRequired,
details: PropTypes.a... | Move rendering of title to seperate method | Move rendering of title to seperate method
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -20,21 +20,31 @@
super(props);
}
+ renderTitle = () => {
+ if (this.props.disabled) {
+ return <p className="simple-select-list__title simple-select-list__title--disabled">{this.props.title}</p>;
+ }
+
+ if (this.props.externalLink) {
+ return (... |
831ff6c95fda0031739c0fa46a5e92762fd91779 | src/components/side-panel/SidePanel.jsx | src/components/side-panel/SidePanel.jsx | // @flow
import React from 'react';
import Tabs from './tabs/Tabs';
import AddSwatchesPanel from './add-swatches/AddSwatchesPanel';
import AboutPanel from './about/AboutPanel';
import type { PaletteType } from '../../../types';
type Props = {
addNewSwatch: Function, // eslint-disable-line react/no-unused-prop-ty... | // @flow
import React from 'react';
import Tabs from './tabs/Tabs';
import AddSwatchesPanel from './add-swatches/AddSwatchesPanel';
import AboutPanel from './about/AboutPanel';
import type { PaletteType } from '../../../types';
type Props = {
addNewSwatch: Function,
tabs: Array<string>,
activeTab: string,... | Remove unused eslint disable rules | [Refactor] Remove unused eslint disable rules
| JSX | isc | eddyerburgh/palette-picker,eddyerburgh/palette-picker | ---
+++
@@ -7,12 +7,12 @@
import type { PaletteType } from '../../../types';
type Props = {
- addNewSwatch: Function, // eslint-disable-line react/no-unused-prop-types
+ addNewSwatch: Function,
tabs: Array<string>,
activeTab: string,
switchActiveTab: Function,
- palettes: Array<PaletteTyp... |
c50fbb96590bbd9a768bdc29627c51e2e31df8c5 | app/javascript/components/meal/extras.jsx | app/javascript/components/meal/extras.jsx | import React from "react";
import { inject, observer } from "mobx-react";
const styles = {
main: {
padding: "1rem 0 0 1rem",
backgroundColor: "white"
},
open: {
visibility: "hidden"
},
closed: {},
title: {
textDecoration: "underline"
}
};
const Extras = inject("store")(
observer(({ sto... | import React from "react";
import { inject, observer } from "mobx-react";
const styles = {
main: {
padding: "1rem 0 0 1rem",
backgroundColor: "white"
},
open: {
visibility: "hidden"
},
closed: {},
title: {
textDecoration: "underline"
}
};
const Extras = inject("store")(
observer(({ sto... | Fix for unconrolled component warning due to initial null value | Fix for unconrolled component warning due to initial null value
| JSX | mit | joyvuu-dave/comeals-rewrite,joyvuu-dave/comeals-rewrite,joyvuu-dave/comeals-rewrite | ---
+++
@@ -29,9 +29,9 @@
key={val}
type="checkbox"
value={val}
- checked={store.meal && store.meal.extras === val}
+ checked={store.meal ? store.meal.extras === val : false}
onChange={e => store.meal.setExtras(e.target.... |
af2eb5823f9be6332f99a15c705fedf4f458b5bd | client/javascript/components/Document.jsx | client/javascript/components/Document.jsx | import React from 'react';
import classNames from 'classnames';
class Document extends React.Component {
render() {
const elementClasses = classNames({
'document': true,
'selected': this.props.selected
});
return (
<div className={elementClasses} onClick={this.props.onClick}>
<d... | import React from 'react';
import classNames from 'classnames';
class Document extends React.Component {
render() {
const elementClasses = classNames({
document: true,
selected: this.props.selected
});
return (
<div className={elementClasses} onClick={this.props.onClick}>
<div c... | Fix ESLint problem of property quotes | Fix ESLint problem of property quotes
| JSX | bsd-3-clause | zesik/insnota,zesik/insnota | ---
+++
@@ -4,8 +4,8 @@
class Document extends React.Component {
render() {
const elementClasses = classNames({
- 'document': true,
- 'selected': this.props.selected
+ document: true,
+ selected: this.props.selected
});
return (
<div className={elementClasses} onClick={th... |
f42c8f5da8d56a0bde3186340603432cdcd1311e | src/components/AtBat.jsx | src/components/AtBat.jsx | import React from 'react';
import { useSelector } from 'react-redux';
import { selectCurrentPlay } from '../features/games';
function AtBat() {
const currentPlay = useSelector(selectCurrentPlay);
const playEvents = currentPlay.playEvents;
const playResult = currentPlay.about.isComplete ? currentPlay.result.descr... | import React from 'react';
import { useSelector } from 'react-redux';
import { selectCurrentPlay } from '../features/games';
function AtBat() {
const currentPlay = useSelector(selectCurrentPlay);
const playEvents = currentPlay.playEvents;
const playResult = currentPlay.about.isComplete ? currentPlay.result.descr... | Move play result to top of at bat display | Move play result to top of at bat display
| JSX | mit | paaatrick/playball | ---
+++
@@ -6,27 +6,33 @@
const currentPlay = useSelector(selectCurrentPlay);
const playEvents = currentPlay.playEvents;
const playResult = currentPlay.about.isComplete ? currentPlay.result.description : '';
- const content = playEvents && playEvents.slice().reverse().map(event => {
- let line = '';
- ... |
270a103569aa44cd840dcbf467c3d108da32fad1 | templates/client/modules/core/components/home.jsx | templates/client/modules/core/components/home.jsx | import React from 'react';
const Home = React.createClass({
render() {
return (
<div>
<h1>Mantra</h1>
<p>
Welcome to Mantra 0.2.0.
</p>
<p>
<ul>
<li>
Read <a target="_blank" href="https://kadirahq.github.io/mantra/">spec</a>
... | import React from 'react';
const Home = () => (
<div>
<h1>Mantra</h1>
<p>
Welcome to Mantra 0.2.0.
</p>
<p>
<ul>
<li>
Read <a target="_blank" href="https://kadirahq.github.io/mantra/">spec</a>
</li>
<li>
Learn <a target="_blank" href="https://gi... | Use stateless component for autogenerated Home component | Use stateless component for autogenerated Home component
| JSX | mit | StorytellerCZ/mantra-cli,mcmunder/bija,mantrajs/mantra-cli,StorytellerCZ/mantra-cli,sungwoncho/mantra-cli,mantrajs/mantra-cli | ---
+++
@@ -1,26 +1,22 @@
import React from 'react';
-const Home = React.createClass({
- render() {
- return (
- <div>
- <h1>Mantra</h1>
- <p>
- Welcome to Mantra 0.2.0.
- </p>
- <p>
- <ul>
- <li>
- Read <a target="_blank" href="https:/... |
e54fb960ede199c173b0de1e165c273b288957aa | src/components/BoundingBox.jsx | src/components/BoundingBox.jsx | import React from 'react';
import {Shape, Group} from 'react-art';
import Colors from '../styles/Colors.js';
import {drawRectBetweenTwoPoints, PropTypes} from './utils/DrawingUtils.js';
/**
* A bounding box is a transparent box used to detect mouse events near a component.
*/
export default class BoundingBox exten... | import React from 'react';
import {Shape, Group} from 'react-art';
import Colors from '../styles/Colors.js';
import {drawRectBetweenTwoPoints, PropTypes} from './utils/DrawingUtils.js';
/**
* A bounding box is a transparent box used to detect mouse events near a component.
*/
export default class BoundingBox exten... | Handle having no handlers in bounding box | Handle having no handlers in bounding box
| JSX | epl-1.0 | circuitsim/circuit-simulator,circuitsim/circuit-simulator,circuitsim/circuit-simulator | ---
+++
@@ -13,14 +13,15 @@
render() {
const end1 = this.props.from,
end2 = this.props.to,
- boundingBoxPath = drawRectBetweenTwoPoints(end1, end2, this.props.width);
+ boundingBoxPath = drawRectBetweenTwoPoints(end1, end2, this.props.width),
+ handlers = this.props.handl... |
a2b399da0f27deee45b04f92fd07242d725cb20c | src/js/components/next-up/index.jsx | src/js/components/next-up/index.jsx | import debug from "debug";
import React, { Component } from "react";
import Session from "../session";
const log = debug("schedule:components:next-up");
export class NextUp extends Component {
render() {
const { getState } = this.props;
const { days, time: { today, now } } = getState();
l... | import debug from "debug";
import React, { Component } from "react";
import Track from "../track";
const log = debug("schedule:components:next-up");
export class NextUp extends Component {
render() {
const { getState } = this.props;
const { days, time: { today, now } } = getState();
let c... | Fix use track component in next-up view | Fix use track component in next-up view
| JSX | mit | orangecms/schedule,orangecms/schedule,nikcorg/schedule,orangecms/schedule,nikcorg/schedule,nikcorg/schedule | ---
+++
@@ -1,6 +1,6 @@
import debug from "debug";
import React, { Component } from "react";
-import Session from "../session";
+import Track from "../track";
const log = debug("schedule:components:next-up");
@@ -27,9 +27,8 @@
{
nextSessions.map(t => {
... |
b70198cb248e881e966f871e2eed0fd4b19bc7f9 | app/components/Header/index.jsx | app/components/Header/index.jsx | import React from 'react';
import './style';
import Auth from '../Auth';
import BoardSelector from '../BoardSelector';
import { asanaUrl } from '../../utils'
const Header = ({auth, projectName, projectId}) => {
let headerButton = <Auth />;
if (auth.isAsanaAuthed) {
let url = asanaUrl();
if (projectId !=... | import React from 'react';
import './style';
import Auth from '../Auth';
import BoardSelector from '../BoardSelector';
import { asanaUrl } from '../../utils'
const Header = ({auth, projectName, projectId}) => {
let headerButton = <Auth />;
if (auth.isAsanaAuthed) {
let url = asanaUrl();
if (projectId !=... | Hide projects button when not authed | Hide projects button when not authed
| JSX | isc | SmoofCreative/kasban,SmoofCreative/kasban | ---
+++
@@ -22,7 +22,7 @@
<header className="header">
<div className="pure-u-8-24">
<div className="header__breadcrumbs">
- <BoardSelector />
+ { auth.isAsanaAuthed && <BoardSelector /> }
<span className="header__current-project">{projectName}</span>
</div>
... |
1a580957821e21c9e6199b8b4e1543f64094ffb5 | src/views/join/join.jsx | src/views/join/join.jsx | const React = require('react');
const render = require('../../lib/render.jsx');
const JoinModal = require('../../components/modal/join/modal.jsx');
const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx');
// Require this even though we don't use it because, without it, webpack runs out of memo... | const React = require('react');
const render = require('../../lib/render.jsx');
const JoinModal = require('../../components/modal/join/modal.jsx');
const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx');
// Require this even though we don't use it because, without it, webpack runs out of memo... | Put values directly in render props. | Put values directly in render props.
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -5,14 +5,12 @@
// Require this even though we don't use it because, without it, webpack runs out of memory...
const Page = require('../../components/page/www/page.jsx'); // eslint-disable-line no-unused-vars
-const openModal = true;
-const showCloseButton = false;
const Register = () => (
<ErrorB... |
38ea352d45257a11e9e6b26ebf77bcd17d04e3c7 | 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
//deep merge is deep indeed
const getNextRoute = (router, offset) ... | 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
//deep merge is deep indeed
const getNextRoute = (router, offset) ... | Fix "Older items" for any page which is not Home | Fix "Older items" for any page which is not Home
Fixes #338.
| JSX | mit | FreeFeed/freefeed-html-react,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,clbn/freefeed-gamma,FreeFeed/freefeed-react-client,clbn/freefeed-gamma,kadmil/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,ujenjt/freefeed-react-client,kadmil/freef... | ---
+++
@@ -25,13 +25,13 @@
<ul className="pager p-pagination-controls">
{props.offset > 0 ?
<li>
- <Link to={{pathname:'', query: offsetObject(minOffset(props.offset))}}
+ <Link to={{pathname: props.location.pathname, query: offsetObject(minOffset(props.offset))}}
onClick=... |
4545a40a36063214fa9909f2e8e0e933f8358dcd | src/scrollto.jsx | src/scrollto.jsx | /**
* Created by Aaron on 12/21/2015.
*/
import * as React from 'react';
//Algorithm described here: https://cgd.io/2008/using-javascript-to-scroll-to-a-specific-elementobject/
function findPos( element ) {
var curtop = 0;
if( element.offsetParent ) {
do {
curtop += element.offsetTop;
... | /**
* Created by Aaron on 12/21/2015.
*/
import * as React from 'react';
//Algorithm described here: https://cgd.io/2008/using-javascript-to-scroll-to-a-specific-elementobject/
function findPos( element ) {
var curtop = 0;
if( element.offsetParent ) {
do {
curtop += element.offsetTop;
... | Test for position before scrolling to it | src: Test for position before scrolling to it
| JSX | mit | novacrazy/react-scrollto,novacrazy/react-scrollto | ---
+++
@@ -40,7 +40,9 @@
} else {
const pos = this.findPos( element );
- window.scroll( 0, pos );
+ if( pos ) {
+ window.scroll( 0, pos );
+ }
}
}
|
8f3f55783ce161d98d46d39a279ee3b69419a69a | src/connection/enterprise/hrd_screen.jsx | src/connection/enterprise/hrd_screen.jsx | import React from 'react';
import Screen from '../../core/screen';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
import HRDPane from './hrd_pane';
import { cancelHRD, logIn } from './actions';
import { enterpriseDomain, isSingleHRDConnection } from '../enterprise';
const Component = ... | import React from 'react';
import Screen from '../../core/screen';
import { renderSignedInConfirmation } from '../../core/signed_in_confirmation';
import HRDPane from './hrd_pane';
import { cancelHRD, logIn } from './actions';
import { enterpriseDomain, isSingleHRDConnection } from '../enterprise';
const Component = ... | Use i18n.html in HRD screen | Use i18n.html in HRD screen
| JSX | mit | mike-casas/lock,mike-casas/lock,mike-casas/lock | ---
+++
@@ -5,16 +5,16 @@
import { cancelHRD, logIn } from './actions';
import { enterpriseDomain, isSingleHRDConnection } from '../enterprise';
-const Component = ({model, t}) => {
- const headerText = t("enterpriseActiveLoginInstructions", {domain: enterpriseDomain(model)}) || null;
+const Component = ({i18n,... |
fb75cc8799da25ce69db2a9edb47df86f4f80e19 | app/components/Login.jsx | app/components/Login.jsx | import React from 'react'
import {Link} from 'react-router'
export const Login = ({ login }) => (
<div className="modal-login">
<nav>
<button className="btn bg-blue"><span className="icon icon-facebook-square"></span>Facebook</button>
<button className="btn bg-green"><span className="icon icon-googl... | import React from 'react'
import {Link} from 'react-router'
export const Login = ({ login }) => (
<div className="modal-login">
<nav>
<button className="btn bg-blue"><span className="icon icon-facebook-square"></span>Facebook</button>
<button className="btn bg-green"><span className="icon icon-googl... | Add link to signup page | Add link to signup page
| JSX | mit | galxzx/pegma,galxzx/pegma,galxzx/pegma | ---
+++
@@ -19,7 +19,7 @@
<div className="login-footer">
<p><Link href="#">Forgot Password?</Link></p>
- <p><Link href="#">Create account</Link></p>
+ <p><Link to="/signup">Create account</Link></p>
</div>
</div> |
5e2375848ae3bc4c7d37f74d83c9ce96663f2e18 | src/app/views/collections/CollectionsController.jsx | src/app/views/collections/CollectionsController.jsx | import React, { Component } from 'react';
import { connect } from 'react-redux'
import CollectionCreate from './create/CollectionCreate';
class Collections extends Component {
constructor(props) {
super(props);
}
render () {
return (
<div>
<div className="grid ... | import React, { Component } from 'react';
import { connect } from 'react-redux'
import CollectionCreate from './create/CollectionCreate';
class Collections extends Component {
constructor(props) {
super(props);
}
handleCollectionCreateSuccess() {
// route to collection details pane for ne... | Add temporary handle create success fucntions and corect heading text | Add temporary handle create success fucntions and corect heading text
| JSX | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -6,6 +6,11 @@
class Collections extends Component {
constructor(props) {
super(props);
+ }
+
+ handleCollectionCreateSuccess() {
+ // route to collection details pane for new collection
+ // update list of collections
}
render () {
@@ -17,8 +22,8 @@
... |
c2f23eda6529a9b9ea3f6c3216905e4d17b4e5a0 | app/assets/javascripts/components/nav.jsx | app/assets/javascripts/components/nav.jsx | import React from 'react';
import { slide as Menu } from 'react-burger-menu';
class Nav extends React.Component {
componentWillMount() {
this.updateDimensions();
}
componentDidMount() {
window.addEventListener("resize", this.updateDimensions);
}
componentWillUnmount() {
window.removeEventListen... | import React from 'react';
import { slide as Menu } from 'react-burger-menu';
const Nav = React.createClass({
// class Nav extends React.Component {
getInitialState() {
return {
width: $(window).width(),
height: $(window).height()
};
},
componentWillMount() {
this.updateDimensions();
}... | Create component calling createClass instead of extending the parent Component class. | Create component calling createClass instead of extending the parent Component class.
| JSX | mit | WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,majak... | ---
+++
@@ -1,26 +1,33 @@
import React from 'react';
import { slide as Menu } from 'react-burger-menu';
+const Nav = React.createClass({
+// class Nav extends React.Component {
-class Nav extends React.Component {
+ getInitialState() {
+ return {
+ width: $(window).width(),
+ height: $(window).heigh... |
5ff7f91715b533196dd336e99123d116dc857183 | client/src/components/UserNameInputBox.jsx | client/src/components/UserNameInputBox.jsx | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import { Card } from 'material-ui/Card';
import TextField from 'material-ui/TextField';
class UserNameInputBox extends React.Component {
constructor (props) {
super(props);
this.state = {
userName: '',
userNameExists:... | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import { Card } from 'material-ui/Card';
import TextField from 'material-ui/TextField';
class UserNameInputBox extends React.Component {
constructor (props) {
super(props);
this.state = {
userName: '',
userNameExists:... | Remove error message logic, move to parent component | Remove error message logic, move to parent component
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -8,7 +8,8 @@
super(props);
this.state = {
userName: '',
- userNameExists: false
+ userNameExists: false,
+ error: ''
};
this.change = this.change.bind(this);
@@ -32,7 +33,7 @@
return (
<div>
- <TextField type="text" floatingLabelText="Name" on... |
4ea0465131e37829b8e18a868ae4d61e7e5de65e | examples/modal/index.jsx | examples/modal/index.jsx | import React from 'react'
import ReactDOM from 'react-dom'
import ModalWindow from 'src/modal/window.jsx'
import Logger from 'src/utils/logger'
export default class FormExamples extends React.Component {
constructor(props) {
super(props)
this.state = {
modalEnabled: false
}
}
render() {
re... | import React from 'react'
import ReactDOM from 'react-dom'
import ModalWindow from 'src/modal/window.jsx'
import Logger from 'src/utils/logger'
export default class FormExamples extends React.Component {
constructor(props) {
super(props)
this.state = {
modalEnabled: false
}
}
render() {
re... | Fix typo in modals example | Fix typo in modals example
| JSX | mit | thinktopography/reframe,thinktopography/reframe | ---
+++
@@ -14,7 +14,7 @@
render() {
return (
<div>
- <h1>Forms</h1>
+ <h1>Modals</h1>
<button className="ui large primary button" onClick={this.showModal.bind(this)}>Show Modal</button>
{this.state.modalEnabled ? this.getModal() : null} |
d4b76f959b7010357f22112321fbdbad9352dafa | src/js/components/AppEmbedded.jsx | src/js/components/AppEmbedded.jsx | import React from 'react';
import Map from './Map';
import Editor from './Editor';
import Divider from './Divider';
import RefreshButton from './RefreshButton';
import { initTangramPlay } from '../tangram-play';
/**
* This class is identical to normal Tangram Play but represents an embedded version of the app
*/
ex... | import React from 'react';
import Map from './Map';
import Editor from './Editor';
import RefreshButton from './RefreshButton';
import { initTangramPlay } from '../tangram-play';
/**
* This class is identical to normal Tangram Play but represents an embedded version of the app
*/
export default class AppEmbedded ex... | Move divider element for EmbeddedApp | Move divider element for EmbeddedApp
| JSX | mit | tangrams/tangram-play,tangrams/tangram-play | ---
+++
@@ -1,7 +1,6 @@
import React from 'react';
import Map from './Map';
import Editor from './Editor';
-import Divider from './Divider';
import RefreshButton from './RefreshButton';
import { initTangramPlay } from '../tangram-play';
@@ -28,7 +27,6 @@
<div>
<Map panel... |
6abe37f0035e62565c574907854ce2ca94731826 | app/react/components/greeting/greeting.jsx | app/react/components/greeting/greeting.jsx | import React from "react";
export default React.createClass({
render: function() {
return (
<div className="jumbotron">
<h1>{this.props.header}</h1>
<p className="lead">{this.props.subHeader}</p>
</div>
);
}
});
| import React from "react";
export default class Greeting extends React.Component {
render() {
return (
<div className="jumbotron">
<h1>{this.props.header}</h1>
<p className="lead">{this.props.subHeader}</p>
</div>
);
}
}
| Make changes for es6 migrations | Greeting: Make changes for es6 migrations
See #613
| JSX | mpl-2.0 | mozilla/science.mozilla.org,mozilla/science.mozilla.org | ---
+++
@@ -1,7 +1,9 @@
import React from "react";
-export default React.createClass({
- render: function() {
+export default class Greeting extends React.Component {
+
+ render() {
+
return (
<div className="jumbotron">
<h1>{this.props.header}</h1>
@@ -9,4 +11,4 @@
</div>
);
... |
abf13ad06a257f0425699ed99049f19c690838c2 | src/components/Parameters.jsx | src/components/Parameters.jsx | /* global __WEBPACK__ */
import React from 'react';
import NumberEditor from 'react-number-editor';
if (__WEBPACK__) {
require('../../style/components/Parameters.less');
}
class Parameters extends React.Component {
render() {
return (
<div className="parameters">
<label>
... | /* global __WEBPACK__ */
import React from 'react';
import NumberEditor from 'react-number-editor';
if (__WEBPACK__) {
require('../../style/components/Parameters.less');
}
class Parameters extends React.Component {
render() {
return (
<div className="parameters">
<label>
... | Increase total limit (200000 isn't too slow) | Increase total limit (200000 isn't too slow)
| JSX | cc0-1.0 | acusti/primal-multiplication,acusti/primal-multiplication | ---
+++
@@ -10,7 +10,7 @@
return (
<div className="parameters">
<label>
- How many primes do you want to show? <NumberEditor min={1} max={100000} step={1} decimals={0} {...this.props} />
+ How many primes do you want to show? <NumberEditor m... |
a1a961f644a38b441549f66dbc2b6c4c107d4391 | src/client/components/TimeAgo/TimeAgo.jsx | src/client/components/TimeAgo/TimeAgo.jsx | import React, { Component, PropTypes } from 'react';
import moment from 'moment'
import Tooltip from '../Tooltip'
export default class TimeAgo extends Component {
constructor(props) {
super(props)
this._interval = setInterval(this.forceUpdate, props.refreshRate)
}
componentWillUnmount() {
... | import React, { Component, PropTypes } from 'react';
import moment from 'moment'
import Tooltip from '../Tooltip'
export default class TimeAgo extends Component {
constructor(props) {
super(props)
this.update = this.update.bind(this)
this._interval = setInterval(this.update, props.refreshRa... | Fix react bug forceUpdate in setInterval | Fix react bug forceUpdate in setInterval
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -5,7 +5,8 @@
export default class TimeAgo extends Component {
constructor(props) {
super(props)
- this._interval = setInterval(this.forceUpdate, props.refreshRate)
+ this.update = this.update.bind(this)
+ this._interval = setInterval(this.update, props.refreshRate)
... |
bd50f1db3fc4a8da919a9ff52eac4f32ec9ec966 | components/font_icon/index.jsx | components/font_icon/index.jsx | /* global React */
import { addons } from 'react/addons';
import style from './style';
import CSSModules from 'react-css-modules';
const FontIcon = React.createClass({
mixins: [addons.PureRenderMixin],
displayName: 'FontIcon',
propTypes: {
className: React.PropTypes.string,
value: React.PropTypes.stri... | /* global React */
import { addons } from 'react/addons';
import style from './style';
export default React.createClass({
mixins: [addons.PureRenderMixin],
displayName: 'FontIcon',
propTypes: {
className: React.PropTypes.string,
value: React.PropTypes.string
},
getDefaultProps () {
return {
... | Remove react css modules from font ico | Remove react css modules from font ico
| JSX | mit | jasonleibowitz/react-toolbox,showings/react-toolbox,showings/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,react-toolbox/react-toolbox,jasonleibowitz/react-toolbox,Magneticmagnum/react-atlas,rubenmoya/react-toolbox,react-toolbox/react-toolbox,soyja... | ---
+++
@@ -2,9 +2,8 @@
import { addons } from 'react/addons';
import style from './style';
-import CSSModules from 'react-css-modules';
-const FontIcon = React.createClass({
+export default React.createClass({
mixins: [addons.PureRenderMixin],
displayName: 'FontIcon',
@@ -27,15 +26,8 @@
},
rend... |
2ee6ab9c4b084c5912efa92fa71ac246bcbd83f4 | app.jsx | app.jsx | var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var RouteHandler = Router.RouteHandler;
var About = React.createClass({
render: function () {
return <h2>About</h2>;
}
});
var Inbox = React.createClass({
render: function () {
return <h2>Inbox</h2>;
}
});
v... | var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var RouteHandler = Router.RouteHandler;
var About = React.createClass({
render: function () {
return <h2>About</h2>;
}
});
var Inbox = React.createClass({
render: function () {
return <h2>Inbox</h2>;
}
});
v... | Update routes to use HTML History API! | Update routes to use HTML History API!
| JSX | mit | AgtLucas/rrr,AgtLucas/rrr | ---
+++
@@ -48,6 +48,6 @@
}
});
-Router.run(routes, Router.HashLocation, (Root) => {
+Router.run(routes, Router.HistoryLocation, (Root) => {
React.render(<Root />, document.body);
}); |
bd0d7dafb2af6d7f147039b10f5e61073235cc4d | src/page-viewer/index.jsx | src/page-viewer/index.jsx | import React, { PropTypes } from 'react'
export const localVersionAvailable = ({page}) => (
!!page.html
)
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
href={`data:text/html;charset=UTF-8,${page.html}`}
title='Stored text version available'
{...props}
>
... | import React, { PropTypes } from 'react'
export const localVersionAvailable = ({page}) => (
!!page.html
)
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
href={URL.createObjectURL(new Blob([page.html], {type: 'text/html;charset=UTF-8'}))}
title='Stored text version avail... | Use blob URI for saved version href. | Use blob URI for saved version href.
| JSX | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -6,7 +6,7 @@
export const LinkToLocalVersion = ({page, children, ...props}) => (
<a
- href={`data:text/html;charset=UTF-8,${page.html}`}
+ href={URL.createObjectURL(new Blob([page.html], {type: 'text/html;charset=UTF-8'}))}
title='Stored text version available'
{...p... |
e9b4cd9a17a1e559804d4599a579604a32e0a69c | src/js/components/DuplicableRowControls.jsx | src/js/components/DuplicableRowControls.jsx | import classNames from "classnames";
import React from "react/addons";
var DuplicableRowControls = React.createClass({
displayName: "DuplicableRowControls",
propTypes: {
disableRemoveButton: React.PropTypes.bool,
handleAddRow: React.PropTypes.func.isRequired,
handleRemoveRow: React.PropTypes.func.isReq... | import classNames from "classnames";
import React from "react/addons";
var DuplicableRowControls = React.createClass({
displayName: "DuplicableRowControls",
propTypes: {
disableRemoveButton: React.PropTypes.bool,
handleAddRow: React.PropTypes.func.isRequired,
handleRemoveRow: React.PropTypes.func.isReq... | Add `type="button"` to prevent event hijacking | Add `type="button"` to prevent event hijacking
| JSX | apache-2.0 | mesosphere/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui | ---
+++
@@ -18,12 +18,15 @@
return (
<div className="controls">
- <button className={removeButtonClassSet}
+ <button type="button"
+ className={removeButtonClassSet}
onClick={this.props.handleRemoveRow}>
<i className="icon ion-ios-minus-outline"/>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.