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
b1b87af469f2495571400d1467cc5770952ef334
assets-server/components/index.jsx
assets-server/components/index.jsx
'use strict'; import React from 'react/addons'; import App from './app.jsx'; const loadApp = () => { React.renderComponent(<App />, document.body); }; document.addEventListener('DOMContentLoaded', loadApp);
'use strict'; import React from 'react/addons'; import App from './app.jsx'; document.addEventListener('DOMContentLoaded', e => { React.render(<App />, document.body); });
Attach callback inside the app class loader
Attach callback inside the app class loader
JSX
mit
renemonroy/es6-scaffold,renemonroy/es6-scaffold
--- +++ @@ -3,8 +3,6 @@ import React from 'react/addons'; import App from './app.jsx'; -const loadApp = () => { - React.renderComponent(<App />, document.body); -}; - -document.addEventListener('DOMContentLoaded', loadApp); +document.addEventListener('DOMContentLoaded', e => { + React.render(<App />, document.b...
b69ec0044b9e3f68d00bd670c51c071d073d237d
client/src/components/UserList.jsx
client/src/components/UserList.jsx
import React from 'react'; import { Link } from 'react-router-dom'; const UserList = (props) => { return ( <div> {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks}><Link to="/inventory"><div className="changeColorForUserList">{user}</div></Link></div>))} </div> ); }; export default Us...
import React from 'react'; import { Link } from 'react-router-dom'; const UserList = (props) => { return ( <div> {props.addUser.map((user)=>(<div className="user" key={user} onClick={props.passInCooks}>Continue as <Link to="/inventory">{user}</Link></div>))} <div>or <Link to="/users">go back</Link> and sel...
Add option to go back and select a different user
Add option to go back and select a different user
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -4,7 +4,8 @@ const UserList = (props) => { return ( <div> - {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks}><Link to="/inventory"><div className="changeColorForUserList">{user}</div></Link></div>))} + {props.addUser.map((user)=>(<div className="user" key={user} onClick=...
5c6b48b48aa13f13e91606cb9a8fdee6bc6b91e3
webapp/components/BuildCoverage.jsx
webapp/components/BuildCoverage.jsx
import React, {Component} from 'react'; import PropTypes from 'prop-types'; export default class BuildCoverage extends Component { static propTypes = { build: PropTypes.object.isRequired }; getCoverage() { let {build} = this.props; if (build.status !== 'finished') return ''; if (!build.stats.cov...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; export default class BuildCoverage extends Component { static propTypes = { build: PropTypes.object.isRequired }; getCoverage() { let {build} = this.props; if (build.status !== 'finished') return ''; if (!build.stats.cov...
Hide coverage information when zero diff coverage
Hide coverage information when zero diff coverage
JSX
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
--- +++ @@ -10,10 +10,10 @@ let {build} = this.props; if (build.status !== 'finished') return ''; if (!build.stats.coverage) return ''; - if (build.stats.coverage.diff_lines_covered === 0) return '0%'; let totalDiffLines = build.stats.coverage.diff_lines_uncovered + build.stats.coverage....
7c62918b5479d8b2d9e66c0d4b7995f11291709e
app/assets/javascripts/components/news_feed/news_feed_item_bounty_win.js.jsx
app/assets/javascripts/components/news_feed/news_feed_item_bounty_win.js.jsx
var NewsFeedItemEvent = require('./news_feed_item_event.js.jsx'); module.exports = React.createClass({ displayName: 'NewsFeedItemBountyWin', propTypes: { actor: React.PropTypes.object.isRequired, target: React.PropTypes.object.isRequired }, render: function() { var actor = this.props.actor; va...
var NewsFeedItemEvent = require('./news_feed_item_event.js.jsx'); module.exports = React.createClass({ displayName: 'NewsFeedItemBountyWin', propTypes: { actor: React.PropTypes.object.isRequired, target: React.PropTypes.object.isRequired }, render: function() { var actor = this.props.actor; va...
Fix styling of usernames in win event
Fix styling of usernames in win event
JSX
agpl-3.0
lachlanjc/meta,assemblymade/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,assemblymade/meta
--- +++ @@ -13,10 +13,10 @@ return ( <NewsFeedItemEvent> - <a href={target.url}>{target.username}</a> + <a href={target.url} className="black bold">{target.username}</a> {' '} was awarded this by {' '} - <a href={actor.url}>{actor.username}</a> + <a href={actor.url...
da3189d073ea293a236ccf6001052aa3dbaebdfb
src/apps/draw.jsx
src/apps/draw.jsx
import React from 'react'; import { Link } from 'react-router'; import Grid from '../components/grid.jsx'; import { drawColumn } from '../utils/grid_helper'; import { rows, columns } from '../utils/configuration'; class Draw extends React.Component { constructor() { super(); this.state = { board: this.crea...
import React from 'react'; import { Link } from 'react-router'; import Grid from '../components/grid.jsx'; import Column from '../components/column.jsx'; import Row from '../components/row.jsx'; import Led from '../components/led.jsx'; import { rows, columns } from '../utils/configuration'; class Draw extends React....
Add onClick handler to toggle LEDs
Add onClick handler to toggle LEDs
JSX
mit
jonathanweiss/pixelboard,jonathanweiss/pixelboard
--- +++ @@ -2,7 +2,10 @@ import { Link } from 'react-router'; import Grid from '../components/grid.jsx'; -import { drawColumn } from '../utils/grid_helper'; +import Column from '../components/column.jsx'; +import Row from '../components/row.jsx'; +import Led from '../components/led.jsx'; + import { rows, columns...
f0eff0daa10eef5c93708fa43c0b5099dd02dc3e
frontend/components/topic-input.jsx
frontend/components/topic-input.jsx
import React, { Component } from 'react' import {default as ReactSelect} from 'react-select' //import css from 'react-select/dist/react-select.css' export default class TopicInput extends Component { constructor(props){ super(props); let topics = []; if (props.value){ topics = props.value.split(','...
import React, { Component } from 'react' import CreatableSelect from 'react-select/creatable'; export default class TopicInput extends Component { constructor(props){ super(props); let topics = []; if (props.value){ topics = props.value.split(',').map(e => { return {label: e, value: e};}); } ...
Update topic input for react-select version upgrade
Update topic input for react-select version upgrade
JSX
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
--- +++ @@ -1,6 +1,5 @@ import React, { Component } from 'react' -import {default as ReactSelect} from 'react-select' -//import css from 'react-select/dist/react-select.css' +import CreatableSelect from 'react-select/creatable'; export default class TopicInput extends Component { constructor(props){ @@ -23,14 ...
04df1dc897abfce7f2f9772a8e5c3c5c6695f95e
src/apps/investments/client/opportunities/UnfilteredLargeCapitalOpportunityCollection.jsx
src/apps/investments/client/opportunities/UnfilteredLargeCapitalOpportunityCollection.jsx
import React from 'react' import { connect } from 'react-redux' import { CollectionList } from '../../../../client/components/' import { TASK_GET_OPPORTUNITIES_LIST, ID, state2props } from './state' import { INVESTMENTS__OPPORTUNITIES_LOADED, INVESTMENTS__OPPORTUNITIES_SELECT_PAGE, } from '../../../../client/actio...
import React from 'react' import { connect } from 'react-redux' import { CollectionList } from '../../../../client/components/' import { TASK_GET_OPPORTUNITIES_LIST, ID, state2props } from './state' import { INVESTMENTS__OPPORTUNITIES_LOADED, INVESTMENTS__OPPORTUNITIES_SELECT_PAGE, } from '../../../../client/actio...
Make task props an inline
C1: Make task props an inline
JSX
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -15,19 +15,17 @@ onPageClick, isComplete, }) => { - const collectionListTask = { - name: TASK_GET_OPPORTUNITIES_LIST, - id: ID, - progressMessage: 'loading opportunities...', - startOnRender: { - payload: { page }, - onSuccessDispatch: INVESTMENTS__OPPORTUNITIES_LOADED, - }...
5a330e95ae4239c6f4a6da0b2e6a38b508309b01
frontend/components/tab-selector.jsx
frontend/components/tab-selector.jsx
import React from 'react' export default class TabSelector extends React.Component { constructor(props){ super(props); this.state = { activeTab: 0 }; this._handleTabSwitch = this._handleTabSwitch.bind(this); } _handleTabSwitch(tabIndex, e){ e.preventDef...
import React from 'react' export default class TabSelector extends React.Component { constructor(props){ super(props); this.state = { activeTab: 0 }; this._handleTabSwitch = this._handleTabSwitch.bind(this); } _handleTabSwitch(tabIndex, e){ e.preventDef...
Fix nav pills on team organizer dash
Fix nav pills on team organizer dash
JSX
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
--- +++ @@ -18,8 +18,8 @@ const {header, children} = this.props; const {activeTab} = this.state; var tabs = header.map((heading,i) => - <li role="presentation" key={i} className={i==activeTab&&'active'}> - <a href="#" onClick={this._handleTabSwitch.bind(this,i)}>{h...
977012daf781a1eaea6a49b8b62281ee120eea67
imports/ui/containers/main/index.jsx
imports/ui/containers/main/index.jsx
import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import Main from '../../components/main/index' const mapStateToProps = state => ({ events: state.events, hideCountry: state.hideValues.hideCountry, hideSport: state.hideValues.hideSport }) export default withRouter(connect(mapS...
import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import Main from '../../components/main/index' import { updateBetsSelected } from '../../../api/redux/actions/betsSelected' const mapStateToProps = state => ({ events: state.events, hideCountry: state.hideValues.hideCountry, hid...
Create a event click handler in the main container that tells Redux to update bets selected.
Create a event click handler in the main container that tells Redux to update bets selected.
JSX
mit
LuisLoureiro/placard-wrapper
--- +++ @@ -2,6 +2,7 @@ import { withRouter } from 'react-router-dom' import Main from '../../components/main/index' +import { updateBetsSelected } from '../../../api/redux/actions/betsSelected' const mapStateToProps = state => ({ events: state.events, @@ -9,4 +10,21 @@ hideSport: state.hideValues.hideSp...
7bf66a48f39d6a9dee450bcff2d5f32a765a06d9
src/authentication/MobileRouter.jsx
src/authentication/MobileRouter.jsx
import React from 'react' import { Router, withRouter } from 'react-router' import Authentication from './src/Authentication' import Revoked from './src/Revoked' import { logException } from 'drive/lib/reporter' const MobileRouter = ({ history, appRoutes, isAuthenticated, isRevoked, onAuthenticated, onLog...
import React from 'react' import { Router, withRouter } from 'react-router' import { Authentication, Revoked } from 'cozy-authentication' import { logException } from 'drive/lib/reporter' const MobileRouter = ({ history, appRoutes, isAuthenticated, isRevoked, onAuthenticated, onLogout }) => { if (!isAu...
Use class from npm module
refacto: Use class from npm module
JSX
agpl-3.0
nono/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-drive,nono/cozy-files-v3,y-lohse/cozy-drive,y-lohse/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-drive,nono/cozy-files-v3,nono/cozy-files-v3,y-lohse/cozy-drive
--- +++ @@ -1,8 +1,8 @@ import React from 'react' import { Router, withRouter } from 'react-router' -import Authentication from './src/Authentication' -import Revoked from './src/Revoked' +import { Authentication, Revoked } from 'cozy-authentication' + import { logException } from 'drive/lib/reporter' const M...
be17ca15146a6c4204c05e2147c669e94dc7652c
src/js/components/context_menu.jsx
src/js/components/context_menu.jsx
import Fluxxor from "fluxxor"; import React from "react"; import ContextMenuItem from "./context_menu_item.jsx"; export default React.createClass({ mixins: [ Fluxxor.FluxMixin(React), Fluxxor.StoreWatchMixin('contextmenu') ], getStateFromFlux: function() { var flux = this.getFlux(); var ctx = fl...
import Fluxxor from "fluxxor"; import React from "react"; import ContextMenuItem from "./context_menu_item.jsx"; export default React.createClass({ mixins: [ Fluxxor.FluxMixin(React), Fluxxor.StoreWatchMixin('contextmenu') ], getStateFromFlux: function() { var flux = this.getFlux(); var ctx = fl...
Fix context menu when not RT
Fix context menu when not RT
JSX
mit
uu59/atom-twitter-client,uu59/atom-twitter-client
--- +++ @@ -18,7 +18,7 @@ top: ctx.pos.top, left: ctx.pos.left }, - items: ctx.items + items: ctx.items.filter((item) => item) }; },
39c779a6a2f5c9f34f135faff99a9656653a543d
src/client/components/Sea/Fish.jsx
src/client/components/Sea/Fish.jsx
import React, { Component } from 'react'; import Radium from 'radium'; export const Type = { Small1: 'Small1', Small2: 'Small2', Small3: 'Small3', Small4: 'Small4', Medium1: 'Medium1', Medium2: 'Medium2', Medium3: 'Medium3', Medium4: 'Medium4', Large1: 'Large1', Large2: 'Large2', Large3: 'Large3'...
import React, { Component } from 'react'; import Radium from 'radium'; export const Type = { Small1: 'Small1', Small2: 'Small2', Small3: 'Small3', Small4: 'Small4', Medium1: 'Medium1', Medium2: 'Medium2', Medium3: 'Medium3', Medium4: 'Medium4', Large1: 'Large1', Large2: 'Large2', Large3: 'Large3'...
Remove transition and add static width to fish
Remove transition and add static width to fish
JSX
mit
grant/sharkhacks5000,grant/sharkhacks5000
--- +++ @@ -23,9 +23,9 @@ return ( <li className='Fish' style={{ position: 'absolute', + width: '120px', left: this.props.left, top: this.props.top, - transition: 'ease-in-out 200ms', transform: `scaleX(${this.props.direction})`, }}> <img r...
e32697ab5b98b49bf6b9c03f15a4ba0ebc8204fc
web-server/app/assets/javascripts/components/show-package-component.jsx
web-server/app/assets/javascripts/components/show-package-component.jsx
define(['underscore', 'react', '../mixins/show-model', 'components/create-update', './package-filters/add-package-filters'], function(_, React, showModel, CreateUpdate, AddPackageFilters) { var ShowPackageComponent = React.createClass({ contextTypes: { router: React.PropTypes.func }, mixins: [showM...
define(['underscore', 'react', '../mixins/show-model', 'components/create-update', './package-filters/add-package-filters'], function(_, React, showModel, CreateUpdate, AddPackageFilters) { var ShowPackageComponent = React.createClass({ contextTypes: { router: React.PropTypes.func }, mixins: [showM...
Refactor show package from list to table
Refactor show package from list to table
JSX
mpl-2.0
PDXostc/rvi_sota_server,PDXostc/rvi_sota_server,PDXostc/rvi_sota_server
--- +++ @@ -9,24 +9,40 @@ return this.context.router.getCurrentParams(); }, showView: function() { - var listItems = _.map(this.state.Model.attributes, function(value, key) { + var rows = _.map(this.state.Model.attributes, function(value, key) { return ( - <li> - ...
88b1da70ae3c6eb520ca13a3a01564d75a6b8182
client/app/bundles/course/assessment/submission/components/ScribingView/SavingIndicator.jsx
client/app/bundles/course/assessment/submission/components/ScribingView/SavingIndicator.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from 'react-intl'; import { scribingTranslations as translations } from '../../translations'; const propTypes = { intl: intlShape.isRequired, clearSavingStatus: PropTypes.func.isRequired, isSaving: PropTypes.bool, i...
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from 'react-intl'; import { scribingTranslations as translations } from '../../translations'; const propTypes = { intl: intlShape.isRequired, clearSavingStatus: PropTypes.func.isRequired, isSaving: PropTypes.bool, i...
Use camelCase for inline style names
Use camelCase for inline style names
JSX
mit
Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2
--- +++ @@ -15,7 +15,7 @@ savingStatus: { width: '50px', }, - saving_status_label: { + savingStatusLabel: { fontSize: '14px', fontWeight: '500', letterSpacing: '0px', @@ -43,7 +43,7 @@ <label htmlFor="saving" style={{ - ...style.saving_status_label, + ...
603843f37a8ad69baaf729b1b41f8b05a95a77fb
src/main/webapp/resources/js/pages/projects/linelist/components/Templates/TemplateSelect.jsx
src/main/webapp/resources/js/pages/projects/linelist/components/Templates/TemplateSelect.jsx
import React from "react"; import { Select } from "antd"; const { Option } = Select; const { i18n } = window.PAGE; export function TemplateSelect(props) { const templates = props.templates.toJS(); if (templates.length) { return ( <Select defaultValue={"" + props.current} style={{ width: 2...
import React from "react"; import { Select } from "antd"; const { Option } = Select; const { i18n } = window.PAGE; export function TemplateSelect(props) { const templates = props.templates.toJS(); return ( <Select disabled={templates.length === 0} defaultValue={"" + props.current} style={{ wi...
Disable template selection if none are available.
Disable template selection if none are available.
JSX
apache-2.0
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
--- +++ @@ -5,22 +5,19 @@ const { i18n } = window.PAGE; export function TemplateSelect(props) { const templates = props.templates.toJS(); - if (templates.length) { - return ( - <Select - defaultValue={"" + props.current} - style={{ width: 250 }} - onSelect={id => props.fetchTemplate...
7378b74ae9278c2ffe55587920f3bdc509de3dc8
app/components/wrapped-markdown.jsx
app/components/wrapped-markdown.jsx
import React from 'react'; import markdownz from 'markdownz'; import { browserHistory } from 'react-router'; const Markdown = markdownz.Markdown; const WrappedMarkdown = React.createClass({ propTypes: { content: React.PropTypes.string, project: React.PropTypes.object, header: React.PropTypes.string, }...
import React from 'react'; import markdownz from 'markdownz'; import { browserHistory } from 'react-router'; const Markdown = markdownz.Markdown; const WrappedMarkdown = React.createClass({ propTypes: { content: React.PropTypes.string, project: React.PropTypes.object, header: React.PropTypes.string, }...
Check for ctrl or cmd before overriding Talk links
Check for ctrl or cmd before overriding Talk links
JSX
apache-2.0
amyrebecca/Panoptes-Front-End,parrish/Panoptes-Front-End,parrish/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,zooniverse/Panoptes-Front-End,parrish/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,amyrebecca/Panoptes-Front-End
--- +++ @@ -13,9 +13,11 @@ onClick(e) { const rightButtonPressed = (!!e.button && e.button > 0); + const modifierKey = (e.ctrlKey || e.metaKey); if (e.target.origin === window.location.origin && e.target.pathname !== window.location.pathname && - !rightButtonPressed) { + !rightButto...
ed12cc4461f51db08187b6dc72644e6cbe2319e6
app/views/LeftDrawer/LeftDrawer.jsx
app/views/LeftDrawer/LeftDrawer.jsx
/* Left drawer navigation component */ import React from 'react'; import Drawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem'; import IconButton from 'material-ui/IconButton'; import NavigationMenu from 'material-ui/svg-icons/navigation/menu'; export default class LeftDrawer extends React.Compo...
/* Left drawer navigation component */ import React from 'react'; import Drawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem'; import IconButton from 'material-ui/IconButton'; import NavigationMenu from 'material-ui/svg-icons/navigation/menu'; export default class LeftDrawer extends React.Compo...
Remove unneeded props in drawer
Remove unneeded props in drawer
JSX
mit
AlbertoALopez/polling,AlbertoALopez/polling
--- +++ @@ -20,9 +20,7 @@ render() { return ( <div><IconButton - onTouchTap={this.handleToggle} - targetOrigin={ {horizontal: 'right', vertical: 'top'} } - anchorOrigin={ {horizontal: 'right', vertical: 'top'} }> + ...
8cd552c86e5334e6a8f6253c137af8a54ac13c23
client/components/TextAnalytics.jsx
client/components/TextAnalytics.jsx
import React from 'react'; import { getDefsAndSyns, analyzeText } from '../../server/utils/customTextAnalytics.js'; export default class TextAnalytics extends React.Component { renderAnalytics = (string) => { const analyticsObj = analyzeText(string); let countEachWordResult = analyticsObj.allTotals; let ...
import React from 'react'; import { getDefsAndSyns, analyzeText } from '../../server/utils/customTextAnalytics.js'; export default class TextAnalytics extends React.Component { renderAnalytics = (string) => { const analyticsObj = analyzeText(string); let countEachWordResult = analyticsObj.allTotals; let ...
Fix error (application breaking) when user backspaces to get rid of text
Fix error (application breaking) when user backspaces to get rid of text
JSX
mit
alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor
--- +++ @@ -18,32 +18,35 @@ } render() { - // hold reference of 'this' const temp = this; - - let topThree = this.renderAnalytics(this.props.text).map((word) => { + if (this.props.text) { + let topThree = this.renderAnalytics(this.props.text).map((word) => { + return ( + <di...
49ac5574826369f4aa86aa69c113e4d4720050d6
src/ui/tracking.jsx
src/ui/tracking.jsx
/* @flow */ /** @jsx node */ import { node, Fragment, type ChildType } from 'jsx-pragmatic/src'; export function TrackingBeacon({ url, nonce } : { url : string, nonce : ?string }) : ChildType { return ( <Fragment> <style innerHTML={ ` .tracking-beacon: { ...
/* @flow */ /** @jsx node */ import { node, Fragment, type ChildType } from 'jsx-pragmatic/src'; export function TrackingBeacon({ url, nonce } : { url : string, nonce : ?string }) : ChildType { return ( <Fragment> <style nonce={ nonce } innerHTML={ ` ...
Add nonce to style tag
Add nonce to style tag
JSX
apache-2.0
paypal/paypal-checkout,paypal/paypal-checkout,paypal/paypal-checkout
--- +++ @@ -6,7 +6,9 @@ export function TrackingBeacon({ url, nonce } : { url : string, nonce : ?string }) : ChildType { return ( <Fragment> - <style innerHTML={ ` + <style + nonce={ nonce } + innerHTML={ ` .tracking-beacon: { ...
8358a8440fd354b4208c627dacc37c52056dffba
app/components/organisms/Header.jsx
app/components/organisms/Header.jsx
import React from 'react'; import { translate } from 'react-i18next'; import {Navbar, Nav} from 'react-bootstrap'; import {Link} from 'react-router'; import ExternalLink from '../atoms/ExternalLink'; import HeaderLanguageSelector from '../molecules/HeaderLanguageSelector'; import './Header.css'; const Head...
import React from 'react'; import { translate } from 'react-i18next'; import {Navbar, Nav} from 'react-bootstrap'; import {Link} from 'react-router'; import ExternalLink from '../atoms/ExternalLink'; import HeaderLanguageSelector from '../molecules/HeaderLanguageSelector'; import './Header.css'; const Head...
Use ImmutableJS for webpack config and overrides
Use ImmutableJS for webpack config and overrides
JSX
mit
amcsi/szeremi,amcsi/szeremi
--- +++ @@ -26,7 +26,13 @@ </Navbar.Brand> <HeaderLanguageSelector /> </Navbar.Header> - <Nav pullRight style={{ fontSize: '120%' }}> + <Nav + pullRight + style={{ + textShadow: '1px 1px 2px rgba(0, 0, 0, .5)', + fo...
901f169324a07bf4ef89a6f9195c8bf4b6c97078
src/pages/race-calendar.jsx
src/pages/race-calendar.jsx
import moment from 'moment'; import React from 'react'; import BigCalendar from 'react-big-calendar'; import 'react-big-calendar/lib/css/react-big-calendar.css'; BigCalendar.momentLocalizer(moment); const RaceCalendar = () => <BigCalendar events={[]} />; export default RaceCalendar;
import moment from 'moment'; import React from 'react'; import BigCalendar from 'react-big-calendar'; import 'react-big-calendar/lib/css/react-big-calendar.css'; import Helmet from 'react-helmet'; import ArticleContainer from '../components/article-container'; import CoverImage from '../components/cover-image'; BigCal...
Fix appearance of the race calendar page
Fix appearance of the race calendar page
JSX
mit
simonyiszk/mvk-web,simonyiszk/mvk-web
--- +++ @@ -2,9 +2,28 @@ import React from 'react'; import BigCalendar from 'react-big-calendar'; import 'react-big-calendar/lib/css/react-big-calendar.css'; +import Helmet from 'react-helmet'; +import ArticleContainer from '../components/article-container'; +import CoverImage from '../components/cover-image'; ...
a1f01542669010ac9d0265d1202465f2398c511b
src/templates/landing_pages/_common/outdated_browser_message.jsx
src/templates/landing_pages/_common/outdated_browser_message.jsx
import React from 'react'; const OutdatedBrowserMessage = () => ( <div id='outdated_browser_message' className='invisible'> {it.L('Your web browser ([_1]) is out of date and may affect your trading experience. Proceed at your own risk. [_2]Update browser[_3]', '{brow_name}', '<a href="https://www.whatbrows...
import React from 'react'; const OutdatedBrowserMessage = () => ( <div id='outdated_browser_message' className='invisible' style={{ display: 'none' }}> {it.L('Your web browser ([_1]) is out of date and may affect your trading experience. Proceed at your own risk. [_2]Update browser[_3]', '{brow_name}', '<a...
Hide when binary-style is not available
Hide when binary-style is not available
JSX
apache-2.0
4p00rv/binary-static,raunakkathuria/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,raunakkathuria/binary-static,4p00rv/binary-static,4p00rv/binary-static,raunakkathuria/binary-static,binary-com/binary-static,binary-com/binary-static,kellybinary/binary-static,kellybinary/binary-static,binary-st...
--- +++ @@ -1,7 +1,7 @@ import React from 'react'; const OutdatedBrowserMessage = () => ( - <div id='outdated_browser_message' className='invisible'> + <div id='outdated_browser_message' className='invisible' style={{ display: 'none' }}> {it.L('Your web browser ([_1]) is out of date and may affect ...
b5edc21996dc084dd3326e4f9505ce1f9250a041
src/hooks/withAppsInMaintenance.jsx
src/hooks/withAppsInMaintenance.jsx
import { useState, useEffect } from 'react' import { Registry } from 'cozy-client' const useAppsInMaintenance = client => { const [appsInMaintenance, setAppsInMaintenance] = useState([]) const registry = new Registry({ client }) useEffect(() => { const fetchData = async () => { const newAppsInMa...
import { useState, useEffect } from 'react' import { Registry } from 'cozy-client' const useAppsInMaintenance = client => { const [appsInMaintenance, setAppsInMaintenance] = useState([]) const registry = new Registry({ client }) useEffect(() => { const fetchData = async () => { const newAppsInMa...
Set maintenance hook dependencies to avoid re-renders and re-queries
fix: Set maintenance hook dependencies to avoid re-renders and re-queries
JSX
agpl-3.0
cozy/cozy-home,cozy/cozy-home,cozy/cozy-home
--- +++ @@ -10,11 +10,10 @@ useEffect(() => { const fetchData = async () => { const newAppsInMaintenance = await registry.fetchAppsInMaintenance() - if (newAppsInMaintenance.length !== appsInMaintenance.length) - setAppsInMaintenance(newAppsInMaintenance) + setAppsInMaintenance(newApps...
2b3368f8955dcb63b97b4920cdfbcf0832f9ef33
src/widgets/likert-scale-editor.jsx
src/widgets/likert-scale-editor.jsx
import * as React from "react"; import PropTypes from "prop-types"; import { StyleSheet, css } from "aphrodite"; import { LikertFaces } from './likert-scale.jsx'; const styles = StyleSheet.create({ face: { display: 'inline-block', width: 30, height: 30, margin: 5, verticalAl...
import * as React from "react"; import PropTypes from "prop-types"; import { StyleSheet, css } from "aphrodite"; import { LikertFaces } from './likert-scale.jsx'; const styles = StyleSheet.create({ face: { display: 'inline-block', width: 30, height: 30, margin: 5, verticalAl...
Remove default value for middle option
Remove default value for middle option
JSX
mit
ariabuckles/perseus,ariabuckles/perseus,ariabuckles/perseus,ariabuckles/perseus
--- +++ @@ -20,7 +20,7 @@ }; static defaultProps = { - labels: ["", "", "", "", ""], + labels: ["", "", "", ""], }; constructor(props) {
04d750f1128673f8d7fd0bc22dd9192e1aaf865a
woodstock/src/containers/App.jsx
woodstock/src/containers/App.jsx
import React from 'react'; import PropTypes from 'prop-types'; import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import AppBarHeader from '../components/AppBarHeader'; import UnitList from '../components/UnitList'; import * as UnitActions from '../actions/UnitActions'; const App = ({action...
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import AppBarHeader from '../components/AppBarHeader'; import UnitList from '../components/UnitList'; const App = ({units}) => ( <div> <AppBarHeader/> <UnitList units={units}/> </div> ); App.pro...
Delete bind action that will be necessary in future
Delete bind action that will be necessary in future
JSX
apache-2.0
solairerove/woodstock,solairerove/woodstock,solairerove/woodstock
--- +++ @@ -1,12 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import AppBarHeader from '../components/AppBarHeader'; import UnitList from '../components/UnitList'; -import * as UnitActions from '../actions/...
d866946ce4d92f1cf4841d8199dbc671f2e63338
client/components/LandingButton.jsx
client/components/LandingButton.jsx
// import React from 'react'; // // class LandingView extends React.Component { // constructor(props) { // super(props); // this.state = { // showText: false, // }; // } // // handleClick() { // this.setState({ // showText: true, // }); // } // render() { // return ( // ...
import React from 'react'; export default class LandingButton extends React.Component { constructor(props) { super(props); this.state = { showText: false, }; } render() { return ( <button onClick={this.props.handleLandingBtnClick}>LandingButton</button> ); } }
Apply onClick to change state in App to render correct views
Apply onClick to change state in App to render correct views
JSX
mit
alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor
--- +++ @@ -1,21 +1,16 @@ -// import React from 'react'; -// -// class LandingView extends React.Component { -// constructor(props) { -// super(props); -// this.state = { -// showText: false, -// }; -// } -// -// handleClick() { -// this.setState({ -// showText: true, -// }); -//...
4f42eeb2099791c4d4a6ff305fa0726bff27a929
tutor/specs/components/app.spec.jsx
tutor/specs/components/app.spec.jsx
import { Wrapper, SnapShot } from './helpers/component-testing'; import App from '../../src/components/app'; import User from '../../src/models/user'; jest.mock('../../src/models/user', () => ({ recordSessionStart: jest.fn(), logEvent: jest.fn(), verifiedRoleForCourse() { return 'teacher'; }, isConfirmed...
import { Wrapper, SnapShot } from './helpers/component-testing'; import EnzymeContext from './helpers/enzyme-context'; import App from '../../src/components/app'; import User from '../../src/models/user'; jest.mock('../../src/models/user', () => ({ recordSessionStart: jest.fn(), logEvent: jest.fn(), verifiedRoleF...
Test accessing a non-existant course shows message
Test accessing a non-existant course shows message
JSX
agpl-3.0
openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js
--- +++ @@ -1,5 +1,5 @@ import { Wrapper, SnapShot } from './helpers/component-testing'; - +import EnzymeContext from './helpers/enzyme-context'; import App from '../../src/components/app'; import User from '../../src/models/user'; jest.mock('../../src/models/user', () => ({ @@ -34,4 +34,14 @@ shallow(<App {...
b091c7de782a73a4e95f16257f6241b928661d26
src/js/clearfix.jsx
src/js/clearfix.jsx
var React = require('react'); var BeforeAfterWrapper = require('./before-after-wrapper.jsx'); var ClearFix = React.createClass({ render: function() { var { style, ...other } = this.props; var before = function() { return { content: "' '", display: 'table' } ...
var React = require('react'); var BeforeAfterWrapper = require('./before-after-wrapper'); var ClearFix = React.createClass({ render: function() { var { style, ...other } = this.props; var before = function() { return { content: "' '", display: 'table' } }...
Remove .jsx extension from require
Remove .jsx extension from require
JSX
mit
arkxu/material-ui,gaowenbin/material-ui,tomgco/material-ui,igorbt/material-ui,mikedklein/material-ui,lucy-orbach/material-ui,VirtueMe/material-ui,wustxing/material-ui,demoalex/material-ui,cjhveal/material-ui,Qix-/material-ui,lawrence-yu/material-ui,mulesoft/material-ui,w01fgang/material-ui,esleducation/material-ui,inoc...
--- +++ @@ -1,5 +1,5 @@ var React = require('react'); -var BeforeAfterWrapper = require('./before-after-wrapper.jsx'); +var BeforeAfterWrapper = require('./before-after-wrapper'); var ClearFix = React.createClass({
c2f69a0dc21f86a058f0b4e428969f2f8194cdd5
js/BarCode.jsx
js/BarCode.jsx
var React = require('react'), ioBarcode = require("io-barcode"); module.exports = React.createClass({ propTypes: { code: React.PropTypes.string.isRequired }, componentDidMount() { var placeholder = React.findDOMNode(this.refs.placeholder); try { var canvas = ioBarcode.CODE128B( this...
var React = require('react'), ioBarcode = require("io-barcode"); module.exports = React.createClass({ propTypes: { code: React.PropTypes.string.isRequired }, componentDidMount() { var img = React.findDOMNode(this.refs.img); try { var canvas = ioBarcode.CODE128B( this.props.code, ...
Use img instead of canvas to make barcodes printable
Use img instead of canvas to make barcodes printable
JSX
mit
MrOrz/cdc-barcode,MrOrz/cdc-barcode
--- +++ @@ -6,7 +6,7 @@ code: React.PropTypes.string.isRequired }, componentDidMount() { - var placeholder = React.findDOMNode(this.refs.placeholder); + var img = React.findDOMNode(this.refs.img); try { var canvas = ioBarcode.CODE128B( this.props.code, @@ -16,16 +16,18 @@ ...
492884a4248830757eccb8779cdb75cc72dbb22b
examples/components/computed-well.jsx
examples/components/computed-well.jsx
var React = require('react'); var Radium = require('../../modules/index'); var { StyleResolverMixin } = Radium; var ComputedWell = React.createClass({ mixins: [ StyleResolverMixin ], getInitialState: function () { return { dynamicBg: null } }, getStyles: function () { return { padding...
var React = require('react'); var Radium = require('../../modules/index'); var { StyleResolverMixin } = Radium; var ComputedWell = React.createClass({ mixins: [ StyleResolverMixin ], getInitialState: function () { return { dynamicBg: '#000' } }, getStyles: function () { return { paddi...
Fix broken computed well example
Fix broken computed well example
JSX
mit
KenPowers/radium,richardfickling/radium,KenPowers/radium,FormidableLabs/radium,WillJHaggard/radium,rolandpoulter/radium,basarat/radium,kof/radium,yetone/radium,bobbyrenwick/radium,namuol/radium-insert-rule,clessg/radium,lexical-labs/radium,nfl/radium,haridusenadeera/radium,bencao/radium,azazdeaz/radium,MicheleBertoli/r...
--- +++ @@ -7,7 +7,7 @@ getInitialState: function () { return { - dynamicBg: null + dynamicBg: '#000' } }, @@ -15,16 +15,8 @@ return { padding: "1em", borderRadius: 5, - background: "#000" + background: this.state.dynamicBg }; - }, - - buildComputedSty...
5d0bcf231a22c936f497daf1734851f403614037
src/jsx/components/Intro.jsx
src/jsx/components/Intro.jsx
import React, { Component } from 'react'; export default class Intro extends Component { render() { return ( <section className="Intro Grid"> <div className="Grid-fullColumn"> <h1 className="Intro-title">Hi! I'm David Minnerly</h1> <p className="Intro-text">I'm a programmer, 3D...
import React, { Component } from 'react'; export default class Intro extends Component { render() { return ( <section className="Intro Grid"> <div className="Grid-fullColumn"> <h1 className="Intro-title">Hi! I'm David Minnerly</h1> <p className="Intro-text">I'm a programmer, 3D...
Remove _blank target from Twitter and GitHub links
Remove _blank target from Twitter and GitHub links These were added under the assumption that it would be expected behavior for these two links to open in a new tab. Going against default behavior isn't really a good thing, so we've opted to just make them behave normally.
JSX
mit
VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website,VoxelDavid/voxeldavid-website
--- +++ @@ -7,7 +7,7 @@ <div className="Grid-fullColumn"> <h1 className="Intro-title">Hi! I'm David Minnerly</h1> - <p className="Intro-text">I'm a programmer, 3D modeler, and I also make websites on occasion. I frequently post about what I'm doing on <a target="_blank" href="https://tw...
97334c9474dcd1ea01ff0365249f78d72ed84f45
src/components/TabGroupListItem.jsx
src/components/TabGroupListItem.jsx
import React, { PropTypes } from 'react'; const TabGroupListItem = ({ name }) => <div>{ name }</div>; TabGroupListItem.propTypes = { name: PropTypes.string, }; export default TabGroupListItem;
import React, { PropTypes } from 'react'; const TabGroupListItem = ({ name }) => <div> { name } <button>Open</button> <button>Remove</button> </div>; TabGroupListItem.propTypes = { name: PropTypes.string, }; export default TabGroupListItem;
Add open and remove buttons
Add open and remove buttons
JSX
mit
hharnisc/tabbie,hharnisc/tabbie
--- +++ @@ -1,7 +1,11 @@ import React, { PropTypes } from 'react'; const TabGroupListItem = ({ name }) => - <div>{ name }</div>; + <div> + { name } + <button>Open</button> + <button>Remove</button> + </div>; TabGroupListItem.propTypes = { name: PropTypes.string,
ab06f67978e0d5be3db278689256eaba1462256c
components/ExamplePluginComponent.jsx
components/ExamplePluginComponent.jsx
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...
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...
Fix small bug in examplePlugin :D
Fix small bug in examplePlugin :D
JSX
apache-2.0
mesosphere/marathon-ui-example-plugin
--- +++ @@ -10,7 +10,7 @@ getInitialState: function () { return { - appsCount: 0 + appsCount: ExamplePluginStore.apps.length }; },
4c79a52a6decfb1b3fa35d36992ef0caa0aec7e1
src/containers/ComicListContainer.jsx
src/containers/ComicListContainer.jsx
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import ComicList from '../components/ComicList' import * as Actions from '../actions' class ComicListContainer extends React.Component { static propTypes = { filter: PropTypes.object.isRequired, comics: PropTypes.array.isRequir...
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import ComicList from '../components/ComicList' import * as Actions from '../actions' class ComicListContainer extends React.Component { static propTypes = { filter: PropTypes.object.isRequired, comics: PropTypes.array.isRequir...
Fix safair throw unsupport construct regex from another regex
Fix safair throw unsupport construct regex from another regex
JSX
mit
rickychien/comiz,rickychien/comiz
--- +++ @@ -27,7 +27,7 @@ let reg try { - reg = new RegExp(filter.query || /.+/, 'i') + reg = new RegExp(filter.query || '.+', 'i') } catch (err) { return [] }
db7862ab0ccf62339760700ceb94eaf5b6aa8931
src/book/heading.jsx
src/book/heading.jsx
var React = require( 'react' ); export default React.createClass({ render() { return ( <h1>Foo</h1> ) } });
var React = require( 'react' ); export default class extends React.Component { render() { return ( <h1>Foo</h1> ) } }
Use ES6 for React class declaration
Use ES6 for React class declaration
JSX
mit
whichdigital/webpack-react-workflow,whichdigital/webpack-react-workflow
--- +++ @@ -1,9 +1,9 @@ var React = require( 'react' ); -export default React.createClass({ +export default class extends React.Component { render() { return ( <h1>Foo</h1> ) } -}); +}
a55706275bcfc1484003183710bbd113ac333335
src/containers/Posts.jsx
src/containers/Posts.jsx
import React from 'react' import { asyncConnect } from 'redux-connect' import classNames from 'classnames' import { fetchPosts } from '../actions/PostsActions' import { Pagination, Summary } from '../components' export const Posts = ({ data, entities, isFetching, itemsPerPage, links, meta: { totalItems }...
import React from 'react' import { asyncConnect } from 'redux-connect' import classNames from 'classnames' import { fetchPosts } from '../actions/PostsActions' import { Loading, NotFound, Pagination, Summary } from '../components' export const Posts = ({ data, entities, isFetching, itemsPerPage, links, m...
Split loading spinner to self component
Split loading spinner to self component
JSX
mit
nomkhonwaan/nomkhonwaan.github.io
--- +++ @@ -3,7 +3,7 @@ import classNames from 'classnames' import { fetchPosts } from '../actions/PostsActions' -import { Pagination, Summary } from '../components' +import { Loading, NotFound, Pagination, Summary } from '../components' export const Posts = ({ data, @@ -15,26 +15,22 @@ page, }) => { ...
e3a2434f8dd10b114aa8abd1ee8efbbb8db753a8
src/App.jsx
src/App.jsx
import React from 'react'; // import PropTypes from 'prop-types'; import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import { ThemeProvider } from '../lib'; import Home from './Home'; import Installation from './Installation'; import Components from './Components'; import FourOhFour from './Fou...
import React from 'react'; import { BrowserRouter, Switch, Route } from 'react-router-dom'; import { ThemeProvider } from '../lib'; import Home from './Home'; import Installation from './Installation'; import Components from './Components'; import FourOhFour from './FourOhFour'; const urlBase = process.env.NODE_ENV =...
Handle gh-pages serving from sub-directory
Handle gh-pages serving from sub-directory
JSX
mit
crystal-ball/componentry,crystal-ball/componentry,crystal-ball/componentry
--- +++ @@ -1,6 +1,5 @@ import React from 'react'; -// import PropTypes from 'prop-types'; -import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; +import { BrowserRouter, Switch, Route } from 'react-router-dom'; import { ThemeProvider } from '../lib'; import Home from './Home'; @@ -8,17 +7,1...
b0db28d819c5b26f337aef7cb9504360216306d5
src/Footer.jsx
src/Footer.jsx
import React from 'react'; export default class Footer extends React.Component { render() { return ( <footer className="android-footer mdl-mega-footer"> <div className="mdl-mega-footer--top-section"> <div className="mdl-mega-footer--left-section"> </div> <div className...
import React from 'react'; export default class Footer extends React.Component { render() { return ( <footer className="android-footer mdl-mega-footer"> <div className="mdl-mega-footer--top-section"> <div className="mdl-mega-footer--left-section"> </div> <div className...
Add link to github on footer
Add link to github on footer
JSX
mit
y-takey/qiitaros,y-takey/qiitaros,y-takey/qiitaros
--- +++ @@ -16,7 +16,9 @@ </div> <div className="mdl-mega-footer--middle-section"> - <p className="mdl-typography--font-light"></p> + <p className="mdl-typography--font-light"> + <a href="https://github.com/y-takey/qiitaros">VIEW SOURCE</a> + </p> </d...
4d8db170292c436ed692330cdd1610282c24bde9
templates/javascript.jsx
templates/javascript.jsx
import React, { PropTypes } from "react" /* const ThisClass = ( props ) => ( <ThisClass key={ props.foo } /> ) // or: */ export default class extends React.Component { constructor(props) { super(props) //this.bindInstanceMethods( "methodName1", "methodName2" ) //this.state = {} } bindInstanceMe...
import React, { PropTypes } from 'react' /* const ThisClass = ( props ) => ( <ThisClass key={ props.foo } /> ) // or: */ export default class ThisClass extends React.Component { constructor(props) { super(props) //this.bindInstanceMethods( 'methodName1', 'methodName2' ) //this.state = {} } bind...
Replace double with single quotes in React template
Replace double with single quotes in React template
JSX
unlicense
chris-kobrzak/js-dev-vim-setup
--- +++ @@ -1,4 +1,4 @@ -import React, { PropTypes } from "react" +import React, { PropTypes } from 'react' /* const ThisClass = ( props ) => ( @@ -7,11 +7,11 @@ // or: */ -export default class extends React.Component { +export default class ThisClass extends React.Component { constructor(props) { s...
ccba6373b396e80f18b1ab171ca758de3eeb74c2
src/app/containers/ScriptViewContainer.jsx
src/app/containers/ScriptViewContainer.jsx
import { ScriptView } from '../components/'; import { connect } from 'react-redux'; import { scripts } from '../actions/' const mapStateToProps = (state) => { let error = state.activeScript.error; console.log("dispatching props"); console.log(state); return { src: state.activeScript.src || 'No active scri...
import { ScriptView } from '../components/'; import { connect } from 'react-redux'; import { scripts } from '../actions/' const mapStateToProps = (state) => { let error = state.activeScript.error; return { src: state.activeScript.src || 'No active script src', content: state.activeScript.content || 'No ac...
Add additional props to scriptview
Add additional props to scriptview
JSX
mit
simonlovesyou/AutoRobot
--- +++ @@ -5,25 +5,28 @@ const mapStateToProps = (state) => { let error = state.activeScript.error; - console.log("dispatching props"); - console.log(state); return { src: state.activeScript.src || 'No active script src', content: state.activeScript.content || 'No active script code', statu...
2fc02c06a044a4ba649ca020f0a43ab950ab40fa
woodstock/src/actions/UnitActions.jsx
woodstock/src/actions/UnitActions.jsx
import * as types from '../constants/ActionTypes'; import FetchUnits from '../http/FetchUnits'; export const fetchUnitsSuccess = (units) => { return { type: types.FETCH_UNITS_SUCCESS, units } }; export const fetchUnits = () => { return (dispatch) => { return FetchUnits.fetchUnits()...
import * as types from '../constants/ActionTypes'; import FetchUnits from '../http/FetchUnits'; export const fetchUnitsSuccess = (units) => { return { type: types.FETCH_UNITS_SUCCESS, units } }; export const fetchUnits = () => { return (dispatch) => { return FetchUnits.fetchUnits()...
Reduce action method style size
Reduce action method style size
JSX
apache-2.0
solairerove/woodstock,solairerove/woodstock,solairerove/woodstock
--- +++ @@ -10,8 +10,8 @@ export const fetchUnits = () => { return (dispatch) => { - return FetchUnits.fetchUnits().then(units => { - dispatch(fetchUnitsSuccess(units)); - }).catch(error => console.log(error)); + return FetchUnits.fetchUnits() + .then(units => dispat...
1040447ede5ffb8156284cc3f4da016ff2c8fd9e
client/src/components/QuestButton.jsx
client/src/components/QuestButton.jsx
import React from 'react'; class QuestButton extends React.Component { constructor(props) { super(props); } render() { return ( <button type="button" onClick={() => this.props.questOnClick('quest_page')}>Quest!</button> ); } } export default QuestButton;
import React from 'react'; class QuestButton extends React.Component { constructor(props) { super(props); } render() { return ( <button className='btn btn-sm btn-danger' type="button" onClick={() => this.props.questOnClick('quest_page')}>Quest!</button> ); } } export default QuestButton;
Edit button to add className btn btn-sm btn-danger
Edit button to add className btn btn-sm btn-danger
JSX
mit
Sibilant-Siblings/sibilant-siblings,Sibilant-Siblings/sibilant-siblings
--- +++ @@ -6,7 +6,7 @@ } render() { return ( - <button type="button" onClick={() => this.props.questOnClick('quest_page')}>Quest!</button> + <button className='btn btn-sm btn-danger' type="button" onClick={() => this.props.questOnClick('quest_page')}>Quest!</button> ); } }
a92264e0eef195b1431ec7fb2a08262a086ed7cb
js/experiments-widget.jsx
js/experiments-widget.jsx
/** * @jsx React.DOM */ var React = require('react'); var WidgetContainer = require('./widget-container.jsx'); var Experiments = React.createClass({ getInitialState: function() { return { experiments: [], idx: null, }; }, displayRandomExperiment: function() { ...
/** * @jsx React.DOM */ var React = require('react'); var WidgetContainer = require('./widget-container.jsx'); var Experiments = React.createClass({ getInitialState: function() { return { experiments: [], idx: null, }; }, displayRandomExperiment: function() { ...
Remove surrounding div of experiments widget.
Remove surrounding div of experiments widget.
JSX
mit
cjfuller/KAshboard
--- +++ @@ -31,20 +31,15 @@ render: function() { if (this.state.experiments.length == 0) { - return <div> - <WidgetContainer> - <LoadingMessage /> - </WidgetContainer> - </div>; + return <WidgetContainer> + ...
496b938e2007870299b60c75283423f5c7f1da3a
src/ReactComponents/ThreeRenderer.jsx
src/ReactComponents/ThreeRenderer.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import THREE from 'three'; /* A component that renders whatever camera and scene using a THREE.WebGLRenderer. */ class ThreeRenderer extends React.PureComponent { componentDidMount() { const canvas = ReactDOM.findDOMNode(this.refs["canvas"]); c...
import React from 'react'; import ReactDOM from 'react-dom'; import THREE from 'three'; /* A component that renders whatever camera and scene using a THREE.WebGLRenderer. */ class ThreeRenderer extends React.PureComponent { componentDidMount() { const canvas = ReactDOM.findDOMNode(this.refs["canvas"]); c...
Implement rendering 3D view to an img element
Implement rendering 3D view to an img element
JSX
mit
pafalium/gd-web-env,pafalium/gd-web-env
--- +++ @@ -41,6 +41,13 @@ /> ); } + + renderToImage() { + this._draw(); + let img = new Image(); + img.src = this._renderer.domElement.toDataURL("image/png"); + return img; + } } const styles = {
5ef4393b224ca4c6318a2a14343f2d969b329f41
src/TextArea.jsx
src/TextArea.jsx
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import FormField from './FormField' class TextArea extends FormField { onFocus (e) { this.setState({ focus: true, touched: true }) // TODO still needed? if (document.documentField.dataset.b...
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import FormField from './FormField' class TextArea extends FormField { onFocus (e) { this.setState({ focus: true, touched: true }) } render () { const { disabled, name, placeholder } = this...
Remove IE fix (should not be needed)
Remove IE fix (should not be needed)
JSX
mit
lohfu/comkit
--- +++ @@ -11,13 +11,6 @@ focus: true, touched: true }) - - // TODO still needed? - if (document.documentField.dataset.browser === 'IE11') { - // make text area behave like input in IE (input fires both - // focus and input when focusing input elements, but not textareas) - th...
2ac65382ec935dd5ebb2ed3cba36bef918f97376
src/components/SubmissionPanel.jsx
src/components/SubmissionPanel.jsx
import React from 'react'; export default class SubmissionPanel extends React.Component { submitCode() { this.props.onCodeSubmitted(); let problemId = $('.btn.active').attr('id'); let editor = ace.edit("editor"); let sourceCode = editor.getValue(); $.ajax({ typ...
import React from 'react'; export default class SubmissionPanel extends React.Component { submitCode() { this.props.onCodeSubmitted(); let editor = ace.edit("editor"); let sourceCode = editor.getValue(); $.ajax({ type: "POST", data: sourceCode, ...
Use current problem id instead of jQuery
Use current problem id instead of jQuery
JSX
apache-2.0
spolnik/JAlgoArena-UI,spolnik/JAlgoArena-UI,spolnik/JAlgoArena-UI
--- +++ @@ -4,7 +4,6 @@ submitCode() { this.props.onCodeSubmitted(); - let problemId = $('.btn.active').attr('id'); let editor = ace.edit("editor"); let sourceCode = editor.getValue(); @@ -13,7 +12,7 @@ data: sourceCode, processData: false, ...
60ef06f016f5a9cc20eb8f46fe984437132cb739
src/js/source/view.jsx
src/js/source/view.jsx
import React from "react"; import SourceCode from "./code.jsx"; let SourceView = React.createClass({ scrollIntoView: function() { var element = null; if (element = document.getElementById('l' + (this.props.start - 5))) { element.scrollIntoView(); } }, componentDidMou...
import React from "react"; import jQuery from "jquery"; import SourceCode from "./code.jsx"; let SourceView = React.createClass({ scrollIntoView: function() { var element = null; if (element = document.getElementById('l' + (this.props.start - 5))) { jQuery("html, body").animate({ ...
Use jQuery for more consistent scrolling behaviour
Use jQuery for more consistent scrolling behaviour
JSX
agpl-3.0
Qafoo/QualityAnalyzer,Qafoo/QualityAnalyzer,Qafoo/QualityAnalyzer,Qafoo/QualityAnalyzer
--- +++ @@ -1,4 +1,5 @@ import React from "react"; +import jQuery from "jquery"; import SourceCode from "./code.jsx"; @@ -8,7 +9,9 @@ var element = null; if (element = document.getElementById('l' + (this.props.start - 5))) { - element.scrollIntoView(); + jQuery("html, b...
f1573f5b91a55d576fbf03e9e2643c7f3f1453da
src/react-autolink.jsx
src/react-autolink.jsx
import React from 'react'; import assign from 'object-assign'; function ReactAutolinkMixin() { let delimiter = /((?:https?:\/\/)?(?:(?:[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]\.)+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?-]*)/ig...
import React from 'react'; import assign from 'object-assign'; function ReactAutolinkMixin() { const delimiter = /((?:https?:\/\/)?(?:(?:[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]\.)+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?-]*)/...
Use const and self implement String.prototype.startsWith for compat
Use const and self implement String.prototype.startsWith for compat
JSX
mit
banyan/react-autolink,banyan/react-autolink,banyan/react-autolink
--- +++ @@ -2,7 +2,11 @@ import assign from 'object-assign'; function ReactAutolinkMixin() { - let delimiter = /((?:https?:\/\/)?(?:(?:[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]\.)+[a-z\.]*[a-z]+|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})(?::\d{1,5})*[a-z0-9.,_\/~#&=;%+?-]*)...
73262bcfbc0049b90cb6d638768e5299db42234c
client/app/bundles/HelloWorld/components/lesson_planner/category_labels/category_label.jsx
client/app/bundles/HelloWorld/components/lesson_planner/category_labels/category_label.jsx
'use strict' import React from 'react' import {Link} from 'react-router' export default React.createClass({ propTypes: { data: React.PropTypes.object.isRequired, extraClassName: React.PropTypes.string, isLink: React.PropTypes.bool }, generateClassName: function () { return `category-label ...
'use strict' import React from 'react' import {Link} from 'react-router' export default React.createClass({ propTypes: { data: React.PropTypes.object.isRequired, extraClassName: React.PropTypes.string, isLink: React.PropTypes.bool }, generateClassName: function () { return `category-label ...
Fix route on activity pack hearder
Fix route on activity pack hearder
JSX
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
--- +++ @@ -25,7 +25,7 @@ const label = <div className={this.generateClassName()}>{this.props.data.name.toUpperCase()}</div> if (this.props.isLink) { return ( - <Link href={this.getLink()}>{label}</Link> + <Link to={this.getLink()}>{label}</Link> ) } else { return lab...
ae56203cc51e3668ba10a1b7c50eb9fbd870a90b
src/components/side-panel/SidePanel.jsx
src/components/side-panel/SidePanel.jsx
// @flow import React from 'react'; import Tabs from './tabs/Tabs'; import AddSwatchesPanel from './add-swatches/AddSwatchesPanel'; import AboutPanel from './about/AboutPanel'; import type { PaletteType } from '../../../types'; type Props = { addNewSwatch: Function, tabs: Array<string>, activeTab: string,...
// @flow import React from 'react'; import Tabs from './tabs/Tabs'; import AddSwatchesPanel from './add-swatches/AddSwatchesPanel'; import AboutPanel from './about/AboutPanel'; import type { PaletteType } from '../../../types'; type Props = { addNewSwatch: Function, tabs: Array<string>, activeTab: string,...
Add link to my github profile
[New] Add link to my github profile
JSX
isc
eddyerburgh/palette-picker,eddyerburgh/palette-picker
--- +++ @@ -38,8 +38,8 @@ {props.activeTab === 'about' && <AboutPanel />} </main> <div className="panel-footer"> - Edd Yerburgh - </div> + Made by <a rel="noopener noreferrer" href="https://github.com/eddyerburgh" target="_blank">Edd Yerburgh</a> + </div> </div> );
455865960bbee3486322fe764bae527cc3c48a49
test/index.jsx
test/index.jsx
import React from 'react'; import { render } from 'react-dom'; import Test from './Test'; render(<Test />, document.getElementById('react-root'));
import React, { StrictMode } from 'react'; import { render } from 'react-dom'; import Test from './Test'; render( <StrictMode> <Test /> </StrictMode>, document.getElementById('react-root'), );
Enable StrictMode in test suite
Enable StrictMode in test suite
JSX
mit
wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf
--- +++ @@ -1,6 +1,10 @@ -import React from 'react'; +import React, { StrictMode } from 'react'; import { render } from 'react-dom'; - import Test from './Test'; -render(<Test />, document.getElementById('react-root')); +render( + <StrictMode> + <Test /> + </StrictMode>, + document.getElementById('react-roo...
e6fe952b4b2fad474b268e003413781feb8f5e30
src/request/components/request-entry-item-view.jsx
src/request/components/request-entry-item-view.jsx
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"> ...
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"> ...
Fix width of total request time in request view
Fix width of total request time in request view
JSX
unknown
avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype
--- +++ @@ -8,7 +8,7 @@ <div className="request-entry-item-holder"> <table className="table table-bordered"> <tr> - <td>{entry.duration}ms</td> + <td width="90">{entry.duration}ms</td> <td colSpan...
c4e33d6b6426dba0961c13350cb0f1bd69d8753c
client/modules/core/components/poll_list_screen.jsx
client/modules/core/components/poll_list_screen.jsx
import React, { PropTypes } from 'react'; import PollList from '../containers/poll_list.js'; import { Button } from 'rebass'; const PollListScreen = ({newPoll}) => ( <div style={{paddingTop: 48}}> <PollList /> <Button pill={true} theme='primary' onClick={newPoll} > New Poll </...
import React, { PropTypes } from 'react'; import PollList from '../containers/poll_list.js'; const PollListScreen = ({newPoll}) => ( <div style={{paddingTop: 48}}> <PollList /> </div> ); PollListScreen.propTypes = { newPoll: PropTypes.func }; export default PollListScreen;
Remove New Poll button from PollListScreen
Remove New Poll button from PollListScreen
JSX
mit
thancock20/voting-app,thancock20/voting-app
--- +++ @@ -1,17 +1,9 @@ import React, { PropTypes } from 'react'; import PollList from '../containers/poll_list.js'; -import { Button } from 'rebass'; const PollListScreen = ({newPoll}) => ( <div style={{paddingTop: 48}}> <PollList /> - <Button - pill={true} - theme='primary' - onClick...
fdbf0e88170c50d34f161ffd80928d1a6b6917e1
example/components.jsx
example/components.jsx
import React from 'react'; import ReorderAnimator from '../src'; export const Item = React.createClass({ render() { return ( <div className="item"> Some item: {this.props.text} : lots of text aeiou aeiou aeiou aeiou aeiou aeiou aeiouaeiouaeiouaeiouaeiouaeiouaeiou aeiou aeiouaeiouaeiou aeiou...
import React from 'react'; import ReorderAnimator from '../src'; export const Item = React.createClass({ render() { return ( <div className="item"> Some item: {this.props.text} : lots of text aeiou aeiou aeiou aeiou aeiou aeiou aeiouaeiouaeiouaeiouaeiouaeiouaeiou aeiou aeiouaeiouaeiou aeiou...
Make sure elements in list can have children.
Make sure elements in list can have children.
JSX
mit
AgentME/react-animate-reorder,AgentME/react-animate-reorder
--- +++ @@ -7,6 +7,8 @@ <div className="item"> Some item: {this.props.text} : lots of text aeiou aeiou aeiou aeiou aeiou aeiou aeiouaeiouaeiouaeiouaeiouaeiouaeiou aeiou aeiouaeiouaeiou aeiou + {' '} + {this.props.children} </div> ); } @@ -15,7 +17,7 @@ export con...
5c60e726754f9085d499eff9802ac9d95ef32a0e
lib/components/App.jsx
lib/components/App.jsx
import React, { Component } from 'react/addons'; export default class App extends Component { constructor(props) { super(props); } render() { return ( <div>App</div> ); } }; App.displayName = 'App';
import React, { Component } from 'react/addons'; import Rx from 'rx-dom'; export default class App extends Component { constructor(props) { super(props); this.state = { delta: 0, time: Date.now(), uncontext: [] }; let uncontext = Rx.DOM.fromWebS...
Add a data source, log it to the console.
Add a data source, log it to the console.
JSX
mit
mysterycommand/rx-uncontext,mysterycommand/rx-uncontext
--- +++ @@ -1,11 +1,39 @@ import React, { Component } from 'react/addons'; +import Rx from 'rx-dom'; export default class App extends Component { constructor(props) { super(props); + + this.state = { + delta: 0, + time: Date.now(), + uncontext: [] + }; ...
8dc632322a7142027a15fe32393de4cbe0d0966d
components/Layout.jsx
components/Layout.jsx
'use strict'; var React = require('react'), ApplicationStore = require('../stores/ApplicationStore'), Layout; Layout = React.createClass({ render: function () { this.props.markup = 'Yeah!'; return ( <html> <head> <meta charSet="utf-8" /> ...
'use strict'; var React = require('react'), DocumentTitle = require('react-document-title'), ApplicationStore = require('../stores/ApplicationStore'), Layout; Layout = React.createClass({ render: function () { var currentPageTitle = DocumentTitle.rewind(); return ( <html> ...
Use innermost document title on the server side
Use innermost document title on the server side Note: The Layout component is only used on the server / the initial server side rendering
JSX
mit
lxanders/community
--- +++ @@ -1,18 +1,19 @@ 'use strict'; var React = require('react'), + DocumentTitle = require('react-document-title'), ApplicationStore = require('../stores/ApplicationStore'), Layout; Layout = React.createClass({ render: function () { - this.props.markup = 'Yeah!'; + var curr...
978d400530cb4d92c94c8a08b7fbd6ff3e6e30e7
installer/frontend/components/tooltip.jsx
installer/frontend/components/tooltip.jsx
import React from 'react'; import _ from 'lodash'; export const Tooltip = ({children}) => <span className="tooltip">{children}</span>; /** * Component for injecting tooltips into anything. Can be used in two ways: * * 1: * <WithTooltip> * <button> * Click me? * <Tooltip> * Click the button! ...
import React from 'react'; export const Tooltip = ({children}) => <span className="tooltip">{children}</span>; /** * Component for injecting tooltips into anything. Can be used in two ways: * * 1: * <WithTooltip> * <button> * Click me? * <Tooltip> * Click the button! * </Tooltip> * </b...
Allow WithTooltip to have multiple children
frontend: Allow WithTooltip to have multiple children
JSX
apache-2.0
squat/tectonic-installer,lander2k2/tectonic-installer,hhoover/tectonic-installer,hhoover/tectonic-installer,squat/tectonic-installer,zbwright/tectonic-installer,AduroIdeja/tectonic-installer,s-urbaniak/tectonic-installer,coreos/tectonic-installer,erjohnso/tectonic-installer,bsiegel/tectonic-installer,joshrosso/tectonic...
--- +++ @@ -1,6 +1,4 @@ import React from 'react'; - -import _ from 'lodash'; export const Tooltip = ({children}) => <span className="tooltip">{children}</span>; @@ -31,17 +29,14 @@ export const WithTooltip = props => { const {children, shouldShow = true, generateText} = props; const text = generateText ...
53ef6fd54e0bb57774c606deceeca6ed46b3443c
app/app/components/tasks/CreateTask.jsx
app/app/components/tasks/CreateTask.jsx
import React from 'react'; export default class CreateTask extends React.Component { render(){ return( <p>New Task</p> ) } }
import React from 'react'; import GoogleMapsLoader from 'google-maps' import axios from 'axios' import {hashHistory} from 'react-router' export default class CreateTask extends React.Component { componentWillMount() { GoogleMapsLoader.KEY = process.env.GOOGLE_MAPS_API_KEY GoogleMapsLoader.load((google) => { ne...
Add google maps initial map and task form
Add google maps initial map and task form
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
--- +++ @@ -1,9 +1,51 @@ import React from 'react'; +import GoogleMapsLoader from 'google-maps' +import axios from 'axios' +import {hashHistory} from 'react-router' export default class CreateTask extends React.Component { + componentWillMount() { + GoogleMapsLoader.KEY = process.env.GOOGLE_MAPS_API_KEY + Googl...
0925cc0d096093ba5c0342c9f79731f1a5674496
lib/javascripts/views/task-panes.js.jsx
lib/javascripts/views/task-panes.js.jsx
/** @jsx React.DOM */ //= require ./tasks-pane (function () { "use strict"; Nike.Views.TaskPanes = React.createClass({ displayName: "Nike.Views.TaskPanes", render: function () { return ( <section className="tasks-panes"> {this.props.taskPaneTasks.map(function (tasks, paneIndex) { return ( <Nik...
/** @jsx React.DOM */ //= require ./tasks-pane (function () { "use strict"; Nike.Views.TaskPanes = React.createClass({ displayName: "Nike.Views.TaskPanes", render: function () { return ( <section className="tasks-panes"> {this.props.taskPaneTasks.map(function (tasks, paneIndex) { return ( <Nik...
Fix infinite adding of scroll area
Fix infinite adding of scroll area
JSX
bsd-3-clause
cupcake/nike,cupcake/nike
--- +++ @@ -38,7 +38,14 @@ var scrollX = window.scrollX; var scrollY = window.scrollY; el.style.minWidth = null; - var width = el.scrollWidth + scrollX; + var scrollWidth = el.scrollWidth; + var width; + if (scrollWidth < this.__minWidth) { + width = scrollWidth + scrollX; + } else { + width = scrol...
3d2da2a6c1e17895c8e0b8e484a767932dc8ae71
app/scripts/components/App.jsx
app/scripts/components/App.jsx
import React from 'react'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; class App extends React.Component { render() { return ( <MuiThemeProvider muiTheme={getMuiTheme()}> {this.props.children} </MuiThemeProvider...
import React from 'react'; import { green900, green700, yellow200 } from 'material-ui/styles/colors'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; const theme = getMuiTheme({ palette: { primary1Color: green700, primary2Color: gr...
Change the theme to be more green.
Change the theme to be more green.
JSX
apache-2.0
rgee/Game-Editor,rgee/Game-Editor
--- +++ @@ -1,11 +1,20 @@ import React from 'react'; +import { green900, green700, yellow200 } from 'material-ui/styles/colors'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; + +const theme = getMuiTheme({ + palette: { + primary1Co...
d0b10caa4ba2225bea20fe8fa0ab5a00173d4ca2
src/components/dev.jsx
src/components/dev.jsx
import React from 'react'; import {Link} from 'react-router'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source ...
import React from 'react'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of Fr...
Update Dev page (FreeFeed v1 released)
Update Dev page (FreeFeed v1 released)
JSX
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
--- +++ @@ -1,5 +1,4 @@ import React from 'react'; -import {Link} from 'react-router'; export default (props) => ( <div className="box"> @@ -10,29 +9,17 @@ <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of FriendFeed.com.</p> - <p>W...
d7af66e34de575c21813963be6abe9e6cd04ffe0
src/jsx/main.jsx
src/jsx/main.jsx
"use strict"; import React from "react" import ReactDOM from "react-dom"; import MetronomeApp from "./MetronomeApp.jsx"; window.addEventListener("load", function () { ReactDOM.render( <MetronomeApp />, document.getElementsByClassName("container")[0] ); }, false);
"use strict"; import React from "react" import ReactDOM from "react-dom"; import MetronomeApp from "./MetronomeApp.jsx"; window.addEventListener("DOMContentLoaded", function () { ReactDOM.render( <MetronomeApp />, document.getElementsByClassName("container")[0] ); }, false);
Change event trigger to init
Change event trigger to init
JSX
mit
seckie/jsmetronome,seckie/jsmetronome
--- +++ @@ -4,7 +4,7 @@ import ReactDOM from "react-dom"; import MetronomeApp from "./MetronomeApp.jsx"; -window.addEventListener("load", function () { +window.addEventListener("DOMContentLoaded", function () { ReactDOM.render( <MetronomeApp />, document.getElementsByClassName("container")[0]
529675bf2479c0c815c34bbeacae859b37aa21b6
src/connection/database/reset_password.jsx
src/connection/database/reset_password.jsx
import React from 'react'; import Screen from '../../core/screen'; import ResetPasswordPane from './reset_password_pane'; import { authWithUsername, hasScreen } from './index'; import { cancelResetPassword, resetPassword } from './actions'; import { renderPasswordResetConfirmation } from './password_reset_confirmation'...
import React from 'react'; import Screen from '../../core/screen'; import ResetPasswordPane from './reset_password_pane'; import { authWithUsername, hasScreen } from './index'; import { cancelResetPassword, resetPassword } from './actions'; import { renderPasswordResetConfirmation } from './password_reset_confirmation'...
Use i18n prop instead of t in ResetPassword screen
Use i18n prop instead of t in ResetPassword screen
JSX
mit
mike-casas/lock,mike-casas/lock,mike-casas/lock
--- +++ @@ -5,13 +5,13 @@ import { cancelResetPassword, resetPassword } from './actions'; import { renderPasswordResetConfirmation } from './password_reset_confirmation'; -const Component = ({model, t}) => { - const headerText = t("forgotPasswordInstructions") || null; +const Component = ({i18n, model}) => { + ...
3b7fb7ae75c88f22bd0489a00d6fd5261618ebee
src/components/inputs/CheckboxInput.jsx
src/components/inputs/CheckboxInput.jsx
import React from 'react' class CheckboxInput extends React.Component { static propTypes = { value: React.PropTypes.bool.isRequired, style: React.PropTypes.object, onChange: React.PropTypes.func, } render() { return <label className="maputnik-checkbox-wrapper"> <input className="ma...
import React from 'react' class CheckboxInput extends React.Component { static propTypes = { value: React.PropTypes.bool.isRequired, style: React.PropTypes.object, onChange: React.PropTypes.func, } render() { return <label className="maputnik-checkbox-wrapper"> <input className="ma...
Fix checkbox not showing status
Fix checkbox not showing status
JSX
mit
maputnik/editor,maputnik/editor
--- +++ @@ -17,7 +17,9 @@ checked={this.props.value} /> <div className="maputnik-checkbox-box"> - <svg className="maputnik-checkbox-icon" viewBox='0 0 32 32'> + <svg style={{ + display: this.props.value ? 'inline' : 'none' + }} className="maputnik-checkbox-icon...
b087def0791da2320b782b59b73da1378f1bfe7d
app/components/StatusButtons.jsx
app/components/StatusButtons.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 StatusButtons = React.createClass({ render() { const flexContainer = { display: 'flex', ...
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 StatusButtons = React.createClass({ render() { const flexContainer = { display: 'flex', ...
Change font weight of status buttons labels
Change font weight of status buttons labels
JSX
mit
spanningtime/smokator,spanningtime/smokator
--- +++ @@ -22,12 +22,15 @@ marginBottom: '10px', fontFamily: 'Mallanna', fontWeight: '200' + } - }; + const styleLabel = { + fontWeight: '200' + } return <div style={flexContainer}> - <RaisedButton label="I want a cigarette" primary={true} style={styleButton} /> -...
e335329ca6f588631961857ca3b7c9559359a0ba
src/components/History.jsx
src/components/History.jsx
import React, {PropTypes} from "react"; import Moment from "moment"; import HistoryItem from "./HistoryItem.jsx"; import HistoryHead from "./HistoryHead.jsx"; class History extends React.Component { constructor(props) { super(props); } getItems() { if (parseInt(this.props.paginate.limit) =...
import React, {PropTypes} from "react"; import Moment from "moment"; import HistoryItem from "./HistoryItem.jsx"; import HistoryHead from "./HistoryHead.jsx"; class History extends React.Component { constructor(props) { super(props); } getItems() { if (parseInt(this.props.paginate.limit) =...
Change results header title depending on search type
Change results header title depending on search type There are currently 3 search types: - With a query - With a query, and date - With neither This commit will modify the title formatting "handler" to account for the above scenarios. A title will be set accordingly. The changes in this commit should be optimised in ...
JSX
mit
MrSaints/historyx,MrSaints/historyx
--- +++ @@ -22,13 +22,18 @@ let formattedTitle = ""; if (this.props.query !== "") { - formattedTitle += "Searching: \"" + this.props.query + "\" on "; + formattedTitle += "Searching: \"" + this.props.query + "\""; + if (this.props.date) { + formatted...
7834fd87c080af5d2af9b745662bc0bcb3175843
web/static/js/components/stage_change_info_action_items.jsx
web/static/js/components/stage_change_info_action_items.jsx
import React from "react" export default () => ( <div> The skinny on Action-Item Generation: <div className="ui basic segment"> <ul className="ui list"> <li>Discuss the highest-voted items on the board. <ul> <li> <small> <strong>Protip: </stro...
import React from "react" export default () => ( <div> The skinny on Action-Item Generation: <div className="ui basic segment"> <ul className="ui list"> <li>Discuss the highest-voted items on the board. <ul> <li> <small> <strong>Protip: </stro...
Update Action Item Generation intro copy
Update Action Item Generation intro copy
JSX
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
--- +++ @@ -15,9 +15,12 @@ </li> </ul> </li> - <li>Generate action-items aimed at obliterating the team's bottlenecks.</li> - <li>Generate action-items that will bolster the team's successes.</li> - <li>Give every action-item an assignee.</li> + <li>Generat...
8f6688f997cef738119df25334b6af5332ab8ae2
src/stores/UserStore.jsx
src/stores/UserStore.jsx
'use strict'; import Immutable from 'immutable'; import Reflux from 'reflux'; import UserActions from 'actions/UserActionCreators'; import TimezoneStore from 'stores/TimezoneStore'; const UserStore = Reflux.createStore({ listenables: UserActions, init() { let storage; try { let fromLocalStorage ...
'use strict'; import Immutable from 'immutable'; import Reflux from 'reflux'; import UserActions from 'actions/UserActionCreators'; import TimezoneStore from 'stores/TimezoneStore'; const UserStore = Reflux.createStore({ listenables: UserActions, init() { let storage; try { let fromLocalStorage ...
Use TimezoneStore.getBy with lazy/seq optimisation to improve performance
Use TimezoneStore.getBy with lazy/seq optimisation to improve performance
JSX
mit
rhumlover/clockette,rhumlover/clockette
--- +++ @@ -33,9 +33,11 @@ storage = []; } - this.data = Immutable.Set(storage).map((zone) => { - return TimezoneStore.data.find((tszone) => tszone.name === zone.name); - }); + this.data = Immutable.List( + storage.map((tz) => { + return TimezoneStore.getBy('zone', tz.zone).fir...
d076d27393b648802efe54573e731bba2a93998d
src/App.jsx
src/App.jsx
import * as React from 'react'; import {Component} from 'react'; import './App.css'; import Item from './item'; class App extends Component { constructor(props) { super(props); this.state = { items: [] }; this.handleEnterPress = this.handleEnterPress.bind(this); this.handlerDeleteItem = th...
import * as React from 'react'; import {Component} from 'react'; import './App.css'; import Item from './item'; class App extends Component { constructor(props) { super(props); this.state = { items: [] }; this.handleEnterPress = this.handleEnterPress.bind(this); this.handlerDeleteItem = th...
Clear input value after add item successfully
Clear input value after add item successfully
JSX
mit
Todolab/frontend,Todolab/frontend
--- +++ @@ -24,6 +24,8 @@ this.setState({ items: this.state.items }); + + e.target.value = ''; } }
d95d82eea11dc66022b32eca7d000201dc85da9f
client/src/components/houseInventory.jsx
client/src/components/houseInventory.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; import HouseInventoryList from './HouseInventoryList.jsx'; import Nav from './Nav.jsx'; class HouseInventory extends React.Component { constructor(props) { super(props); this.state = { items: this.props.dummyData ...
import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; import HouseInventoryList from './HouseInventoryList.jsx'; import Nav from './Nav.jsx'; class HouseInventory extends React.Component { constructor(props) { super(props); this.state = { items: [], houseId: 1 /...
Change GET to POST request, change to using fridgr database data instead of dummy data
Change GET to POST request, change to using fridgr database data instead of dummy data
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -9,7 +9,8 @@ super(props); this.state = { - items: this.props.dummyData + items: [], + houseId: 1 // dummy value for now, will get from superclass props eventually }; } @@ -18,12 +19,10 @@ } getItems(callback) { - // will need to send the house id with this r...
6075965c50e52c12724295db78dbc9436db1642d
src/app/components/MainSection/index.jsx
src/app/components/MainSection/index.jsx
import React, {Component} from 'react' import muiThemeable from 'material-ui/styles/muiThemeable' import BaseSection from 'app/components/BaseSection' import styled from 'styled-components' const MainSectionWrapper = styled(BaseSection(styled.main))` background-color: ${props => props.theme.palette.canvasColor} wid...
import React, {Component} from 'react' import muiThemeable from 'material-ui/styles/muiThemeable' import BaseSection from 'app/components/BaseSection' import styled from 'styled-components' const MainSectionWrapper = styled(BaseSection(styled.main))` background-color: ${props => props.theme.palette.canvasColor} wid...
Fix for short messages list height
Fix for short messages list height
JSX
mit
wasd171/chatinder,wasd171/chatinder,wasd171/chatinder
--- +++ @@ -7,6 +7,7 @@ const MainSectionWrapper = styled(BaseSection(styled.main))` background-color: ${props => props.theme.palette.canvasColor} width: 100%; + overflow: hidden; `; @muiThemeable()
8d782154e7ce9570f689a76b947b71957ec15a36
src/FieldsBinding.jsx
src/FieldsBinding.jsx
import React from 'react'; import PropTypes from 'prop-types'; import * as lib from './helpers'; export default class FieldsBinding extends React.Component { validate(target) { const { schema, formStatus, update } = this.props; lib.startValidating( target, schema, formStatus, update ) } handleOnChange =...
import React from 'react'; import PropTypes from 'prop-types'; import * as lib from './helpers'; export default class FieldsBinding extends React.Component { validate(target) { const { schema, formStatus, update } = this.props; lib.startValidating( target, schema, formStatus, update ) } handleOnChange =...
Update the variable name collision
Update the variable name collision
JSX
mit
Albert-Gao/veasy
--- +++ @@ -8,16 +8,14 @@ lib.startValidating( target, schema, formStatus, update ) } - handleOnChange = e => { - return this.validate(e.target); - }; + handleOnChange = e => (this.validate(e.target)); render() { const names = Object.keys(this.props.schema); - const child = React.Childre...
ab9ef4583966d08a2ca0b8aa2fea46b6b9f5813b
src/templates/app/resources/asset_index.jsx
src/templates/app/resources/asset_index.jsx
import React from 'react'; const AssetIndex = () => ( <div id='asset_index_wrapper' className='gr-centered gr-12-p gr-12-m'> <h1>{it.L('Asset Index')}</h1> <div className='gr-padding-10'> <p id='errorMsg' className='error-msg invisible' /> <div id='asset-index' className='ha...
import React from 'react'; const AssetIndex = () => ( <div id='asset_index_wrapper' className='gr-centered gr-12-p gr-12-m'> <h1>{it.L('Asset Index')}</h1> <div className='gr-padding-10'> <p id='errorMsg' className='error-msg invisible' /> <div id='asset-index' className='ha...
Change text for empty asset index table
Change text for empty asset index table
JSX
apache-2.0
4p00rv/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,kellybinary/binary-static,ashkanx/binary-static,4p00rv/binary-static,kellybinary/binary-static,kellybinary/binary-static,binary-static-deployed/binary-st...
--- +++ @@ -7,7 +7,7 @@ <p id='errorMsg' className='error-msg invisible' /> <div id='asset-index' className='has-tabs gr-parent' /> <p className='notice-msg center-text invisible' id='empty-asset-index'> - {it.L('Asset index is unavailable at this time.')} + ...
eea24cec3b357d0ef93a18eb3edcf62e5a83b922
src/app/components/Post/ContentHtml.jsx
src/app/components/Post/ContentHtml.jsx
/* eslint-disable react/no-danger */ import React from 'react'; import cheerio from 'cheerio'; import CaptureLinks from './CaptureLinks'; import * as libs from '../../libs'; const ContentHtml = ({ html, linksColor }) => { const $ = cheerio.load(html); $('a').attr('style', `color: ${libs.darkenColor(linksColor)};`)...
/* eslint-disable react/no-danger, no-undef */ import React from 'react'; import cheerio from 'cheerio'; import CaptureLinks from './CaptureLinks'; import * as libs from '../../libs'; const ContentHtml = ({ html, linksColor }) => { const $ = cheerio.load(html); $('a').attr('style', `color: ${libs.darkenColor(links...
Use cors for images if protocol is SSL
Use cors for images if protocol is SSL
JSX
mit
worona/starter-app-theme-worona
--- +++ @@ -1,4 +1,4 @@ -/* eslint-disable react/no-danger */ +/* eslint-disable react/no-danger, no-undef */ import React from 'react'; import cheerio from 'cheerio'; import CaptureLinks from './CaptureLinks'; @@ -7,6 +7,11 @@ const ContentHtml = ({ html, linksColor }) => { const $ = cheerio.load(html); $(...
f11389d8217ff24ba6b354a28edf013523d63e9d
web/static/js/components/user_list_item.jsx
web/static/js/components/user_list_item.jsx
import React from "react" import * as AppPropTypes from "../prop_types" import styles from "./css_modules/user_list_item.css" const UserListItem = props => { let userName = props.user.given_name const imgSrc = props.user.picture.replace("sz=50", "sz=200") if (props.user.is_facilitator) userName += " (Facilitato...
import React from "react" import * as AppPropTypes from "../prop_types" import styles from "./css_modules/user_list_item.css" const UserListItem = ({ user }) => { let givenName = user.given_name const imgSrc = user.picture.replace("sz=50", "sz=200") if (user.is_facilitator) givenName += " (Facilitator)" retur...
Refactor UserListItem, leveraging destructuring of arguments to avoid duplication
Refactor UserListItem, leveraging destructuring of arguments to avoid duplication
JSX
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro
--- +++ @@ -2,19 +2,19 @@ import * as AppPropTypes from "../prop_types" import styles from "./css_modules/user_list_item.css" -const UserListItem = props => { - let userName = props.user.given_name - const imgSrc = props.user.picture.replace("sz=50", "sz=200") +const UserListItem = ({ user }) => { + let givenN...
d7814dfec89ab4034300bdd7577d8af835f5fbd5
src/components/shared/breadcrumb/component.jsx
src/components/shared/breadcrumb/component.jsx
"use strict"; var React = require('react') , Immutable = require('immutable') module.exports = React.createClass({ displayName: 'Breadcrumb', propTypes: { crumbs: React.PropTypes.instanceOf(Immutable.List).isRequired }, render: function () { var truncatise = require('truncatise') , lastLabel...
"use strict"; var React = require('react') , Immutable = require('immutable') module.exports = React.createClass({ displayName: 'Breadcrumb', propTypes: { crumbs: React.PropTypes.instanceOf(Immutable.List).isRequired }, render: function () { var truncatise = require('truncatise') , lastLabel...
Fix bug with breadcrumb keys
Fix bug with breadcrumb keys Something was causing server and client rendering of localized breadcrumbs to turn out strangely because of differing keys.
JSX
agpl-3.0
editorsnotes/editorsnotes-renderer
--- +++ @@ -27,8 +27,8 @@ return ( <ul className="breadcrumb-top"> { - this.props.crumbs.pop().map(crumb => - <li key={crumb.hashCode()}> + this.props.crumbs.pop().map((crumb, i) => + <li key={i}> <a href={crumb.get('href')}> ...
bc7b47f1e6e43a57bc17d3309f184184d2f89be2
src/app/components/home.jsx
src/app/components/home.jsx
'use strict'; import React from 'react'; import { Link } from 'react-router' import Input from './input.jsx'; import { objectifyForm } from '../helpers/forms'; import { urlSafeString } from '../helpers/strings'; export default class Home extends React.Component { constructor(props) { super(props); this.hand...
'use strict'; import React from 'react'; import { Link } from 'react-router' import Input from './input.jsx'; import { objectifyForm } from '../helpers/forms'; import { urlSafeString } from '../helpers/strings'; import MapStore from '../../stores/map-store.jsx'; export default class Home extends React.Component { c...
Add new map to mapstore
Add new map to mapstore
JSX
mit
jkrayer/poc-map-points,jkrayer/poc-map-points
--- +++ @@ -5,6 +5,7 @@ import Input from './input.jsx'; import { objectifyForm } from '../helpers/forms'; import { urlSafeString } from '../helpers/strings'; +import MapStore from '../../stores/map-store.jsx'; export default class Home extends React.Component { constructor(props) { @@ -13,10 +14,9 @@ } ...
9bd3b61f6633878eced588147b2b008593c1e616
js/menu-nested-item.jsx
js/menu-nested-item.jsx
/** * @jsx React.DOM */ var React = require('react'), Classable = require('./mixins/classable.js'), Icon = require('./icon.jsx'), Menu = require('./menu.jsx'); var MenuNestedItem = React.createClass({ mixins: [Classable], propTypes: { key: React.PropTypes.number.isRequired, menuItems: React.Prop...
/** * @jsx React.DOM */ var React = require('react'), Classable = require('./mixins/classable.js'), Icon = require('./icon.jsx'), Menu = require('./menu.jsx'); var MenuNestedItem = React.createClass({ mixins: [Classable], propTypes: { key: React.PropTypes.number.isRequired, menuItems: React.Prop...
Remove test code from nested menu item
Remove test code from nested menu item
JSX
mit
manchesergit/material-ui,mubassirhayat/material-ui,zuren/material-ui,skarnecki/material-ui,whatupdave/material-ui,whatupdave/material-ui,tan-jerene/material-ui,glabcn/material-ui,hesling/material-ui,jeroencoumans/material-ui,demoalex/material-ui,mmrtnz/material-ui,vaiRk/material-ui,tribecube/material-ui,tomgco/material...
--- +++ @@ -20,7 +20,6 @@ getDefaultProps: function() { return { - Mark: sux }; },
9300066e4327a27fd4cbf9fab829ca5c3026aa3c
frontend/src/admin/datamodel/components/revisions/TextDiff.jsx
frontend/src/admin/datamodel/components/revisions/TextDiff.jsx
/*eslint-env node */ import React, { Component, PropTypes } from "react"; import { diffWords } from 'diff'; export default class TextDiff extends Component { static propTypes = { diff: PropTypes.object.isRequired }; render() { let { diff: { before, after }} = this.props; return (...
/*eslint-env node */ import React, { Component, PropTypes } from "react"; import { diffWords } from 'diff'; export default class TextDiff extends Component { static propTypes = { diff: PropTypes.object.isRequired }; render() { let { diff: { before, after }} = this.props; return (...
Add spaces in text diffs
Add spaces in text diffs
JSX
agpl-3.0
Endika/metabase,dashkb/metabase,dashkb/metabase,blueoceanideas/metabase,dashkb/metabase,dashkb/metabase,dashkb/metabase,blueoceanideas/metabase,Endika/metabase,Endika/metabase,blueoceanideas/metabase,blueoceanideas/metabase,Endika/metabase,Endika/metabase,blueoceanideas/metabase
--- +++ @@ -16,12 +16,15 @@ " {before != null && after != null ? diffWords(before, after).map((section, index) => - section.added ? + <span> + {section.added ? <str...
37adedc040bc28f07c533429894a2c3517f8dfb4
client/src/index.jsx
client/src/index.jsx
import 'aframe'; import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, browserHistory } from 'react-router'; import App from './components/App.js'; import Home from './components/Home.js'; import Main from './components/Main.js'; ReactDOM.render(( <Router hist...
import 'aframe'; import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, browserHistory } from 'react-router'; import App from './components/App.js'; import Home from './components/Home.js'; import Main from './components/Main.js'; import Portfolio from './componen...
Modify and add new component routes
Modify and add new component routes
JSX
mit
francoabaroa/happi,francoabaroa/happi
--- +++ @@ -7,12 +7,22 @@ import App from './components/App.js'; import Home from './components/Home.js'; import Main from './components/Main.js'; +import Portfolio from './components/Portfolio.js'; +import Skills from './components/Skills.js'; +import Contact from './components/Contact.js'; +import HackerWords fr...
577971256111161885a2b97bf69d97aa2884c58e
src/ObjectivesList.jsx
src/ObjectivesList.jsx
/** * Created by Alvaro on 19/03/2017. */ import React from 'react'; import ReactDOM from 'react-dom'; class ObjectivesList extends React.Component{ constructor(props) { super(props); this.state = { objectives: [] }; // Get a reference to the database service var database = firebase....
/** * Created by Alvaro on 19/03/2017. */ import React from 'react'; import ReactDOM from 'react-dom'; var database = firebase.database(); class ObjectivesList extends React.Component{ constructor(props) { super(props); this.state = { objectives: [] }; } componentDidMount() { databas...
Load data fron database when the component is mounted.
Load data fron database when the component is mounted.
JSX
apache-2.0
varomorf/gallu,varomorf/gallu
--- +++ @@ -5,8 +5,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; +var database = firebase.database(); + class ObjectivesList extends React.Component{ - constructor(props) { super(props); @@ -14,23 +15,23 @@ this.state = { objectives: [] }; + } - // Get a refer...
0e2d542526c7ca935b535c81748508125ecf1fca
src/components/list.jsx
src/components/list.jsx
import React, { Component, PropTypes } from 'react'; export default class List extends Component { static propTypes = { Item: PropTypes.func.isRequired, items: PropTypes.array.isRequired, onSelect: PropTypes.func.isRequired }; render() { const { Item, items, onSelect } = this.props; return...
import React, { Component, PropTypes } from 'react'; export default class List extends Component { static propTypes = { Item: PropTypes.func.isRequired, items: PropTypes.array.isRequired, onSelect: PropTypes.func.isRequired }; render() { const { Item, items, onSelect } = this.props; return...
Use the item index as the React key
Use the item index as the React key This removes the need for the items to have an ID.
JSX
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
--- +++ @@ -13,7 +13,7 @@ return <ul> {items.map((item, index) => - <li key={item.id}> + <li key={index}> <Item {...item} onSelect={() => { onSelect({ index }); }} /> </li> )}
b7f2aa4134964e408228ef909ede796941d4d23a
src/components/api_component.jsx
src/components/api_component.jsx
const F = require('fkit') const React = require('react') const createClass = require('create-react-class') const ClassComponent = React.createFactory(require('./class_component')) const ModuleComponent = React.createFactory(require('./module_component')) /** * Represents a HTML page. * * @class PageComponent */ m...
const F = require('fkit') const React = require('react') const createClass = require('create-react-class') const ClassComponent = React.createFactory(require('./class_component')) const ModuleComponent = React.createFactory(require('./module_component')) /** * Represents a HTML page. * * @class PageComponent */ m...
Add summaries back to the API index
Add summaries back to the API index
JSX
mit
nullobject/jsdoc-react
--- +++ @@ -35,7 +35,7 @@ renderAnchor: function(item) { return ( /* jshint ignore:start */ - <li key={item.key}><a href={'#' + item.name}>{item.name}</a></li> + <li key={item.key}><a href={'#' + item.name}>{item.name} &mdash; {item.summary}</a></li> /* jshint ignore:end */ ); ...
24e71f9901746de0c1c512b7078747578661caed
src/components/chat_message/message_list.jsx
src/components/chat_message/message_list.jsx
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import MessageListItem from './message_list_item'; import {mapObject} from '../../utils' import {ListGroup} from 'react-bootstrap'; export default class MessageList extends Component { constructor(props) { super(props); } ...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import MessageListItem from './message_list_item'; import {mapObject} from '../../utils' import {ListGroup} from 'react-bootstrap'; export default class MessageList extends Component { constructor(props) { super(props); } ...
Fix comparing times for chat scrolling
Fix comparing times for chat scrolling
JSX
mit
johnnyvf24/hellochess-v2,johnnyvf24/hellochess-v2,johnnyvf24/hellochess-v2
--- +++ @@ -15,9 +15,12 @@ } componentDidUpdate(prevProps) { + function lastMessageTime(props) { + return (new Date(_.last(props.messages).time)).getTime(); + } if (prevProps.messages.length !== this.props.messages.length || prevProps.thread != this.props...
323a43761a7c27f46a2e1805c455f7cebf01b2a7
src/components/Navbar.jsx
src/components/Navbar.jsx
import React from 'react'; import AppBar from 'material-ui/AppBar'; import FlatButton from 'material-ui/FlatButton'; const navButtonsContainerStyles = { 'marginTop': 0, 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center' }; const navButtonsStyles = { 'color': "#fff", }; const NavButtons ...
import React from 'react'; import { Link, IndexLink } from 'react-router'; import AppBar from 'material-ui/AppBar'; import FlatButton from 'material-ui/FlatButton'; const navButtonsContainerStyles = { 'marginTop': 0, 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center' }; const navButtonsSty...
Integrate Link routes with the current nav buttons
Integrate Link routes with the current nav buttons
JSX
mit
juanhenriquez/react-weather-app,juanhenriquez/react-weather-app
--- +++ @@ -1,4 +1,5 @@ import React from 'react'; +import { Link, IndexLink } from 'react-router'; import AppBar from 'material-ui/AppBar'; import FlatButton from 'material-ui/FlatButton'; @@ -17,9 +18,23 @@ const NavButtons = () => { return ( <div> - <FlatButton label="Home" style={ navButtonsSty...
99d57e6363f2c62963611fb115f7277fca0cda90
packages/_demo/src/ButtonDemo.jsx
packages/_demo/src/ButtonDemo.jsx
import Button from '@react-material/button'; import React from 'react'; const ButtonDemo = () => <div> <h1>Button</h1> {Object.entries({ light: '', dark: 'mdc-theme--dark', }).map(([themeName, themeStyleClassName]) => <div key={themeName}> <h2>{themeName} theme</h2> <se...
import Button from '@react-material/button'; import React from 'react'; const ButtonDemo = () => <div> <h1>Button</h1> {[ ['light', ''], ['dark', 'mdc-theme--dark'], ].map(([themeName, themeStyleClassName]) => <div key={themeName}> <h2>{themeName} theme</h2> <section cl...
Fix CI support for older Node versions
ci(fix): Fix CI support for older Node versions
JSX
mit
kripod/material-components-react,kripod/material-components-react
--- +++ @@ -5,10 +5,10 @@ <div> <h1>Button</h1> - {Object.entries({ - light: '', - dark: 'mdc-theme--dark', - }).map(([themeName, themeStyleClassName]) => + {[ + ['light', ''], + ['dark', 'mdc-theme--dark'], + ].map(([themeName, themeStyleClassName]) => <div key={theme...
a13a2e448ff40f16dbcf2f1d9f3f3f30a432be21
src/app/containers/ScriptListContainer.jsx
src/app/containers/ScriptListContainer.jsx
import { ScriptList } from '../components/'; import { connect } from 'react-redux'; import { scripts, app } from '../actions/' const mapStateToProps = (state) => { return { scripts: state.scripts.scripts, show: !state.app.showAddDialog } } const mapDispatchToProps = (dispatch) => { return { onScript...
import { ScriptList } from '../components/'; import { connect } from 'react-redux'; import { scripts, app } from '../actions/' const mapStateToProps = (state) => { return { scripts: state.scripts.scripts, show: !state.app.showAddDialog } } const mapDispatchToProps = (dispatch) => { return { onScript...
Add dispatch function to view the add script view to scriptlist
Add dispatch function to view the add script view to scriptlist
JSX
mit
simonlovesyou/AutoRobot
--- +++ @@ -13,6 +13,9 @@ return { onScriptClick: (src) => { dispatch(scripts.toggleScript(src)) + }, + onAddScriptClick: () => { + dispatch(app.toggleAddDialog()); } } }
e5b1717a91faee78ff42f792c6df048938a45c6d
src/js/components/refugee-main-content.jsx
src/js/components/refugee-main-content.jsx
var React = require('react'); var Decorator = require('./refugee-context-decorator.jsx'); var RefugeeMapSegment = require('./refugee-map/refugee-map-segment.jsx'); var RefugeeSankeySegment = require('./refugee-sankey/refugee-sankey-segment.jsx'); var RefugeeMainContent = React.createClass({ render: function() { ...
var React = require('react'); var Decorator = require('./refugee-context-decorator.jsx'); var RefugeeMapSegment = require('./refugee-map/refugee-map-segment.jsx'); var RefugeeSankeySegment = require('./refugee-sankey/refugee-sankey-segment.jsx'); var RefugeeMainContent = React.createClass({ render: function() { ...
Add refugee map segment that was accidently removed
Add refugee map segment that was accidently removed
JSX
mit
lucified/lucify-refugees,lucified/lucify-refugees,lucified/lucify-refugees,lucified/lucify-refugees
--- +++ @@ -16,8 +16,8 @@ <div className="refugee-main-content"> - - + <RefugeeMapSegment {...this.props} /> + <RefugeeSankeySegment {...this.props} /> </div> @@ -29,7 +29,7 @@ }); /* - <RefugeeMapSegment {...this.props} /> + */ module.exports = Decorator(RefugeeMainContent);
26a69481b0653e294645b76e8fe4bbb63d295683
application/welcome.jsx
application/welcome.jsx
import React from "react"; export default class Welcome extends React.Component { render () { return <div className="primary-app"> <h2>Welcome!</h2> <p> Use this site to manage your usage of GitHub repositories for W3C ...
import React from "react"; export default class Welcome extends React.Component { render () { return <div className="primary-app"> <h2>Welcome!</h2> <p> Use this site to <a href="https://w3c.github.io/repo-management.html">manage IPR of cont...
Clarify goal of tool and link to documentation
Clarify goal of tool and link to documentation close #86
JSX
mit
w3c/ash-nazg,w3c/ash-nazg
--- +++ @@ -6,8 +6,8 @@ return <div className="primary-app"> <h2>Welcome!</h2> <p> - Use this site to manage your usage of GitHub repositories for W3C - projects. + Use this site to <a href="https:...
e8030c8b2400100e77bd7214e286c4a111105441
dashboards/api.jsx
dashboards/api.jsx
var React = require('react'); var Dashboard = require('tiler').Dashboard; var ListTile = require('../../node-tiler-contrib-list-tile/components/ListTile.jsx'); var breakpoints = {lg: 1200, md: 996, sm: 768, xs: 480}; var cols = {lg: 12, md: 10, sm: 8, xs: 4}; React.render( <Dashboard breakpoints={breakpoints} cols=...
var React = require('react'); var Dashboard = require('tiler').Dashboard; var ListTile = require('tiler-contrib-list-tile'); var breakpoints = {lg: 1200, md: 996, sm: 768, xs: 480}; var cols = {lg: 12, md: 10, sm: 8, xs: 4}; React.render( <Dashboard breakpoints={breakpoints} cols={cols} rowHeight={30}> <ListTil...
Correct path to list tile
Correct path to list tile
JSX
mit
simondean/squarely-vertx-spike,simondean/squarely-vertx-spike,simondean/squarely-vertx-spike,simondean/squarely-vertx-spike
--- +++ @@ -1,6 +1,6 @@ var React = require('react'); var Dashboard = require('tiler').Dashboard; -var ListTile = require('../../node-tiler-contrib-list-tile/components/ListTile.jsx'); +var ListTile = require('tiler-contrib-list-tile'); var breakpoints = {lg: 1200, md: 996, sm: 768, xs: 480}; var cols = {lg: 12...
2182d465cbeeedd5225487b1c5ba1bec1e9b2713
examples/react-chayns-signature/Example.jsx
examples/react-chayns-signature/Example.jsx
import React from 'react'; import Signature from '../../src/react-chayns-signature/component/Signature'; const SignatureExample = () => ( <Signature onSubscribe={() => chayns.dialog.toast({ description: 'Unterschrieben', duration: 3000, }) } ...
import React from 'react'; import Signature from '../../src/react-chayns-signature/component/Signature'; const SignatureExample = () => ( <Signature onSubscribe={() => chayns.dialog.toast({ description: 'Unterschrieben', duration: 3000, }) } ...
Add onEdit to signature example
Add onEdit to signature example
JSX
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -9,6 +9,7 @@ duration: 3000, }) } + onEdit={(e) => console.log('edit', e)} /> );
058384ecca96911d3bb351fcf189d7fe0335fd47
test/AvailableTimes-test.jsx
test/AvailableTimes-test.jsx
import { mount } from 'enzyme'; import React from 'react'; import AvailableTimes from '../src/AvailableTimes'; import CalendarSelector from '../src/CalendarSelector'; it('works with no props', () => { expect(() => mount(<AvailableTimes />)).not.toThrowError(); }); it('does not render a calendar selector', () => { ...
import { mount } from 'enzyme'; import React from 'react'; import AvailableTimes from '../src/AvailableTimes'; import CalendarSelector from '../src/CalendarSelector'; import Week from '../src/Week'; describe('without props', () => { it('works with no props', () => { expect(() => mount(<AvailableTimes />)).not.t...
Add test for weekStartsOn prop
Add test for weekStartsOn prop
JSX
mit
trotzig/react-available-times,trotzig/react-available-times
--- +++ @@ -3,17 +3,31 @@ import AvailableTimes from '../src/AvailableTimes'; import CalendarSelector from '../src/CalendarSelector'; +import Week from '../src/Week'; -it('works with no props', () => { - expect(() => mount(<AvailableTimes />)).not.toThrowError(); +describe('without props', () => { + it('works...
023b7a708c5efc438aadb33b5bc5f7e2a6e0feb6
src/components/CircuitCanvas.jsx
src/components/CircuitCanvas.jsx
import React from 'react'; import ReactArt from 'react-art'; import Colors from '../styles/Colors.js'; var Surface = ReactArt.Surface; export default class CircuitCanvas extends React.Component { constructor(props) { super(props); } render() { const elements = this.props.elements.map(function(element...
import React from 'react'; import ReactArt from 'react-art'; import Colors from '../styles/Colors.js'; var Surface = ReactArt.Surface; export default class CircuitCanvas extends React.Component { constructor(props) { super(props); } render() { const elements = this.props.elements.map(function(element...
Add comment linking to React doc on child keys
Add comment linking to React doc on child keys
JSX
epl-1.0
circuitsim/circuit-simulator,circuitsim/circuit-simulator,circuitsim/circuit-simulator
--- +++ @@ -13,6 +13,7 @@ render() { const elements = this.props.elements.map(function(element) { + // https://facebook.github.io/react/docs/multiple-components.html#dynamic-children const props = Object.assign({key: element.id}, element.props); return React.createElement(elem...
4f23ec1778397ad5b4c1e9c6143101dec1351012
src/components/FilenameInput.jsx
src/components/FilenameInput.jsx
import React, { Component } from 'react' const ENTER_KEY = 'Enter' export default class FilenameInput extends Component { constructor (props) { super(props) this.state = { value: props.name || '' } } componentDidMount () { this.textInput.focus() } handleKeyPress (e) { if (e.key =...
import React, { Component } from 'react' const ENTER_KEY = 13 export default class FilenameInput extends Component { constructor (props) { super(props) this.state = { value: props.name || '' } } componentDidMount () { this.textInput.focus() } handleKeyPress (e) { if (e.keyCode ==...
Fix enter key on safari :bug:
Fix enter key on safari :bug: KeyboardEvent.key is not supported on safari: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
JSX
agpl-3.0
y-lohse/cozy-drive,goldoraf/cozy-drive,enguerran/cozy-drive,nono/cozy-files-v3,enguerran/cozy-files-v3,cozy/cozy-files-v3,goldoraf/cozy-drive,cozy/cozy-files-v3,nono/cozy-files-v3,y-lohse/cozy-files-v3,y-lohse/cozy-drive,y-lohse/cozy-drive,nono/cozy-files-v3,cozy/cozy-files-v3,goldoraf/cozy-drive,cozy/cozy-files-v3,y-l...
--- +++ @@ -1,6 +1,6 @@ import React, { Component } from 'react' -const ENTER_KEY = 'Enter' +const ENTER_KEY = 13 export default class FilenameInput extends Component { constructor (props) { @@ -15,7 +15,7 @@ } handleKeyPress (e) { - if (e.key === ENTER_KEY) { + if (e.keyCode === ENTER_KEY) { ...
9e5a74bfa1c676dca4994238ae224e8fe3a203fd
src/component/strategies/list-component.jsx
src/component/strategies/list-component.jsx
import React, { Component } from 'react'; import { List, ListItem, ListItemContent, Icon, IconButton, Chip } from 'react-mdl'; import style from './strategies.scss'; class StrategiesListComponent extends Component { static contextTypes = { router: React.PropTypes.object, } componentDidMount () ...
import React, { Component } from 'react'; import { Link } from 'react-router'; import { List, ListItem, ListItemContent, IconButton, Chip } from 'react-mdl'; class StrategiesListComponent extends Component { static contextTypes = { router: React.PropTypes.object, } componentDidMount () { ...
Make strategy list as links
Make strategy list as links
JSX
apache-2.0
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
--- +++ @@ -1,8 +1,7 @@ import React, { Component } from 'react'; +import { Link } from 'react-router'; -import { List, ListItem, ListItemContent, Icon, IconButton, Chip } from 'react-mdl'; - -import style from './strategies.scss'; +import { List, ListItem, ListItemContent, IconButton, Chip } from 'react-mdl'; ...
f105b7d52dfcde81397d3e23b2eba462a6aa03fe
demos/index.jsx
demos/index.jsx
'use strict' import React from 'react' import {Route, IndexRedirect, IndexRoute, Link} from 'react-router' import Scratchpad from './scratchpad' import Whiteboard from './whiteboard' import Chat from './chat' const Index = ({children}) => <div> <h1>Demos!</h1> <h2><Link to='demos/scratchpad/welcome'>Scratchpad</L...
'use strict' import React from 'react' import {Route, IndexRedirect, IndexRoute, Link} from 'react-router' import Scratchpad from './scratchpad' import Whiteboard from './whiteboard' import Chat from './chat' const Index = ({children}) => <div> <h1>Demos!</h1> <h2><Link to='/demos/scratchpad/welcome'>Scratchpad</...
Make links on demo page absolute paths to end the madness.
Make links on demo page absolute paths to end the madness.
JSX
mit
pandemic-1707/pandemic-1707,Attune-GH/attune,pandemic-1707/pandemic-1707,pandemic-1707/pandemic-1707,Myach-FSA/Capstone,Myach-FSA/Capstone,Attune-GH/attune,Myach-FSA/Capstone,Attune-GH/attune
--- +++ @@ -8,18 +8,18 @@ const Index = ({children}) => <div> <h1>Demos!</h1> - <h2><Link to='demos/scratchpad/welcome'>Scratchpad</Link></h2> + <h2><Link to='/demos/scratchpad/welcome'>Scratchpad</Link></h2> <p> The scratchpad is the very simplest React/Firebase demo—a text area whose content is...
a6f1a304d1367428dc1fa5a84709986d66284cb7
src/components/elements/recent-groups.jsx
src/components/elements/recent-groups.jsx
import React from 'react'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import { fromNowOrNow } from '../../utils'; const GROUPS_SIDEBAR_LIST_LENGTH = 4; const renderRecentGroup = recentGroup => { const updatedAgo = fromNowOrNow(parseInt(recentGroup.updatedAt)); return ( <li cl...
import React from 'react'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import { fromNowOrNow } from '../../utils'; const GROUPS_SIDEBAR_LIST_LENGTH = 4; const renderRecentGroup = recentGroup => { const updatedAgo = fromNowOrNow(parseInt(recentGroup.updatedAt)); return ( <li ke...
Remove unused CSS classnames from RecentGroups
Remove unused CSS classnames from RecentGroups
JSX
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
--- +++ @@ -9,7 +9,7 @@ const renderRecentGroup = recentGroup => { const updatedAgo = fromNowOrNow(parseInt(recentGroup.updatedAt)); return ( - <li className="p-my-groups-link" key={recentGroup.id}> + <li key={recentGroup.id}> <Link to={`/${recentGroup.username}`}> {recentGroup.screenName...
7066813ef8c46749f047184f0320917584c60acf
src/containers/App.jsx
src/containers/App.jsx
import React from 'react' import USMap from '../components/USMap' import { StyleSheet } from 'react-look' import { connect } from 'react-redux' const styles = StyleSheet.create({ map: { height: '80vh', width: 'auto' } }) function mapStateToProps(state) { return { events: state.events } } const Ap...
import React from 'react' import USMap from '../components/USMap' import { StyleSheet } from 'react-look' import { connect } from 'react-redux' const styles = StyleSheet.create({ map: { height: '70vmin' } }) function mapStateToProps(state) { return { events: state.events } } const App = ({ events }) ...
Use vmin to do better map size
Use vmin to do better map size
JSX
agpl-3.0
ryankopf/bnc-website,ryankopf/bnc-website,itstriz/website
--- +++ @@ -5,8 +5,7 @@ const styles = StyleSheet.create({ map: { - height: '80vh', - width: 'auto' + height: '70vmin' } })
b2b933c153bea5ee84aa62007f4b633dde5ebdac
common/app/routes/Hikes/components/Hike.jsx
common/app/routes/Hikes/components/Hike.jsx
import React, { PropTypes } from 'react'; import { Col, Panel, Row } from 'react-bootstrap'; import Lecture from './Lecture.jsx'; import Questions from './Questions.jsx'; export default React.createClass({ displayName: 'Hike', propTypes: { currentHike: PropTypes.object, showQuestions: PropTypes.boo...
import React, { PropTypes } from 'react'; import { Col, Panel, Row } from 'react-bootstrap'; import Lecture from './Lecture.jsx'; import Questions from './Questions.jsx'; export default React.createClass({ displayName: 'Hike', propTypes: { currentHike: PropTypes.object, showQuestions: PropTypes.boo...
Fix title for panel This fixes hover object Object issue
Fix title for panel This fixes hover object Object issue
JSX
bsd-3-clause
pahosler/freecodecamp,matthew-t-smith/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,BerkeleyTrue/FreeCodeCamp,raisedadead/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,BrendanSweeny/FreeCodeCamp,matthew-t-smith/freeCodeCamp,jonathanihm/freeCodeCamp,1111113j8Pussy420/https-github.com-raisedadead-freeCodeCamp,otavioarc/freeCodeCamp,...
--- +++ @@ -29,14 +29,15 @@ showQuestions } = this.props; - const videoTitle = <h2>{ title }</h2>; + const videoTitle = <h4>{ title }</h4>; return ( <Col xs={ 12 }> <Row> <Panel className={ 'text-center' } - title={ videoTitle }> + ...
e768254b017d1099224dba6ded6d4bfd4f1d60f8
client/components/AddGame.jsx
client/components/AddGame.jsx
import React from 'react' import {connect} from 'react-redux' import {addGameVisibleToggle} from '../actions/' class AddGame extends React.Component { // Need to create an add visible toggle off and on // Then some checking on whether a user has a game or not already // Then some glue back to the API to post so...
import React from 'react' import {connect} from 'react-redux' import {addGameVisibleToggle} from '../actions/' class AddGame extends React.Component { // Then some checking on whether a user has a game or not already // Then some glue back to the API to post some datas addGameToggle(e) { this.props.dispatc...
Add game toggle working on add game page
Add game toggle working on add game page
JSX
mit
alan-jordan/gamr-v2,alan-jordan/gamr-v2
--- +++ @@ -4,7 +4,6 @@ class AddGame extends React.Component { - // Need to create an add visible toggle off and on // Then some checking on whether a user has a game or not already // Then some glue back to the API to post some datas @@ -15,14 +14,19 @@ render() { return ( <div classNam...