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
8bebe4f4468877d1dd9addfcdd3716535470af60
src/styles/theme/connect-with-theme.jsx
src/styles/theme/connect-with-theme.jsx
import React from 'react'; import PropTypes from 'prop-types'; /** * A Wrapper function to inject the theme passed in by the context as a prop into the JSS HOC. * * @private * @param {Function} Component - The HOC from JSS. * @param {String} [componentName] - The name of the component so we only pass the theme *...
import React from 'react'; import PropTypes from 'prop-types'; /** * A Wrapper function to inject the theme passed in by the context as a prop into the JSS HOC. * * @private * @param {Function} Component - The HOC from JSS. * @param {String} [componentName] - The name of the component so we only pass the theme *...
Add a more descriptive displayName for the wrapper component returned by connectWithTheme
Add a more descriptive displayName for the wrapper component returned by connectWithTheme
JSX
mit
HenriBeck/materialize-react,HenriBeck/materialize-react,TF2PickupNET/components
--- +++ @@ -30,5 +30,11 @@ Wrapper.contextTypes = { theme: PropTypes.object }; + const displayName = Component.displayName || Component.name || 'Component'; + + Wrapper.displayName = displayName.startsWith('Jss') + ? `connectWithTheme(${displayName.slice(4, displayName.length - 1)})` + : `connectWithTh...
553f4d70dbf93f87b1640f319f4b513276410252
client/source/Index.jsx
client/source/Index.jsx
// React + React-Router Dependencies import React, { Component } from 'react'; import { render } from 'react-dom'; import { Router, IndexRoute, Route, browserHistory } from 'react-router'; // Importing the React components from components folder import App from './components/App'; import LandingPage from './components...
// React + React-Router Dependencies import React, { Component } from 'react'; import { render } from 'react-dom'; import { Router, IndexRoute, Route, browserHistory } from 'react-router'; // Importing the React components from components folder import App from './components/App'; import LandingPage from './components...
Add additional routes to handle users accessing other users profiles
Add additional routes to handle users accessing other users profiles
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -7,6 +7,7 @@ import App from './components/App'; import LandingPage from './components/LandingPage'; import User from './components/User/UserPage'; +import AltUser from './components/User/AltUserPage'; import RecipeMain from './components/Recipe/RecipeMain'; import CreateRecipeMain from './components...
bf7d15c580e45f850b9e9cf9f4d39a95703ac4cb
components/button/__examples__/brand-disabled-destructive-inverse.jsx
components/button/__examples__/brand-disabled-destructive-inverse.jsx
import React from 'react'; import IconSettings from '~/components/icon-settings'; import Button from '~/components/button'; // `~` is replaced with design-system-react at runtime class Example extends React.Component { static displayName = 'ButtonExample'; render() { return ( <IconSettings iconPath="/assets/i...
import React from 'react'; import IconSettings from '~/components/icon-settings'; import Button from '~/components/button'; // `~` is replaced with design-system-react at runtime class Example extends React.Component { static displayName = 'ButtonExample'; render() { return ( <IconSettings iconPath="/assets/i...
Add `outline-brand` variant to doc site examples
Button: Add `outline-brand` variant to doc site examples Fixes #1943
JSX
bsd-3-clause
salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react
--- +++ @@ -23,6 +23,8 @@ <Button label="Destructive" variant="destructive" /> + <Button label="Outline Brand" variant="outline-brand" /> + <div style={{ backgroundColor: '#16325c',
42810b299fd18187a534efb78f8b6b883928cb61
src/index.jsx
src/index.jsx
/** @jsx createElement */ import {createElement} from 'elliptical' const defaultProps = { label: 'string', limit: 1, trimmed: true } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [...
/** @jsx createElement */ import {createElement} from 'elliptical' const defaultProps = { label: 'string', limit: 1, trimmed: true } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [...
Add id to make Lacona extension easier
Add id to make Lacona extension easier
JSX
mit
lacona/lacona-phrase-string
--- +++ @@ -35,4 +35,4 @@ return true } -export const String = {defaultProps, describe} +export const String = {defaultProps, describe, id: 'elliptical-string:String'}
9bcfcf4199f51e5d92fbfd5e7babbfab032f5c72
src/index.jsx
src/index.jsx
const React = require('react') const ReactDom = require('react-dom') const ReactRedux = require('react-redux') const Redux = require('redux') const { remote } = require('electron') const { persistStore, autoRehydrate } = require('redux-persist') const { AsyncNodeStorage } = require('redux-persist-node-storage') const ...
const React = require('react') const ReactDom = require('react-dom') const ReactRedux = require('react-redux') const Redux = require('redux') const { remote } = require('electron') const { persistStore, autoRehydrate } = require('redux-persist') const { AsyncNodeStorage } = require('redux-persist-node-storage') const ...
Store it all in userData again
Store it all in userData again
JSX
mit
cheshire137/gh-notifications-snoozer,cheshire137/gh-notifications-snoozer
--- +++ @@ -10,7 +10,7 @@ const reducer = require('./reducers/reducer') const store = Redux.createStore(reducer, undefined, autoRehydrate()) -const persistDir = remote.app.getPath('desktop') +const persistDir = remote.app.getPath('userData') const persistOptions = { storage: new AsyncNodeStorage(persistDir) } p...
347ff4fe719064e0e21dc3e40b3e14e6eb39bd1a
src/components/carousel/carousel.jsx
src/components/carousel/carousel.jsx
var React = require('react'); var Slider = require('react-slick'); var Thumbnail = require('../thumbnail/thumbnail.jsx'); require('slick-carousel/slick/slick.scss'); require('slick-carousel/slick/slick-theme.scss'); require('./carousel.scss'); module.exports = React.createClass({ propTypes: { items: React...
var React = require('react'); var Slider = require('react-slick'); var Thumbnail = require('../thumbnail/thumbnail.jsx'); require('slick-carousel/slick/slick.scss'); require('slick-carousel/slick/slick-theme.scss'); require('./carousel.scss'); module.exports = React.createClass({ propTypes: { items: React...
Fix GH-37: Construct project urls correctly
Fix GH-37: Construct project urls correctly
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -33,6 +33,9 @@ case 'gallery': href = '/studio/' + item.id + '/'; break; + case 'project': + href = '/projects/' + item.id + '/'; + break; default: ...
c512918d29e1a753560b9000a8b2504ee6cf0c4c
app/react/components/user-list/user-list.jsx
app/react/components/user-list/user-list.jsx
// Gets passed an array of users. Returns array of GithubAvatars for users matching role import React from "react"; import GithubAvatar from "../../components/github-avatar/github-avatar.jsx"; export default React.createClass({ propTypes: { users: React.PropTypes.array, role: React.PropTypes.string }, ...
// Gets passed an array of users. Returns array of GithubAvatars for users matching role import React from "react"; import GithubAvatar from "../../components/github-avatar/github-avatar.jsx"; export default class UserList extends React.Component { render() { // Get an array of users by checking if they're o...
Make changes for es6 migrations
UserList: Make changes for es6 migrations See #613
JSX
mpl-2.0
mozilla/science.mozilla.org,mozilla/science.mozilla.org
--- +++ @@ -3,20 +3,8 @@ import React from "react"; import GithubAvatar from "../../components/github-avatar/github-avatar.jsx"; -export default React.createClass({ - propTypes: { - users: React.PropTypes.array, - role: React.PropTypes.string - }, - getDefaultProps() { - return { - users: [], - ...
59ba74958c2cb4eab5ba0522181ac7eed21e7148
extensions/lite/views/Admin/index.jsx
extensions/lite/views/Admin/index.jsx
import React, { Component } from 'react' export default class AdminView extends Component { render() { return null } }
// To fix commit import React, { Component } from 'react' export default class AdminView extends Component { render() { return null } }
Add a comment to fix commit number error
Add a comment to fix commit number error
JSX
agpl-3.0
botpress/botpress,botpress/botpress,botpress/botpress,botpress/botpress
--- +++ @@ -1,3 +1,5 @@ +// To fix commit + import React, { Component } from 'react' export default class AdminView extends Component {
9c0934a63603a2ef471651ae904da2680c284c8a
src/js/containers/TasksContainer.jsx
src/js/containers/TasksContainer.jsx
import React from 'react'; import request from 'superagent'; import Tasks from '../components/Tasks.jsx'; export default class TasksContainer extends React.Component { constructor(props) { super(props); this.state = { tasks: [], }; this.getTasksFromServer = this.getTasksFromServer.bind(this)...
import React from 'react'; import request from 'superagent'; import Tasks from '../components/Tasks.jsx'; export default class TasksContainer extends React.Component { constructor(props) { super(props); this.state = { tasks: [], }; this.getTasksFromServer = this.getTasksFromServer.bind(this)...
Use forEach instead of map
Use forEach instead of map
JSX
mit
tanaka0325/nippo-web,tanaka0325/nippo-web
--- +++ @@ -34,7 +34,7 @@ const tasksTodo = []; const tasksDoing = []; const tasksDone = []; - this.state.tasks.map((task) => { + this.state.tasks.forEach((task) => { switch (task.status) { case 1: tasksTodo.push(task);
e80f0e49fbcd4c69e3a9bf27b1cc013b6731ec16
src/components/EditablePolyline.jsx
src/components/EditablePolyline.jsx
import { Polyline } from 'react-leaflet' import { icon } from 'leaflet' import { PolylineEditor } from 'leaflet-editable-polyline' export default class EditablePolyline extends Polyline { componentWillMount () { let options = {} for (let key in this.props) { if (this.props.hasOwnProperty(key)) { ...
import { Polyline } from 'react-leaflet' import { icon } from 'leaflet' import { PolylineEditor } from 'leaflet-editable-polyline' export default class EditablePolyline extends Polyline { componentWillMount () { let options = {} for (let key in this.props) { if (this.props.hasOwnProperty(key)) { ...
Increase number of points to edit a segment that can be displayed
Increase number of points to edit a segment that can be displayed
JSX
mit
ruipgil/GatherMySteps,ruipgil/GatherMySteps
--- +++ @@ -20,6 +20,7 @@ iconSize: [12, 12], iconAnchor: [6, 6] }) + options.maxMarkers = 500 this.leafletElement = PolylineEditor(this.props.positions, options) } }
709d306d3cb2df02e652e6a20a3201f3728bfa6e
src/components/StarterComponent.jsx
src/components/StarterComponent.jsx
import React from 'react'; export default class StarterComponent extends React.Component { displayName = 'StarterComponent'; constructor() { super(); } render() { return <div>{'StarterComponent'}</div>; } }
import React from 'react'; export default class StarterComponent extends React.Component { displayName = 'StarterComponent'; constructor(props) { super(props); } render() { return <div>{'StarterComponent'}</div>; } }
Add props to component constructor
Add props to component constructor
JSX
mit
motiz88/yet-another-universal-package-starter,motiz88/yet-another-react-component-starter,motiz88/react-dygraphs
--- +++ @@ -3,8 +3,8 @@ export default class StarterComponent extends React.Component { displayName = 'StarterComponent'; - constructor() { - super(); + constructor(props) { + super(props); } render() {
592f72077f78fe857aa2624c443f619509befa32
src/js/components/widgets/altitudeWidget.jsx
src/js/components/widgets/altitudeWidget.jsx
import React from 'react'; import altitudeStore from '../../stores/altitudeStore'; import classNames from 'classnames'; export default class AltitudeWidget extends React.Component { constructor() { super(); this.state = { altitude: this.getAltitude() }; altitudeStore.addChangeListener(this.setAltitude); ...
import React from 'react'; import altitudeStore from '../../stores/altitudeStore'; import classNames from 'classnames'; export default class AltitudeWidget extends React.Component { constructor() { super(); this.state = { altitude: this.getAltitude() }; altitudeStore.addChangeListener(this.setAltitude); ...
Remove blades div from altitude widget.
Remove blades div from altitude widget.
JSX
mit
prodec/trail-blazer,prodec/trail-blazer
--- +++ @@ -13,11 +13,6 @@ return ( <div id="wind-speed-widget"> <div className="windmill"> - <div> - <div className="blade"></div> - <div className="blade"></div> - <div className="blade"></div> - </div> </div> <div className="...
e2aff619a818c90b30e1068f395ece366b92f2fd
src/components/SightingList.jsx
src/components/SightingList.jsx
import React from 'react'; import { Card, CardMedia, CardTitle, CardText } from 'material-ui/Card'; // import styled from 'styled-components'; // const Img = styled.img` // margin: // ` const SightingList = props => { console.log(props); return ( <div> <h1>Sighting List</h1> {props.sightings.map(...
import React from 'react'; import { Card, CardMedia, CardTitle, CardText } from 'material-ui/Card'; // import styled from 'styled-components'; // const Img = styled.img` // margin: // ` const SightingList = props => { console.log(props); return ( <div> <h1>Sighting List</h1> {props.sightings.map(...
Add default image data in case there's no relevant info
Add default image data in case there's no relevant info
JSX
mit
omarcodex/butterfly-pinner,omarcodex/butterfly-pinner
--- +++ @@ -16,7 +16,7 @@ <CardMedia> <img src={s.photoURL || 'https://evolution.berkeley.edu/evolibrary/images/evo/ontogenew.gif'} - alt={s.scientificName} + alt={s.scientificName || 'Sighting image here.'} /> </CardMedia> ...
4e2275a2e3f6d55b32a65bf23f78bb37ec700fd6
client/components/Events/Event.jsx
client/components/Events/Event.jsx
import React, { PropTypes } from 'react'; import { Link } from 'react-router'; const Event = ({ eventName, contractAddress, description, eventStartDateTime, eventEndDateTime, eventContractAddress, price, addressLine1, addressLine2, city, state, zipPostalCode, country }) => ( <li> <img src="http://tctechcrunch201...
import React, { PropTypes } from 'react'; import { Link } from 'react-router'; const Event = ({ eventName, contractAddress, description, eventStartDateTime, eventEndDateTime, eventContractAddress, price, addressLine1, addressLine2, city, state, zipPostalCode, country }) => ( <li> <Link to={{ pathname: ...
Add commit before pulling upstream
Add commit before pulling upstream
JSX
mit
digitalsherpas/ticket-sherpa,andrewk17/ticket-sherpa,kevinbrosamle/ticket-sherpa,kevinbrosamle/ticket-sherpa,chrispicato/ticket-sherpa,digitalsherpas/ticket-sherpa,andrewk17/ticket-sherpa,chrispicato/ticket-sherpa
--- +++ @@ -3,7 +3,25 @@ const Event = ({ eventName, contractAddress, description, eventStartDateTime, eventEndDateTime, eventContractAddress, price, addressLine1, addressLine2, city, state, zipPostalCode, country }) => ( <li> - <img src="http://tctechcrunch2011.files.wordpress.com/2008/04/linux-penguin-smal...
7738546008330e98047c9845b44b99656d107d0b
public/components/MultipleGlasses.jsx
public/components/MultipleGlasses.jsx
import React from 'react'; import glassDetails from './../../glassDetails.js'; import beerPair from './../../pairList.js'; class MultipleGlasses extends React.Component { constructor(props){ super(props); this.handleGlassUpdate = this.handleGlassUpdate.bind(this); } handleGlassUpdate(e) { e.preventDe...
import React from 'react'; import glassDetails from './../../glassDetails.js'; import beerPair from './../../pairList.js'; const MultipleGlasses = (props) => { const handleGlassUpdate = (e) => { e.preventDefault(); props.updateGlass(e.target.innerHTML); } let temp = props.glasses.slice(); ...
Refactor multiple glasses component to stateless component
Refactor multiple glasses component to stateless component
JSX
mit
joeylaguna/tankard.io,joeylaguna/tankard.io
--- +++ @@ -1,35 +1,27 @@ -import React from 'react'; -import glassDetails from './../../glassDetails.js'; -import beerPair from './../../pairList.js'; +import React from 'react'; +import glassDetails from './../../glassDetails.js'; +import beerPair from './../../pairList.js'; -class MultipleGlasses e...
dd8579026bbae1a2579afb2e170eacc399275002
src/components/ui/ListForms.jsx
src/components/ui/ListForms.jsx
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; class ListForms extends PureComponent { render() { return <ul> { Object.keys(this.props.forms).map(project => <li key={ `key-${project}` }> <a target="_blank" href={ this.props.forms[project] }>{ project }</...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { List, Segment } from 'semantic-ui-react'; class ListForms extends PureComponent { render() { return <Segment textAlign="left"> <List relaxed divided> { Object.keys(this.props.forms).map(project => <...
Use sematic UI List element
Use sematic UI List element
JSX
mit
BrunoGodefroy/theodo-form-printer,BrunoGodefroy/theodo-form-printer,BrunoGodefroy/theodo-form-printer
--- +++ @@ -1,15 +1,21 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; +import { List, Segment } from 'semantic-ui-react'; class ListForms extends PureComponent { render() { - return <ul> - { Object.keys(this.props.forms).map(project => - <li key={ `key-${pr...
9628d2885f3bdb3b58fd58baeb6b26bb76c2b122
src/app/components/change-password/ChangePasswordForm.jsx
src/app/components/change-password/ChangePasswordForm.jsx
import React, { Component } from 'react'; import Input from '../Input' import PropTypes from 'prop-types'; const propTypes = { formData: PropTypes.shape({ inputs: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired, value: PropTypes.string, label: PropTyp...
import React, { Component } from 'react'; import Input from '../Input' import PropTypes from 'prop-types'; const propTypes = { formData: PropTypes.shape({ inputs: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired, value: PropTypes.string, label: PropTyp...
Add isSubmitting check and disable input and buttons and show loader if true
Add isSubmitting check and disable input and buttons and show loader if true Former-commit-id: 054d688cf76d87a77605ae7515105dbe35799c93 Former-commit-id: ace2c726643f5214e26d786232dad5ee86d4b5fa Former-commit-id: feace0245e270a55f8ee9216f74c672f84427e8a
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -13,7 +13,8 @@ error: PropTypes.string })), onSubmit: PropTypes.func.isRequired, - onCancel: PropTypes.func.isRequired + onCancel: PropTypes.func.isRequired, + isSubmitting: PropTypes.bool }).isRequired }; @@ -25,7 +26,8 @@ } render() ...
b199d835cadaaa4329501988cbc0a55992f4a975
web/src/js/components/ChatContainer.jsx
web/src/js/components/ChatContainer.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { roomInputChange, roomInputSend } from 'actions/roomActions'; import Paper from 'material-ui/Paper'; class ChatContainer extends React.Component { static propTypes = { dispatch: PropTypes.func }; sta...
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { roomInputChange, roomInputSend } from 'actions/roomActions'; import Paper from 'material-ui/Paper'; class ChatContainer extends React.Component { static propTypes = { dispatch: PropTypes.func }; sta...
Revert "fix more material stuff"
Revert "fix more material stuff" This reverts commit 46d88e7e4526e076ed99c0360da853624c123e72.
JSX
mit
upnextfm/upnextfm,upnextfm/upnextfm,upnextfm/upnextfm,upnextfm/upnextfm
--- +++ @@ -28,7 +28,8 @@ const { dispatch, inputValue } = this.props; return ( - <Paper elevation = {4} className = "up-room__paper_container up-room__chat"> + <Paper elevation = {4} className = "up-room__paper_container"> + <div className="up-room__chat"> <div className="up-room_...
2aa4d6cb89f52cc156d28e29f24f5c7a67516293
src/readme_page.jsx
src/readme_page.jsx
/** * @license Apache-2.0 * * Copyright (c) 2019 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/** * @license Apache-2.0 * * Copyright (c) 2019 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Fix flashing of template string
Fix flashing of template string
JSX
apache-2.0
stdlib-js/www,stdlib-js/www,stdlib-js/www
--- +++ @@ -32,8 +32,7 @@ * @returns {ReactComponent} React component */ function ReadmePage( props ) { - // TODO: consider whether to redirect to a 404 page - var html = HTML_FRAGMENT_CACHE[ props.path ] || '{{ FRAGMENT }}'; + var html = HTML_FRAGMENT_CACHE[ props.path ] || ''; return ( <div id="readme"
6128399c186cf23f36ccad4b3f478808223e4993
src/components/semver-checker-form.jsx
src/components/semver-checker-form.jsx
var React = require('react'); var SemverCheckerForm = React.createClass({ handleChange: function() { var constraint = this.refs.constraint.getDOMNode().value.trim(), version = this.refs.version.getDOMNode().value.trim(), valid = true; if (!constraint && !version) { ...
var React = require('react'); var SemverCheckerForm = React.createClass({ handleChange: function() { var constraint = this.refs.constraint.getDOMNode().value.trim(), version = this.refs.version.getDOMNode().value.trim(), valid = true; if (!constraint && !version) { ...
Set constraint state only when valid
Set constraint state only when valid
JSX
mit
jubianchi/semver-check,jubianchi/semver-check
--- +++ @@ -25,7 +25,9 @@ this.props.setConstraint(constraint); } else { this.refs.constraint.getDOMNode().classList.add('error'); - this.props.setConstraint(null); + if (!constraint) { + this.props.setConstraint(null); + } ...
5130cdedf1c71fce7096096736a02dda1073ccb3
src/utils/ChromeAPI.jsx
src/utils/ChromeAPI.jsx
export function searchHistory(q = "", d = false, e = false, m = 0) { let params = { text: q, maxResults: m }; if (d) { params["startTime"] = d; } if (e) { params["endTime"] = e; } return new Promise((resolve, reject) => { chrome.history.search(params, ...
export function searchHistory(q = "", d = 0, e = false, m = 0) { let params = { text: q, maxResults: m, startTime: d }; if (e) { params["endTime"] = e; } return new Promise((resolve, reject) => { chrome.history.search(params, (h) => { //console.tab...
Remove a condition on start time; it should always be set (at least to 0 to search all)
Remove a condition on start time; it should always be set (at least to 0 to search all)
JSX
mit
MrSaints/historyx,MrSaints/historyx
--- +++ @@ -1,11 +1,9 @@ -export function searchHistory(q = "", d = false, e = false, m = 0) { +export function searchHistory(q = "", d = 0, e = false, m = 0) { let params = { text: q, - maxResults: m + maxResults: m, + startTime: d }; - if (d) { - params["startTime"]...
1097892d4b51155dc4759c5fd15e6c0436503637
src/cred/phone-number/ask_location.jsx
src/cred/phone-number/ask_location.jsx
import React from 'react'; import LocationSelect from './location_select'; import { cancelSelectPhoneLocation, changePhoneLocation } from './actions'; import { initialLocationSearchStr, selectingLocation } from './index'; import * as l from '../../lock/index'; export default class AskLocation extends React.Component {...
import React from 'react'; import LocationSelect from './location_select'; import { cancelSelectPhoneLocation, changePhoneLocation } from './actions'; import { initialLocationSearchStr, selectingLocation } from './index'; import * as l from '../../lock/index'; export default class AskLocation extends React.Component {...
Update code style in AskLocation
Update code style in AskLocation
JSX
mit
mike-casas/lock,auth0/lock-passwordless,auth0/lock-passwordless,auth0/lock-passwordless,mike-casas/lock,mike-casas/lock
--- +++ @@ -5,14 +5,6 @@ import * as l from '../../lock/index'; export default class AskLocation extends React.Component { - render() { - return ( - <LocationSelect selectHandler={::this.handleSelect} - cancelHandler={::this.handleCancel} - initialLocationSearchStr={this.props.initialLocati...
d8420d49fa1eddeeb5c968b8b70c69cba95fc02c
frontend/src/components/start/index.jsx
frontend/src/components/start/index.jsx
//@flow import React, {PropTypes} from 'react'; import {fetchJson} from '../../services/backend'; import styles from './style.css' const Start = React.createClass({ getInitialState() { return { songs: [] }; }, componentDidMount() { fetchJson('/api/songs.json').then(songs => t...
//@flow import React, {PropTypes} from 'react'; import {fetchJson} from '../../services/backend'; import styles from './style.css' const Start = React.createClass({ getInitialState() { return { searchString: '', songs: [] }; }, componentDidMount() { fetchJson('/api/so...
Replace placeholder div with actual input element
Replace placeholder div with actual input element
JSX
mit
cthit/singIT,cthit/singIT,cthit/singIT,cthit/singIT,cthit/singIT
--- +++ @@ -8,6 +8,7 @@ const Start = React.createClass({ getInitialState() { return { + searchString: '', songs: [] }; }, @@ -25,12 +26,24 @@ ) }, + handleSearchInput(event) { + this.setState({ + searchString: event.target.value + }) + }, ...
2d5e67b5be15cd6daf7af690e190b794fa982201
src/field/phone-number/ask_location.jsx
src/field/phone-number/ask_location.jsx
import React from 'react'; import LocationSelect from './location_select'; import { cancelSelectPhoneLocation, changePhoneLocation } from './actions'; import { initialLocationSearchStr, selectingLocation } from './index'; import * as l from '../../core/index'; export default class AskLocation extends React.Component {...
import React from 'react'; import LocationSelect from './location_select'; import { cancelSelectPhoneLocation, changePhoneLocation } from './actions'; import { initialLocationSearchStr, selectingLocation } from './index'; import * as l from '../../core/index'; import * as i18n from '../../i18n'; // TODO: can't we get t...
Use i18n module in AskLocation
Use i18n module in AskLocation
JSX
mit
mike-casas/lock,mike-casas/lock,mike-casas/lock
--- +++ @@ -3,6 +3,7 @@ import { cancelSelectPhoneLocation, changePhoneLocation } from './actions'; import { initialLocationSearchStr, selectingLocation } from './index'; import * as l from '../../core/index'; +import * as i18n from '../../i18n'; // TODO: can't we get this from props? export default class AskLo...
b82baba6b0168f156cc45f47c98c0dde723c06d9
app/assets/javascripts/components/popover_link.es6.jsx
app/assets/javascripts/components/popover_link.es6.jsx
class PopoverLink extends React.Component { constructor(props) { super(props); this.state = { showPopover: false, user: null, position: null }; } render () { return ( <span className="popover-link" onMouseEnter={this.handleMouseEnter.bind(this)} onMouseLeave={this.handleMouseL...
class PopoverLink extends React.Component { constructor(props) { super(props); this.state = { showPopover: false, user: null, position: null }; } render () { return ( <span className="popover-link" onMouseEnter={this.handleMouseEnter.bind(this)} onMouseLeave={this.handleMouseL...
Add setTimeout to PopoverLink component to defer displaying popover when user hovers over the link
Add setTimeout to PopoverLink component to defer displaying popover when user hovers over the link
JSX
mit
dev-warner/Revinyl-Product,aamin005/Firdowsspace,aamin005/Firdowsspace,kenny-hibino/stories,aamin005/Firdowsspace,dev-warner/Revinyl-Product,dev-warner/Revinyl-Product,kenny-hibino/stories,kenny-hibino/stories
--- +++ @@ -36,21 +36,27 @@ let position; const POPOVER_HEIGHT = 200; if ( POPOVER_HEIGHT + 30 > event.clientY) { - position = "bottom"; + this.position = "bottom"; } else { - position = "top"; + this.position = "top"; } - $.ajax({ - url: `/api/users/${this.props.u...
627cb667d69f655ea0b47f6e2ea46bb52fbdbc25
frontend/src/tutorial/TutorialModal.jsx
frontend/src/tutorial/TutorialModal.jsx
import React, { Component, PropTypes } from "react"; import Icon from "metabase/components/Icon.jsx"; export default class TutorialModal extends Component { render() { const { modalStepIndex, modalStepCount } = this.props; return ( <div className="TutorialModalContent p2"> ...
import React, { Component, PropTypes } from "react"; import Icon from "metabase/components/Icon.jsx"; const ENABLE_BACK_BUTTON = false; // disabled due to possibility of getting in inconsistent states export default class TutorialModal extends Component { render() { const { modalStepIndex, modalStepCount...
Disable tutorial back button for now
Disable tutorial back button for now
JSX
agpl-3.0
Endika/metabase,blueoceanideas/metabase,dashkb/metabase,Endika/metabase,blueoceanideas/metabase,dashkb/metabase,Endika/metabase,dashkb/metabase,dashkb/metabase,Endika/metabase,dashkb/metabase,blueoceanideas/metabase,Endika/metabase,blueoceanideas/metabase,blueoceanideas/metabase
--- +++ @@ -1,6 +1,8 @@ import React, { Component, PropTypes } from "react"; import Icon from "metabase/components/Icon.jsx"; + +const ENABLE_BACK_BUTTON = false; // disabled due to possibility of getting in inconsistent states export default class TutorialModal extends Component { render() { @@ -16,7 +18...
aa6101c8bad5202399b833c5086e2607d3feb937
src/public/views/pages/donate.jsx
src/public/views/pages/donate.jsx
'use strict'; import React from 'react'; import { strings } from '../../lib/i18n'; import Header from '../header.jsx'; import Footer from '../footer.jsx'; import Title from '../components/title.jsx'; export default React.createClass({ render: function() { return ( <div id='donate'> ...
'use strict'; import React from 'react'; import { strings } from '../../lib/i18n'; import Header from '../header.jsx'; import Footer from '../footer.jsx'; import Title from '../components/title.jsx'; export default React.createClass({ render: function() { return ( <div id='donate'> ...
Move intro message to below the title
Move intro message to below the title
JSX
mit
thofmann/BitcoinUnlimitedWeb,sinahab/BitcoinUnlimitedWeb,thofmann/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,sinahab/BitcoinUnlimitedWeb
--- +++ @@ -24,12 +24,10 @@ </div> </div> <div className='col-sm-9'> + <h2 className="green">{strings().donate.supportus}</h2> <p> ...
1fe1a01b494cc2eddab417dace089fde59203b9c
app/Resources/client/jsx/project/helpers/addTraitToProject.jsx
app/Resources/client/jsx/project/helpers/addTraitToProject.jsx
function addTraitToProject(traitName, traitValues, traitCitations, biom, dimension, dbVersion,internalProjectId, action) { console.log(arguments) var trait_metadata = biom.getMetadata({dimension: dimension, attribute: ['fennec', dbversion, 'fennec_id']}).map( function (value) { if (value in ...
function addTraitToProject(traitName, traitValues, traitCitations, biom, dimension, dbVersion,internalProjectId, action) { console.log(arguments) var trait_metadata = biom.getMetadata({dimension: dimension, attribute: ['fennec', dbVersion, 'fennec_id']}).map( function (value) { if (value in ...
Rename dbversion to dbVersion in traitDetails jsx
Rename dbversion to dbVersion in traitDetails jsx
JSX
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -1,6 +1,6 @@ function addTraitToProject(traitName, traitValues, traitCitations, biom, dimension, dbVersion,internalProjectId, action) { console.log(arguments) - var trait_metadata = biom.getMetadata({dimension: dimension, attribute: ['fennec', dbversion, 'fennec_id']}).map( + var trait_metadata...
0f22a42cd5f947f99274b83fdddaa84b45b6ecc5
src/connection/enterprise/hrd_screen.jsx
src/connection/enterprise/hrd_screen.jsx
import React from 'react'; import Screen from '../../core/screen'; import { renderSignedInConfirmation } from '../../core/signed_in_confirmation'; import HRDPane from './hrd_pane'; import { cancelHRD, logInHRD } from './actions'; import { enterpriseDomain, isSingleHRDConnection } from '../enterprise'; const Component...
import React from 'react'; import Screen from '../../core/screen'; import { renderSignedInConfirmation } from '../../core/signed_in_confirmation'; import HRDPane from './hrd_pane'; import { cancelHRD, logIn } from './actions'; import { enterpriseDomain, isSingleHRDConnection } from '../enterprise'; const Component = ...
Fix logging in with a corporate connection
Fix logging in with a corporate connection
JSX
mit
mike-casas/lock,mike-casas/lock,mike-casas/lock
--- +++ @@ -2,7 +2,7 @@ import Screen from '../../core/screen'; import { renderSignedInConfirmation } from '../../core/signed_in_confirmation'; import HRDPane from './hrd_pane'; -import { cancelHRD, logInHRD } from './actions'; +import { cancelHRD, logIn } from './actions'; import { enterpriseDomain, isSingleHRDC...
d0f119b00e50e0a8dc5cb7dca1c439fbb0a17c0a
shared/components/handlebars-example.jsx
shared/components/handlebars-example.jsx
/** @jsx React.DOM */ /* global React */ import ExampleMixin from '../mixins/example'; import Code from './code'; import LocaleSelect from './locale-select'; import HandlebarsOutput from './handlebars-output'; export default React.createClass({ displayName: 'HandlebarsExample', mixins : [ExampleMixin], ...
/** @jsx React.DOM */ /* global React */ import ExampleMixin from '../mixins/example'; import Code from './code'; import LocaleSelect from './locale-select'; import HandlebarsOutput from './handlebars-output'; export default React.createClass({ displayName: 'HandlebarsExample', mixins : [ExampleMixin], ...
Tweak HTML structure of examples
Tweak HTML structure of examples
JSX
bsd-3-clause
ericf/formatjs-site,okuryu/formatjs-site,ericf/formatjs-site
--- +++ @@ -10,6 +10,16 @@ displayName: 'HandlebarsExample', mixins : [ExampleMixin], + genderateRenderCode: function () { + return [ + this.generateIntlDataCode(), + '', + 'var html = template(context, {', + ' data: {intl: intlData}', + ...
a15e67e5251ffcce0439f4ee9814b06aa814bf5d
js/components/vendor/google-analytics.jsx
js/components/vendor/google-analytics.jsx
import React from "react"; export class GoogleAnalytics extends React.Component { static propTypes = { account: React.PropTypes.string.isRequired, history: React.PropTypes.object } componentDidMount() { window.ga = window.ga || function() { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date; ...
import React from "react"; export class GoogleAnalytics extends React.Component { static propTypes = { account: React.PropTypes.string.isRequired, history: React.PropTypes.object } componentDidMount() { window.ga = window.ga || function() { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date; ...
Use new google analytics code
Use new google analytics code
JSX
isc
dennybritz/neal-react
--- +++ @@ -10,8 +10,8 @@ componentDidMount() { window.ga = window.ga || function() { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date; const account = this.props.account; - const scriptProtocol = ("https:" === document.location.protocol ? "https://ssl" : "http://www"); - const scriptSrc = ...
241ca0483e88b810be4e42a90adc58e714477bc7
imports/ui/report-view/table/element-characteristic-filter.jsx
imports/ui/report-view/table/element-characteristic-filter.jsx
import { Meteor } from 'meteor/meteor'; import React, { PropTypes } from 'react'; import { Glyphicon, OverlayTrigger, Popover, FormGroup, Checkbox } from 'react-bootstrap'; import Elements from '../../../api/elements/elements.js'; const ElementCharacteristicFilter = (props) => { const originalElement = Elements.coll...
import { Meteor } from 'meteor/meteor'; import React, { PropTypes } from 'react'; import { Glyphicon, OverlayTrigger, Popover, FormGroup, Checkbox } from 'react-bootstrap'; import Elements from '../../../api/elements/elements.js'; const ElementCharacteristicFilter = (props) => { const originalElement = Elements.coll...
Change onClick to onChange for checkbox preventing console warning
Change onClick to onChange for checkbox preventing console warning
JSX
mit
minden/data-furnace,minden/data-furnace
--- +++ @@ -17,7 +17,8 @@ return ( <Checkbox checked={isPresent(characteristic, props.element.favCharacteristicIds)} - onClick={() => Meteor.call('Reports.toggleCharacteristic', + onChange={() => Meteor.call( + 'Re...
0b7a02ae491e684b96440fc95e0d734cf7be8e1f
client/components/Index/IndexComponent.jsx
client/components/Index/IndexComponent.jsx
var React = require('react'); var IndexComponent = React.createClass({ getDefaultProps: function () { return { items: [] }; }, render: function() { if (this.props.items.length === 0) { return ( <p ref="empty">Index is empty.</p> ); } return ( <section> ...
var React = require('react'); var IndexComponent = React.createClass({ getDefaultProps: function () { return { items: [] }; }, render: function() { if (this.props.items.length === 0) { return ( <p ref="empty">Index is empty.</p> ); } return ( <section> ...
Fix React unique key test notice
Fix React unique key test notice
JSX
mit
sdbondi/react-webpack-boilerplate,sdbondi/react-webpack-play,daviferreira/classnames-webpack-eval,srn/react-webpack-boilerplate,justengland/tic-tac-toe,Widcket/react-form,tungv/editor,dclowd9901/react-ui-action-handler-decoupling,Widcket/react-form,bellicose100xp/react-webpack-boilerplate,weixing2014/react-webpack-boil...
--- +++ @@ -18,8 +18,8 @@ <section> <h2>react-webpack-boilerplate</h2> <ul ref="indexList" className="index-list"> - {this.props.items.map(function(item){ - return <li>item {item}</li> + {this.props.items.map(function(item, index){ + return <li key={ind...
f168e5dda597b61e8b55e05cc9746c77f7c5d011
app/assets/javascripts/components/common/multi_select_field.jsx
app/assets/javascripts/components/common/multi_select_field.jsx
import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import Select from 'react-select'; import selectStyles from '../../styles/select'; const MultiSelectField = createReactClass({ displayName: 'MultiSelectField', propTypes: { label: PropTypes.string,...
import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import Select from 'react-select'; import selectStyles from '../../styles/select'; const MultiSelectField = createReactClass({ displayName: 'MultiSelectField', propTypes: { label: PropTypes.string,...
Handle de-selection of last option in MultiSelectField
Handle de-selection of last option in MultiSelectField react-select changed behavior with version 3, so that removing the last selected option from a multiselect results in value of `null` instead of `[]` as before. This was resulting in an error in the tickets selector, which assumes an array of selected filters. Re...
JSX
mit
WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard
--- +++ @@ -23,7 +23,7 @@ handleSelectChange(value) { this.setState({ value }); - this.props.setSelectedFilters(value); + this.props.setSelectedFilters(value || []); }, render() {
9824d7fe230c67c8c73149cf9115b4e583fe32b2
app/api/openWeatherMap.jsx
app/api/openWeatherMap.jsx
var axios = require('axios'); const OPEN_WEATHER_MAP_URL = `http://api.openweathermap.org/data/2.5/weather?appid=${API_KEY}&units=imperial`; module.exports = { getCurrentWeather: function (location) { var encodedLocation = encodeURIComponent(location); var requestUrl = `${OPEN_WEATHER_MAP_URL}&q=${encodedLo...
const axios = require('axios'); const OPEN_WEATHER_MAP_URL = 'http://api.openweathermap.org/data/2.5/'; const DEFAULT_UNIT = 'imperial'; module.exports = { getCurrentWeather: function (location) { const encodedLocation = encodeURIComponent(location); const requestUrl = `${OPEN_WEATHER_MAP_URL}weather?appid=${API...
Add method to call OpenWeatherMap API's 5-day forecast
Add method to call OpenWeatherMap API's 5-day forecast
JSX
mit
bmorelli25/React-Weather-App,bmorelli25/React-Weather-App
--- +++ @@ -1,20 +1,38 @@ -var axios = require('axios'); +const axios = require('axios'); -const OPEN_WEATHER_MAP_URL = `http://api.openweathermap.org/data/2.5/weather?appid=${API_KEY}&units=imperial`; +const OPEN_WEATHER_MAP_URL = 'http://api.openweathermap.org/data/2.5/'; +const DEFAULT_UNIT = 'imperial'; modu...
f162d026d33a6d86f8fe3893ab3154062ee863f6
src/components/post-attachment-image.jsx
src/components/post-attachment-image.jsx
import React from 'react'; import numeral from 'numeral'; export default (props) => { const formattedFileSize = numeral(props.fileSize).format('0.[0] b'); const formattedImageSize = (props.imageSizes.o ? `, ${props.imageSizes.o.w}×${props.imageSizes.o.h}px` : ''); const nameAndSize = props.fileName + ' (' + form...
import React from 'react'; import numeral from 'numeral'; export default (props) => { const formattedFileSize = numeral(props.fileSize).format('0.[0] b'); const formattedImageSize = (props.imageSizes.o ? `, ${props.imageSizes.o.w}×${props.imageSizes.o.h}px` : ''); const nameAndSize = props.fileName + ' (' + form...
Make PostAttachmentImage more compatible with the new API
[retina-thumbnails] Make PostAttachmentImage more compatible with the new API
JSX
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
--- +++ @@ -9,10 +9,10 @@ const removeAttachment = () => props.removeAttachment(props.id); const imageAttributes = { - src: props.thumbnailUrl, + src: props.imageSizes.t && props.imageSizes.t.url || props.thumbnailUrl, alt: nameAndSize, - width: props.imageSizes.t ? props.imageSizes.t.w : undefi...
48f10bcb732f6541b4299541d231b20b6451813a
src/components/inputs/AutocompleteInput.jsx
src/components/inputs/AutocompleteInput.jsx
import React from 'react' import Autocomplete from 'react-autocomplete' import input from '../../config/input' import colors from '../../config/colors' import { margins, fontSizes } from '../../config/scales' class AutocompleteInput extends React.Component { static propTypes = { value: React.PropTypes.string.isR...
import React from 'react' import Autocomplete from 'react-autocomplete' import input from '../../config/input' import colors from '../../config/colors' import { margins, fontSizes } from '../../config/scales' class AutocompleteInput extends React.Component { static propTypes = { value: React.PropTypes.string.isR...
Convert Autocmplete from tabs to spaces
Convert Autocmplete from tabs to spaces
JSX
mit
maputnik/editor,maputnik/editor
--- +++ @@ -13,41 +13,44 @@ } render() { - return <Autocomplete - menuStyle={{ - border: 'none', + return <Autocomplete + menuStyle={{ + border: 'none', padding: '2px 0', position: 'fixed', overflow: 'auto', maxHeight: '50%', - }} - inputProps={{ + ...
a008141868527e8533fc7aefe225348e39afa5cb
src/drive/web/modules/services/components/Picker/AddFolderButton.jsx
src/drive/web/modules/services/components/Picker/AddFolderButton.jsx
import React from 'react' import { connect } from 'react-redux' import { Button } from 'cozy-ui/react' const AddFolderButton = ({ addFolder }) => ( <Button onClick={addFolder}>Nouveau dossier</Button> ) const mapDispatchToPropsButton = (dispatch, ownProps) => ({ addFolder: () => dispatch(showNewFolderInput()) }) ...
import React from 'react' import { connect } from 'react-redux' import { Button, ButtonAction, withBreakpoints, Icon } from 'cozy-ui/react' import IconFolderAdd from 'drive/assets/icons/icon-folder-add.svg' import { showNewFolderInput } from 'drive/web/modules/filelist/duck' const AddFolderButton = ({ addFolder, break...
Add folder buton on mobile
fix: Add folder buton on mobile
JSX
agpl-3.0
y-lohse/cozy-drive,nono/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-drive,cozy/cozy-files-v3,nono/cozy-files-v3,cozy/cozy-files-v3,y-lohse/cozy-files-v3,y-lohse/cozy-files-v3,y-lohse/cozy-drive,y-lohse/cozy-drive,y-lohse/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,cozy/cozy-files-v3
--- +++ @@ -1,13 +1,31 @@ import React from 'react' import { connect } from 'react-redux' -import { Button } from 'cozy-ui/react' +import { Button, ButtonAction, withBreakpoints, Icon } from 'cozy-ui/react' +import IconFolderAdd from 'drive/assets/icons/icon-folder-add.svg' +import { showNewFolderInput } from 'driv...
f2b7b30af38e98095e602b4e1aa557bdbc301de1
app/components/App.jsx
app/components/App.jsx
import AppBar from 'material-ui/AppBar'; import FlatButton from 'material-ui/FlatButton'; import NavLogo from 'components/NavLogo'; import React from 'react'; const App = React.createClass({ render() { const styleAppBar = { height: '125px' }; const styleFlatButton = { height: '125px', ...
import AppBar from 'material-ui/AppBar'; import FlatButton from 'material-ui/FlatButton'; import NavLogo from 'components/NavLogo'; import React from 'react'; const App = React.createClass({ render() { const styleAppBar = { height: '125px' }; const styleFlatButton = { height: '125px', ...
Update styles for Main navbar
Update styles for Main navbar
JSX
mit
brybrophy/workflow,brybrophy/workflow
--- +++ @@ -22,15 +22,35 @@ }; const styleIconLeft = { - marginLeft: '35px' + height: '125px', + lineHeight: '125px', + marginLeft: '35px', + marginTop: '14px' + }; + + const styleSubTitle = { + fontSize: '.9rem', + marginLeft: '10px', + position: 'relative', ...
c6ef853a89a525b3e72cc92e7dcf07e5b31009b3
app/react/components/data-card/data-card.jsx
app/react/components/data-card/data-card.jsx
import React from "react"; import Categories from "../../components/categories/categories.jsx"; export default React.createClass({ propTypes: { className: React.PropTypes.string, showPicture: React.PropTypes.bool, picture: React.PropTypes.string, categories: React.PropTypes.arrayOf(React.PropTypes.s...
import React from "react"; import Categories from "../../components/categories/categories.jsx"; export default class DataCard extends React.Component { render() { return ( <div className={`data-card-wrapper ${this.props.className}`}> <div className="data-card"> {this.props.showPicture ...
Make changes for es6 migrations
DataCard: Make changes for es6 migrations See #613
JSX
mpl-2.0
mozilla/science.mozilla.org,mozilla/science.mozilla.org
--- +++ @@ -2,18 +2,8 @@ import React from "react"; import Categories from "../../components/categories/categories.jsx"; -export default React.createClass({ - propTypes: { - className: React.PropTypes.string, - showPicture: React.PropTypes.bool, - picture: React.PropTypes.string, - categories: React....
1c8f3386730fb4d6391fecd4c0b907991a7874f2
code/client/routes.jsx
code/client/routes.jsx
import React from 'react'; import {render} from 'react-dom' import {mount} from 'react-mounter'; // load Layout and Welcome React components import {Exemplars, HowTo, Layout, Users, Welcome} from './app.jsx'; import {Router, Route, IndexRoute} from 'react-router' import createBrowserHistory from 'history/lib/createBrow...
import React from 'react'; import {render} from 'react-dom'; // load Layout and Welcome React components import {Exemplars, HowTo, Layout, Users, Welcome} from './app.jsx'; import {Router, Route, IndexRoute} from 'react-router' import createBrowserHistory from 'history/lib/createBrowserHistory' const routes = <Router...
Remove react-mounter (no longer using flow-router).
Remove react-mounter (no longer using flow-router).
JSX
bsd-3-clause
DouglasUrner/Class-Blog
--- +++ @@ -1,6 +1,6 @@ import React from 'react'; -import {render} from 'react-dom' -import {mount} from 'react-mounter'; +import {render} from 'react-dom'; + // load Layout and Welcome React components import {Exemplars, HowTo, Layout, Users, Welcome} from './app.jsx'; import {Router, Route, IndexRoute} from 'r...
7bf48ea61756ef6596d0aba8147c886b35c1499c
src/client/components/ActivityFeed/activities/card/ActivityCardLabels.jsx
src/client/components/ActivityFeed/activities/card/ActivityCardLabels.jsx
import React from 'react' import Tag from '../../../Tag' import styled from 'styled-components' import PropTypes from 'prop-types' import { SPACING } from '@govuk-react/constants' const TagRow = styled('div')` display: flex; justify-content: space-between; padding-bottom: ${SPACING.SCALE_2}; margin-right: ${S...
import React from 'react' import Tag from '../../../Tag' import styled from 'styled-components' import PropTypes from 'prop-types' import { SPACING } from '@govuk-react/constants' const TagRow = styled('div')` display: flex; justify-content: space-between; padding-bottom: ${SPACING.SCALE_2}; margin-right: ${S...
Remove redundant check for interaction kind
Remove redundant check for interaction kind
JSX
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend
--- +++ @@ -35,11 +35,9 @@ )} </TagColumn> <TagColumn> - {kind && ( - <Tag data-test="activity-kind-label" colour="grey"> - {kind} - </Tag> - )} + <Tag data-test="activity-kind-label" colour="grey"> + {kind} + </Tag> </TagColumn> </TagRow> )
60f96256581f4c49790b221a218cee4823f4c8cd
web/static/js/configs/stage_configs.jsx
web/static/js/configs/stage_configs.jsx
import React from "react" export default { "prime-directive": { alert: null, confirmationMessage: "Are you sure want to proceed to the Idea Generation stage?", nextStage: "idea-generation", progressionButton: { copy: "Proceed to Idea Generation", iconClass: "arrow right", }, }, "i...
import React from "react" export default { "prime-directive": { alert: null, confirmationMessage: "Your entire party has arrived?", nextStage: "idea-generation", progressionButton: { copy: "Proceed to Idea Generation", iconClass: "arrow right", }, }, "idea-generation": { alert...
Update prime directive stage progression text
Update prime directive stage progression text - we want folks to not move to the idea generation stage until everyone in (or the majority of) the party has arrived
JSX
mit
stride-nyc/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
--- +++ @@ -3,7 +3,7 @@ export default { "prime-directive": { alert: null, - confirmationMessage: "Are you sure want to proceed to the Idea Generation stage?", + confirmationMessage: "Your entire party has arrived?", nextStage: "idea-generation", progressionButton: { copy: "Proceed to ...
87f316ff1396efaa3a6e51b22de7744a5b0a4793
installer/frontend/components/cidr.jsx
installer/frontend/components/cidr.jsx
import React from 'react'; import { Deselect, Input, WithClusterConfig } from './ui'; import { validate } from '../validate'; import { DESELECTED_FIELDS } from '../cluster-config.js'; import { WithTooltip } from './tooltip'; const generateTooltipText = ({value}) => { if (validate.CIDR(value)) { return; } co...
import React from 'react'; import { Deselect, Input, WithClusterConfig } from './ui'; import { validate } from '../validate'; import { DESELECTED_FIELDS } from '../cluster-config.js'; export const CIDR = ({field, name, disabled, placeholder, autoFocus, validator, selectable, fieldName}) => { fieldName = fieldName |...
Fix tooltip preventing editing of CIDR inputs
frontend: Fix tooltip preventing editing of CIDR inputs
JSX
apache-2.0
hhoover/tectonic-installer,rithujohn191/tectonic-installer,enxebre/tectonic-installer,s-urbaniak/tectonic-installer,everett-toews/tectonic-installer,lander2k2/tectonic-installer,lander2k2/tectonic-installer,yifan-gu/tectonic-installer,aknuds1/tectonic-installer,colemickens/tectonic-installer,everett-toews/tectonic-inst...
--- +++ @@ -3,18 +3,6 @@ import { Deselect, Input, WithClusterConfig } from './ui'; import { validate } from '../validate'; import { DESELECTED_FIELDS } from '../cluster-config.js'; -import { WithTooltip } from './tooltip'; - -const generateTooltipText = ({value}) => { - if (validate.CIDR(value)) { - return; -...
952d6579c6d08b29be91a87c73cffcb83826987e
src/js/components/DateHeader.jsx
src/js/components/DateHeader.jsx
import React from 'react'; const DateHeader = () => { const today = new Date(); return ( <div className="section"> <nav className="nav has-shadow"> <div className="container"> <div className="nav-left"> <a>◀</a> </div> <div className="nav-center"> ...
import React, { PropTypes } from 'react'; const propTypes = { date: PropTypes.string.isRequired, prevDate: PropTypes.func.isRequired, nextDate: PropTypes.func.isRequired, }; export default class DateHeader extends React.Component { constructor(props) { super(props); this._onClickPrevDate = this._onCl...
Implement prev/next Date on click
Implement prev/next Date on click
JSX
mit
tanaka0325/nippo-web,tanaka0325/nippo-web
--- +++ @@ -1,24 +1,46 @@ -import React from 'react'; +import React, { PropTypes } from 'react'; -const DateHeader = () => { - const today = new Date(); - return ( - <div className="section"> - <nav className="nav has-shadow"> - <div className="container"> - <div className="nav-left"> - ...
ea013b011a9ad14f6bea834d2b4da8d6feb0ee76
src/client/views/layouts/home-layout.jsx
src/client/views/layouts/home-layout.jsx
MainLayout = React.createClass({ render() { return <div> <header> <h1>Welcome to the Github Gamified Issue Tracker</h1> <p>Fix some issues and get sweet points</p> </header> <main> Content Goes Here </main> <footer> Made by Meteor Phoenix <a href="http...
HomeLayout = React.createClass({ render() { return <div> <header> <h1>Welcome to the Github Gamified Issue Tracker</h1> <p>Fix some issues and get sweet points</p> </header> <main> Content Goes Here </main> <footer> Made by Meteor Phoenix <a href="http...
Fix name for home layout
Fix name for home layout
JSX
mit
meteor-phoenix/global-hackathon,meteor-phoenix/global-hackathon
--- +++ @@ -1,4 +1,4 @@ -MainLayout = React.createClass({ +HomeLayout = React.createClass({ render() { return <div> <header>
40f8c665c2f1f4cee594f54ad5d75f6d1a15ef33
src/components/app.jsx
src/components/app.jsx
import React from 'react'; import { IndexLink, Link } from 'react-router'; export default function App(props) { const { children, encounter, location } = props; let link = null; if (location.pathname !== '/') { link = <IndexLink to="/">Home</IndexLink>; } else if (encounter.length) { link = <Link to="...
import React from 'react'; import GlobalHeader from './global-header'; export default function App({children}) { return ( <div> <GlobalHeader /> {React.cloneElement(children)} </div> ); } App.propTypes = { children: React.PropTypes.element.isRequired };
Move nav to new component global-header
Move nav to new component global-header
JSX
mit
jkrayer/summoner,jkrayer/summoner
--- +++ @@ -1,30 +1,15 @@ import React from 'react'; -import { IndexLink, Link } from 'react-router'; +import GlobalHeader from './global-header'; -export default function App(props) { - const { children, encounter, location } = props; - let link = null; - - if (location.pathname !== '/') { - link = <IndexLi...
8f05b612f40012c8e3c14bb2c55ac7ae14651167
src/components/AddServiceTile.jsx
src/components/AddServiceTile.jsx
import React, { Component } from 'react' import { withClient } from 'cozy-client' import Icon from 'cozy-ui/react/Icon' import AppLinker, { generateWebLink } from 'cozy-ui/react/AppLinker' import palette from 'cozy-ui/stylus/settings/palette.json' export class AddServiceTile extends Component { render() { const...
import React from 'react' import { withClient } from 'cozy-client' import Icon from 'cozy-ui/react/Icon' import AppLinker, { generateWebLink } from 'cozy-ui/react/AppLinker' import palette from 'cozy-ui/stylus/settings/palette.json' const AddServiceTile = ({ label, client }) => { const nativePath = '/discover/?type=...
Transform class into a function
refactor: Transform class into a function
JSX
agpl-3.0
cozy/cozy-home,cozy/cozy-home,cozy/cozy-home
--- +++ @@ -1,38 +1,34 @@ -import React, { Component } from 'react' +import React from 'react' import { withClient } from 'cozy-client' - import Icon from 'cozy-ui/react/Icon' import AppLinker, { generateWebLink } from 'cozy-ui/react/AppLinker' import palette from 'cozy-ui/stylus/settings/palette.json' -export ...
58a9cebffd7d81bc1438458711b9add0816655a9
example/js/app.jsx
example/js/app.jsx
import React from 'react'; import Row from './row.jsx'; let App = React.createClass({ displayName : 'App', render() { var st = this.state; return ( <div {...this.props} className="app"> <Row> <p>Column 1</p> <p>Column 2</p> <p>Column 3</p> </Row> ...
import React from 'react'; import Row from './row.jsx'; let App = React.createClass({ displayName : 'App', render() { var st = this.state; return ( <div {...this.props} className="app"> <Row rowName="example"> <p>Column 1</p> <p>Column 2</p> <p>Column 3</p> ...
Add an example name to remember its old dimensions
Add an example name to remember its old dimensions
JSX
mit
renemonroy/react-row,renemonroy/react-row
--- +++ @@ -9,7 +9,7 @@ var st = this.state; return ( <div {...this.props} className="app"> - <Row> + <Row rowName="example"> <p>Column 1</p> <p>Column 2</p> <p>Column 3</p>
341bf207c10de69a67497d96177133e643c06de1
source/assets/js/app/components/user_media_configurator_modal.es6.jsx
source/assets/js/app/components/user_media_configurator_modal.es6.jsx
const UserMediaConfiguratorModal = (props) => { return <div className="modal hide fade modal-center" id="modal-user-media-configurator" data-backdrop="static"> <div className="modal-header"> <h3>You are about to join a palava conference!</h3> </div> <div className="modal-body"> <p>Please choos...
const UserMediaConfiguratorModal = (props) => { return <div className="modal hide fade modal-center" id="modal-user-media-configurator" data-backdrop="static"> <div className="modal-header"> <h3>You are about to join a palava conference!</h3> </div> <div className="modal-body"> <p><strong>Plea...
Add privacy policy to prompt
Add privacy policy to prompt
JSX
mit
palavatv/palava-portal,palavatv/palava-portal,palavatv/palava-portal
--- +++ @@ -4,7 +4,8 @@ <h3>You are about to join a palava conference!</h3> </div> <div className="modal-body"> - <p>Please choose which media streams you want to send to other participants</p> + <p><strong>Please note:</strong> This will join or create a video chat room with others. For te...
5eb0e36faf7f0682ca3aa35f9bf952a61f217383
src/components/fields/DocLabel.jsx
src/components/fields/DocLabel.jsx
import React from 'react' import input from '../../config/input.js' import colors from '../../config/colors.js' import { margins, fontSizes } from '../../config/scales.js' export default class DocLabel extends React.Component { static propTypes = { label: React.PropTypes.string.isRequired, doc: React.PropTyp...
import React from 'react' import input from '../../config/input.js' import colors from '../../config/colors.js' import { margins, fontSizes } from '../../config/scales.js' export default class DocLabel extends React.Component { static propTypes = { label: React.PropTypes.string.isRequired, doc: React.PropTyp...
Decrease doc label font size
Decrease doc label font size
JSX
mit
maputnik/editor,maputnik/editor
--- +++ @@ -35,10 +35,11 @@ <div style={{ backgroundColor: colors.gray, padding: margins[1], + fontSize: 10, position: 'absolute', top: 20, left: 0, - width: 100, + width: 120, display: this.state.showDoc ? null : 'none', zInde...
1a6bd94b1330706d96d5470b7833640d2bb56fbd
src/components/InputBar/InputBar.jsx
src/components/InputBar/InputBar.jsx
import React from 'react'; import Button from '../Button/Button.jsx'; import './InputBar.css'; const InputBar = () => ( <div className="InputBar"> <textarea placeholder="text here, dummy" /> <Button variant="send" onClick={() => {}}>Send</Button> </div> ); export default InputBar;
import React, { Component } from 'react'; import Button from '../Button/Button.jsx'; import './InputBar.css'; class InputBar extends Component { state = { chatText: '', } sendChat = () => { console.log('aldkfjalkd'); } handleChange = (e) => { this.setState({ [e.target.name]: e.target.va...
Make chat text box into class based components for testing sockets
Make chat text box into class based components for testing sockets - no point in hooking up the text chat thing to redux yet until we actually have sockets working.
JSX
bsd-3-clause
minimalchat/operator-app,minimalchat/operator-app
--- +++ @@ -1,13 +1,39 @@ -import React from 'react'; +import React, { Component } from 'react'; import Button from '../Button/Button.jsx'; import './InputBar.css'; -const InputBar = () => ( - <div className="InputBar"> - <textarea placeholder="text here, dummy" /> - <Button variant="send" onClick={() =>...
332e11c87c1c29ecf135f3ec1103150a64979b36
web/static/js/components/stage_change_info_prime_directive.jsx
web/static/js/components/stage_change_info_prime_directive.jsx
import React from "react" export default () => ( <p> The Prime Directive is used to frame the retrospective, such that the time spent is as constructive as possible. Read it for yourself, and try to keep it in mind as the retro moves forward </p> )
import React from "react" export default () => ( <p> The Prime Directive is used to frame the retrospective, such that the time spent is as constructive as possible. Read it to yourself! Internalize it! </p> )
Update prime directive stage info copy
Update prime directive stage info copy
JSX
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
--- +++ @@ -3,7 +3,6 @@ export default () => ( <p> The Prime Directive is used to frame the retrospective, such that the time - spent is as constructive as possible. Read it for yourself, and try to keep - it in mind as the retro moves forward + spent is as constructive as possible. Read it to yours...
81f8cda7bf41fcfe8610873a00bfe72dcc242f55
src/Onboard.jsx
src/Onboard.jsx
// ./components/my-form-component.js' import React from 'react'; import { Control, Form, getFormValues, formValueSelector } from 'redux-form'; import Nav from './Nav.jsx'; import WizardForm from './WizardForm.jsx'; import { OverlayTrigger, Popover, FormGroup, FormControl, ControlLabel, Radio, ButtonGroup, ButtonToolbar...
// ./components/my-form-component.js' import React from 'react'; import { Control, Form, getFormValues, formValueSelector } from 'redux-form'; import Nav from './Nav.jsx'; import WizardForm from './WizardForm.jsx'; import { OverlayTrigger, Popover, FormGroup, FormControl, ControlLabel, Radio, ButtonGroup, ButtonToolbar...
Send Data from form to backend
Send Data from form to backend
JSX
mit
potatowave/escolha,potatowave/escolha
--- +++ @@ -14,11 +14,6 @@ </Popover> ); -function postForm(data_insert) { - saveCase(data_insert); - // console.log(JSON.stringify(data_insert)); -} - class OnboardData extends React.Component { render() { @@ -30,7 +25,7 @@ <Nav /> <main className="onboardform"> - <WizardFo...
87e0708d2437f15cea42f17862ce902f737f7a7c
js/copy-url-button.jsx
js/copy-url-button.jsx
/** * External dependencies */ var React = require( 'react' ), ReactZeroClipboard = require( 'react-zeroclipboard' ); module.exports = React.createClass( { getResultsURL: function() { return 'http://www.abtestcalculator.com' + '?ap=' + this.props.variations.a.participants + '&ac=' + this.props.variations.a...
/** * External dependencies */ var React = require( 'react' ), ReactZeroClipboard = require( 'react-zeroclipboard' ); /** * Internal dependencies */ var analytics = require( './analytics' ); module.exports = React.createClass( { getResultsURL: function() { return 'http://www.abtestcalculator.com' + '?ap=' ...
Add analytics event for copying results url
Add analytics event for copying results url
JSX
mit
mattm/abtestcalculator,mattm/abtestcalculator
--- +++ @@ -3,6 +3,11 @@ */ var React = require( 'react' ), ReactZeroClipboard = require( 'react-zeroclipboard' ); + +/** + * Internal dependencies + */ +var analytics = require( './analytics' ); module.exports = React.createClass( { getResultsURL: function() { @@ -14,6 +19,7 @@ }, urlCopied: function...
4862d529cc3966278b849ec8a654ec8d0af55aa6
src/js/popup/components/Panel.jsx
src/js/popup/components/Panel.jsx
import {connect} from 'react-redux' import {createElement, PropTypes} from 'react' import CSSModules from 'react-css-modules' import BookmarkTree from './BookmarkTree' import Search from './Search' import styles from '../../../css/popup/panel.css' const Panel = (props) => { const {trees} = props const mainPanel...
import {connect} from 'react-redux' import {createElement, PropTypes} from 'react' import CSSModules from 'react-css-modules' import BookmarkTree from './BookmarkTree' import Search from './Search' import styles from '../../../css/popup/panel.css' const Panel = (props) => { const {trees} = props const mainPanel...
Use treeInfo.id as key instead of treeIndex
Use treeInfo.id as key instead of treeIndex
JSX
mit
foray1010/Popup-my-Bookmarks,foray1010/Popup-my-Bookmarks
--- +++ @@ -13,12 +13,12 @@ const mainPanelItems = [] const subPanelItems = [] - for (const [treeIndex] of trees.entries()) { + for (const [treeIndex, treeInfo] of trees.entries()) { const targetPanelItems = treeIndex % 2 === 0 ? mainPanelItems : subPanelItems targetPanelItems.push( <Book...
cba6c33927ad1520a8a1db541398d5f13cd6b1d7
components/charts/Area.jsx
components/charts/Area.jsx
const React = require("react"); const c3 = require('c3'); module.exports = React.createClass({ displayName: 'AreaChart', onClick() { }, componentDidMount() { this.chart = c3.generate({ bindto: this.getDOMNode(), data: { x: 'x', json: {} } }); this.renderChart(); ...
const React = require("react"); const c3 = require('c3'); module.exports = React.createClass({ displayName: 'AreaChart', onClick() { }, componentDidMount() { this.chart = c3.generate({ bindto: this.getDOMNode(), data: { x: 'x', json: [] }, axis: { x: { ...
Add timeseries on x axis
Add timeseries on x axis
JSX
mit
bengler/imdikator,bengler/imdikator
--- +++ @@ -11,8 +11,16 @@ bindto: this.getDOMNode(), data: { x: 'x', - json: {} - } + json: [] + }, + axis: { + x: { + type: 'timeseries', + tick: { + format: '%Y' + } + } + } }); this.rende...
bf373cba03e982e39caabe0cb0e287742a53688a
packages/lesswrong/components/sequences/SequencesNavigationLink.jsx
packages/lesswrong/components/sequences/SequencesNavigationLink.jsx
import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; const SequencesNavigationLink = ({ slug, document, docu...
import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; import { withStyles } from '@material-ui/core/styles'; const styles...
Fix sequences navigation button coloring
Fix sequences navigation button coloring There was a regression introduced by deleting seemingly-unused SCSS, because `SequencesNavigationLink` was dynamically constructing the class names `sequences-navigation-top-left` and `sequences-navigation-top-right`. Additionally, the SCSS that was incorrectly removed containe...
JSX
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
--- +++ @@ -3,6 +3,20 @@ import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; +import { withStyles } from '@material-ui/core/styles'; + +const styles = theme => ({ + normal: { + "& .material-icons": { + color: "rgba(0,0,0, 0.5) !important" +...
ff599d53643198fe8896d65f46c0ca81e54a554d
src/js/components/PayoutSelectContainer.jsx
src/js/components/PayoutSelectContainer.jsx
import React from 'react'; import InputBlock from './InputBlock'; import text from '../helpers/text'; const PayoutSelectContainer = (props) => { const props2 = Object.keys(props) .filter((key) => key !== 'state' && key !== 'options') .reduce((props2, key) => (props2[key] = props[key], props2), {}); retur...
import React from 'react'; import InputBlock from './InputBlock'; import text from '../helpers/text'; const PayoutSelectContainer = (props) => { const props2 = Object.keys(props) .filter((key) => key !== 'state' && key !== 'options') .reduce((props2, key) => (props2[key] = props[key], props2), {}); retur...
Add new strings for translation
Add new strings for translation
JSX
apache-2.0
binary-com/japanui,binary-com/japanui,binary-com/japanui
--- +++ @@ -12,8 +12,8 @@ heading={text('Payout Amount')}> <div className='payout-input'> <div className='float-left'> - ¥ <input {...props2} id='payout'/> - <label className='payout-mult' htmlFor='payout'>,000</label> + {text('¥')} <input {...props2} id='payout'/> + ...
b6a66f9a6cbd51e64fd3af4e36e6fb9e689e362e
src/app/login/Login.jsx
src/app/login/Login.jsx
import React, { Component } from 'react'; import { connect } from 'react-redux' import Layout from '../global/Layout'; class Login extends Component { constructor(props) { super(props); } render() { return ( <Layout > <div>This is login</div> </Layo...
import React, { Component } from 'react'; import { connect } from 'react-redux' import { post } from '../utilities/post' class Login extends Component { constructor(props) { super(props); this.state = { email: "", password: "" }; this.handleSubmit = this.h...
Add login form and set cookie functionality
Add login form and set cookie functionality Former-commit-id: fef22bf27286c177022e74155b6dcb5b4ad5091f Former-commit-id: db0c2838cf6268459a99f3313db3f7f4b37d40bb Former-commit-id: 239ee8594ae5280a24b54f7a066207ed023dae5b
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -1,20 +1,73 @@ import React, { Component } from 'react'; import { connect } from 'react-redux' -import Layout from '../global/Layout'; +import { post } from '../utilities/post' class Login extends Component { constructor(props) { super(props); + + this.state = { + ema...
d1b5665f0df4038965246c06edd93c1a29ab8931
src/sui-card/index.jsx
src/sui-card/index.jsx
import React from 'react'; import cx from 'classnames'; class SuiCard extends React.Component { static get propTypes(){ return { landscapeLayout: React.PropTypes.bool, contentFirst: React.PropTypes.bool, primary: React.PropTypes.any.isRequired, secondary: React.PropTypes.any, classN...
import React, { PropTypes } from 'react'; import cx from 'classnames'; export default function SuiCard (props) { const classNames = cx({ 'sui-Card': !props.className, [`${props.className}`]: props.className, 'sui-Card--landscape': props.landscapeLayout, 'sui-Card--contentfirst': props.landscapeLayout...
Move to a stateless component
Move to a stateless component
JSX
mit
SUI-Components/sui-card
--- +++ @@ -1,46 +1,33 @@ -import React from 'react'; +import React, { PropTypes } from 'react'; import cx from 'classnames'; -class SuiCard extends React.Component { - static get propTypes(){ - return { - landscapeLayout: React.PropTypes.bool, - contentFirst: React.PropTypes.bool, - primary: Re...
c6b018b07121f83e5598f556bd1ba97a59285004
app/js/home/Page.jsx
app/js/home/Page.jsx
import React from 'react'; import asyncComponent from 'common/components/AsyncComponent'; import Hero from 'home/components/Hero'; import 'scss/home.scss'; // Load the events list async from the Events Chunck const HomeEvents = asyncComponent(() => import(/* webpackChunkName: "Events" */ 'events/containers/HomeEvents...
import React from 'react'; import asyncComponent from 'common/components/AsyncComponent'; import Hero from 'home/components/Hero'; import 'scss/home.scss'; // Load the events list async from the Events Chunck const HomeEvents = asyncComponent(() => import(/* webpackChunkName: "Events" */ 'events/containers/HomeEvents...
Add link to the mentor schedule on the homepage
Add link to the mentor schedule on the homepage
JSX
mit
rit-sse/OneRepoToRuleThemAll
--- +++ @@ -15,7 +15,7 @@ <h4 className="front-heading">Mentoring <small>10am - 6pm, Mon - Fri</small></h4> <p> The SSE has a mentor on duty every day that can help with SE, CS and other technical classes. - There are also physics tutors who hold open mentoring hours in our lab. ...
4349f21a5555baac8b8496a3bc34f33b2cd1fcd0
js/search.jsx
js/search.jsx
const React = require('react') const ShowCard = require('./ShowCard') const data = require('../public/data') const Search = () => ( <div className='container'> <div className='shows'> {data.shows.map((show) => ( <ShowCard show={show} key={show.imdbID}/> ))} </div> </div> ) module.expor...
const React = require('react') const ShowCard = require('./ShowCard') const data = require('../public/data') const Search = () => ( <div className='container'> <div className='shows'> {data.shows.map((show) => ( <ShowCard show={show} key={show.imdbID} /> ))} </div> </div> ) module.expo...
Fix the unique key prop error
Fix the unique key prop error
JSX
mit
michaeldumalag/ReactSelfLearning,michaeldumalag/ReactSelfLearning
--- +++ @@ -6,7 +6,7 @@ <div className='container'> <div className='shows'> {data.shows.map((show) => ( - <ShowCard show={show} key={show.imdbID}/> + <ShowCard show={show} key={show.imdbID} /> ))} </div> </div>
c218a26b1a170dcbef7f250052e4e64b9490c106
app/components/NotFound.jsx
app/components/NotFound.jsx
import React from 'react'; import {Link} from 'react-router'; const NotFound = () => ( <div className="app__content__main not-found"> <h1 className="not-found__disclaimer">Nothing to see here</h1> Go <a href="" onClick={(e) => (e.preventDefault(), history.back())}>back</a> Go <Link to="/">home</Link> </div> );...
import React from 'react'; import {Link} from 'react-router'; const NotFound = () => ( <div className="app__content__main not-found"> <h1 className="not-found__disclaimer">Nothing to see here</h1> <p> Go <a href="" onClick={(e) => (e.preventDefault(), history.back())}>back</a> Go <Link to="/">home</Link> ...
Fix links on not-found route out of alignment
fix(not-found): Fix links on not-found route out of alignment
JSX
mit
Velenir/workers-journey,Velenir/workers-journey
--- +++ @@ -4,8 +4,10 @@ const NotFound = () => ( <div className="app__content__main not-found"> <h1 className="not-found__disclaimer">Nothing to see here</h1> - Go <a href="" onClick={(e) => (e.preventDefault(), history.back())}>back</a> - Go <Link to="/">home</Link> + <p> + Go <a href="" onClick={(e) => ...
0b528a6aad1f3196c80826574210db46b409d339
src/components/xp-calculator.jsx
src/components/xp-calculator.jsx
import React from 'react'; import Input from './input'; import style from '../style/xp-calculator.css'; export default class XpCalculator extends React.Component { constructor(props) { super(props); this.state = { split: null, total: 0 }; this.calculateXpReward = this.calculateXpReward.bi...
import React from 'react'; import Input from './input'; import style from '../style/xp-calculator.css'; export default class XpCalculator extends React.Component { constructor(props) { super(props); this.state = { split: null, total: 0 }; this.calculateXpReward = this.calculateXpReward.bi...
Refactor to handle encounter changes
Refactor to handle encounter changes
JSX
mit
jkrayer/summoner,jkrayer/summoner
--- +++ @@ -10,9 +10,17 @@ total: 0 }; this.calculateXpReward = this.calculateXpReward.bind(this); + this.setTotal = this.setTotal.bind(this); } componentWillMount() { - const { encounter } = this.props; + this.setTotal(this.props.encounter); + } + componentWillReceiveProps(nextProps...
503100cbd59abb9ca8676030cf1825410a4448da
templates/minimal/public/javascripts/main.jsx
templates/minimal/public/javascripts/main.jsx
// View that displays a button to call the server var NameLoaderView = React.createClass({ render: function() { return ( <div> <h1>{this.props.staticName}</h1> <p>Hello {this.props.staticName}</p> <input type="button" value="Get app name" onClick={this.props.handleClick} /> <...
// View that displays a button to call the server var NameLoaderView = React.createClass({ render: function() { return ( <div> <h1>{this.props.staticName}</h1> <p>Hello {this.props.staticName}</p> <input type="button" value="Get app name" onClick={this.props.handleClick} /> <...
Fix appName type in minimal template
Fix appName type in minimal template
JSX
mit
peterjuras/slush-azure-node,peterjuras/slush-react-express,peterjuras/slush-react-express,peterjuras/slush-react-express,peterjuras/slush-azure-node,peterjuras/slush-azure-node
--- +++ @@ -21,7 +21,7 @@ var xhr = new XMLHttpRequest(); xhr.open('GET', '/api', true); xhr.onload = function () { - this.setState({ appname: xhr.responseText }); + this.setState({ appName: xhr.responseText }); }.bind(this); xhr.send(); },
57e5ca9fe1cce60d825f9b6457bad001fd98811c
client/src/components/UserNameInputBox.jsx
client/src/components/UserNameInputBox.jsx
import React from 'react'; import RaisedButton from 'material-ui/RaisedButton'; import { Card } from 'material-ui/Card'; import TextField from 'material-ui/TextField'; class UserNameInputBox extends React.Component { constructor (props) { super(props); this.state = { userName: '', userNameExists:...
import React from 'react'; import RaisedButton from 'material-ui/RaisedButton'; import { Card } from 'material-ui/Card'; import TextField from 'material-ui/TextField'; class UserNameInputBox extends React.Component { constructor (props) { super(props); this.state = { userName: '', userNameExists:...
Add buttonClicked function invocation when Submit button is clicked to update parent state
Add buttonClicked function invocation when Submit button is clicked to update parent state
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -24,7 +24,9 @@ } passDataToCreateUser() { + console.log('please work'); this.props.dataFromInputBox({userName: this.state.userName, userNameExists: this.state.userNameExists}); + this.props.buttonClicked(true); } render () {
29f746881eee0db17b82c510a23e9e56e035a066
src/links.jsx
src/links.jsx
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. import _ from 'underscore'; import React from 'react'; import { FormatTemplate, MatchFilter } from './utils.jsx'; import { Filter } from './dispatch.jsx'; export default class LinksPa...
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. import _ from 'underscore'; import React from 'react'; import { FormatTemplate, MatchFilter } from './utils.jsx'; import { Filter } from './dispatch.jsx'; export default class LinksPa...
Add missing key prop in LinksPanel rendering.
Add missing key prop in LinksPanel rendering.
JSX
apache-2.0
devnev/boardwalk,devnev/boardwalk
--- +++ @@ -10,8 +10,8 @@ render() { return ( <div> - {this.props.links.map(function(link) { - return <Link match={link.match} url={link.url} text={link.text} /> + {this.props.links.map(function(link, index) { + return <Link key={index} match={link.match} url={link.url} ...
833ae362aa7d014f2fe30cb6179143eaf22e5cca
src/js/components/refugee-map/refugee-time-range-indicator.jsx
src/js/components/refugee-map/refugee-time-range-indicator.jsx
var React = require('react'); var moment = require('moment'); var RefugeeTimeRangeIndicator = React.createClass({ displayTimeRange: function(timeRange) { var startMoment = moment.unix(timeRange[0]); var endMoment = moment.unix(timeRange[1]); if (startMoment.month() == endMoment.month() && sta...
var React = require('react'); var moment = require('moment'); var RefugeeTimeRangeIndicator = React.createClass({ displayTimeRange: function(timeRange) { var startMoment = moment.unix(timeRange[0]); var endMoment = moment.unix(timeRange[1]); if (startMoment.month() == endMoment.month() && sta...
Change format to "Jan 2015"
Change format to "Jan 2015"
JSX
mit
lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries
--- +++ @@ -11,9 +11,9 @@ if (startMoment.month() == endMoment.month() && startMoment.year() == endMoment.year()) { - return startMoment.format("MMM/YYYY"); + return startMoment.format("MMM YYYY"); } else { - return startMoment.format("MMM/YYYY") + " - " + endMoment.format("MMM/YYY...
1318e090eef13ac06b6fda81466172bdcfd3be0d
react-component-template/example/entry.jsx
react-component-template/example/entry.jsx
import React from 'react' import ReactDOM from 'react-dom' import {{PascalName}} from '../index.jsx' import data from './data.js' import styles from './entry.css' import a11y from 'react-a11y' // expose React for debugging window.React = React a11y(React) ReactDOM.render(<{{PascalName}} {...data} />, document.getEle...
import React from 'react' import {{PascalName}} from '../index.jsx' import data from './data.js' import styles from './entry.css' import a11y from 'react-a11y' // expose React for debugging window.React = React a11y(React) React.render(<{{PascalName}} {...data} />, document.getElementById('app'))
Revert "update example to require react DOM"
Revert "update example to require react DOM" This reverts commit 7fd76eef357cd63124e738ff7e4fd24a0966e86a.
JSX
mit
cstumph/ribcage-gen,Techwraith/ribcage-gen,Techwraith/ribcage-gen,cstumph/ribcage-gen,tedbreen/ribcage-gen
--- +++ @@ -1,6 +1,4 @@ import React from 'react' -import ReactDOM from 'react-dom' - import {{PascalName}} from '../index.jsx' import data from './data.js' import styles from './entry.css' @@ -10,4 +8,4 @@ window.React = React a11y(React) -ReactDOM.render(<{{PascalName}} {...data} />, document.getElementById...
95e77f6e46c1d6e39752d13aa27fb4fe50927315
src/Seguidor/Seguidor.jsx
src/Seguidor/Seguidor.jsx
import React, { Component } from 'react'; import { Link } from 'react-router'; import FetchingIndicator from '../Fetching/FetchingIndicator'; import SeguidorHeading from './SeguidorHeading'; import Carousel from './Carousel/Carousel'; import YearTabsMobile from './YearTabsMobile'; import MediaQuery from 'react-responsi...
import React, { Component } from 'react' import MediaQuery from 'react-responsive' import FetchingIndicator from '../Fetching/FetchingIndicator' import SeguidorHeading from './SeguidorHeading' import Carousel from './Carousel/Carousel' class Seguidor extends Component { componentDidMount() { this.props.onLoad() ...
Fix para reflejar refactor anterior
Fix para reflejar refactor anterior
JSX
isc
UTNianos/frontend,UTNianos/frontend
--- +++ @@ -1,59 +1,50 @@ -import React, { Component } from 'react'; -import { Link } from 'react-router'; -import FetchingIndicator from '../Fetching/FetchingIndicator'; -import SeguidorHeading from './SeguidorHeading'; -import Carousel from './Carousel/Carousel'; -import YearTabsMobile from './YearTabsMobile'; -imp...
ce3db70d103dcd5ba1fa75ec5ddb9de6e9360198
src/containers/LanguagePicker.jsx
src/containers/LanguagePicker.jsx
import { connect } from 'react-redux' import { getLang } from '../selectors/locales' import { getUrlName } from '../routeTable' import * as locales from '../locales' import LanguagePicker from '../components/LanguagePicker' const mapStateToProps = state => ({ pathName: typeof window === 'undefined' || !window ? '...
import { connect } from 'react-redux' import { getLang } from '../selectors/locales' import { getUrlName } from '../routeTable' import * as locales from '../locales' import LanguagePicker from '../components/LanguagePicker' const mapStateToProps = (state) => ({ pathName: (typeof window === 'undefined' || !window ...
Resolve language picker from URL on ssr
Resolve language picker from URL on ssr
JSX
mit
just-paja/improtresk-web,just-paja/improtresk-web
--- +++ @@ -7,8 +7,10 @@ import LanguagePicker from '../components/LanguagePicker' -const mapStateToProps = state => ({ - pathName: typeof window === 'undefined' || !window ? 'home' : getUrlName(getLang(state), window.location.pathname) || 'home', +const mapStateToProps = (state) => ({ + pathName: (typeof wind...
323825db0b441072e90d1dcb3e31510e928041d1
app/assets/javascripts/components/river.js.jsx
app/assets/javascripts/components/river.js.jsx
var SetIntervalMixin = { componentWillMount: function() { this.intervals = []; }, setInterval: function() { this.intervals.push(setInterval.apply(null, arguments)); }, componentWillUnmount: function() { this.intervals.forEach(clearInterval); } }; var Comment = React.createClass({ mixins: [Se...
var SetIntervalMixin = { componentWillMount: function() { this.intervals = []; }, setInterval: function() { this.intervals.push(setInterval.apply(null, arguments)); }, componentWillUnmount: function() { this.intervals.forEach(clearInterval); } }; var Comment = React.createClass({ mixins: [Se...
Make River Function with Necessary Information
Make River Function with Necessary Information
JSX
mit
jjshin85/echo,jjshin85/echo,jjshin85/echo
--- +++ @@ -37,7 +37,7 @@ console.log(this.state.pins); return (<div>{this.state.pins.map(function (key, value){ return <div key={key.id}> - Comment: {key.comment} Name: {key.username} + <p className='river'>{key.username} @ {key.location} Song: {} - {key.comment}</p> </di...
bb6071b9c1540889f24d9f775f8a1021f5987ab6
client/app/bundles/course/assessment/submission/components/pastAnswers/PastProgrammingAnswer.jsx
client/app/bundles/course/assessment/submission/components/pastAnswers/PastProgrammingAnswer.jsx
import React, { Component } from 'react'; import ProgrammingImportEditor from '../../containers/ProgrammingImportEditor'; import ReadOnlyEditor from '../../containers/ReadOnlyEditor'; import TestCaseView from '../../containers/TestCaseView'; import { answerShape, questionShape } from '../../propTypes'; export default...
import React, { Component } from 'react'; import ProgrammingImportEditor from '../../containers/ProgrammingImportEditor'; import ReadOnlyEditor from '../../containers/ReadOnlyEditor'; import TestCaseView from '../../containers/TestCaseView'; import { answerShape, questionShape } from '../../propTypes'; export default...
Fix past file upload answers
Fix past file upload answers
JSX
mit
Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2
--- +++ @@ -35,7 +35,7 @@ const content = file ? file.content.split('\n') : ''; if (question.fileSubmission) { - return this.renderFileSubmissionPastAnswer().bind(this); + return this.renderFileSubmissionPastAnswer(); } return (
02a8d1a9a6f0324eed066624df52a25fe6fae38b
src/FacebookLoading.jsx
src/FacebookLoading.jsx
import React, { PropTypes } from 'react'; import styles from './FacebookLoading.styl'; const FacebookLoading = (props) => { let { style, duration, zoom } = props; if (typeof duration === 'number') { duration += 's'; } return ( <div className={styles.loading} st...
import React, { PropTypes } from 'react'; import styles from './FacebookLoading.styl'; const FacebookLoading = (props) => { let { style, duration, zoom } = props; if (typeof duration === 'number') { duration += 's'; } return ( <div className={styles.loading} st...
Resolve an issue of incorrect vendor-prefixed style property
Resolve an issue of incorrect vendor-prefixed style property
JSX
mit
cheton/react-facebook-loading
--- +++ @@ -13,9 +13,9 @@ className={styles.loading} style={{ animationDuration: duration, - webkitAnimationDuration: duration, - mozAnimationDuration: duration, - oAnimationDuration: duration, + WebkitAnimationDura...
dd954b42c0b7b4d89baec8f3ad1ba832db5099f8
client/network/site-connected-filter.jsx
client/network/site-connected-filter.jsx
import React from 'react' import { connect } from 'react-redux' import siteSocket from './site-socket' import { makeServerUrl } from './server-url' import styles from './site-connected-filter.css' import LoadingIndicator from '../progress/dots.jsx' let applyCookies = async () => {} if (IS_ELECTRON) { const { remote...
import React from 'react' import { connect } from 'react-redux' import siteSocket from './site-socket' import styles from './site-connected-filter.css' import LoadingIndicator from '../progress/dots.jsx' @connect(state => ({ siteNetwork: state.network.site })) export default class SiteConnectedFilter extends React.Co...
Remove the unnecessary explicit cookie applying
Remove the unnecessary explicit cookie applying Previously this was required because webpack didn't respect the `browser` field in the `package.json` for the `electron-renderer` targets, which `engine.io-client` used to determine when to use which version of `XMLHttpRequest`, so it used the node's version. Newer vers...
JSX
mit
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
--- +++ @@ -1,52 +1,20 @@ import React from 'react' import { connect } from 'react-redux' import siteSocket from './site-socket' -import { makeServerUrl } from './server-url' import styles from './site-connected-filter.css' import LoadingIndicator from '../progress/dots.jsx' -let applyCookies = async () => {...
25eb0c6575f808c27b72ab2ecae823133d3fcf5f
src/map/components/panel-handle/__tests__/MapPanelHandle.test.jsx
src/map/components/panel-handle/__tests__/MapPanelHandle.test.jsx
import React from 'react'; import { shallow } from 'enzyme'; import MapPanelHandle from '../MapPanelHandle'; describe('MapPanelHandle', () => { it('should render children by default', () => { const mapPanelHandle = shallow( <MapPanelHandle isMapPanelHandleVisible onMapPanelHandleToggle={()...
import React from 'react'; import { shallow } from 'enzyme'; import MapPanelHandle from '../MapPanelHandle'; describe('MapPanelHandle', () => { it('should render children by default', () => { const mapPanelHandle = shallow( <MapPanelHandle isMapPanelHandleVisible onMapPanelHandleToggle={()...
Use mock features of Jest instead of Sinon
Use mock features of Jest instead of Sinon
JSX
mpl-2.0
Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas_prototype,Amsterdam/atlas
--- +++ @@ -30,7 +30,7 @@ ); mapPanelHandle.find('.map-panel-handle__toggle').simulate('click'); - expect(onButtonClickSpy.mock.calls.length).toBe(1); + expect(onButtonClickSpy).toHaveBeenCalledTimes(1); expect(mapPanelHandle.find('.children-test').length).toBe(0); }); });
deb45df71282d605ccc9df50cd2d83e429bc748f
src/components/SocialLinks.jsx
src/components/SocialLinks.jsx
import React from 'react'; import PropTypes from 'prop-types'; const propTypes = {}; const defaultProps = {}; const SocialLinks = (props) => { const text = encodeURIComponent(props.messages.morse); const url = encodeURIComponent(`http://simoneduca.com/#/morse-translator/message/${props.params.message_id}`); re...
import React from 'react'; import PropTypes from 'prop-types'; const propTypes = {}; const defaultProps = {}; const SocialLinks = (props) => { const text = encodeURIComponent(props.messages.morse); const url = encodeURIComponent(`http://simoneduca.com/morse-translator/#/message/${props.params.message_id}`); re...
Put hash in the correct place
Put hash in the correct place
JSX
apache-2.0
simoneduca/morse-translator,simoneduca/morse-translator
--- +++ @@ -7,7 +7,7 @@ const SocialLinks = (props) => { const text = encodeURIComponent(props.messages.morse); - const url = encodeURIComponent(`http://simoneduca.com/#/morse-translator/message/${props.params.message_id}`); + const url = encodeURIComponent(`http://simoneduca.com/morse-translator/#/message/${...
317515b850a46dc14decacfa04edaf5ee5a667c3
src/js/components/Task.jsx
src/js/components/Task.jsx
import React, { PropTypes } from 'react'; const propTypes = { task: PropTypes.object.isRequired, }; export default class Task extends React.Component { render() { return ( <tr> <td> {this.props.task.text} </td> </tr> ); } } Task.propTypes = propTypes;
import React, { PropTypes } from 'react'; const propTypes = { task: PropTypes.object.isRequired, }; export default class Task extends React.Component { render() { return ( <tr> <td> {this.props.task.text} </td> <td className="is-icon"> <i className="fa fa-chec...
Add icon in task, but not work yet
Add icon in task, but not work yet
JSX
mit
tanaka0325/nippo-web,tanaka0325/nippo-web
--- +++ @@ -11,6 +11,15 @@ <td> {this.props.task.text} </td> + <td className="is-icon"> + <i className="fa fa-check" /> + </td> + <td className="is-icon"> + <i className="fa fa-pencil" /> + </td> + <td className="is-icon"> + <i...
6724ce34a1dfc54e71310c1b787b65d9ae1a5a4a
app/lib/Create.jsx
app/lib/Create.jsx
'use strict'; var React = require('react'); var SkyLight = require('jsx!react-skylight/src/skylight.jsx'); var Button = require('react-pure-button'); var Form = require('lib/Form'); module.exports = React.createClass({ displayName: 'Create', propTypes: { actions: React.PropTypes.object, sche...
'use strict'; var React = require('react'); var SkyLight = require('jsx!react-skylight/src/skylight.jsx'); var Button = require('react-pure-button'); var Form = require('lib/Form'); module.exports = React.createClass({ displayName: 'Create', propTypes: { actions: React.PropTypes.object, sche...
Print possible submit errors to console
Print possible submit errors to console
JSX
mit
bebraw/react-crm-frontend,koodilehto/koodilehto-crm-frontend,bebraw/react-crm-frontend,koodilehto/koodilehto-crm-frontend
--- +++ @@ -62,6 +62,9 @@ that.props.actions.create(data); } + else { + console.info('errors', errors); + } } }, });
441b37e1bcec19c5ae87e690da4f5b9c03995d53
client/src/MyMap.jsx
client/src/MyMap.jsx
import React from 'react'; import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl"; import accessTokens from './accessTokens.js'; // import mapboxStyle from './mapboxStyle.js'; const containerStyle = { height: "80vh", width: "80vw", }; class MyMap extends React.Component { constructor(props) { super...
import React from 'react'; import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl"; import accessTokens from './accessTokens.js'; import { Map } from 'immutable'; const containerStyle = { height: "80vh", width: "80vw", }; class MyMap extends React.Component { constructor(props) { super(props); t...
Implement Feature in map Layer
Implement Feature in map Layer
JSX
mit
conniedaisy/filmSF,conniedaisy/filmSF
--- +++ @@ -1,7 +1,7 @@ import React from 'react'; import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl"; import accessTokens from './accessTokens.js'; -// import mapboxStyle from './mapboxStyle.js'; +import { Map } from 'immutable'; const containerStyle = { height: "80vh", @@ -14,12 +14,20 @@ ...
696f6e4e7e5fa95fb7a6cf72ff004fbdc1ffc485
test/BrowseNotesSpec.jsx
test/BrowseNotesSpec.jsx
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import BrowseNotes from './../client/components/BrowseNotes'; describe('<BrowseNotes />', () => { it('should render component', () => { const wrapper = mount(<BrowseNotes />); expect(wrapper.find('h2')).to.have.length(...
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import BrowseNotes from './../client/components/BrowseNotes'; describe('<BrowseNotes />', () => { it('should render component', () => { const wrapper = mount(<BrowseNotes />); expect(wrapper.find('h2')).to.have.length(...
Tweak pseudo code very slightly for browse notes spec
Tweak pseudo code very slightly for browse notes spec
JSX
mit
enchanted-spotlight/Plato,enchanted-spotlight/Plato
--- +++ @@ -25,5 +25,4 @@ // Should filter out notes that do not meet search parameters -// Should open note for editing when it is clicked - +// Should open note component with note data when clicked
a2327632a55620b8cf32ccac8e8ea489d86fa67c
src/components/registration/registration.jsx
src/components/registration/registration.jsx
var React = require('react'); var Modal = require('../modal/modal.jsx'); require('./registration.scss'); Modal.setAppElement(document.getElementById('view')); var Registration = React.createClass({ propTypes: { isOpen: React.PropTypes.bool, onRegistrationDone: React.PropTypes.func, onRequ...
var React = require('react'); var Modal = require('../modal/modal.jsx'); require('./registration.scss'); Modal.setAppElement(document.getElementById('view')); var Registration = React.createClass({ propTypes: { isOpen: React.PropTypes.bool, onRegistrationDone: React.PropTypes.func, onRequ...
Handle relaunch requests from the iframe
Handle relaunch requests from the iframe Only attach the message listener when the modal is displaying. This prevents multiple listeners being set up by multiple registration components on the page. Also, scope the `onMessage` handler to that component's iframe, so that we don't respond to other component's messages....
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -13,13 +13,27 @@ }, onMessage: function (e) { if (e.origin != window.location.origin) return; + if (e.source != this.refs.registrationIframe.contentWindow) return; if (e.data == 'registration-done') this.props.onRegistrationDone(); + if (e.data == 'registration-rel...
8b2e4230dc2b3c35c584d9ef9292f0b0b94b6725
src/components/user-feed.jsx
src/components/user-feed.jsx
import React from 'react' import {Link} from 'react-router' import PaginatedView from './paginated-view' import Feed from './feed' export default props => ( <div> {props.viewUser.blocked ? ( <div className="box-body"> <p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts an...
import React from 'react' import {Link} from 'react-router' import PaginatedView from './paginated-view' import Feed from './feed' export default props => ( <div> {props.viewUser.blocked ? ( <div className="box-body"> <p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts an...
Fix user's own private feed
Fix user's own private feed Before: user is shown "user has a private feed" for their own feed. After: user is shown the feed contents.
JSX
mit
davidmz/freefeed-react-client,FreeFeed/freefeed-html-react,clbn/freefeed-gamma,kadmil/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-html-react,clbn/freefeed-gamma,clbn/freefeed-gamma,ujenjt/freefeed-react-client,FreeFeed/freefeed-react-...
--- +++ @@ -11,7 +11,7 @@ <p>You have blocked <b>{props.viewUser.screenName}</b>, so all of their posts and comments are invisible to you.</p> <p><a onClick={()=>props.userActions.unban({username: props.viewUser.username, id: props.viewUser.id})}>Un-block</a></p> </div> - ) : props.viewUse...
5ac3571b2d8dbeb8cf74ebfbc8f2fe5d1df17713
app/components/Input.jsx
app/components/Input.jsx
import React, { Component, PropTypes } from 'react' export default class Input extends Component { static propTypes = { handleChange: PropTypes.func, handleSubmit: PropTypes.func, id: PropTypes.string, type: PropTypes.oneOf(['text']).isRequired, value: PropTypes.oneOfType([PropTypes.string, PropT...
import React, { Component, PropTypes } from 'react' export default class Input extends Component { static propTypes = { handleChange: PropTypes.func, handleSubmit: PropTypes.func, id: PropTypes.string, type: PropTypes.oneOf(['text']).isRequired, value: PropTypes.oneOfType([PropTypes.string, PropT...
Fix input styling on iOS
Fix input styling on iOS
JSX
mit
quis/notify-public-research-prototype,quis/notify-public-research-prototype,quis/notify-public-research-prototype
--- +++ @@ -25,7 +25,7 @@ render () { return <input - className="ba2 b--govuk-gray-1 outline w-100" + className="ba2 b--govuk-gray-1 outline w-100 input-reset" id={this.props.id} onChange={this::this.handleChange} onKeyUp={this::this.handleKeyUp}
fa1d91396d9aabe4241699e4f55224a88880bdf6
frontend/components/app.jsx
frontend/components/app.jsx
import React from 'react'; const App = ({ children }) => ( <div> {/* TODO: Build header, footer, and categories and render here*/} {/*<header className="header-bar u-full-width"> <a>This is the header</a> </header>*/} {children} </div> ); export default App;
import React from 'react'; const App = ({ children }) => ( <div> {children} </div> ); export default App;
Remove todo, items will be in seperate component
Remove todo, items will be in seperate component
JSX
mit
PGilbertSchmitt/SwappingApp,PGilbertSchmitt/SwappingApp,PGilbertSchmitt/SwappingApp
--- +++ @@ -2,10 +2,6 @@ const App = ({ children }) => ( <div> - {/* TODO: Build header, footer, and categories and render here*/} - {/*<header className="header-bar u-full-width"> - <a>This is the header</a> - </header>*/} {children} </div> );
03f6e166b0de21424a472cf300dee3c44d88c2e1
src/Stagger/index.jsx
src/Stagger/index.jsx
import React from 'react'; import { node, number } from 'prop-types'; import { TransitionGroup } from 'react-transition-group'; const Stagger = ({ children, chunk, delay, ...props }) => { const getDelay = idx => { if (chunk) { return (idx % chunk) * delay; } return idx * delay; ...
import React from 'react'; import { node, number } from 'prop-types'; import { TransitionGroup } from 'react-transition-group'; export const getStaggerDelay = (idx, props) => { if (props.chunk) { return (idx % props.chunk) * props.delay; } return idx * props.delay; }; const Stagger = ({ children, ...
Move getDelay out of component and rename to make more testable
Move getDelay out of component and rename to make more testable
JSX
mit
unruffledBeaver/react-animation-components
--- +++ @@ -2,19 +2,19 @@ import { node, number } from 'prop-types'; import { TransitionGroup } from 'react-transition-group'; -const Stagger = ({ children, chunk, delay, ...props }) => { - const getDelay = idx => { - if (chunk) { - return (idx % chunk) * delay; - } - return idx...
9996226bc05b1208d946fb5f11e3f7eb3f6f088c
client/src/Nav.jsx
client/src/Nav.jsx
import React from 'react'; class Nav extends React.Component { constructor(props) { super(props); this.state({ }); } render() { return ( <div> <button id="my-shopping-list">My Shopping List</button> <button id="house-inventory">House Inventory</button> </div> ...
import React from 'react'; class Nav extends React.Component { constructor(props) { super(props); this.state = { }; } render() { return ( <div> <button id="my-shopping-list">My Shopping List</button> <button id="house-inventory">House Inventory</button> </div> ...
Fix syntax error in this.state
Fix syntax error in this.state
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -4,9 +4,9 @@ constructor(props) { super(props); - this.state({ + this.state = { - }); + }; }
803e5641c4a473948038645ea494908e60f4d4fe
src/ui/input/input_wrap.jsx
src/ui/input/input_wrap.jsx
import React from 'react'; export default class InputWrap extends React.Component { render() { const { before, focused, isValid, name, icon } = this.props; let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`; if (!isValid) { blockClassName += " auth0-lock-error"; } let ...
import React from 'react'; export default class InputWrap extends React.Component { render() { const { after, before, focused, isValid, name, icon } = this.props; let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`; if (!isValid) { blockClassName += " auth0-lock-error"; } ...
Add after prop to InputWrap
Add after prop to InputWrap This will allow to show a validation hint.
JSX
mit
mike-casas/lock,mike-casas/lock,mike-casas/lock
--- +++ @@ -3,7 +3,7 @@ export default class InputWrap extends React.Component { render() { - const { before, focused, isValid, name, icon } = this.props; + const { after, before, focused, isValid, name, icon } = this.props; let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`; ...
f2bca1bdc04260c0268c307f14245d3bd00c2311
src/js/app.jsx
src/js/app.jsx
import React from 'react'; import { connect } from 'react-redux'; import { showMonster } from '../redux/actions'; import MonsterList from './monsterlist'; import Monster from './monster' const App = React.createClass({ propTypes: { allMonsters: React.PropTypes.array.isRequired }, render () { let monster ...
import React from 'react'; import { connect } from 'react-redux'; import { showMonster } from '../redux/actions'; import MonsterList from './monsterlist'; import Monster from './monster' const App = React.createClass({ propTypes: { allMonsters: React.PropTypes.array.isRequired, visibleStatBlock: React.PropTy...
Add proptypes and simplify select
Add proptypes and simplify select
JSX
mit
jkrayer/summoner,jkrayer/summoner
--- +++ @@ -6,7 +6,8 @@ const App = React.createClass({ propTypes: { - allMonsters: React.PropTypes.array.isRequired + allMonsters: React.PropTypes.array.isRequired, + visibleStatBlock: React.PropTypes.object }, render () { let monster = this.props.visibleStatBlock ? <Monster monster={this.p...
02077028997db9f3248bc9d1256762ccd729da5b
src/cesium/CesiumProjectContents.jsx
src/cesium/CesiumProjectContents.jsx
import React, {Component} from "react"; import BillboardCollection from "cesium/Source/Scene/BillboardCollection"; import CesiumBillboard from "./primitives/CesiumBillboard"; export class CesiumProjectContents extends Component { constructor(props) { super(props); this.billboards = new Billboard...
Add a CesiumContents component to render many billboards
Add a CesiumContents component to render many billboards
JSX
mit
markerikson/cesium-react-webpack-demo,markerikson/cesium-react-webpack-demo
--- +++ @@ -0,0 +1,55 @@ +import React, {Component} from "react"; + +import BillboardCollection from "cesium/Source/Scene/BillboardCollection"; + +import CesiumBillboard from "./primitives/CesiumBillboard"; + +export class CesiumProjectContents extends Component { + constructor(props) { + super(props); + + ...
8e7bde93dc6b352c32b034ad00b005977ddd8e63
app/js/main.jsx
app/js/main.jsx
import Action from './action' import Chat from './components/chat.jsx' import LogList from './components/log_list.jsx' import UnitGroup from './components/unit_group.jsx' import Clock from './stores/clock' import {LogStore} from './stores/log' import UnitGroupStore, {UNIT_GROUP_PLAYER, UNIT_GROUP_AI} from './stores/uni...
import Action from './action' import Chat from './components/chat.jsx' import LogList from './components/log_list.jsx' import UnitGroup from './components/unit_group.jsx' import Clock from './stores/clock' import {LogStore} from './stores/log' import UnitGroupStore, {UNIT_GROUP_PLAYER, UNIT_GROUP_AI} from './stores/uni...
Remove the action object from global
Remove the action object from global
JSX
mit
etheriqa/crescent-client,etheriqa/crescent-client
--- +++ @@ -12,8 +12,6 @@ const playerUnitGroupStore = new UnitGroupStore(action, UNIT_GROUP_PLAYER) const aiUnitGroupStore = new UnitGroupStore(action, UNIT_GROUP_AI) -global.action = action - React.render( <div> <UnitGroup unitGroup={playerUnitGroupStore} clock={clock} />
9c3c7c971dbe3e66c57524f16811b4a2a2577236
src/components/CartItems.jsx
src/components/CartItems.jsx
var React = require('react'); var ItemName = require('./ItemName.jsx'); var RemoveButton = require('./RemoveButton.jsx'); var CartItems = React.createClass({ render: function () { var _this = this; var itemNames = this.props.items.map(function (item, index) { return ( <...
var React = require('react'); var ItemName = require('./ItemName.jsx'); var RemoveButton = require('./RemoveButton.jsx'); var CartItems = React.createClass({ render: function () { var itemNames = this.props.items.map((item, index) => { return ( <li key={index} className="item">...
Use ES6 arrow functions to avoid 'this' binding
Use ES6 arrow functions to avoid 'this' binding
JSX
mit
rahulbaphana/Reactive-Cart,rahulbaphana/Reactive-Cart
--- +++ @@ -5,13 +5,12 @@ var CartItems = React.createClass({ render: function () { - var _this = this; - var itemNames = this.props.items.map(function (item, index) { + var itemNames = this.props.items.map((item, index) => { return ( <li key={index} classNam...
1e6dd5809a7ac55b8e01ba13c08875445c7f83f8
src/app/App.jsx
src/app/App.jsx
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { hasValidAuthToken } from './utilities/hasValidAuthToken'; import { userLoggedIn } from './config/actions'; import user from './utilities/user'; const propTypes = { children: PropTypes.node...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { hasValidAuthToken } from './utilities/hasValidAuthToken'; import { userLoggedIn } from './config/actions'; import user from './utilities/user'; const propTypes = { children: PropTypes.node...
Fix app not loading and add loader animation
Fix app not loading and add loader animation Former-commit-id: 8b7cd270f37f8d54ba8375b399eb73814aafffe8 Former-commit-id: dda5bd7528e029cc4518918d1743bf4b0c3a44d1 Former-commit-id: efa4e5a9c42c5c3848573dfd092dbececdbf540f
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -32,6 +32,7 @@ user.getPermissions(email).then(userType => { user.setUserState(userType); + this.setState({isCheckingAuthentication: false}); }); return; } @@ -44,7 +45,9 @@ <div> ...
9fd0699054c1604a9eda8c82175af93a72099847
app/src/components/Navbar/Navbar.jsx
app/src/components/Navbar/Navbar.jsx
import React, {Component} from 'react'; import './Navbar.css'; class Navbar extends Component{ render(){ return( <div className="topnav"> <a href="https://github.com/Roshanjossey/first-contributions/blob/master/README.md">Get Started</a> <a href="#about">About</a> </div> ) } }...
import React, {Component} from 'react'; import './Navbar.css'; class Navbar extends Component{ render(){ return( <div className="topnav"> <a href="https://twitter.com/1stContribution" target="_blank">twitter</a> <a href="https://firstcontributions.herokuapp.com" target="_blank">slack</a> ...
Change links in navbar to point to slach and twitter
Change links in navbar to point to slach and twitter
JSX
mit
lauratavares/first-contributions,Shhzdmrz/first-contributions,Shhzdmrz/first-contributions,dichaves/first-contributions,RickHaan/first-contributions,Abhishekchakru/first-contributions,FearTheFrail/first-contributions,RickHaan/first-contributions,dichaves/first-contributions,lauratavares/first-contributions,Abhishekchak...
--- +++ @@ -5,8 +5,8 @@ render(){ return( <div className="topnav"> - <a href="https://github.com/Roshanjossey/first-contributions/blob/master/README.md">Get Started</a> - <a href="#about">About</a> + <a href="https://twitter.com/1stContribution" target="_blank">twitter</a> + ...
5f2dffb39a3688d154220456302129518bcda332
src/components/stage-selector/stage-selector.jsx
src/components/stage-selector/stage-selector.jsx
const classNames = require('classnames'); const PropTypes = require('prop-types'); const React = require('react'); const Box = require('../box/box.jsx'); const CostumeCanvas = require('../costume-canvas/costume-canvas.jsx'); const styles = require('./stage-selector.css'); const StageSelector = props => { const { ...
const classNames = require('classnames'); const PropTypes = require('prop-types'); const React = require('react'); const Box = require('../box/box.jsx'); const CostumeCanvas = require('../costume-canvas/costume-canvas.jsx'); const styles = require('./stage-selector.css'); const StageSelector = props => { const { ...
Use 4x3 ratio for backdrop thumbnail to prevent blank space
Use 4x3 ratio for backdrop thumbnail to prevent blank space
JSX
bsd-3-clause
cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,LLK/scratch-gui
--- +++ @@ -33,7 +33,7 @@ {url ? ( <CostumeCanvas className={styles.costumeCanvas} - height={44} + height={42} url={url} width={56}...
3f4d3f020781604aff4170eb251a3bf5caa1cd28
lib/components/input-email/InputEmail.jsx
lib/components/input-email/InputEmail.jsx
import React from 'react'; import { assign, isEmpty, trim } from 'lodash'; import classnames from 'classnames'; import bem from 'bem-classname'; import isValidValueEntered from './validations'; import FieldComponent from '../FieldComponent'; export default class InputEmail extends FieldComponent { onChangeBound = t...
import React from 'react'; import { assign, isEmpty, trim } from 'lodash'; import classnames from 'classnames'; import bem from 'bem-classname'; import isValidValueEntered from './validations'; import FieldComponent from '../FieldComponent'; export default class InputEmail extends FieldComponent { onChangeBound = t...
Fix issue in input email component
Fix issue in input email component
JSX
mit
drioemgaoin/react-responsive-form,drioemgaoin/react-responsive-form
--- +++ @@ -49,7 +49,9 @@ } onChange(event: React.SyntheticEvent<HTMLInputElement>) { - this.setState({ value: event.currentTarget.value }); + const value = event.currentTarget.value; + + this.setState({ value: value }); if (this.props.onChange) { this.props.onChange(value);
213e18f18ddaaf80b8897acb436b56617f8c92e7
src/components/elements/realtime-switch.jsx
src/components/elements/realtime-switch.jsx
import React from 'react'; import { connect } from 'react-redux'; import { updateFrontendPreferences, home } from '../../redux/action-creators'; const RealtimeSwitch = (props) => ( <div className={'realtime-switch' + (props.frontendPreferences.realtimeActive ? ' on' : ' off')}> <div className="realtime-switch-l...
import React from 'react'; import { connect } from 'react-redux'; import { updateFrontendPreferences, home } from '../../redux/action-creators'; const RealtimeSwitch = (props) => ( <div className={'realtime-switch' + (props.frontendPreferences.realtimeActive ? ' on' : ' off')}> <div className="realtime-switch-l...
Replace arrow function with prepared prop in RealtimeSwitch
[jsx-no-bind] Replace arrow function with prepared prop in RealtimeSwitch
JSX
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
--- +++ @@ -6,7 +6,7 @@ const RealtimeSwitch = (props) => ( <div className={'realtime-switch' + (props.frontendPreferences.realtimeActive ? ' on' : ' off')}> <div className="realtime-switch-label">Realtime updates</div> - <div className="realtime-switch-range" onClick={() => props.toggle(props.userId, pro...
0796575aca7072c01b2e0978eae981593c03a7c2
templates/scaffolds/component/component.jsx
templates/scaffolds/component/component.jsx
import React from 'react'; import './{{name}}.less'; type Props = { } class {{name}} extends React.Component { description: '{{description}}' props: Props constructor(props: Props) { super(props); } /* Component Custom Methods */ /* End Component Custom Methods */ /* React Component LifeCycl...
import React from 'react'; import './{{name}}.less'; type Props = { } class {{name}} extends React.Component { description: '{{description}}' props: Props constructor(props: Props) { super(props); } /* Component Custom Methods */ /* End Component Custom Methods */ /* React Component LifeCycle ...
Remove spacing on compinent scaffold
Remove spacing on compinent scaffold
JSX
mit
111StudioKK/lambda-cli,111StudioKK/lambda-cli
--- +++ @@ -1,7 +1,5 @@ import React from 'react'; - import './{{name}}.less'; - type Props = {
9731569807cde71e802beca8b45a3e40e0f8a356
src/specs/css-module.spec.jsx
src/specs/css-module.spec.jsx
import React from 'react'; import { lorem } from './util'; const IS_BROWSER = typeof(window) !== 'undefined'; let css; if (IS_BROWSER) { css = require('./css-module.module.css'); console.log("css", css); } const CssSample = () => ( <div className="css-module-sample"> <p>{ lorem(50) }</p> <p>{ lorem(50...
import React from 'react'; import { lorem } from './util'; const IS_BROWSER = typeof(window) !== 'undefined'; let css; if (IS_BROWSER) { // css = require('./css-module.module.css'); // console.log("css", css); } const CssSample = () => ( <div className="css-module-sample"> <p>{ lorem(50) }</p> <p>{ lo...
Comment out failing module reference.
Comment out failing module reference.
JSX
mit
philcockfield/ui-harness,philcockfield/ui-harness,philcockfield/ui-harness
--- +++ @@ -4,8 +4,8 @@ const IS_BROWSER = typeof(window) !== 'undefined'; let css; if (IS_BROWSER) { - css = require('./css-module.module.css'); - console.log("css", css); + // css = require('./css-module.module.css'); + // console.log("css", css); }