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 |
|---|---|---|---|---|---|---|---|---|---|---|
a4718b967fd67d69aac0f2120d728a7cce3b28fa | src/DirectChat.test.jsx | src/DirectChat.test.jsx | import React from 'react';
import { shallow } from 'enzyme';
import DirectChat from './DirectChat';
test('Passes message on form submit', () => {
const message = 'hey!';
let received = null;
const wrapper = shallow(<DirectChat
style="primary"
onSubmitMessage={(val) => { received = val; }}
/>);
wrappe... | import React from 'react';
import { shallow, mount } from 'enzyme';
import DirectChat from './DirectChat';
test('Passes message on form submit', () => {
const message = 'hey!';
let received = null;
const wrapper = shallow(<DirectChat
style="primary"
onSubmitMessage={(val) => { received = val; }}
/>);
... | Test DirectChat receiving contact toggle | Test DirectChat receiving contact toggle
| JSX | mit | react-admin-lte/react-admin-lte,jonmpqts/reactjs-admin-lte,react-admin-lte/react-admin-lte | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import { shallow } from 'enzyme';
+import { shallow, mount } from 'enzyme';
import DirectChat from './DirectChat';
test('Passes message on form submit', () => {
@@ -19,3 +19,43 @@
});
expect(received).toEqual(message);
});
+
+class ToggleContacts extends... |
cc0436ae92ca2a2124d7e4a9ce79990106d39cef | imports/ui/structure-view/element-tree.jsx | imports/ui/structure-view/element-tree.jsx | import React, { PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Elements from '../../api/elements.js';
import Element from './element.jsx';
import AddElementButton from './add-element-button.jsx';
const addElementButtonDivStyle = {
border: '1px solid #ddd',
backgroundCo... | import React, { PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Elements from '../../api/elements.js';
import Element from './element.jsx';
import AddElementButton from './add-element-button.jsx';
import { Panel } from 'react-bootstrap';
const elementTreeHeader = () => (
... | Make element tree use bootstrap panel and refactor to aline with coding style | Make element tree use bootstrap panel and refactor to aline with coding style
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -3,40 +3,29 @@
import Elements from '../../api/elements.js';
import Element from './element.jsx';
import AddElementButton from './add-element-button.jsx';
+import { Panel } from 'react-bootstrap';
-const addElementButtonDivStyle = {
- border: '1px solid #ddd',
- backgroundColor: '#F8F8F8',
- paddin... |
84d24ebc40ec6923dcce9ebed7c19aca7c7f4a05 | assets/js/view/bemvindo/BemVindoView.jsx | assets/js/view/bemvindo/BemVindoView.jsx | class BemVindoView extends React.Component {
/** Esqueleto de objeto que deve ser passado como parâmetro. */
props = {
pessoa: {
nome: "",
sobrenome: ""
}
}
constructor(props) {
super(props);
this.props = props;
}
exibeNomePessoa(pessoa) {
var texto = "";
pessoa.sobre... | class BemVindoView extends React.Component {
/** Esqueleto de objeto que deve ser passado como parâmetro. */
// props = {
// pessoa: {
// nome: "",
// sobrenome: ""
// }
// }
exibeNomePessoa(pessoa) {
var texto = "";
pessoa.sobrenome ? (
texto = pessoa.nome + ' ' + pessoa.sob... | Remove override desnecessário do constructor de React.Component | Remove override desnecessário do constructor de React.Component
(por causa de um override de props em BemVindoView estava sendo necessário criar um constructor interno, mas isso só é necessário quando se quer definir state inicial e/ou fazer bind de métodos onClick)
| JSX | mit | gustavosotnas/SandboxReact,gustavosotnas/SandboxReact | ---
+++
@@ -1,18 +1,12 @@
class BemVindoView extends React.Component {
/** Esqueleto de objeto que deve ser passado como parâmetro. */
- props = {
- pessoa: {
- nome: "",
- sobrenome: ""
- }
- }
-
- constructor(props) {
- super(props);
-
- this.props = props;
- }
+ // props = {
+ // ... |
4aed1177fc81f84812a5e5dbff7dce72d692a629 | test/common/components/DropDown.unit.spec.jsx | test/common/components/DropDown.unit.spec.jsx | import React from 'react';
import SkinDeep from 'skin-deep';
import { expect } from 'chai';
import DropDown from '../../../src/js/common/components/DropDown.jsx';
describe('<DropDown>', () => {
const props = {
buttonText: 'Button text',
clickHandler: () => {},
contents: (<h1>Hi</h1>),
cssClass: 'tes... | import React from 'react';
import ReactDOM from 'react-dom';
import { expect } from 'chai';
import sinon from 'sinon';
import DropDown from '../../../src/js/common/components/DropDown.jsx';
describe('<DropDown>', () => {
const clickHandler = sinon.stub();
const container = window.document.createElement('div');
... | Add test cases for closing dropdowns when a different element is clicked | Add test cases for closing dropdowns when a different element is clicked
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -1,13 +1,22 @@
import React from 'react';
-import SkinDeep from 'skin-deep';
+import ReactDOM from 'react-dom';
import { expect } from 'chai';
+import sinon from 'sinon';
import DropDown from '../../../src/js/common/components/DropDown.jsx';
describe('<DropDown>', () => {
+
+ const clickHandler = ... |
b4acabcfd135551fb19ebbfc273ce3099097f79d | app/assets/javascripts/components/ListItem.jsx | app/assets/javascripts/components/ListItem.jsx | var ListItem = React.createClass({
mixins: [FluxMixin],
inputChange: function(event) {
this.state.hasChanged = true;
this.setState({ value: event.target.value });
},
saveData: function() {
// this.getFlux().actions.updateIngredient(this.props.ingredient, $(this.refs.ingredient.getDOMNode()).val())... | var ListItem = React.createClass({
mixins: [FluxMixin],
inputChange: function(event) {
this.state.hasChanged = true;
this.setState({ value: event.target.value });
},
saveData: function() {
// this.getFlux().actions.updateIngredient(this.props.ingredient, $(this.refs.ingredient.getDOMNode()).val())... | Add image and link to list item template. | Add image and link to list item template.
| JSX | mit | krisimmig/mytopten,kirillis/mytopten,kirillis/mytopten,kirillis/mytopten,krisimmig/mytopten,krisimmig/mytopten | ---
+++
@@ -30,6 +30,8 @@
return (
<li className={ classes }>
<p className="c-listItem__title">{ this.props.data.title }</p>
+ <a href={ this.props.data.link } className="c-listItem__link">link</a>
+ <img src={ this.props.data.image_url } className="c-listItem__link" />
<in... |
4e5404d7ae9c2bc970e185eb38250816c97e8836 | lib/jsx/layerSVG.jsx | lib/jsx/layerSVG.jsx | /*global $, app, File, localize, params, svg */
// Required params:
// - layerID: ID of layer to generate SVG info for
// - layerFilename: name to write the SVG file to.
// "File" is an ExtendScript global that does not require the use of "new".
var appFolder = { Windows: "/", Macintosh: "/Adobe Photoshop CC.app/... | /*global $, app, File, localize, params, svg */
// Required params:
// - layerID: ID of layer to generate SVG info for
// - layerFilename: name to write the SVG file to.
// - layerScale: amount to scale SVG (value of 1 generates no scaling code).
// "File" is an ExtendScript global that does not require the use... | Add support for SVG scaling. | Add support for SVG scaling.
| JSX | mit | camikazegreen/photoshop-scrambler,camikazegreen/photoshop-scrambler,adobe-photoshop/generator-core,camikazegreen/photoshop-scrambler,codeorelse/generator-core,MikkoH/generator-core,alesitalugo/generator-core,kristjanmik/generator-assets | ---
+++
@@ -3,11 +3,12 @@
// Required params:
// - layerID: ID of layer to generate SVG info for
// - layerFilename: name to write the SVG file to.
+// - layerScale: amount to scale SVG (value of 1 generates no scaling code).
// "File" is an ExtendScript global that does not require the use of "new".
var... |
795520c92400c62a8e43fcd4e3db4c843e5cd3d5 | imports/modules/app/components/Index.jsx | imports/modules/app/components/Index.jsx | import React from 'react';
import { Jumbotron } from 'react-bootstrap';
const Index = () => (
<div className="Index">
<Jumbotron className="text-center">
<h2>Rock</h2>
<p>A starting point for Meteor applications.</p>
<p><a className="btn btn-success" href="https://github.com/ggallon/rock" targe... | import React from 'react';
import { Jumbotron } from 'react-bootstrap';
const Index = () => (
<div className="Index">
<Jumbotron className="text-center">
<h2>Rock</h2>
<p>A starting point for Meteor applications.</p>
<p><a className="btn btn-success" href="https://github.com/ggallon/rock" role=... | Remove target="_blank" to index component | Remove target="_blank" to index component
| JSX | mit | ggallon/rock,ggallon/rock | ---
+++
@@ -6,7 +6,7 @@
<Jumbotron className="text-center">
<h2>Rock</h2>
<p>A starting point for Meteor applications.</p>
- <p><a className="btn btn-success" href="https://github.com/ggallon/rock" target="_blank" role="button">Read the Documentation</a></p>
+ <p><a className="btn btn-suc... |
94fadbd088d94638ce2bf821ccc30acb965fee68 | assets/js/components/atoms/SurveyCompletionIndicatorHeart.jsx | assets/js/components/atoms/SurveyCompletionIndicatorHeart.jsx | import React, { PropTypes, Component } from 'react'
const style = {
outerHeart: {
backgroundImage: 'url("/img/gray-heart.svg")',
backgroundRepeat: 'no-repeat',
backgroundSize: 'contain',
height: 48,
width: 52,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
inne... | import React, { PropTypes, Component } from 'react'
const style = {
outerHeart: {
backgroundImage: 'url("/img/gray-heart.svg")',
backgroundRepeat: 'no-repeat',
backgroundSize: 'contain',
height: 48,
width: 52
},
innerHeart: {
transition: 'all 2s ease-in-out',
backgroundImage: 'url("/i... | Improve smoothness of heart-growing animation by using css3 scaling. | Improve smoothness of heart-growing animation by using css3 scaling.
| JSX | mit | Code4HR/okcandidate,stanzheng/okcandidate | ---
+++
@@ -6,18 +6,15 @@
backgroundRepeat: 'no-repeat',
backgroundSize: 'contain',
height: 48,
- width: 52,
- display: 'flex',
- justifyContent: 'center',
- alignItems: 'center'
+ width: 52
},
innerHeart: {
- transition: 'height 2s, width 2s',
+ transition: 'all 2s ease-in-o... |
7758cf2a610581f3d93f0857e7ab55a9a0a8bff7 | internal_packages/theme-picker/spec/theme-picker-spec.jsx | internal_packages/theme-picker/spec/theme-picker-spec.jsx | import React from 'react';
const ReactTestUtils = React.addons.TestUtils;
import ThemePackage from '../../../src/theme-package';
import ThemePicker from '../lib/theme-picker';
const {resourcePath} = NylasEnv.getLoadSettings();
const light = new ThemePackage(resourcePath + '/internal_packages/ui-light');
const dark = ... | import React from 'react';
const ReactTestUtils = React.addons.TestUtils;
import ThemePackage from '../../../src/theme-package';
import ThemePicker from '../lib/theme-picker';
const {resourcePath} = NylasEnv.getLoadSettings();
const light = new ThemePackage(resourcePath + '/internal_packages/ui-light');
const dark = ... | Remove filter for theme picker spec | spec(theme-picker): Remove filter for theme picker spec
| JSX | mit | nylas/nylas-mail,nylas-mail-lives/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,nylas/nylas-mail,nirmit/nylas-mail,simonft/nylas-mail,simonft/nylas-mail,nylas/nylas-mail,nylas/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,simonft/nylas-mail,nirmit/ny... | ---
+++
@@ -8,7 +8,7 @@
const light = new ThemePackage(resourcePath + '/internal_packages/ui-light');
const dark = new ThemePackage(resourcePath + '/internal_packages/ui-dark');
-fdescribe('ThemePicker', ()=> {
+describe('ThemePicker', ()=> {
beforeEach(()=> {
spyOn(ThemePicker.prototype, '_setActiveTheme... |
0dc1ee91333858df79dce97d1c2b6a52d36a4088 | frontend/src/metabase/components/Icon.jsx | frontend/src/metabase/components/Icon.jsx | /*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes... | /*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes... | Fix "Cannot read property 'attrs' of undefined" when icon is missing | Fix "Cannot read property 'attrs' of undefined" when icon is missing
| JSX | agpl-3.0 | blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase | ---
+++
@@ -20,6 +20,9 @@
render() {
const icon = loadIcon(this.props.name);
+ if (!icon) {
+ return null;
+ }
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
@@ -31,9 +34,7 @@
props.height *= props.scale;
}
... |
3d08fba6efd006d6df1d66336851fb4067979e13 | app/assets/javascripts/components/activity/upload_table.jsx | app/assets/javascripts/components/activity/upload_table.jsx | import React from 'react';
import TransitionGroup from 'react-addons-css-transition-group';
import Loading from '../common/loading.cjsx';
import Upload from '../uploads/upload.cjsx';
const UploadTable = React.createClass({
displayName: 'UploadTable',
propTypes: {
loading: React.PropTypes.bool,
uploads: Re... | import React from 'react';
import Loading from '../common/loading.cjsx';
import Upload from '../uploads/upload.cjsx';
const UploadTable = React.createClass({
displayName: 'UploadTable',
propTypes: {
loading: React.PropTypes.bool,
uploads: React.PropTypes.array,
headers: React.PropTypes.array
},
g... | Fix styling and remove unused code from UploadTable | Fix styling and remove unused code from UploadTable
| JSX | mit | Wowu/WikiEduDashboard,KarmaHater/WikiEduDashboard,alpha721/WikiEduDashboard,MusikAnimal/WikiEduDashboard,majakomel/WikiEduDashboard,majakomel/WikiEduDashboard,MusikAnimal/WikiEduDashboard,MusikAnimal/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,feelfree... | ---
+++
@@ -1,5 +1,4 @@
import React from 'react';
-import TransitionGroup from 'react-addons-css-transition-group';
import Loading from '../common/loading.cjsx';
import Upload from '../uploads/upload.cjsx';
@@ -45,21 +44,14 @@
const ths = this._renderHeaders();
return (
- <table className="acti... |
515596b077fa469da43f04499d2c3788a81c28c4 | app/AmountSpent.jsx | app/AmountSpent.jsx | import React, { Component, PropTypes } from 'react';
class AmountSpent extends Component {
static propTypes = {
amountEarned: PropTypes.number,
amountSpent: PropTypes.number
};
render() {
const { amountEarned, amountSpent } = this.props;
const balance = amountEarned - amountSpent;
return (... | import React, { Component, PropTypes } from 'react';
class AmountSpent extends Component {
static propTypes = {
amountEarned: PropTypes.number,
amountSpent: PropTypes.number
};
renderBalance() {
const { amountEarned, amountSpent } = this.props;
const balance = amountEarned - amountSpent;
co... | Add styles for Balance amount | Add styles for Balance amount
| JSX | mit | kwonghow/toto-app,kwonghow/toto-app | ---
+++
@@ -6,16 +6,27 @@
amountSpent: PropTypes.number
};
- render() {
+ renderBalance() {
const { amountEarned, amountSpent } = this.props;
const balance = amountEarned - amountSpent;
+ const positive = balance >= 0;
+
+ const style = {
+ color: positive ? '#007f00' : '#df0000',
+... |
19192e58750aa1aead728322035c6df5b809f4a5 | frontend/src/components/icons/NightModeIcon.jsx | frontend/src/components/icons/NightModeIcon.jsx | import React from "react";
import Icon from "metabase/components/Icon.jsx";
const NightModeIcon = (props) =>
<Icon name={props.isNightMode ? "moon" : "sun"} {...props} />
export default NightModeIcon;
| import React from "react";
import Icon from "metabase/components/Icon.jsx";
const NightModeIcon = (props) =>
<Icon name={props.isNightMode ? "sun" : "moon"} {...props} />
export default NightModeIcon;
| Swap sun/moon in night mode icon | Swap sun/moon in night mode icon
| JSX | agpl-3.0 | blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase | ---
+++
@@ -3,6 +3,6 @@
import Icon from "metabase/components/Icon.jsx";
const NightModeIcon = (props) =>
- <Icon name={props.isNightMode ? "moon" : "sun"} {...props} />
+ <Icon name={props.isNightMode ? "sun" : "moon"} {...props} />
export default NightModeIcon; |
eb5850256d52d07703b692694a8207a34448c33c | 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';
class UserNameInputBox extends React.Component {
constructor (props) {
super(props);
this.state = {
userName: '',
userNameExists: false
};
this.change = this.change.bi... | 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:... | Change input to TextInput and button styling | Change input to TextInput and button styling
| JSX | mit | SentinelsOfMagic/SentinelsOfMagic | ---
+++
@@ -1,6 +1,7 @@
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) {
@@ -30,9 +31,9 @@
return (
<div... |
1eaaba1bf504ac65997607955b3ec46ed0ddc0ab | imports/ui/structure-view/element-name.jsx | imports/ui/structure-view/element-name.jsx | import React from 'react';
import Elements from '../../api/elements.js';
import InplaceEdit from '../components/inplace-edit.jsx';
export default class ElementName extends React.Component {
constructor(props) {
super(props);
this.setName = this.setName.bind(this);
}
setName(text) {
Elements.setName(... | import React from 'react';
import Elements from '../../api/elements.js';
import InplaceEdit from '../components/inplace-edit.jsx';
const setName = (elementId, text) => {
Elements.setName(elementId, text);
};
const elementName = (name) => {
if (name.length === 0) {
return 'name';
}
return name;
};
const E... | Change react component to stateless function | Change react component to stateless function
| JSX | mit | minden/data-furnace,minden/data-furnace | ---
+++
@@ -2,37 +2,32 @@
import Elements from '../../api/elements.js';
import InplaceEdit from '../components/inplace-edit.jsx';
-export default class ElementName extends React.Component {
- constructor(props) {
- super(props);
- this.setName = this.setName.bind(this);
+const setName = (elementId, text) =... |
2ff47b6337fa264153aa6f8015847514ee053102 | web/static/js/components/grouping_stage.jsx | web/static/js/components/grouping_stage.jsx | import React from "react"
import LowerThird from "./lower_third"
import styles from "./css_modules/idea_generation_stage.css"
export default props => {
return (
<div className={styles.wrapper}>
<div style={{ flex: 1 }} />
<LowerThird {...props} />
</div>
)
}
| import React from "react"
import { Preview } from "react-dnd-multi-backend"
import LowerThird from "./lower_third"
import styles from "./css_modules/idea_generation_stage.css"
// specification for rendering a drag preview on touch devices
// https://github.com/LouisBrunner/dnd-multi-backend/tree/master/packages/reac... | Add drag preview to grouping stage | Add drag preview to grouping stage
| JSX | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro | ---
+++
@@ -1,13 +1,22 @@
import React from "react"
+import { Preview } from "react-dnd-multi-backend"
import LowerThird from "./lower_third"
+
import styles from "./css_modules/idea_generation_stage.css"
+
+// specification for rendering a drag preview on touch devices
+// https://github.com/LouisBrunner/dnd-mu... |
0230dd0885c6ef97b20bad74a7c60ae958dcd3dc | src/modules/PostPreview/index.jsx | src/modules/PostPreview/index.jsx | import React, {Component, PropTypes} from "react"
import Avatars from "../Avatars"
import AuthorsList from "../AuthorsList"
import formatDate from "../formatDate"
export default class PostPreview extends Component {
static displayName = "PostPreview"
static contextTypes = {
i18n: PropTypes.object,
}
s... | import React, {Component, PropTypes} from "react"
import Avatars from "../Avatars"
import AuthorsList from "../AuthorsList"
import formatDate from "../formatDate"
export default class PostPreview extends Component {
static displayName = "PostPreview"
static contextTypes = {
i18n: PropTypes.object,
}
s... | Use url field instead of route | Use url field instead of route
Close #380
| JSX | mit | putaindecode/putaindecode.fr,putaindecode/putaindecode.fr,putaindecode/putaindecode.io,revolunet/putaindecode.fr,putaindecode/putaindecode.fr,revolunet/putaindecode.fr,revolunet/putaindecode.fr | ---
+++
@@ -27,7 +27,7 @@
<a
className="putainde-Link putainde-List-title"
- href={post.route}
+ href={post.url}
>
{post.title}
</a> |
5acc71f47495a45b70fcc4446aea41ef89f14c13 | pages/Filter/spec.jsx | pages/Filter/spec.jsx | import React from 'react';
import { Provider } from 'react-redux';
import configureStore from 'redux-mock-store';
import { MockedView } from 'Components/View/mock';
import { mount } from 'enzyme';
import mockRenderOptions from '@shopgate/pwa-common/helpers/mocks/mockRenderOptions';
import {
mockedState,
mockedEmpty... | import React from 'react';
import { Provider } from 'react-redux';
import configureStore from 'redux-mock-store';
import { MockedView } from 'Components/View/mock';
import { mount } from 'enzyme';
import mockRenderOptions from '@shopgate/pwa-common/helpers/mocks/mockRenderOptions';
import {
mockedState,
mockedEmpty... | Add portals to prices on category page | PWA-218: Add portals to prices on category page
- unit test
| JSX | apache-2.0 | shopgate/theme-gmd | ---
+++
@@ -16,6 +16,7 @@
/**
* Creates component
* @return {ReactWrapper}
+ * @param {Object} state Component state
*/
const createComponent = (state) => {
/* eslint-disable global-require */ |
9761e2d865bb462e340865537feecc16e0a5157f | src/dataaccess/FHIRApiDataSource.jsx | src/dataaccess/FHIRApiDataSource.jsx | import IDataSource from './IDataSource';
import PatientRecord from '../patient/PatientRecord';
import hardCodedFHIRPatient from './HardCodedFHIRPatient.json';
// import request from 'sync-request';
class FHIRApiDataSource extends IDataSource {
getPatient(id) {
// REST Call to get FHIR patient from Syntheti... | import IDataSource from './IDataSource';
import PatientRecord from '../patient/PatientRecord';
import hardCodedFHIRPatient from './HardCodedFHIRPatient.json';
import request from 'sync-request';
class FHIRApiDataSource extends IDataSource {
getPatient(id) {
// REST Call to get FHIR patient from SyntheticMA... | Add line to parse result from REST call to SyntheticMASS. | Add line to parse result from REST call to SyntheticMASS.
| JSX | apache-2.0 | standardhealth/flux,standardhealth/flux | ---
+++
@@ -1,7 +1,7 @@
import IDataSource from './IDataSource';
import PatientRecord from '../patient/PatientRecord';
import hardCodedFHIRPatient from './HardCodedFHIRPatient.json';
-// import request from 'sync-request';
+import request from 'sync-request';
class FHIRApiDataSource extends IDataSource {
g... |
5189458de4fc99abad5ca98df9871098b0c977f7 | packages/lesswrong/components/common/LoadMore.jsx | packages/lesswrong/components/common/LoadMore.jsx | import { registerComponent, Components } from 'meteor/vulcan:core';
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import { queryIsUpdating } from './queryStatusUtils'
const styles = theme => ({
root: {
...theme.typography.body2,
...them... | import { registerComponent, Components } from 'meteor/vulcan:core';
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import { queryIsUpdating } from './queryStatusUtils'
import {useTracking} from "../../lib/analyticsEvents";
const styles = theme => ... | Add click tracking to load more button | Add click tracking to load more button
| JSX | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope | ---
+++
@@ -3,6 +3,7 @@
import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import { queryIsUpdating } from './queryStatusUtils'
+import {useTracking} from "../../lib/analyticsEvents";
const styles = theme => ({
root: {
@@ -21,12 +22,15 @@
const LoadMore = ({ load... |
2e58f59fe306890288ede0235d8203f0b6d40159 | Todo-Redux/app/components/TodoTask.jsx | Todo-Redux/app/components/TodoTask.jsx | import React from 'react';
import { connect } from 'react-redux';
import moment from 'moment';
import { toggleTask } from 'actions';
export var TodoTask = React.createClass({
render() {
var { id, text, completed, createdAt, completedAt, dispatch } = this.props,
taskClassName = completed ? ... | import React from 'react';
import { connect } from 'react-redux';
import moment from 'moment';
import { toggleTask } from 'actions';
export var TodoTask = React.createClass({
render() {
var { id, text, completed, createdAt, completedAt, dispatch, priority } = this.props,
taskClassName = co... | Add priority display for task text | Add priority display for task text
| JSX | mit | JulianNicholls/Complete-React-Web-App,JulianNicholls/Complete-React-Web-App | ---
+++
@@ -6,7 +6,7 @@
export var TodoTask = React.createClass({
render() {
- var { id, text, completed, createdAt, completedAt, dispatch } = this.props,
+ var { id, text, completed, createdAt, completedAt, dispatch, priority } = this.props,
taskClassName = completed ? 'task task-completed' : 't... |
9a9fadc63ca711609a56a5f949d1cc5c0f2d202f | front/app/utils.jsx | front/app/utils.jsx | function getUrlParams() {
var queryDict = {};
location.search.substr(1).split("&")
.forEach(function(item) {
queryDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1]);
});
return queryDict;
}
function jsonPostRequest(url) {
var request = new XMLHttpRequest();
... | function getUrlParams() {
var queryDict = {};
location.search.substr(1).split("&")
.forEach(function(item) {
queryDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1].replace(/\+/g, " "));
});
return queryDict;
}
function jsonPostRequest(url) {
var request = new... | Fix problem with additional spaces | Fix problem with additional spaces
| JSX | mit | otraczyk/gsevol-web,otraczyk/gsevol-web,otraczyk/gsevol-web,otraczyk/gsevol-web | ---
+++
@@ -2,7 +2,7 @@
var queryDict = {};
location.search.substr(1).split("&")
.forEach(function(item) {
- queryDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1]);
+ queryDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1].replace(/\+/g, " "));
... |
467a31e2bb4ecc753fd6f5f75f862ed4dc8e50b7 | app/assets/javascripts/components/resources/resources.jsx | app/assets/javascripts/components/resources/resources.jsx |
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import CourseLink from '../common/course_link.jsx';
import { getWeeksArray } from '../../selectors';
const Resources = ({ weeks }) => {
const blocks = _.flatten(weeks.map(week => week.blocks));
const modules = _.flatten(bl... |
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import CourseLink from '../common/course_link.jsx';
import { getWeeksArray } from '../../selectors';
import TrainingModules from '../timeline/training_modules';
const Resources = ({ weeks }) => {
const blocks = _.flatten(week... | Use TrainingModules component to show assigned modules | Use TrainingModules component to show assigned modules
| JSX | mit | WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ---
+++
@@ -5,27 +5,18 @@
import CourseLink from '../common/course_link.jsx';
import { getWeeksArray } from '../../selectors';
-
+import TrainingModules from '../timeline/training_modules';
const Resources = ({ weeks }) => {
const blocks = _.flatten(weeks.map(week => week.blocks));
- const modules = _.flat... |
0de5fa73f96a1c2f0effaa98670467aa48d75718 | index.jsx | index.jsx | import React, {PropTypes} from 'react';
export const Radio = React.createClass({
displayName: 'Radio',
contextTypes: {
radioGroup: React.PropTypes.object
},
render: function() {
const {name, selectedValue, onChange} = this.context.radioGroup;
const optional = {};
if(selectedValue !== undefine... | import React, {PropTypes} from 'react';
export class Radio extends React.Component {
static displayName = 'Radio';
static contextTypes = {
radioGroup: React.PropTypes.object
};
render() {
const {name, selectedValue, onChange} = this.context.radioGroup;
const optional = {};
if(selectedValue !=... | Convert to es6 class per React 15.5 deprecation warning | Convert to es6 class per React 15.5 deprecation warning
| JSX | mit | chenglou/react-radio-group,chenglou/react-radio-group | ---
+++
@@ -1,13 +1,13 @@
import React, {PropTypes} from 'react';
-export const Radio = React.createClass({
- displayName: 'Radio',
+export class Radio extends React.Component {
+ static displayName = 'Radio';
- contextTypes: {
+ static contextTypes = {
radioGroup: React.PropTypes.object
- },
+ };
-... |
df198c7f35f6bb05f55be9a3afc985dfb5a9ec44 | src/request/components/request-entry-item-view.jsx | src/request/components/request-entry-item-view.jsx | var React = require('react');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
<tr>
<td rowSpa... | var React = require('react');
Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
var entry = this.props.entry;
return (
<div className="request-entry-item-holder">
<table className="table table-bordered">
... | Add timeago component to the request list | Add timeago component to the request list
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -1,4 +1,5 @@
var React = require('react');
+ Timeago = require('../../lib/components/timeago.jsx');
module.exports = React.createClass({
render: function() {
@@ -8,9 +9,10 @@
<table className="table table-bordered">
<tr>
<td rowSpan... |
930e798eeba56302fd92ab52c7d2a62adedf30aa | src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx | src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx | import React from 'react'
import { storiesOf } from '@storybook/react'
import NewWindowLink from 'NewWindowLink'
const stories = storiesOf('NewWindowLink')
stories.add('Default', () => (
<NewWindowLink href="https://example.com">This is a link</NewWindowLink>
))
| import React from 'react'
import { storiesOf } from '@storybook/react'
import NewWindowLink from 'NewWindowLink'
const stories = storiesOf('NewWindowLink')
stories
.add('Default', () => (
<NewWindowLink href="https://example.com">This is a link</NewWindowLink>
))
.add('Custom aria-label', () => (
<NewWi... | Add story for window link with custom aria label | Add story for window link with custom aria label
| JSX | mit | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | ---
+++
@@ -4,6 +4,12 @@
const stories = storiesOf('NewWindowLink')
-stories.add('Default', () => (
- <NewWindowLink href="https://example.com">This is a link</NewWindowLink>
-))
+stories
+ .add('Default', () => (
+ <NewWindowLink href="https://example.com">This is a link</NewWindowLink>
+ ))
+ .add('Cust... |
4537899ae170f09626b02190446a19e598956d03 | frontend/src/containers/Application.react.jsx | frontend/src/containers/Application.react.jsx | import React from 'react';
import Header from 'containers/Header.react';
import Navbar from 'containers/Navbar.react';
import Footer from 'containers/Footer.react';
export default class Application extends React.Component {
static propTypes = {
children: React.PropTypes.any.isRequired
}
render() {
return ... | import React from 'react';
import Header from 'containers/Header.react';
import Navbar from 'containers/Navbar.react';
import Footer from 'containers/Footer.react';
import Radium from 'radium';
@Radium
export default class Application extends React.Component {
static propTypes = {
children: React.PropTypes.any... | Make the application as a flexbox container | Make the application as a flexbox container
| JSX | agpl-3.0 | jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi | ---
+++
@@ -4,6 +4,9 @@
import Navbar from 'containers/Navbar.react';
import Footer from 'containers/Footer.react';
+import Radium from 'radium';
+
+@Radium
export default class Application extends React.Component {
static propTypes = {
children: React.PropTypes.any.isRequired
@@ -11,7 +14,7 @@
rende... |
6e36c936978c6f728c5532b616307b0bc4b86dbb | test/test-hook.jsx | test/test-hook.jsx | 'use strict';
var React = require('react');
require('style!css!../css/styles.css');
require('style!css!../examples/example-styles.css');
require('style!css!../node_modules/react-resizable/css/styles.css');
typeof window !== "undefined" && (window.React = React); // for devtools
typeof window !== "undefined" && (window.... | 'use strict';
var React = require('react');
require('style!css!../css/styles.css');
require('style!css!../examples/example-styles.css');
require('style!css!../node_modules/react-resizable/css/styles.css');
typeof window !== "undefined" && (window.React = React); // for devtools
module.exports = function(Layout) {
do... | Remove perf export in examples | Remove perf export in examples
| JSX | mit | vpezeshkian/react-grid-layout,nd0ut/react-grid-layout,seanich/react-grid-layout,vpezeshkian/react-grid-layout,cp/react-grid-layout,cferrios/react-grid-layout,cp/react-grid-layout,nd0ut/react-grid-layout,seanich/react-grid-layout,STRML/react-grid-layout,vpezeshkian/react-grid-layout,STRML/react-grid-layout,cp/react-grid... | ---
+++
@@ -4,7 +4,6 @@
require('style!css!../examples/example-styles.css');
require('style!css!../node_modules/react-resizable/css/styles.css');
typeof window !== "undefined" && (window.React = React); // for devtools
-typeof window !== "undefined" && (window.Perf = React.addons.Perf); // for devtools
module.e... |
190b3f265ed5ac8e2072c29317f67229a4fed9db | client/components/team/team-browser.jsx | client/components/team/team-browser.jsx | import { Meteor } from 'meteor/meteor';
import React, { Component } from 'react';
import { Link, browserHistory } from 'react-router';
import { Container, Grid, Form, Icon, Message } from 'semantic-ui-react';
TeamBrowser = class TeamBrowser extends Component {
constructor(props) {
super(props);
this.state = ... | import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import React, { Component } from 'react';
import { Link, browserHistory } from 'react-router';
import { Container, Grid, Form, Icon, Message } from 'semantic-ui-react';
const SORT_BY_OPTS = [
{ text: 'None', value: 'n... | Add subscription and filterng form to team browser | Add subscription and filterng form to team browser
| JSX | mit | kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt | ---
+++
@@ -1,20 +1,67 @@
import { Meteor } from 'meteor/meteor';
+import { createContainer } from 'meteor/react-meteor-data';
import React, { Component } from 'react';
import { Link, browserHistory } from 'react-router';
import { Container, Grid, Form, Icon, Message } from 'semantic-ui-react';
+const SORT_BY_O... |
f25b912537acf17bf71cc12b3b3463060570a80b | src/modules/ThreadPost/ThreadPost.jsx | src/modules/ThreadPost/ThreadPost.jsx | import './ThreadPost.styles'
import React, { Component } from 'react'
import classes from 'classnames'
import LazyLoad from 'react-lazyload'
import {
TimeAgo,
Line,
ToggleOnClick,
Image
} from '~/components'
import {
renderControls,
renderRefs,
renderTitle,
renderMedia,
renderMe... | import './ThreadPost.styles'
import React, { Component } from 'react'
import classes from 'classnames'
import {
TimeAgo,
Line,
ToggleOnClick,
Image
} from '~/components'
import {
renderControls,
renderRefs,
renderTitle,
renderMedia,
renderMediaInfo
} from './Render'
import { se... | Remove Lazyload from thread post | fix(Thread): Remove Lazyload from thread post
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -1,7 +1,6 @@
import './ThreadPost.styles'
import React, { Component } from 'react'
import classes from 'classnames'
-import LazyLoad from 'react-lazyload'
import {
TimeAgo, |
9415044cb84efedebacc8b9f692334327ac1b897 | app/app/components/home/RegisteredUserHome.jsx | app/app/components/home/RegisteredUserHome.jsx | import React from 'react';
import {Link} from 'react-router'
import auth from '../../utils/auth.jsx'
export default class RegisteredUserHome extends React.Component {
// componentWillMount() {
// auth.getUser(localStorage.id).then((res) => {
// this.user = res.data.user
// })
// }
render(){
return(
<div... | import React from 'react';
import {Link} from 'react-router'
import auth from '../../utils/auth.jsx'
export default class RegisteredUserHome extends React.Component {
render(){
return(
<div className="starter-template">
<h1>Welcome Back, {this.props.user.first_name}</h1>
<p className="lead">Get so... | Add link to new task | Add link to new task
| JSX | mit | taodav/MicroSerfs,taodav/MicroSerfs | ---
+++
@@ -3,17 +3,13 @@
import auth from '../../utils/auth.jsx'
export default class RegisteredUserHome extends React.Component {
- // componentWillMount() {
- // auth.getUser(localStorage.id).then((res) => {
- // this.user = res.data.user
- // })
- // }
+
render(){
return(
<div className="starter-... |
ad6322698d4a194a3fae4cd535d68ab152940c35 | app/components/App.jsx | app/components/App.jsx | import React, { Component } from 'react';
import localforage from 'localforage';
import debounce from 'lodash.debounce';
import Header from './Header';
import Editor from './Editor';
import Footer from './Footer';
export default class App extends Component {
constructor(props, context) {
super(props, context);... | import React, { Component } from 'react';
import localforage from 'localforage';
import debounce from 'lodash.debounce';
import Header from './Header';
import Editor from './Editor';
import Footer from './Footer';
export default class App extends Component {
constructor(props, context) {
super(props, context);... | Add default content (the dirty way) | Add default content (the dirty way)
| JSX | mit | TailorDev/monod,PaulDebus/monod,TailorDev/monod,PaulDebus/monod,TailorDev/monod,PaulDebus/monod | ---
+++
@@ -21,8 +21,26 @@
loadRaw() {
return localforage.getItem(this.forageKey).then((value) => {
- return null !== value ? value : '';
- });
+ return null !== value ? value : [
+ 'Introducing Monod',
+ '=================',
+ '',
+ '> **TL;DR** This editor is the f... |
2d2589a8df7bb181f8b23e137578dbabadc1b1f5 | src/components/ImageView.jsx | src/components/ImageView.jsx | // @flow
import React, { Component } from 'react';
import Image from '../domain/Image';
export default class ImageView extends Component {
props: {
image: Image,
showPreview: Function,
remove: Function,
};
render() {
return (
<li className="image-view">
<div className="image-contai... | // @flow
import React, { Component } from 'react';
import Image from '../domain/Image';
export default class ImageView extends Component {
props: {
image: Image,
showPreview: Function,
remove: Function,
};
render() {
return (
<li className="image-view">
<div className="image-contai... | Fix remove button event bubling | Fix remove button event bubling
| JSX | mit | mizoguche/approve-pr-with-image,mizoguche/approve-pr-with-image | ---
+++
@@ -15,18 +15,23 @@
<div className="image-container">
<img alt="approve" style={{ maxHeight: '180px', maxWidth: '180px' }} src={this.props.image.src} />
</div>
- <div
+ <a
+ tabIndex="-1"
className="remove-button-container"
- onClick={() ... |
43e6322e936ab63b4740c3ca4a30a54980cf5a2c | src/extension/features/general/hide-closed-accounts/components/hide-closed-button.jsx | src/extension/features/general/hide-closed-accounts/components/hide-closed-button.jsx | import * as React from 'react';
import * as PropTypes from 'prop-types';
import { controllerLookup } from 'toolkit/extension/utils/ember';
import { l10n, getToolkitStorageKey } from 'toolkit/extension/utils/toolkit';
export const HideClosedButton = ({ toggleHiddenState }) => {
const isHidden = getToolkitStorageKey('... | import * as React from 'react';
import * as PropTypes from 'prop-types';
import { controllerLookup } from 'toolkit/extension/utils/ember';
import { l10n, getToolkitStorageKey } from 'toolkit/extension/utils/toolkit';
export const HideClosedButton = ({ toggleHiddenState }) => {
const isHidden = getToolkitStorageKey('... | Use 'no' fonticon instead of 'help-2' for hide closed accounts | Use 'no' fonticon instead of 'help-2' for hide closed accounts
| JSX | mit | falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,falkencreative/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,blargity/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,falkencreative/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolki... | ---
+++
@@ -15,7 +15,7 @@
return (
<li onClick={toggleHidden}>
<button>
- <i className="flaticon stroke help-2" />
+ <i className="flaticon stroke no" />
{` ${label}`} Closed Accounts
</button>
</li> |
a103afa469ed3ecb41c5cb034eea95dd4661c5f7 | public/components/BeerPair.jsx | public/components/BeerPair.jsx | import React from 'react';
import beerPair from './../../pairList.js';
class BeerPair extends React.Component {
constructor(props){
super(props);
}
render(){
return(
<div>
{
this.props.currentBeer.name ? `${this.props.currentBeer.name} is a ${this.props.currentBeer.type} and should be dra... | import React from 'react';
import beerPair from './../../pairList.js';
class BeerPair extends React.Component {
constructor(props){
super(props);
}
render(){
return(
<div>
{
this.props.currentBeer.name ? `${this.props.currentBeer.name} is a ${this.props.currentBeer.type} and should be dra... | Remove placeholder text while waiting for data | Remove placeholder text while waiting for data
| JSX | mit | joeylaguna/tankard.io,joeylaguna/tankard.io | ---
+++
@@ -10,7 +10,7 @@
return(
<div>
{
- this.props.currentBeer.name ? `${this.props.currentBeer.name} is a ${this.props.currentBeer.type} and should be drank in a ${beerPair[this.props.currentBeer.type][0]}` : 'no beers'
+ this.props.currentBeer.name ? `${this.props.currentBeer.name} is ... |
2ea315257b555e69b535b2992e2a11f09ad34c87 | app/assets/javascripts/components/DiscoverComponents/ResultList.js.jsx | app/assets/javascripts/components/DiscoverComponents/ResultList.js.jsx | var ResultList = React.createClass({
render: function() {
var resultNodes = this.props.results.map(function(result){
return (
<ResultItem title={result.title} description={result.description} link={result.link} points={result.points} categoryName={result.category_name} image={result.imag... | var ResultList = React.createClass({
render: function() {
var resultNodes = this.props.results.map(function(result){
return (
<ResultItem title={result.title} description={result.description} link={result.link} points={result.points} categoryName={result.category_name} image={result.imag... | Fix react complaint about keyed items needing React.addons.createFragment(object) on discover page | Fix react complaint about keyed items needing React.addons.createFragment(object) on discover page
| JSX | mit | ShadyLogic/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,TimCannady/fixstarter,TimCannady/fixstarter | ---
+++
@@ -14,7 +14,7 @@
{ this.props.results.length == 0 ?
<p> Enter something in the search bar! </p>
:
- {resultNodes}
+ React.addons.createFragment({resultNodes})
}
</div>
</div> |
a3d9321cdf1f1d08a49f8ac5fcef070946045560 | app/assets/javascripts/student_profile/main.jsx | app/assets/javascripts/student_profile/main.jsx | $(function() {
// only run if the correct page
if (!($('body').hasClass('students') && $('body').hasClass('show'))) return;
// imports
const PageContainer = window.shared.PageContainer;
const parseQueryString = window.shared.parseQueryString;
const MixpanelUtils = window.shared.MixpanelUtils;
// entry p... | const ReactDOM = window.ReactDOM;
$(function() {
// only run if the correct page
if (!($('body').hasClass('students') && $('body').hasClass('show'))) return;
// imports
const PageContainer = window.shared.PageContainer;
const parseQueryString = window.shared.parseQueryString;
const MixpanelUtils = window.... | Fix linter warning about ReactDOM | Fix linter warning about ReactDOM
| JSX | mit | jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | ---
+++
@@ -1,3 +1,5 @@
+const ReactDOM = window.ReactDOM;
+
$(function() {
// only run if the correct page
if (!($('body').hasClass('students') && $('body').hasClass('show'))) return; |
c482ba4871913c55f524e51c24bae4b29f937828 | app/scripts/components/Insights/Customs/Sonoma/slides/SonomaSlide6.jsx | app/scripts/components/Insights/Customs/Sonoma/slides/SonomaSlide6.jsx | import React from 'react';
class SonomaSlide6 extends React.Component {
render() {
return (
<section>
<section className="sonoma-slide">
<div className="container content-section">
<div className="row">
<div className="columns medium-6 wrapper">
... | import React from 'react';
import Iframe from '../../../../IFrame';
function SonomaSlide6() {
const mapUrl = 'http://resource-watch.github.io/insights/sonoma-maps/winter-air-temperature.html';
return (
<section className="sonoma-slide" data-title="Warmer Winter Nights">
<div className="container content-... | Add map in slide 6 | Add map in slide 6
| JSX | mit | resource-watch/prep-app,resource-watch/prep-app | ---
+++
@@ -1,48 +1,27 @@
import React from 'react';
+import Iframe from '../../../../IFrame';
-class SonomaSlide6 extends React.Component {
-
- render() {
- return (
- <section>
- <section className="sonoma-slide">
- <div className="container content-section">
- <div className=... |
28981cff8af308c01323d6f1befc582b80be840e | js/Details.jsx | js/Details.jsx | const React = require('react')
class Details extends React.Component {
render () {
return (
<div style={{textAlign: 'left'}} className='container'>
<pre><code>
{JSON.stringify(this.props.params, null, 4)}
</code></pre>
</div>
)
}
}
const { object } = React.PropTypes
... | const React = require('react')
class Details extends React.Component {
render () {
const params = this.props.params || {}
const { title, description, year, poster, trailer } = params
return (
<div style={{textAlign: 'left'}} className='container'>
<header className='header'>
<h1 c... | Add House of Cards trailer. | Add House of Cards trailer.
| JSX | mit | JoeMarion/complete-intro-to-react,JoeMarion/complete-intro-to-react | ---
+++
@@ -2,11 +2,22 @@
class Details extends React.Component {
render () {
+ const params = this.props.params || {}
+ const { title, description, year, poster, trailer } = params
return (
<div style={{textAlign: 'left'}} className='container'>
- <pre><code>
- {JSON.stringify... |
7c2fe256a239dbb4375288601219be04de8dfeb8 | src/request/components/request-filter-view.jsx | src/request/components/request-filter-view.jsx | var React = require('react');
module.exports = React.createClass({
render: function() {
return (
<div className="request-session-holder">
<h2>Filter</h2>
<em>No found filters.</em>
</div>
);
}
});
| var glimpse = require('glimpse'),
React = require('react'),
LinkedStateMixin = React.addons.LinkedStateMixin;
module.exports = React.createClass({
mixins: [ LinkedStateMixin ],
getInitialState: function() {
return {
uri: '',
method: '',
contentTyp... | Add form elements and filter event to request filter view | Add form elements and filter event to request filter view
| JSX | unknown | Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype | ---
+++
@@ -1,12 +1,43 @@
-var React = require('react');
+var glimpse = require('glimpse'),
+ React = require('react'),
+ LinkedStateMixin = React.addons.LinkedStateMixin;
module.exports = React.createClass({
+ mixins: [ LinkedStateMixin ],
+ getInitialState: function() {
+ return {
+ ... |
30cc12a2ccea084b3f36de2a68a9b10bcc98adaa | src/actions/HistoryActions.jsx | src/actions/HistoryActions.jsx | import Constants from "../constants/HistoryConstants.jsx";
import {searchHistory} from "../utils/ChromeAPI.jsx";
import Moment from "moment";
export default {
load(d = new Date(), q = "") {
this.dispatch(Constants.LOAD_HISTORY);
const start = Moment(d).startOf("day").valueOf();
const end =... | import Constants from "../constants/HistoryConstants.jsx";
import {searchHistory} from "../utils/ChromeAPI.jsx";
import Moment from "moment";
export default {
load(d = new Date(), q = "") {
this.dispatch(Constants.LOAD_HISTORY);
let start = d,
end = false;
if (d !== 0) {
... | Change load action to allow dateless queries | Change load action to allow dateless queries
This change will allow us to search with no date range.
That is, it will return all results.
| JSX | mit | MrSaints/historyx,MrSaints/historyx | ---
+++
@@ -6,8 +6,14 @@
export default {
load(d = new Date(), q = "") {
this.dispatch(Constants.LOAD_HISTORY);
- const start = Moment(d).startOf("day").valueOf();
- const end = Moment(d).endOf("day").valueOf();
+
+ let start = d,
+ end = false;
+
+ if (d !== 0) {... |
1497dfa5ed4117b0946eade8ae0e354f9c62fb90 | src/sentry/static/sentry/app/components/events/interfaces/exceptionMechanism.jsx | src/sentry/static/sentry/app/components/events/interfaces/exceptionMechanism.jsx | import React from 'react';
import KeyValueList from '../interfaces/keyValueList';
const ExceptionMechanism = React.createClass({
propTypes: {
data: React.PropTypes.object.isRequired,
platform: React.PropTypes.string,
},
render() {
let elements = [];
if (this.props.data.mach_exception) {
c... | import React from 'react';
import Pills from '../../pills';
import Pill from '../../pill';
const ExceptionMechanism = React.createClass({
propTypes: {
data: React.PropTypes.object.isRequired,
platform: React.PropTypes.string,
},
render() {
let pills = [];
if (this.props.data.mach_exception) {
... | Use pills for exception mechanism | Use pills for exception mechanism
| JSX | bsd-3-clause | mvaled/sentry,JackDanger/sentry,gencer/sentry,BuildingLink/sentry,alexm92/sentry,fotinakis/sentry,ifduyue/sentry,mitsuhiko/sentry,fotinakis/sentry,BuildingLink/sentry,zenefits/sentry,gencer/sentry,BuildingLink/sentry,ifduyue/sentry,looker/sentry,gencer/sentry,looker/sentry,alexm92/sentry,beeftornado/sentry,mvaled/sentr... | ---
+++
@@ -1,5 +1,6 @@
import React from 'react';
-import KeyValueList from '../interfaces/keyValueList';
+import Pills from '../../pills';
+import Pill from '../../pill';
const ExceptionMechanism = React.createClass({
propTypes: {
@@ -8,29 +9,44 @@
},
render() {
- let elements = [];
+ let pills... |
09e7a5b3b97f8ac85e77d765206093d3540dc851 | src/operator/visitors/visitor/__tests__/invite_button.test.jsx | src/operator/visitors/visitor/__tests__/invite_button.test.jsx | import React from 'react';
import {shallow, mount} from 'enzyme';
import {expect} from 'chai';
import * as sinon from 'sinon';
import InviteButton from '../invite_button';
describe('<InviteButton />', () => {
describe('inactive state (already invited visitor)', () => {
it('should be null', () => {
... | import React from 'react';
import {shallow} from 'enzyme';
import {expect} from 'chai';
import * as sinon from 'sinon';
import InviteButton from '../invite_button';
describe('<InviteButton />', () => {
describe('inactive state (already invited visitor)', () => {
it('should be null', () => {
con... | Use enzyme.shallow instead of enzyme.mount for <InviteButton/> component | Use enzyme.shallow instead of enzyme.mount for <InviteButton/> component | JSX | apache-2.0 | JustBlackBird/mibew-ui,JustBlackBird/mibew-ui | ---
+++
@@ -1,5 +1,5 @@
import React from 'react';
-import {shallow, mount} from 'enzyme';
+import {shallow} from 'enzyme';
import {expect} from 'chai';
import * as sinon from 'sinon';
import InviteButton from '../invite_button';
@@ -29,7 +29,7 @@
it('should fire "onClick" callback', () => {
... |
de8e06ec69d87991d3b0674bd343fcd4469c432b | app/components/LoginButtons.jsx | app/components/LoginButtons.jsx | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const LoginButtons = React.createClass({
render() {
const flexContainer = {
display: 'flex',
f... | import React from 'react';
import { Link } from 'react-router';
import RaisedButton from 'material-ui/RaisedButton';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const LoginButtons = React.createClass({
render() {
const flexContai... | Add Links to /status page | Add Links to /status page
| JSX | mit | spanningtime/smokator,spanningtime/smokator | ---
+++
@@ -1,9 +1,11 @@
import React from 'react';
+import { Link } from 'react-router';
import RaisedButton from 'material-ui/RaisedButton';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const LoginButtons = React.createClass({
+... |
dc61a6ca9371089b5fba00bfabd5b654a23b069d | app/views/timezone.jsx | app/views/timezone.jsx | /** @jsx React.DOM */
var React = require('react');
var moment = require('moment-timezone');
var Person = require('./person.jsx');
module.exports = React.createClass({
render: function() {
// We clone the time object itself so the this time is bound to
// the global app time
var localTime = moment( ... | /** @jsx React.DOM */
var React = require('react');
var moment = require('moment-timezone');
var Person = require('./person.jsx');
module.exports = React.createClass({
render: function() {
// We clone the time object itself so the this time is bound to
// the global app time
var localTime = moment( ... | Add key to people React child view | Add key to people React child view
| JSX | mit | djfarrelly/timezone,bexelbie/timezone,bexelbie/timezone,djfarrelly/timezone | ---
+++
@@ -24,7 +24,8 @@
<h3 className="timezone-time">{displayTime}</h3>
<p className="timezone-offset">{offset}</p>
{this.props.model.map(function(person){
- return <Person model={person} />;
+ var key = person.name + Math.floor(Math.random() * 10);
+ return <Person model=... |
e78a2e0413b42cacce4bad19d15fa3e566513ee9 | shared/components/TodosView.jsx | shared/components/TodosView.jsx | import React from 'react';
import { PropTypes } from 'react';
import Immutable from 'immutable';
export default class TodosView extends React.Component {
static propTypes = {
todos: PropTypes.instanceOf(Immutable.List).isRequired,
editTodo: PropTypes.func.isRequired,
deleteTodo: Pro... | import React from 'react';
import { PropTypes } from 'react';
import Immutable from 'immutable';
export default class TodosView extends React.Component {
static propTypes = {
todos: PropTypes.instanceOf(Immutable.List).isRequired,
editTodo: PropTypes.func.isRequired,
deleteTodo: Pro... | Use arrow function when mapping todo items | Use arrow function when mapping todo items
| JSX | mit | bananaoomarang/isomorphic-redux | ---
+++
@@ -33,7 +33,7 @@
return (
<div id="todos-list">
{
- this.props.todos.map(function (todo, index) {
+ this.props.todos.map((todo, index) => {
return (
<div style={btnStyle} key={index}>
<span>{todo}</span>
@@ -42,7 +42,7 @@
... |
82b65779365c3fe136b62aac8000df0cb4b8c85e | src/components/MessageMenuBar/MessageMenuBar.jsx | src/components/MessageMenuBar/MessageMenuBar.jsx | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import Button from '../Button/Button.jsx';
import { toggleChatOpen } from '../../store/Chat/actions';
import './MessageMenuBar.css';
const MessageMenuBar = (props) => {
const { activeChatId, activeChatIsOpen, toggleOpen } = props;
co... | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import Button from '../Button/Button.jsx';
import { toggleChatOpen } from '../../store/Chat/actions';
import './MessageMenuBar.css';
const MessageMenuBar = (props) => {
const { activeChatId, activeChatIsOpen, toggleOpen } = props;
co... | Move propTypes up for nit nit | Move propTypes up for nit nit
| JSX | bsd-3-clause | minimalchat/operator-app,minimalchat/operator-app | ---
+++
@@ -21,6 +21,14 @@
);
};
+
+MessageMenuBar.propTypes = {
+ activeChatId: PropTypes.string.isRequired,
+ activeChatIsOpen: PropTypes.bool,
+ toggleOpen: PropTypes.func.isRequired,
+};
+
+
const mapStateToProps = state => ({
activeChatId: state.chat.activeId,
activeChatIsOpen: state.chat.activeI... |
c0ed3feb9261a9da6856c56a7365195adb70c266 | src/BlocklyToolbox.jsx | src/BlocklyToolbox.jsx | import React from 'react';
import BlocklyToolboxCategory from './BlocklyToolboxCategory';
import BlocklyToolboxBlock from './BlocklyToolboxBlock';
var BlocklyToolbox = React.createClass({
propTypes: {
categories: React.PropTypes.array,
blocks: React.PropTypes.array,
processCategory: React.PropTypes.func... | import React from 'react';
import BlocklyToolboxCategory from './BlocklyToolboxCategory';
import BlocklyToolboxBlock from './BlocklyToolboxBlock';
var BlocklyToolbox = React.createClass({
propTypes: {
categories: React.PropTypes.array,
blocks: React.PropTypes.array,
processCategory: React.PropTypes.func... | Add support for our typeahead search PR | Add support for our typeahead search PR
| JSX | mit | patientslikeme/react-blockly-component,patientslikeme/react-blockly-component | ---
+++
@@ -9,6 +9,23 @@
blocks: React.PropTypes.array,
processCategory: React.PropTypes.func,
didUpdate: React.PropTypes.func
+ },
+
+ renderCategories: function(categories) {
+ return categories.map(function(category, i) {
+ if (category.type == 'sep') {
+ return <sep key={"sep_" + i... |
6fc7c323f4e32601292c41728d8969ae0903a62e | src/Slide.jsx | src/Slide.jsx | import React, { Component, PropTypes } from 'react'
const styles = {
root: {
color: 'white'
},
header: {
height: 'calc(100% - 230px)',
textAlign: 'center'
},
headerItem: {
position: 'relative',
top: '50%',
transform: 'translateY(-50%)'
},
text: {
textAlign: 'center'
}
}
exp... | import React, { Component, PropTypes } from 'react'
import { blue500, blue700 } from 'material-ui/styles/colors'
const styles = {
root: {
color: 'white',
backgroundColor: blue500,
height: '100%'
},
media: {
position: 'relative',
top: '50%',
transform: 'translateY(-50%)'
},
mediaBackgr... | Rework slide props to allow styles override. | Rework slide props to allow styles override.
| JSX | mit | TeamWertarbyte/material-auto-rotating-carousel | ---
+++
@@ -1,37 +1,53 @@
import React, { Component, PropTypes } from 'react'
+import { blue500, blue700 } from 'material-ui/styles/colors'
const styles = {
root: {
- color: 'white'
+ color: 'white',
+ backgroundColor: blue500,
+ height: '100%'
},
- header: {
- height: 'calc(100% - 230px)',
... |
47b04c0dcc00cd6631aa91a4cc8ae5f6c1f41d5f | app/client/components/layouts/main/MainLayout.jsx | app/client/components/layouts/main/MainLayout.jsx | Camino.MainLayout = React.createClass({
render() {
return (
<div>
{this.props.header}
{this.props.content}
{this.props.footer}
</div>
)
}
}); | Camino.MainLayout = React.createClass({
render() {
return (
<span>
<head>
<title>Camino</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
... | Add missing <head> with viewport | Add missing <head> with viewport
| JSX | mit | fjaguero/camino,fjaguero/camino | ---
+++
@@ -1,13 +1,22 @@
Camino.MainLayout = React.createClass({
render() {
return (
- <div>
+ <span>
+ <head>
+ <title>Camino</title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=... |
99a4cff1910304733d32e57f41362caaf96f3781 | src/ui/components/Button/index.jsx | src/ui/components/Button/index.jsx | import { h } from 'preact';
import styles from './Button.css';
const Button = ({
className,
children,
type = 'default',
...props
}) => (
<button
lassName={`${styles.this} ${styles[type]} ${className ? className : ''}`}
{...props}
>
{ children }
</button>
);
export d... | import { h } from 'preact';
import styles from './Button.css';
const Button = ({
className,
children,
type = 'default',
...props
}) => (
<button
className={`${styles.this} ${styles[type]} ${className ? className : ''}`}
{...props}
>
{ children }
</button>
);
export ... | Fix className prop on Button | Fix className prop on Button
| JSX | mit | BusterLabs/Partyshare,BusterLabs/Partyshare | ---
+++
@@ -8,7 +8,7 @@
...props
}) => (
<button
- lassName={`${styles.this} ${styles[type]} ${className ? className : ''}`}
+ className={`${styles.this} ${styles[type]} ${className ? className : ''}`}
{...props}
>
{ children } |
8410d88bdc9c9dcf4d2c3584c5334de55194f4fb | src/components/tab.jsx | src/components/tab.jsx | var React = require('react');
var classNames = require('classnames');
module.exports = Tab = React.createClass({
displayName: 'Tab',
contextTypes: {
activeClassName: React.PropTypes.string.isRequired
},
propTypes: {
className: React.PropTypes.string,
id: React.PropTypes.number.... | var React = require('react');
var classNames = require('classnames');
module.exports = Tab = React.createClass({
displayName: 'Tab',
contextTypes: {
activeClassName: React.PropTypes.string.isRequired
},
propTypes: {
className: React.PropTypes.string,
id: React.PropTypes.number,... | Fix error when Id is not specified on the Tab component | Fix error when Id is not specified on the Tab component
| JSX | mit | janvanhelvoort/easy-tabs | ---
+++
@@ -8,7 +8,7 @@
},
propTypes: {
className: React.PropTypes.string,
- id: React.PropTypes.number.isRequired,
+ id: React.PropTypes.number,
selected: React.PropTypes.bool,
children: React.PropTypes.oneOfType([
React.PropTypes.array,
@@ -16,9 +1... |
b3770692f961a0799829d53b6313cde80f9dadc3 | client/views/readouts/transmission_delay_readout.jsx | client/views/readouts/transmission_delay_readout.jsx | import Moment from "moment";
import "moment-duration-format";
import React from "react";
import ListeningView from "../listening_view.js";
class TransmissionDelayReadout extends ListeningView {
componentDidMount() {
super.componentDidMount();
window.setInterval(() => {this.forceUpdate();}, 1000);
}
re... | import Moment from "moment";
import "moment-duration-format";
import React from "react";
import ListeningView from "../listening_view.js";
class TransmissionDelayReadout extends ListeningView {
componentDidMount() {
super.componentDidMount();
window.setInterval(() => {this.forceUpdate();}, 1000);
}
re... | Remove crossfilter from microcharts, fix atmo means, and clarify ground time label. | Remove crossfilter from microcharts, fix atmo means, and clarify ground time label.
| JSX | mit | sensedata/space-telemetry,sensedata/space-telemetry | ---
+++
@@ -12,7 +12,7 @@
}
render() {
- const unixTime = this.state.data.length > 0 ? this.state.data[0].t : 0;
+ const unixTime = this.state.data ? this.state.data.t : 0;
const time = Moment.unix(unixTime).utc();
const now = Moment().utc();
const delta = now.diff(time, "milliseconds"); |
3938a21433dd4a23341547acd41523f3679b8cb1 | src/react-chayns-selectlist/component/SelectItem.jsx | src/react-chayns-selectlist/component/SelectItem.jsx | import React from 'react';
import PropTypes from 'prop-types';
export default class SelectItem extends React.Component {
static componentName = 'SelectItem';
static propTypes = {
id: PropTypes.oneOfType([ // eslint-disable-line react/no-unused-prop-types
PropTypes.string,
Prop... | import React from 'react';
import PropTypes from 'prop-types';
export default class SelectItem extends React.Component {
static componentName = 'SelectItem';
static propTypes = {
id: PropTypes.oneOfType([ // eslint-disable-line react/no-unused-prop-types
PropTypes.string,
Prop... | Add possible propTypes to name-prop | Add possible propTypes to name-prop
| JSX | mit | TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components | ---
+++
@@ -10,7 +10,11 @@
PropTypes.string,
PropTypes.number
]),
- name: PropTypes.string, // eslint-disable-line react/no-unused-prop-types
+ name: PropTypes.oneOfType([ // eslint-disable-line react/no-unused-prop-types
+ PropTypes.string,
+ Pro... |
cb0e767775824914564ac1978352ffea1ba28758 | components/ExamplePluginComponent.jsx | components/ExamplePluginComponent.jsx | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var {PluginActions, PluginDispatcher} = global.MarathonUIPluginAPI;
var ExamplePluginComponent = React.createClass({
getInitialState: function () {
... | import React from "react/addons";
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
var {PluginActions, PluginHelper} =
global.MarathonUIPluginAPI;
var ExamplePluginComponent = React.createClass({
getInitialState: function () {
re... | Add helper to call actions | Add helper to call actions
| JSX | apache-2.0 | mesosphere/marathon-ui-example-plugin | ---
+++
@@ -3,7 +3,8 @@
import ExamplePluginStore from "../stores/ExamplePluginStore";
import ExamplePluginEvents from "../events/ExamplePluginEvents";
-var {PluginActions, PluginDispatcher} = global.MarathonUIPluginAPI;
+var {PluginActions, PluginHelper} =
+ global.MarathonUIPluginAPI;
var ExamplePluginCompo... |
01673bdc5afeb69ca84034b3edfd95511a13d549 | client/src/components/Nav/index.jsx | client/src/components/Nav/index.jsx | import React, { Component } from 'react';
import AppBar from 'material-ui/AppBar';
import $ from "jquery";
import { Link } from 'react-router';
import NavMenuIcon from './NavMenuIcon';
const color={ backgroundImage: 'url("http://bit.ly/2b2ePzs")', width: "100%", opacity: 0.6 };
class AppNavBar extends Component {
... | import React, { Component } from 'react';
import AppBar from 'material-ui/AppBar';
import $ from "jquery";
import { Link } from 'react-router';
import NavMenuIcon from './NavMenuIcon';
const color={ backgroundImage: 'url("http://bit.ly/2b2ePzs")', width: "100%", opacity: 0.6 };
class AppNavBar extends Component {
... | Fix typo in prop types | Fix typo in prop types
| JSX | mit | NerdDiffer/reprise,NerdDiffer/reprise,NerdDiffer/reprise | ---
+++
@@ -46,7 +46,7 @@
title: React.PropTypes.string.isRequired,
loggedIn: React.PropTypes.bool.isRequired,
user: React.PropTypes.string.isRequired,
- logout: React.PropTypes.func.isRequired,
+ logOut: React.PropTypes.func.isRequired,
};
export default AppNavBar; |
fe8e6d725181b541e7e19c94194d693c5140ec25 | SingularityUI/app/components/taskSearch/Header.jsx | SingularityUI/app/components/taskSearch/Header.jsx | import React from 'react';
import Glyphicon from '../common/atomicDisplayItems/Glyphicon';
let Header = React.createClass({
render() {
return <div>{this.props.global ? <a className='btn btn-danger' href={window.config.appRoot + '/request/' + this.props.requestId} alt={`Return to Request ${ this.props.requ... | import React, { PropTypes } from 'react';
import Glyphicon from '../common/atomicDisplayItems/Glyphicon';
const Header = (props) => {
let maybeLink;
if (props.global) {
maybeLink = (
<a className="btn btn-danger" href={`${config.appRoot}/request/${props.requestId}`} alt={`Return to Request ${props.reque... | Clean up one of the task search components | Clean up one of the task search components
| JSX | apache-2.0 | HubSpot/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,HubSpot/Singularity,andrhamm/Singularity,HubSpot/Singularity,hs-jenk... | ---
+++
@@ -1,12 +1,30 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
import Glyphicon from '../common/atomicDisplayItems/Glyphicon';
-let Header = React.createClass({
+const Header = (props) => {
+ let maybeLink;
- render() {
- return <div>{this.props.global ? <a className=... |
71e8b6bcdc4b434371b38de684ac740ed706b3dc | www/app/script/component/LikeButtons.jsx | www/app/script/component/LikeButtons.jsx | var React = require('react');
var ForceAuthMixin = require('../mixin/ForceAuthMixin');
var LikeButtons = React.createClass({
mixins: [
ForceAuthMixin
],
getLikeIconClassNames: function(value)
{
if (value)
return 'icon-thumb_up icon-btn'
+ (this.props.resou... | var React = require('react');
var ForceAuthMixin = require('../mixin/ForceAuthMixin');
var LikeButtons = React.createClass({
mixins: [
ForceAuthMixin
],
getLikeIconClassNames: function(value)
{
if (value)
return 'icon-thumb_up icon-btn'
+ (this.props.resou... | Add like/dislike buttons when the user is not logged in. | Add like/dislike buttons when the user is not logged in.
| JSX | mit | promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico | ---
+++
@@ -26,10 +26,14 @@
{
return (
<span>
- <span className={this.getLikeIconClassNames(true)}
- onClick={(e)=>this.props.likeAction(this.props.resource.id, true)}></span>
- <span className={this.getLikeIconClassNames(false)}
- ... |
869b44c5d6a0d7174def151577444a18e30929a3 | application/jsx/home.jsx | application/jsx/home.jsx | /** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
event.preventDefault();
... | /** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
var success = _.bind(
... | Send redirect closure on successful logout. | Send redirect closure on successful logout.
| JSX | mit | areida/spacesynter,dcpages/dcLibrary-Template,dcpages/dcLibrary-Template,areida/spacesynter,areida/spacesynter,areida/spacesynter,areida/spacesynter | ---
+++
@@ -13,8 +13,16 @@
mixins : [NavigateMixin],
logout : function(event) {
+ var success = _.bind(
+ function() {
+ this.redirect('/');
+ },
+ this
+ );
+
event.preventDefault();
- ... |
deabd499cb2d81964b7afbf9aa10be8bc504513d | js/views/filelist.jsx | js/views/filelist.jsx | var React = require('react')
var Table = require('react-bootstrap/Table')
var addr = require('./typography.jsx').addr
module.exports = React.createClass({
render: function() {
var files = this.props.files
var className = "table-hover filelist"
if(this.props.namesHidden) className += ' filelist-names-hid... | var React = require('react')
var Table = require('react-bootstrap/Table')
var addr = require('./typography.jsx').addr
module.exports = React.createClass({
render: function() {
var files = this.props.files
var className = "table-hover filelist"
if(this.props.namesHidden) className += ' filelist-names-hid... | Use gateway server for viewing files | Use gateway server for viewing files
| JSX | mit | masylum/webui,ipfs/webui,manlea/ipfs,masylum/webui,manlea/ipfs,ipfs/webui,ipfs/webui | ---
+++
@@ -22,11 +22,12 @@
{files ? files.map(function(file) {
if(typeof file === 'string') file = { id: file }
+ // TODO: get gateway path from config instead of using hardcoded localhost:8080
return (
<tr className="webui-file" data-type={file.type}>
- ... |
59b53507960d88a3f6d270c4996ac1e95a1c7c00 | src/js/letters/containers/LettersApp.jsx | src/js/letters/containers/LettersApp.jsx | import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvai... | import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvai... | Change basic error message content | Change basic error message content
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | ---
+++
@@ -12,7 +12,8 @@
if (unregistered) {
view = (
<h4>
- To view and download your VA letters, you need to verify your identity (or whatever).
+ We weren't able to find information about your VA letters.
+ If you think you should be able to access this information, please call... |
23f1e9f1f17832e21490be3f67ee36d3b0110baf | frontend/components/organizer-dash.jsx | frontend/components/organizer-dash.jsx | import React from 'react'
import TabSelector from './tab-selector'
import MeetingCalendar from './meeting-calendar'
import WeeklyMeetingsList from './weekly-meetings-list'
import ActiveLearningCirclesList from './active-learning-circles-list'
import FacilitatorList from './facilitator-list'
import InvitationList from '... | import React from 'react'
import TabSelector from './tab-selector'
import WeeklyMeetingsList from './weekly-meetings-list'
import ActiveLearningCirclesList from './active-learning-circles-list'
import FacilitatorList from './facilitator-list'
import InvitationList from './invitation-list'
require("./stylesheets/organi... | Remove import for missing file | Remove import for missing file
| JSX | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | ---
+++
@@ -1,6 +1,5 @@
import React from 'react'
import TabSelector from './tab-selector'
-import MeetingCalendar from './meeting-calendar'
import WeeklyMeetingsList from './weekly-meetings-list'
import ActiveLearningCirclesList from './active-learning-circles-list'
import FacilitatorList from './facilitator-li... |
0ac88c65188fb6d22ad2dd9924907c397aedd3f5 | src/js/components/Tasks.jsx | src/js/components/Tasks.jsx | import React from 'react';
export default class Tasks extends React.Component {
constructor(props) {
super(props);
}
render() {
const tasks = this.props.tasks.map((task) => {
return (
<tr key={task.id}>
<td>
<input type="checkbox" id={task.id} name={task.id} value={ta... | import React, { PropTypes } from 'react';
import Task from './Task.jsx';
const propTypes = {
label: PropTypes.string.isRequired,
tasks: PropTypes.array,
};
export default class Tasks extends React.Component {
render() {
const tasks = this.props.tasks.map(task => <Task key={task.id} task={task} />);
re... | Add proptypes in tasks component | Add proptypes in tasks component
| JSX | mit | tanaka0325/nippo-web,tanaka0325/nippo-web | ---
+++
@@ -1,21 +1,15 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
+
+import Task from './Task.jsx';
+
+const propTypes = {
+ label: PropTypes.string.isRequired,
+ tasks: PropTypes.array,
+};
export default class Tasks extends React.Component {
- constructor(props) {
- super(pro... |
d3ed3bf2bd74b53465d0a816092a5e3472aabc25 | www_src/components/card/card.jsx | www_src/components/card/card.jsx | var React = require('react/addons');
var ImageLoader = require('react-imageloader');
var Link = require('../link/link.jsx');
var Card = React.createClass({
statics: {
DEFAULT_THUMBNAIL: '../../img/default.svg'
},
actionsClicked: function (e) {
e.preventDefault();
e.stopPropagation();
this.props.o... | var React = require('react/addons');
var ImageLoader = require('react-imageloader');
var Link = require('../link/link.jsx');
var Card = React.createClass({
statics: {
DEFAULT_THUMBNAIL: '../../img/default.svg'
},
actionsClicked: function (e) {
e.preventDefault();
e.stopPropagation();
this.props.o... | Use react-imageloaders prerender property to prevent 0 height thumbnails | Use react-imageloaders prerender property to prevent 0 height thumbnails
| JSX | mpl-2.0 | bolaram/webmaker-android,alanmoo/webmaker-android,rodmoreno/webmaker-android,k88hudson/webmaker-android,j796160836/webmaker-android,gvn/webmaker-android,gvn/webmaker-android,alicoding/webmaker-android,alanmoo/webmaker-android,mozilla/webmaker-android,bolaram/webmaker-android,k88hudson/webmaker-android,rodmoreno/webmake... | ---
+++
@@ -11,11 +11,16 @@
e.stopPropagation();
this.props.onActionsClick.call(this, this.props);
},
+ prerenderImage: function() {
+ return React.createElement('img', {
+ src: Card.DEFAULT_THUMBNAIL
+ });
+ },
render: function () {
return (
<Link url={this.props.url} href={t... |
afecdce4f7b6faaa6ecad4eaa5c4440a5d8b7b53 | elements/BodyContent.jsx | elements/BodyContent.jsx | 'use strict';
var React = require('react');
var Router = require('react-router');
var RouteHandler = Router.RouteHandler;
var Paths = require('./PathsMixin');
var layoutHooks = require('../layoutHooks');
var config = require('config');
module.exports = function(Body) {
return React.createClass({
displayName: 'B... | 'use strict';
var React = require('react');
var Router = require('react-router');
var RouteHandler = Router.RouteHandler;
var Paths = require('./PathsMixin');
var layoutHooks = require('../layoutHooks');
var config = require('config');
module.exports = function(Body) {
return React.createClass({
displayName: 'B... | Return an object for `currentPath` | Return an object for `currentPath`
This makes more sense as it's easier to consume at plugins.
| JSX | mit | RamonGebben/antwar,RamonGebben/antwar,antwarjs/antwar | ---
+++
@@ -27,10 +27,16 @@
});
}
-function getExternalContent(paths, currentPath) {
+function getExternalContent(paths, pathName) {
return layoutHooks.bodyContent({
config: config,
paths: paths,
- currentPath: currentPath,
+ currentPath: getCurrentPath(paths, pathName),
});
}
+
+function... |
770d35541593321404042aa7ea1cc58e583abeeb | src/ui/components/FileList/index.jsx | src/ui/components/FileList/index.jsx | import { h } from 'preact';
import Button from 'components/Button';
import Center from 'components/Center';
import FileListItem from 'components/FileListItem';
import { GATEWAY_URL } from '../../../electron/constants';
import { shell, ipcRenderer } from 'electron';
import {
IPC_EVENT_HIDE_MENU,
} from '../../../sha... | import { h } from 'preact';
import Button from 'components/Button';
import Center from 'components/Center';
import FileListItem from 'components/FileListItem';
import { GATEWAY_URL } from '../../../electron/constants';
import { shell, ipcRenderer } from 'electron';
import {
IPC_EVENT_HIDE_MENU,
} from '../../../sha... | Sort files by the date added to partyshare folder | Sort files by the date added to partyshare folder
Closes #33
| JSX | mit | BusterLabs/Partyshare,BusterLabs/Partyshare | ---
+++
@@ -38,7 +38,7 @@
);
}
- // files = files.sort((a, b) => new Date(b.stats.ctime) - new Date(a.stats.ctime));
+ files = files.sort((a, b) => new Date(b.stats.ctime) - new Date(a.stats.ctime));
return (
<ul className={styles.this} {...props}> |
73aea839fd28695fae423a4c798176e394f6f424 | src/components/Layout/global.jsx | src/components/Layout/global.jsx | import { Global as EmotionGlobal } from "@emotion/core"
import React from "react"
const Global = () => (
<EmotionGlobal
styles={{
".gatsby-highlight": {
backgroundColor: "#fdf6e3",
borderRadius: "0.3em",
marginBottom: "1.58em",
padding: "1em",
overflow: "auto",
... | import { Global as EmotionGlobal } from "@emotion/core"
import React from "react"
const Global = () => (
<EmotionGlobal
styles={{
".gatsby-highlight": {
backgroundColor: "#fdf6e3",
borderRadius: "0.3em",
marginBottom: "1.58em",
padding: "1em",
overflow: "auto",
... | Fix code line highlight margins | Fix code line highlight margins
| JSX | mit | jbhannah/jbhannah.net,jbhannah/jbhannah.net | ---
+++
@@ -24,7 +24,6 @@
},
".gatsby-highlight-code-line": {
marginLeft: "-3.8em",
- marginRight: "-2em",
paddingLeft: "3.7em",
},
},
@@ -33,11 +32,11 @@
".gatsby-highlight-code-line": {
backgroundColor: "#fe... |
4580d169f23b6795109ba3d85ace3798c99f4d59 | client/src/routes.jsx | client/src/routes.jsx | // Modules
import React from 'react';
import { Route, IndexRoute } from 'react-router';
// Local Imports
import App from './components/App';
import LandingPage from './components/LandingPage';
import Login from './components/Login';
import Signup from './components/Signup';
import Room from './components/Room';
import... | // Modules
import React from 'react';
import { Route, IndexRoute } from 'react-router';
// Local Imports
import App from './components/App';
import LandingPage from './components/LandingPage';
import Login from './components/Login';
import Signup from './components/Signup';
import Room from './components/Room';
import... | Add a route for BeatSequencer | Add a route for BeatSequencer
| JSX | mit | NerdDiffer/reprise,NerdDiffer/reprise,NerdDiffer/reprise | ---
+++
@@ -11,7 +11,7 @@
import CreateOrJoin from './components/CreateOrJoin';
import Invalid from './components/Invalid';
import Metronome from './components/Metronome';
-
+import BeatSequencer from './components/BeatSequencer';
export default (
<Route path="/" component={App}>
@@ -21,6 +21,7 @@
<Rout... |
106f7f1010328cf3c09eaee4ffe00ecdfe1933ad | src/mb/components/MovieDetailSpotlight.jsx | src/mb/components/MovieDetailSpotlight.jsx | import React from 'react';
import RatingStars from './RatingStars';
export default class MovieDetailSpotlight extends React.Component {
static propTypes = {
movie: React.PropTypes.shape({
trailers: React.PropTypes.array,
title: React.PropTypes.string,
year: React.PropTypes.string,
count... | import React from 'react';
import RatingStars from './RatingStars';
export default class MovieDetailSpotlight extends React.Component {
static propTypes = {
movie: React.PropTypes.shape({
trailers: React.PropTypes.array,
title: React.PropTypes.string,
year: React.PropTypes.string,
count... | Fix bug of none trailers situation. | Fix bug of none trailers situation.
| JSX | mit | NJU-SAP/movie-board,NJU-SAP/movie-board | ---
+++
@@ -24,8 +24,12 @@
};
render() {
+ let url = '';
+ if (this.props.movie.trailers.length > 0) {
+ url = this.props.movie.trailers[0].medium;
+ }
const style = {
- backgroundImage: `-webkit-linear-gradient(left, rgba(0,0,0,1) 28%, rgba(20,20,20,0)), url('${this.props.movie.traile... |
210141822de1c46515cf84293b435ad6ac02918f | client/components/presentation/Main/GroupHeader/GroupOptionsDisplayToggle.jsx | client/components/presentation/Main/GroupHeader/GroupOptionsDisplayToggle.jsx | import React from 'react';
/**
* a button that displays a dropdown menu when clicked
* @function GroupOptionsDisplayToggle
* @returns {object} component
*/
const GroupOptionsDisplayToggle = () => {
$('.dropdown-button').dropdown({
constrainWidth: false
});
return (
<div className="menu col s3">
... | import React from 'react';
import ReactTooltip from 'react-tooltip';
/**
* a button that displays a dropdown menu when clicked
* @function GroupOptionsDisplayToggle
* @returns {object} component
*/
const GroupOptionsDisplayToggle = () => {
$('.dropdown-button').dropdown({
constrainWidth: false
});
return... | Change menu icon and add tooltip | [fix] Change menu icon and add tooltip
[Delivers #151285073]
| JSX | mit | tomipaul/PostIt,tomipaul/PostIt | ---
+++
@@ -1,4 +1,5 @@
import React from 'react';
+import ReactTooltip from 'react-tooltip';
/**
* a button that displays a dropdown menu when clicked
@@ -14,9 +15,12 @@
<a
className="dropdown-button"
href="#!"
+ data-for="group-options"
+ data-tip="Group Options"
... |
14fd4e9a5bcc5ae846c2c1c8806065f91016c59b | src/views/messages/message-rows/forum-topic-post.jsx | src/views/messages/message-rows/forum-topic-post.jsx | var classNames = require('classnames');
var FormattedMessage = require('react-intl').FormattedMessage;
var React = require('react');
var SocialMessage = require('../../../components/social-message/social-message.jsx');
var ForumPostMessage = React.createClass({
type: 'ForumPostMessage',
propTypes: {
a... | var classNames = require('classnames');
var FormattedMessage = require('react-intl').FormattedMessage;
var React = require('react');
var SocialMessage = require('../../../components/social-message/social-message.jsx');
var ForumPostMessage = React.createClass({
type: 'ForumPostMessage',
propTypes: {
a... | Change CSS class .mod-studio-activity to .mod-forum-activity in forum post message row | Change CSS class .mod-studio-activity to .mod-forum-activity in forum post message row
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -16,7 +16,7 @@
var topicLink = '/discuss/topic/' + this.props.topicId + '/unread/';
var classes = classNames(
- 'mod-studio-activity',
+ 'mod-forum-activity',
this.props.className
);
return ( |
5fe51c52fa1fd1f9595f6beb7f80eae2b7084c80 | app/components/Header.jsx | app/components/Header.jsx | 'use strict';
import React from 'react';
import {Link} from 'react-router';
const displayName = 'octopus-library-header';
export default class Header extends React.Component {
render() {
return (
<header>
<div className="container">
<div className="row clearfix">
<div classN... | 'use strict';
import React from 'react';
import {Link} from 'react-router';
const displayName = 'octopus-library-header';
export default class Header extends React.Component {
render() {
return (
<header>
<div className="container">
<div className="row clearfix">
<div classN... | Tweak home link so Octopus icon is part of the link | Tweak home link so Octopus icon is part of the link
| JSX | apache-2.0 | Parametric/OctopusDeployCommunityLibrary,Parametric/OctopusDeployCommunityLibrary,Parametric/OctopusDeployCommunityLibrary,red-gate/Library,alastairtree/Library,red-gate/Library,alastairtree/Library,alastairtree/Library | ---
+++
@@ -12,7 +12,7 @@
<div className="container">
<div className="row clearfix">
<div className="column">
- <h2 className="site-title"><Link to="/">Octopus Deploy Library</Link></h2>
+ <Link to="/"><h2 className="site-title">Octopus Deploy Library</h2></L... |
fcdd7ff09481cc9008d0f32cba9192242c71c0bc | src/app/components/app-container.jsx | src/app/components/app-container.jsx | 'use strict';
import React from 'react';
import App from './app.jsx';
import InitialData from './../data/initial-data.json';
const AppContainer = React.createClass({
getInitialState () {
return {
monsters: null
};
},
getDefaultProps () {
return {
initialData: InitialData
};
},
ha... | 'use strict';
import React from 'react';
import App from './app.jsx';
import { connect } from 'react-redux';
import InitialData from './../data/initial-data.json';
const AppContainer = React.createClass({
//on mounting check localData and use
handleSampleData () {
this.props.dispatch({type: 'LOAD_DATA', mons... | Refactor to use Redux and Sample Data | Refactor to use Redux and Sample Data
| JSX | mit | jkrayer/summoner,jkrayer/summoner | ---
+++
@@ -2,31 +2,19 @@
import React from 'react';
import App from './app.jsx';
+import { connect } from 'react-redux';
import InitialData from './../data/initial-data.json';
const AppContainer = React.createClass({
- getInitialState () {
- return {
- monsters: null
- };
- },
- getDefaultProps... |
136b3f34cf976dc3b0d7035c59a39255d8f37393 | client/src/components/SelectInstrument.jsx | client/src/components/SelectInstrument.jsx | import React from 'react';
const SelectInstrument = ({ handleClick, opacity }) => (
<div id="selectInstrumentRoom">
<div>
<img
id="instLogo"
src="../../../style/InstrumentRoomLogo.png"
alt="logo"
/>
</div>
<div className={opacity('piano')}>
<img
id="piano... | import React from 'react';
const SelectInstrument = ({ handleClick, opacity }) => (
<div id="selectInstrumentRoom">
<div>
<img
id="instLogo"
src="../../../style/InstrumentRoomLogo.png"
alt="logo"
/>
</div>
<div className={opacity('piano')}>
<img
id="piano... | Add fry as an instrument | Add fry as an instrument
| JSX | mit | NerdDiffer/reprise,NerdDiffer/reprise,NerdDiffer/reprise | ---
+++
@@ -25,6 +25,14 @@
onClick={handleClick.bind(null, 'drums')}
/>
</div>
+ <div className={opacity('fry')}>
+ <img
+ id="fryChoose"
+ src="http://i.stack.imgur.com/STEuc.png"
+ alt="fry"
+ onClick={handleClick.bind(null, 'fry')}
+ />
+ </div>
<... |
3210793284d38642262363fe0d2a20564e0aa213 | src/components/docs.jsx | src/components/docs.jsx | import Ecology from "ecology";
import React from "react";
import Radium from "radium";
import settings from "../spectacle-variables";
import SpectacleREADME from "!!raw!spectacle/README.markdown";
class Docs extends React.Component {
getMainStyles() {
return {
position: "relative",
zIndex: "0",
... | import Ecology from "ecology";
import React from "react";
import Radium from "radium";
import {Grid, Cell} from "radium-grid";
import settings from "../spectacle-variables";
import SpectacleREADME from "!!raw!spectacle/README.markdown";
class Docs extends React.Component {
getSectionStyles() {
return {
po... | Set up space for nav. | Set up space for nav.
| JSX | mit | etsfactory/spectacle-docs-ets,etsfactory/spectacle-docs-ets,etsfactory/spectacle-docs-ets | ---
+++
@@ -1,18 +1,22 @@
import Ecology from "ecology";
import React from "react";
import Radium from "radium";
+import {Grid, Cell} from "radium-grid";
import settings from "../spectacle-variables";
import SpectacleREADME from "!!raw!spectacle/README.markdown";
class Docs extends React.Component {
- getM... |
4c47726c25888d0b77133ae1ea2090801e3b7bae | src/components/templates/todo-app/todo-app.jsx | src/components/templates/todo-app/todo-app.jsx | import './todo-app.scss';
import React from 'react/addons';
import AppActions from '../../../js/actions/app-actions';
import TodoStore from '../../../js/stores/todo-store';
import Header from '../../molecules/header/header.jsx';
import TodoList from '../../organisms/todo-list/todo-list.jsx';
const TodoApp = React.c... | import './todo-app.scss';
import React from 'react/addons';
import AppActions from '../../../js/actions/app-actions';
import TodoStore from '../../../js/stores/todo-store';
import Header from '../../molecules/header/header.jsx';
import TodoList from '../../organisms/todo-list/todo-list.jsx';
const TodoApp = React.c... | Remove TodoApp TodoStore listener on unmount | Remove TodoApp TodoStore listener on unmount
| JSX | mit | haner199401/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed,haner199401/React-Node-Project-Seed | ---
+++
@@ -20,6 +20,10 @@
AppActions.getTodos();
},
+ componentWillUnmount: function() {
+ TodoStore.removeChangeListener(this._onChange);
+ },
+
_onChange: function() {
this.setState({ todos: TodoStore.getAll() });
}, |
b7b9c0ca71d45b18dc46974c6d10de67d42c63d8 | src/scripts/components/MemberDetails.jsx | src/scripts/components/MemberDetails.jsx | 'use strict';
var React = require('react');
var _ = require('lodash');
var _detailsID = 'member-details';
var MemberDetails = React.createClass({
getSelected: function() {
return _.find(this.props.family.members, function(member) {
return member.id === this.props.focus;
}, this);
},
render: func... | 'use strict';
var React = require('react');
var _ = require('lodash');
var _detailsID = 'member-details';
var MemberDetails = React.createClass({
getSelected: function() {
return _.find(this.props.family.members, function(member) {
return member._id === this.props.focus;
}, this);
},
render: fun... | Fix member details for new schema | Fix member details for new schema
| JSX | mit | lumc-nested/nested-editor,lumc-nested/nested-editor | ---
+++
@@ -8,7 +8,7 @@
var MemberDetails = React.createClass({
getSelected: function() {
return _.find(this.props.family.members, function(member) {
- return member.id === this.props.focus;
+ return member._id === this.props.focus;
}, this);
},
|
bbbe0f8836ecd89b5c6f791f3c122a37b3d3cdef | src/views/preview/meta.jsx | src/views/preview/meta.jsx | const React = require('react');
const Helmet = require('react-helmet').default;
const projectShape = require('./projectshape.jsx').projectShape;
const Meta = props => {
const {id, title, instructions, author} = props.projectInfo;
// Do not want to render any meta tags unless all the info is loaded
// Che... | const React = require('react');
const Helmet = require('react-helmet').default;
const projectShape = require('./projectshape.jsx').projectShape;
const Meta = props => {
const {id, title, instructions, author} = props.projectInfo;
// Do not want to render any meta tags unless all the info is loaded
// Che... | Fix linter issues with prop ordering | Fix linter issues with prop ordering | JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -30,8 +30,8 @@
property="og:description"
/>
<link
+ href={`https://scratch.mit.edu/projects/${id}`}
rel="canonical"
- href={`https://scratch.mit.edu/projects/${id}`}
/>
</Helmet>
); |
8183b5822b600f0c93bfb75486e9635f6838b2aa | ui/component/publishText/view.jsx | ui/component/publishText/view.jsx | // @flow
import React from 'react';
import { FormField } from 'component/common/form';
import Button from 'component/button';
import usePersistedState from 'effects/use-persisted-state';
import Card from 'component/common/card';
type Props = {
title: ?string,
description: ?string,
disabled: boolean,
updatePubl... | // @flow
import React from 'react';
import { FormField } from 'component/common/form';
import usePersistedState from 'effects/use-persisted-state';
import Card from 'component/common/card';
type Props = {
title: ?string,
description: ?string,
disabled: boolean,
updatePublishForm: ({}) => void,
};
function Pub... | Update markdown-toggle style in Publish to the new quick-action style for consistency with Comments. | Update markdown-toggle style in Publish to the new quick-action style for consistency with Comments.
| JSX | mit | lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-app | ---
+++
@@ -1,7 +1,6 @@
// @flow
import React from 'react';
import { FormField } from 'component/common/form';
-import Button from 'component/button';
import usePersistedState from 'effects/use-persisted-state';
import Card from 'component/common/card';
@@ -41,14 +40,9 @@
value={description}
... |
629929a805c34aa3f5ada8009012b1c8bed46003 | client/modules/core/components/poll_list.jsx | client/modules/core/components/poll_list.jsx | import React, { PropTypes } from 'react';
import Poll from '../containers/poll.js';
const PollList = ({polls}) => (
<ul>
{polls.map((poll) => {
return (
<Poll
key={poll._id}
poll={poll}
/>
);
})}
</ul>
);
PollList.propTypes = {
polls: PropTypes.array
};
ex... | import React, { PropTypes } from 'react';
import Poll from '../containers/poll.js';
const PollList = ({polls}) => (
<ul style={{paddingLeft: 0}}>
{polls.map((poll) => {
return (
<Poll
key={poll._id}
poll={poll}
/>
);
})}
</ul>
);
PollList.propTypes = {
poll... | Fix styling issue with PollList | Fix styling issue with PollList
| JSX | mit | thancock20/voting-app,thancock20/voting-app | ---
+++
@@ -2,7 +2,7 @@
import Poll from '../containers/poll.js';
const PollList = ({polls}) => (
- <ul>
+ <ul style={{paddingLeft: 0}}>
{polls.map((poll) => {
return (
<Poll |
f1dcd0542cead90a9985ece1a50b86d943eb7b48 | components/dashboards-web-component/src/auth/Logout.jsx | components/dashboards-web-component/src/auth/Logout.jsx | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... | Delete saved dashboard thumbnails on logout. | Delete saved dashboard thumbnails on logout.
| JSX | apache-2.0 | dilini-muthumala/carbon-dashboards,wso2/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,dilini-muthumala/carbon-dashboards,lasanthaS/carbon-dashboards,ksdperera/carbon-dashboards,dilini-muthumala/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,wso2/carbon-dashboards | ---
+++
@@ -20,6 +20,7 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
+import DashboardThumbnail from '../utils/DashboardThumbnail';
import AuthManager from './utils/AuthManager';
/**
@@ -28,10 +29,10 @@
export default class Logout extends Component {
/**
... |
94a6952e89d186051299c991128eb5ab378777fd | src/fieldContainer.jsx | src/fieldContainer.jsx | import _ from "lodash";
import React, { Component } from "react";
export default (ComposedComponent) => {
return class FieldContainer extends Component {
static defaultProps = {
defaultValue: null,
isFormInput: true
}
componentDidMount() {
this.onChange(this.props.defaultValue);
}
... | import _ from "lodash";
import React, { Component } from "react";
export default (ComposedComponent) => {
return class FieldContainer extends Component {
static defaultProps = {
defaultValue: null,
isFormInput: true
}
componentDidMount() {
this.onChange(this.props.defaultValue);
}
... | Check if field.data is undefined rather than falsy | Check if field.data is undefined rather than falsy
We don't mind if field.data is null (which it will be on component mount unless a different default value is provided). If field.data is null we want that to go into the values tree as null rather than returning the entire data object which it was doing previously.
| JSX | mit | mwillmott/morph-forms | ---
+++
@@ -15,7 +15,7 @@
getValues(data) {
if (typeof data === "object" && data !== null) {
return _.mapValues(data, (field) => {
- if (field.data) {
+ if (typeof field.data !== "undefined") {
return this.getValues(field.data);
} else {
retu... |
cde811f4c5e14edcbf3396c95c2fb5b164c6f2b4 | app/assets/javascripts/components/mission.js.jsx | app/assets/javascripts/components/mission.js.jsx | class Mission extends React.Component {
render() {
return(
<div className="row">
<div className="col-sm-1 col-md-3"></div>
<div className="col-sm-10 col-md-6">
<div className="panel panel-default">
<div className="panel-heading">
<h3 className="panel-title">
... | class Mission extends React.Component {
render() {
return(
<div className="row">
<div className="col-sm-1"></div>
<div className="col-sm-10">
<div className="panel panel-default">
<div className="panel-heading">
<h3 className="panel-title">
Our Mission
... | Fix width of Mission component to standard | Fix width of Mission component to standard
| JSX | mit | danmckeon/crconnect,danmckeon/crconnect,danmckeon/crconnect | ---
+++
@@ -2,8 +2,8 @@
render() {
return(
<div className="row">
- <div className="col-sm-1 col-md-3"></div>
- <div className="col-sm-10 col-md-6">
+ <div className="col-sm-1"></div>
+ <div className="col-sm-10">
<div className="panel panel-default">
<div className="... |
bd870a2ce12f4e577ef01698a65967a03cad40b7 | src/client/public/components/home/Home.jsx | src/client/public/components/home/Home.jsx | var React = require('react');
var Flux = require('react-flux');
var Router = require('react-router');
var {Route, RouteHandler, Link } = Router;
var Home = React.createClass({
render: function () {
return (
<div>
<h3>Welcome home!</h3>
<RouteHandler/>
</div>
);
}
});
module... | var React = require('react');
var Flux = require('react-flux');
var Router = require('react-router');
var Bootstrap = require('react-bootstrap');
var {Route, RouteHandler, Link } = Router;
var {Navbar, Nav, NavItem, DropdownButton, MenuItem} = Bootstrap;
var Home = React.createClass({
mixins: [
Router.Navi... | Add a simple bootstrap navbar and event handlers to main home view | Add a simple bootstrap navbar and event handlers to main home view
| JSX | apache-2.0 | andrewfhart/coinbox,andrewfhart/coinbox | ---
+++
@@ -1,14 +1,44 @@
var React = require('react');
var Flux = require('react-flux');
var Router = require('react-router');
+var Bootstrap = require('react-bootstrap');
+
var {Route, RouteHandler, Link } = Router;
+var {Navbar, Nav, NavItem, DropdownButton, MenuItem} = Bootstrap;
var Home = React.crea... |
7854b4df2d04f405b12c61f7fd1761786f0c0100 | src/components/Home.jsx | src/components/Home.jsx | 'use strict';
import React, { Component } from 'react';
export default class Home extends Component {
render() {
return (
<main className='card card--about' role='main'>
<h1 className='text-center'>Welcome</h1>
<p>My name is Erick Mock, and I'm a web developer and designer. I have a certi... | 'use strict';
import React, { Component } from 'react';
export default class Home extends Component {
render() {
return (
<main className='card card--about' role='main'>
<h1 className='text-center'>Welcome</h1>
<p>I'm a web developer and designer. I have a certificate in advanced software... | Refresh content on home page and then comment out github link since not as active on it (for now) | Refresh content on home page and then comment out github link since not as active on it (for now)
| JSX | mit | kcirekcom/portfolio,kcirekcom/portfolio | ---
+++
@@ -8,10 +8,10 @@
<main className='card card--about' role='main'>
<h1 className='text-center'>Welcome</h1>
- <p>My name is Erick Mock, and I'm a web developer and designer. I have a certificate in advanced software development in full stack JavaScript along with a degree in psychology... |
a9ba27ef97f0e5610e27f1975f2f27133d3770b6 | src/views/jobs/jobs.jsx | src/views/jobs/jobs.jsx | var React = require('react');
var render = require('../../lib/render.jsx');
var FormattedMessage = require('react-intl').FormattedMessage;
var Page = require('../../components/page/www/page.jsx');
require('./jobs.scss');
var Jobs = React.createClass({
type: 'Jobs',
render: function () {
return (
... | var React = require('react');
var render = require('../../lib/render.jsx');
var FormattedMessage = require('react-intl').FormattedMessage;
var Page = require('../../components/page/www/page.jsx');
require('./jobs.scss');
var Jobs = React.createClass({
type: 'Jobs',
render: function () {
return (
... | Fix gh-1404: Add Junior Designer | Fix gh-1404: Add Junior Designer | JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -38,6 +38,14 @@
MIT Media Lab, Cambridge, MA (or Remote)
</span>
</li>
+ <li>
+ <a href="https://www.media.mit.edu/about/job-opportunities/junior-web-... |
b795db2afbdc9c6bca2a4e96c03444f12d76a304 | app/javascript/app/components/footer/footer-component.jsx | app/javascript/app/components/footer/footer-component.jsx | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import BottomBar from 'components/footer/bottom-bar';
import Contact from 'components/contact';
import layout from 'styles/layout.scss';
import styles from './footer-styles.scss';
class Footer extends PureC... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import BottomBar from 'components/footer/bottom-bar';
import Contact from 'components/contact';
import layout from 'styles/layout.scss';
import styles from './footer-styles.scss';
class Footer extends PureC... | Hide logos on about page | Hide logos on about page
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -11,32 +11,34 @@
class Footer extends PureComponent {
// eslint-disable-line react/prefer-stateless-function
render() {
- const { partners } = this.props;
+ const { partners, location } = this.props;
const className = cx(styles.footer, styles.border);
return (
<footer classNam... |
6c2c004109353275b3a262933295212a69a04a35 | static/js/src/User.jsx | static/js/src/User.jsx | var React = require('react');
var util = require('./util');
var User = React.createClass({
handleClick: function(e){
if (this.props.onClick) {
this.props.onClick.call(this, e, this.props.user);
}
},
handleConnectedClick: function(e){
if (this.props.handleConnectedClick) ... | var React = require('react');
var util = require('./util');
var User = React.createClass({
handleClick: function(e){
if (this.props.onClick) {
this.props.onClick.call(this, e, this.props.user);
}
},
handleConnectedClick: function(e){
if (this.props.handleConnectedClick) ... | Add blocked class to user | Add blocked class to user
| JSX | mit | ebenpack/chatblast,ebenpack/chatblast,ebenpack/chatblast | ---
+++
@@ -14,14 +14,18 @@
},
render: function() {
var user = this.props.user;
+ var blocked = this.props.blocked;
var extras = '';
+ var userClass = 'user';
if (this.props.showConnected) {
- var blockedText = ' | ' + (this.props.blocked ? 'Unblock' : 'Bl... |
36a09a3b928b8ac1c506a98ca70a154dc56f96cb | app/javascript/packs/agendum/agendum_list.jsx | app/javascript/packs/agendum/agendum_list.jsx | import React from 'react';
// Controls
import Agendum from './agendum';
// Utils
import _ from 'lodash';
/*
* Create a list of Agendum.
*/
const AgendumList = (props) => {
return(
<div className="row">
{
props.agenda.map((agendum, key) => {
return(
... | import React from 'react';
// Controls
import Agendum from './agendum';
// Utils
import _ from 'lodash';
/*
* Create a list of Agendum.
*/
const AgendumList = (props) => {
return(
<div className="row">
{
props.agenda.map((agendum) => {
return(
... | Fix agendums not deleting correctly. | Fix agendums not deleting correctly.
| JSX | mit | robyparr/adjourn,robyparr/adjourn,robyparr/adjourn | ---
+++
@@ -13,9 +13,9 @@
return(
<div className="row">
{
- props.agenda.map((agendum, key) => {
+ props.agenda.map((agendum) => {
return(
- <div className="col m4" key={key}>
+ <div className="... |
07323eb5e36df0987afa0772d2df499fefc008ee | src/client/components/Dropdown/Dropdown.jsx | src/client/components/Dropdown/Dropdown.jsx | import React, { Component } from 'react';
import uuid from "uuid";
import classNames from "classnames";
export default class Dropdown extends Component {
constructor(props) {
super(props);
this.updateScroller = this.updateScroller.bind(this);
}
componentDidMount() {
this.updateScro... | import React, { Component } from 'react';
import uuid from "uuid";
import classNames from "classnames";
export default class Dropdown extends Component {
constructor(props) {
super(props);
this.updateScroller = this.updateScroller.bind(this);
}
componentDidMount() {
this.updateScro... | Rename click handler, add default scroll opts | Rename click handler, add default scroll opts
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -25,12 +25,12 @@
}
render () {
- const {items, className, handleClick} = this.props;
+ const {items, className, onClick} = this.props;
const classes = classNames(className, "nano");
return (
<div ref="dropdown" className={classes}>
- ... |
3506ee326066a519f7a01d2dfbf508495b230dbd | src/pages/MemeViewer.jsx | src/pages/MemeViewer.jsx | import React from "react";
import { Link } from "react-router";
import Board from "../components/Board";
import Thread from "../components/Thread";
export default class MemeViewer extends React.Component {
constructor() {
super()
}
render() {
return (
<div className="MemeViewe... | import React from "react";
import Board from "../components/Board";
import Thread from "../components/Thread";
export default class MemeViewer extends React.Component {
constructor(props) {
super(props);
this.requestBoard.bind(this);
this.onThreadRequest.bind(this);
this.state = ... | Add http to viewer page | Add http to viewer page
| JSX | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -1,20 +1,53 @@
import React from "react";
-import { Link } from "react-router";
import Board from "../components/Board";
import Thread from "../components/Thread";
export default class MemeViewer extends React.Component {
- constructor() {
- super()
+ constructor(props) {
+ supe... |
0aa968e87a4b4b9c99e7716f1a3576729cd8e6ea | src/components/app.jsx | src/components/app.jsx | import React from 'react';
import {connect} from 'react-redux';
import css from './app.styl';
export class App extends React.Component {
static propTypes = {
files: React.PropTypes.object
}
render() {
return (
<div className="app">
<h1>Refractor</h1>
<div className={css.sideBySid... | import React from 'react';
import {connect} from 'react-redux';
import css from './app.styl';
class App extends React.Component {
static propTypes = {
files: React.PropTypes.object
}
render() {
return (
<div className="app">
<h1>Refractor</h1>
<div className={css.sideBySide}>
... | Fix babel 6 export issue | Fix babel 6 export issue | JSX | mit | kpdecker/refractor,kpdecker/refractor | ---
+++
@@ -3,7 +3,7 @@
import css from './app.styl';
-export class App extends React.Component {
+class App extends React.Component {
static propTypes = {
files: React.PropTypes.object
}
@@ -30,4 +30,8 @@
}
}
+
+// Hack around https://github.com/babel/babel/issues/2868
+export {App};
+
export ... |
c3acb8139bd998be0575885d0a32bc44d7526fa8 | examples/react-router-flux/src/components/App.jsx | examples/react-router-flux/src/components/App.jsx | var React = require('react')
var { RouteHandler, Navigation } = require('react-router')
var App = React.createClass({
mixins: [Navigation],
hi() {
this.transitionTo('hello')
},
time() {
this.transitionTo('time')
},
render() {
return (
<div>
<a href="#" onClick={this.hi}>Say hi<... | var React = require('react')
var { RouteHandler, Link } = require('react-router')
var App = React.createClass({
render() {
return (
<div>
<Link to='hello'>Say hi</Link>
<br />
<Link to='time'>What time is it?</Link>
<br />
<RouteHandler {...this.props} />
</div... | Fix link to `hello`, using `Link` components from `react-router` | Fix link to `hello`, using `Link` components from `react-router`
| JSX | mit | goatslacker/iso,scvnathan/iso,michaelBenin/iso,redfieldstefan/iso,kwangkim/iso,scvnathan/iso,d-mon-/iso,michaelBenin/iso,kwangkim/iso | ---
+++
@@ -1,23 +1,13 @@
var React = require('react')
-var { RouteHandler, Navigation } = require('react-router')
+var { RouteHandler, Link } = require('react-router')
var App = React.createClass({
- mixins: [Navigation],
-
- hi() {
- this.transitionTo('hello')
- },
-
- time() {
- this.transitionTo('ti... |
8117a2018912be5ab0737e87ba1858022c33feab | react_app/src/components/pages/SourceDataPage.jsx | react_app/src/components/pages/SourceDataPage.jsx | import React from 'react'
import SourceDataHeader from 'components/headers/SourceDataHeader'
const SourceDataPage = props => {
const source_data_table = (
<div>
{ /* Main content for source data */ }
</div>
)
return (
<div className='data-entry-page'>
<SourceDataHeader {...props} />
<div cl... | import React from 'react'
import SourceDataHeader from 'components/headers/SourceDataHeader'
const SourceDataPage = ({locations, campaigns, indicators}) => {
console.log('locations', locations)
console.log('campaigns', campaigns)
console.log('indicators', indicators)
const source_data_table = (
<div>
{ /... | Update source data page to have access to meta_data | Update source data page to have access to meta_data
| JSX | agpl-3.0 | unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/rhizome | ---
+++
@@ -1,7 +1,12 @@
import React from 'react'
import SourceDataHeader from 'components/headers/SourceDataHeader'
-const SourceDataPage = props => {
+const SourceDataPage = ({locations, campaigns, indicators}) => {
+
+ console.log('locations', locations)
+ console.log('campaigns', campaigns)
+ console.log(... |
c9e8d103b55c1f060965610c8091611a85dfe374 | app/js/static/Page.jsx | app/js/static/Page.jsx | /* eslint-disable react/no-danger */
import React from 'react';
import PropTypes from 'prop-types';
import 'scss/page.scss';
function getPage(page) {
try {
return require('markdown/' + page + '.md'); // eslint-disable-line
} catch (e) {
return null;
}
}
const Static = ({ location }) => {
const page = ... | /* eslint-disable react/no-danger */
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import 'scss/page.scss';
function getPage(page) {
try {
return require('markdown/' + page + '.md'); // eslint-disable-line
} catch (e) {
return null;
}
}
const Sta... | Change Content & Refactor a-tag to a Link component | Change Content & Refactor a-tag to a Link component
| JSX | mit | rit-sse/OneRepoToRuleThemAll | ---
+++
@@ -1,6 +1,7 @@
/* eslint-disable react/no-danger */
import React from 'react';
import PropTypes from 'prop-types';
+import { Link } from 'react-router-dom';
import 'scss/page.scss';
function getPage(page) {
@@ -29,12 +30,11 @@
4<span />4
</h1>
</div>
- <... |
490ac7edcdf2b55dac91ff2f234ca5be0173b183 | elements/BodyRoutes.jsx | elements/BodyRoutes.jsx | 'use strict';
var _ = require('lodash');
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var Body = require('theme/Body');
var SectionIndex = require('theme/SectionIndex');
var SiteIndex = require('./SiteIndex.jsx');
var BodyContent = require('./BodyContent.jsx')(Body);
v... | 'use strict';
var _ = require('lodash');
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var Body = require('theme/Body');
var SectionIndex = require('theme/SectionIndex');
var SiteIndex = require('./SiteIndex.jsx');
var BodyContent = require('./BodyContent.jsx')(Body);
v... | Add extra slash to root only for build | Add extra slash to root only for build
Now root should work in development mode. I'm not exactly sure why this
hack is needed. I guess the development and build mode must differ in
some crucial manner. Ideally we wouldn't need this.
| JSX | mit | antwarjs/antwar,RamonGebben/antwar,RamonGebben/antwar | ---
+++
@@ -12,6 +12,12 @@
var Page = require('./Page.jsx');
var config = require('config');
+
+// XXXXX: for some reason this is needed for regular build to work
+var extraSlash = '/';
+if(__DEV__) {
+ extraSlash = '';
+}
module.exports = (
<Route name='bodyContent' handler={BodyContent} path='/'>
@@ -28,... |
fe82f9a7ddcabb040aa0d5ca0641a75c4bd2987a | src/client/components/ActivityFeed/activities/DataHubEvent.jsx | src/client/components/ActivityFeed/activities/DataHubEvent.jsx | import React from 'react'
import PropTypes from 'prop-types'
import CardUtils from './card/CardUtils'
import { formatStartAndEndDate } from '../../../utils/date'
import { ACTIVITY_TYPE } from '../constants'
import ActivityCardWrapper from './card/ActivityCardWrapper'
import ActivityCardSubject from './card/ActivityCa... | import React from 'react'
import PropTypes from 'prop-types'
import CardUtils from './card/CardUtils'
import { formatStartAndEndDate } from '../../../utils/date'
import { ACTIVITY_TYPE } from '../constants'
import ActivityCardWrapper from './card/ActivityCardWrapper'
import ActivityCardSubject from './card/ActivityCa... | Add organiser, service type and lead team variables to metadata and render them | Add organiser, service type and lead team variables to metadata and render them
| JSX | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | ---
+++
@@ -11,7 +11,7 @@
export default function DataHubEvent({ activity: event }) {
const eventObject = event.object
- const name = eventObject.name
+ const eventName = eventObject.name
const date = formatStartAndEndDate(eventObject.startTime, eventObject.endTime)
const organiser = eventObject['dit:or... |
d976add968d53b97111610389a28972b7ccedaf0 | src/components/Home.jsx | src/components/Home.jsx | import React, { Component } from 'react'
import classNames from 'classnames'
import { Route, withRouter } from 'react-router-dom'
import { translate } from 'cozy-ui/react/I18n'
import { Main, Content } from 'cozy-ui/react/Layout'
import Konnector from 'components/Konnector'
import Applications from 'components/Applic... | import React, { Component } from 'react'
import classNames from 'classnames'
import { Route, withRouter, Redirect } from 'react-router'
import { translate } from 'cozy-ui/react/I18n'
import { Main, Content } from 'cozy-ui/react/Layout'
import Konnector from 'components/Konnector'
import Applications from 'components/... | Add redirect to handle few wrong route | fix: Add redirect to handle few wrong route
| JSX | agpl-3.0 | cozy/cozy-home,cozy/cozy-home,cozy/cozy-home | ---
+++
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import classNames from 'classnames'
-import { Route, withRouter } from 'react-router-dom'
+import { Route, withRouter, Redirect } from 'react-router'
import { translate } from 'cozy-ui/react/I18n'
import { Main, Content } from 'cozy-ui/react/Layou... |
4300486293e5ac7815ef22bd1e649433d7b2daeb | example/app/screens/todo/components/main-section/toggle-all.jsx | example/app/screens/todo/components/main-section/toggle-all.jsx | import React from 'react'
import {wrap} from 'tide'
class ToggleAll extends React.Component {
onChange = () => {
this.props.tide.actions.todo.toggleAllCompleted()
};
render() {
const all = this.props.todos.every((todo) => todo.get('completed'))
return (
<span>
<input
checked=... | import React from 'react'
import {wrap} from 'tide'
class ToggleAll extends React.Component {
onChange = () => {
this.props.tide.actions.todo.toggleAllCompleted()
};
render() {
const all = this.props.todos.every((todo) => todo.get('completed'))
return (
<span>
<input
checked=... | Update tide example to have working toggle all button | Update tide example to have working toggle all button
| JSX | mit | tictail/tide,tictail/tide,tictail/tide | ---
+++
@@ -14,6 +14,7 @@
checked={all}
onChange={this.onChange}
className="toggle-all"
+ id="toggle-all"
type="checkbox"
/>
<label htmlFor="toggle-all"> |
55e8f2c3230277d126e67359ebdd98e82a03151e | 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 openModal = true;
const Register = () => (
<div className="join">
<JoinModal
isOpen={openModal}
key="scratch3registration"
... | 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');
const openModal = true;
const Register = () => (
<ErrorBoundary>
<JoinModal
... | Add in the error boundary. | Add in the error boundary.
| JSX | bsd-3-clause | LLK/scratch-www,LLK/scratch-www | ---
+++
@@ -1,14 +1,15 @@
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');
const openModal = true;
const Register = () => (
- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.