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
00bc833223ba155b5bab23e38a5f202cc6de9f5b
src/framework/dropdown/DropdownGroup.spec.jsx
src/framework/dropdown/DropdownGroup.spec.jsx
import { TestCaseFactory } from 'react-test-kit'; import BaseDropdown from '../base/dropdown/BaseDropdown.jsx'; import DropdownGroup from './DropdownGroup.jsx'; import DropdownDot from './dropdownDot/DropdownDot.jsx'; describe('DropdownGroup', () => { const requiredProps = { onSelect: () => undefined, labe...
Create Action dropdown: - tests for dropdowngroup
[SDX-1419] Create Action dropdown: - tests for dropdowngroup
JSX
mit
smaato/ui-framework
--- +++ @@ -0,0 +1,78 @@ + +import { TestCaseFactory } from 'react-test-kit'; + +import BaseDropdown from '../base/dropdown/BaseDropdown.jsx'; +import DropdownGroup from './DropdownGroup.jsx'; +import DropdownDot from './dropdownDot/DropdownDot.jsx'; + +describe('DropdownGroup', () => { + const requiredProps = { + ...
35879c90d3f0f1b183845d7ffaf657ea96a8ba4c
lib/client/components/whatsnew/emailSelector.jsx
lib/client/components/whatsnew/emailSelector.jsx
import React from 'react'; class EmailSelector extends React.Component { constructor(props) { super(props); this.state = { premailer: false, }; this.onPremailerChange = this.onPremailerChange.bind(this); this.onSeeEmail = this.onSeeEmail.bind(this); } onPremailerChange(event) { this...
Implement react-router and factorize whatsnew page
Implement react-router and factorize whatsnew page
JSX
mit
dbrugne/ftp-nanny,dbrugne/ftp-nanny
--- +++ @@ -0,0 +1,48 @@ +import React from 'react'; + +class EmailSelector extends React.Component { + constructor(props) { + super(props); + this.state = { + premailer: false, + }; + this.onPremailerChange = this.onPremailerChange.bind(this); + this.onSeeEmail = this.onSeeEmail.bind(this); + }...
2e66e0149a3ecfb8a8a9a4f7e81ed7271f6f1e23
bin/rtlib/defaultTheme/routelink.jsx
bin/rtlib/defaultTheme/routelink.jsx
// routelink.jsx const ARCCORE = require('arccore'); const React = require('react'); const RouteHashLink = require('./routehashlink.jsx'); var RouteLink = React.createClass({ render: function() { var pagesGraph = this.props.pagesGraph; var route = this.props.route; var errorStyles = { ...
Add a React JS component <RouteLink> to the default theme... ... Quickly render an <A> link tag to a another page in your snapsite by providing it's route (not route hash but the actual route path that's simpler for humans to remember).
Add a React JS component <RouteLink> to the default theme... ... Quickly render an <A> link tag to a another page in your snapsite by providing it's route (not route hash but the actual route path that's simpler for humans to remember).
JSX
mit
Encapsule/snapsite,Encapsule/snapsite
--- +++ @@ -0,0 +1,41 @@ +// routelink.jsx + +const ARCCORE = require('arccore'); +const React = require('react'); + +const RouteHashLink = require('./routehashlink.jsx'); + +var RouteLink = React.createClass({ + + render: function() { + + var pagesGraph = this.props.pagesGraph; + var route = this.pr...
246482a6a43aa9b5e36f27d166be8d54f482d90a
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/source/Tests/Utils/IntlHelper.jsx
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/source/Tests/Utils/IntlHelper.jsx
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
Update intl test helper util
Update intl test helper util
JSX
apache-2.0
tharikaGitHub/carbon-apimgt,Rajith90/carbon-apimgt,chamindias/carbon-apimgt,fazlan-nazeem/carbon-apimgt,chamilaadhi/carbon-apimgt,fazlan-nazeem/carbon-apimgt,isharac/carbon-apimgt,malinthaprasan/carbon-apimgt,pubudu538/carbon-apimgt,uvindra/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,prasa7/carbon-apimgt,praminda/ca...
--- +++ @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License...
169a0529863cbbb0568db5b470ef2d79fdaecac0
index.jsx
index.jsx
'use strict'; import React, {PropTypes} from 'react'; function radio(name, selectedValue, onChange) { return React.createClass({ render: function() { return ( <input {...this.props} type="radio" name={name} checked={this.props.value === selectedValue} ...
import React, {PropTypes} from 'react'; function radio(name, selectedValue, onChange) { return React.createClass({ render: function() { return ( <input {...this.props} type="radio" name={name} checked={this.props.value === selectedValue} onChange={o...
Remove use strict (babel already puts that)
Remove use strict (babel already puts that)
JSX
mit
beni55/react-radio-group,beni55/react-radio-group,chenglou/react-radio-group,chenglou/react-radio-group
--- +++ @@ -1,5 +1,3 @@ -'use strict'; - import React, {PropTypes} from 'react'; function radio(name, selectedValue, onChange) {
6e37f5332d6866ce9182b2c043d2dfe895dce9fa
src/components/dl-container.jsx
src/components/dl-container.jsx
import React from 'react'; import Dl from './dl.jsx'; export default class DlContainer extends React.Component { constructor(props) { super(props); } render() { let { data, hl } = this.props; let terms = []; data.forEach((d) => { terms.push(d.name); terms.push(d.desc); }); r...
Add container for handling data as provided
Add container for handling data as provided
JSX
mit
jkrayer/summoner,jkrayer/summoner
--- +++ @@ -0,0 +1,25 @@ +import React from 'react'; +import Dl from './dl.jsx'; + +export default class DlContainer extends React.Component { + constructor(props) { + super(props); + } + render() { + let { data, hl } = this.props; + let terms = []; + + data.forEach((d) => { + terms.push(d.name); ...
98e23760012060eea0c22d29ddb797b330fe711d
client/app/bundles/comments/startup/clientRegistration.jsx
client/app/bundles/comments/startup/clientRegistration.jsx
import App from './ClientApp'; import RouterApp from './ClientRouterApp'; import SimpleCommentScreen from '../components/SimpleCommentScreen/SimpleCommentScreen'; import ReactOnRails from 'react-on-rails'; ReactOnRails.setOptions({ traceTurbolinks: TRACE_TURBOLINKS, }); ReactOnRails.register( { App, Route...
import App from './ClientApp'; import RouterApp from './ClientRouterApp'; import SimpleCommentScreen from '../components/SimpleCommentScreen/SimpleCommentScreen'; import ReactOnRails from 'react-on-rails'; ReactOnRails.setOptions({ traceTurbolinks: TRACE_TURBOLINKS, // eslint-disable-line no-undef }); ReactOnRails....
Fix linting issue with Webpack defined var
Fix linting issue with Webpack defined var
JSX
mit
thiagoc7/react-webpack-rails-tutorial,suzukaze/react-webpack-rails-tutorial,szyablitsky/react-webpack-rails-tutorial,suzukaze/react-webpack-rails-tutorial,suzukaze/react-webpack-rails-tutorial,jeffthemaximum/jeffline,szyablitsky/react-webpack-rails-tutorial,phosphene/react-on-rails-cherrypick,thiagoc7/react-webpack-rai...
--- +++ @@ -4,7 +4,7 @@ import ReactOnRails from 'react-on-rails'; ReactOnRails.setOptions({ - traceTurbolinks: TRACE_TURBOLINKS, + traceTurbolinks: TRACE_TURBOLINKS, // eslint-disable-line no-undef }); ReactOnRails.register(
927c3731559c99f550d3448768135913797fe710
src/jipt-paragraphs.jsx
src/jipt-paragraphs.jsx
/** * Paragraph parsing/splitting for article jipt i18n */ const SimpleMarkdown = require("simple-markdown"); const arrayRules = { paragraph: { match: SimpleMarkdown.defaultRules.paragraph.match, order: 1, parse: (capture, state, parse) => capture[1], }, }; const builtArrayParser = ...
Add a small paragraph-splitting parser.
JIPT: Add a small paragraph-splitting parser. Summary: Uses simple-markdown to add a function to split a string into its constituent paragraphs, and a function to join those paragraphs back into a source string. Depends on D21241 Test Plan: none Reviewers: emily Reviewed By: emily Subscribers: jlfwong, kevinb Di...
JSX
mit
learningequality/perseus,alexristich/perseus,iamchenxin/perseus,ariabuckles/perseus,ariabuckles/perseus,sachgits/perseus,iamchenxin/perseus,sachgits/perseus,alexristich/perseus,ariabuckles/perseus,learningequality/perseus,ariabuckles/perseus
--- +++ @@ -0,0 +1,32 @@ +/** + * Paragraph parsing/splitting for article jipt i18n + */ + +const SimpleMarkdown = require("simple-markdown"); + +const arrayRules = { + paragraph: { + match: SimpleMarkdown.defaultRules.paragraph.match, + order: 1, + parse: (capture, state, parse) => capture[1]...
dff5473d43a53cf099d5c4f259961624ffe6ac10
src/js/Components/Modal.jsx
src/js/Components/Modal.jsx
import React from 'react'; import ImportedModal from 'react-responsive-modal'; export default class Modal extends React.Component { constructor(props) { super(props); this.state = { show: this.props.show }; } close() { this.props.onHide(); this.setState({ show: false }); } ...
Move modal to own component file
Move modal to own component file
JSX
agpl-3.0
BreakOutEvent/breakout-frontend
--- +++ @@ -0,0 +1,45 @@ +import React from 'react'; +import ImportedModal from 'react-responsive-modal'; +export default class Modal extends React.Component { + + constructor(props) { + super(props); + this.state = { + show: this.props.show + }; + } + + close() { + this.props.onHide(); + this....
f3b1296a9ac67abc7b97fd0647acc1d891a620db
demo/app/client/js/patterns/index.jsx
demo/app/client/js/patterns/index.jsx
export * from './client'; export * from './server'; export * from './braintree'; export * from './billing'; export * from './experience'; export * from './styles'; export * from './mark'; export * from './confirm';
export * from './client'; export * from './server'; // export * from './braintree'; // export * from './billing'; export * from './experience'; export * from './styles'; export * from './mark'; export * from './confirm';
Comment out agreements and braintree demo
Comment out agreements and braintree demo
JSX
apache-2.0
vishakha94/paypal-checkout,paypal/paypal-checkout,mstuart/paypal-checkout,bluepnume/paypal-checkout,andreabondi/paypal-checkout,bluepnume/paypal-checkout,trainerbill/paypal-checkout,mstuart/paypal-checkout,paypal/paypal-checkout,bluepnume/paypal-checkout,andreabondi/paypal-checkout,vishakha94/paypal-checkout,andreabond...
--- +++ @@ -1,8 +1,8 @@ export * from './client'; export * from './server'; -export * from './braintree'; -export * from './billing'; +// export * from './braintree'; +// export * from './billing'; export * from './experience'; export * from './styles'; export * from './mark';
760e74f11c4f15b80545f21739962d3461a355a4
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
Apply new theme for API Category delete
Apply new theme for API Category delete
JSX
apache-2.0
jaadds/carbon-apimgt,Rajith90/carbon-apimgt,bhathiya/carbon-apimgt,tharindu1st/carbon-apimgt,tharindu1st/carbon-apimgt,Rajith90/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,malinthaprasan/carbon-apimgt,nuwand/carbon-apimgt,chamindias/carbon-apimgt,isharac/carbon-apimgt,chamilaadhi/carbon-apimgt,praminda/carbon-apimgt...
--- +++ @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License...
5f085bc2906bd7c791f6e8ab7d2b6437d45b37b0
src/components/Breadcrumb.jsx
src/components/Breadcrumb.jsx
import styles from '../styles/breadcrumb' import React from 'react' import { translate } from '../plugins/preact-polyglot' import { withRouter } from 'react-router' const Breadcrumb = ({ t, router }) => { // extract elements from the pathNames let path = router.location.pathname.match(/\/([^/]*)(.*)/) // rootN...
import styles from '../styles/breadcrumb' import React from 'react' import { translate } from '../plugins/preact-polyglot' import { withRouter } from 'react-router' const Breadcrumb = ({ t, router }) => { // extract elements from the pathNames let path = router.location.pathname.match(/\/([^/]*)(.*)/) // rootN...
Add file path elements computing in breadcrumb component (for later use)
[feat] Add file path elements computing in breadcrumb component (for later use)
JSX
agpl-3.0
cozy/cozy-files-v3,cozy/cozy-files-v3,enguerran/cozy-drive,enguerran/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,enguerran/cozy-drive,goldoraf/cozy-drive,cozy/cozy-files-v3,enguerran/cozy-files-v3,cozy/cozy-files-v3,goldoraf/cozy-drive,y-lohse/cozy-drive,goldoraf/cozy-drive,y-lohse/cozy-files-v3,enguerran/cozy-...
--- +++ @@ -11,8 +11,9 @@ // rootName is the first element before file path const rootName = path[1] - // the remain is the file path + // the remainder is the file path const filePath = path[2] + const filePathElements = path[2].replace(/\/([^/]*)/, '$1').split('/') return ( <h2 class={styles...
9d027219e3a3e54baeda3ea0d49188d5bae8caf9
src/sentry/static/sentry/app/views/groupDetails/seenBy.jsx
src/sentry/static/sentry/app/views/groupDetails/seenBy.jsx
/*** @jsx React.DOM */ var React = require("react"); var GroupSeenBy = React.createClass({ render() { return ( <div className="seen-by"> <ul> <li>Seen by:</li> </ul> </div> ); } }); module.exports = GroupSeenBy;
/*** @jsx React.DOM */ var React = require("react"); var Gravatar = require("../../components/gravatar"); var GroupState = require("../../mixins/groupState"); var GroupSeenBy = React.createClass({ mixins: [GroupState], render() { var group = this.getGroup(); var seenByNodes = group.seenBy.map((user, us...
Use real data for seen by
Use real data for seen by
JSX
bsd-3-clause
gencer/sentry,JackDanger/sentry,felixbuenemann/sentry,Natim/sentry,korealerts1/sentry,ifduyue/sentry,kevinlondon/sentry,BuildingLink/sentry,jean/sentry,Kryz/sentry,ifduyue/sentry,beeftornado/sentry,daevaorn/sentry,mvaled/sentry,BuildingLink/sentry,Kryz/sentry,beeftornado/sentry,nicholasserra/sentry,looker/sentry,gencer...
--- +++ @@ -2,12 +2,32 @@ var React = require("react"); +var Gravatar = require("../../components/gravatar"); +var GroupState = require("../../mixins/groupState"); + var GroupSeenBy = React.createClass({ + mixins: [GroupState], + render() { + var group = this.getGroup(); + + var seenByNodes = group.se...
9ce5c896f80075bd43f89de4ef6ec92e82f0ba9d
web/app/components/Utility/AccountName.jsx
web/app/components/Utility/AccountName.jsx
import React from "react"; import ChainTypes from "./ChainTypes"; import BindToChainState from "./BindToChainState"; /** * Given an account id, displays the name of that account * * Expects one property, 'account' which should be a account id */ class AccountName extends React.Component { static propTypes ...
Add utility component to display account name from id
Add utility component to display account name from id
JSX
mit
bitshares/bitshares-2-ui,BitSharesEurope/testnet.bitshares.eu,bitshares/bitshares-2-ui,BitSharesEurope/wallet.bitshares.eu,openledger/graphene-ui,BitSharesEurope/testnet.bitshares.eu,trendever/bitshares-ui,BitSharesEurope/graphene-ui-testnet,BitSharesEurope/wallet.bitshares.eu,openledger/graphene-ui,BitSharesEurope/gra...
--- +++ @@ -0,0 +1,23 @@ +import React from "react"; +import ChainTypes from "./ChainTypes"; +import BindToChainState from "./BindToChainState"; + +/** + * Given an account id, displays the name of that account + * + * Expects one property, 'account' which should be a account id + */ + +class AccountName extends Re...
a93103ebd8bccf3449083551eaf5ee8b3d280c23
test/helpers/clockette-utils.jsx
test/helpers/clockette-utils.jsx
'use strict'; import React from 'react/addons'; const ReactTestUtils = React.addons.TestUtils; class RenderedComponent { constructor(component) { this.component = component; this.renderedComponent = ReactTestUtils.renderIntoDocument(component); } /* * Finds a node in component's children */ fi...
Create a test utility class to make testing easier
Create a test utility class to make testing easier
JSX
mit
rhumlover/clockette,rhumlover/clockette
--- +++ @@ -0,0 +1,47 @@ +'use strict'; + +import React from 'react/addons'; +const ReactTestUtils = React.addons.TestUtils; + + +class RenderedComponent { + constructor(component) { + this.component = component; + this.renderedComponent = ReactTestUtils.renderIntoDocument(component); + } + + /* + * Finds ...
d3d71c9f4561094fe13a76107eaf224aa6ad5414
src/web/components/Information/index.jsx
src/web/components/Information/index.jsx
import React from 'react' import { Panel } from 'react-bootstrap' import classnames from 'classnames' import { connect } from 'nuclear-js-react-addons' import getters from '~/stores/getters' import actions from '~/actions' import axios from 'axios' const style = require('./style.scss') @connect(props => ({ botIn...
Create a new component for information
Create a new component for information
JSX
agpl-3.0
botpress/botpress,botpress/botpress,botpress/botpress,botpress/botpress
--- +++ @@ -0,0 +1,66 @@ +import React from 'react' +import { + Panel +} from 'react-bootstrap' + +import classnames from 'classnames' + +import { connect } from 'nuclear-js-react-addons' +import getters from '~/stores/getters' +import actions from '~/actions' + +import axios from 'axios' + +const style = require('....
58b4f8ef105768b039be53a2c5350e5b605505d5
webapp/components/ArtifactsList.jsx
webapp/components/ArtifactsList.jsx
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {Flex, Box} from 'grid-styled'; import Collapsable from './Collapsable'; import Panel from './Panel'; import ResultGridHeader from './ResultGridHeader'; import ResultGridRow from './ResultGridRow'; export default class ArtifactsList ex...
Implement a build artifacts component
feat(artifacts): Implement a build artifacts component
JSX
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
--- +++ @@ -0,0 +1,68 @@ +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; +import {Flex, Box} from 'grid-styled'; + +import Collapsable from './Collapsable'; +import Panel from './Panel'; +import ResultGridHeader from './ResultGridHeader'; +import ResultGridRow from './ResultGridRow'; + +...
8e0c229b4c19739868faaa5493e87e4c20945456
src/js/components/TaskFileLinkComponent.jsx
src/js/components/TaskFileLinkComponent.jsx
var React = require("react/addons"); var classNames = require("classnames"); var MesosActions = require("../actions/MesosActions"); var MesosEvents = require("../events/MesosEvents"); var MesosStore = require("../stores/MesosStore"); function matchFileName(name) { return (file) => file.name === name; } var TaskFil...
Add task file link component
Add task file link component
JSX
apache-2.0
mesosphere/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui
--- +++ @@ -0,0 +1,79 @@ +var React = require("react/addons"); +var classNames = require("classnames"); + +var MesosActions = require("../actions/MesosActions"); +var MesosEvents = require("../events/MesosEvents"); +var MesosStore = require("../stores/MesosStore"); + +function matchFileName(name) { + return (file) =...
80b13039a3697b3d0e8aabb57d7f0bdb066ea46f
client/views/app.jsx
client/views/app.jsx
/** @jsx React.DOM */ module("views/app", function(require) { var Tracks = require("views/tracks").TrackList; var Queue = require("views/queue").Queue; var App = React.createClass({ getInitialState: function() { return {currentPanel: 0, queueUpdated: false}; }, componentDidMount: function() ...
Implement the root App view
Implement the root App view
JSX
agpl-3.0
tOkeshu/GhettoBlaster,tOkeshu/GhettoBlaster
--- +++ @@ -0,0 +1,92 @@ +/** @jsx React.DOM */ + +module("views/app", function(require) { + var Tracks = require("views/tracks").TrackList; + var Queue = require("views/queue").Queue; + + var App = React.createClass({ + getInitialState: function() { + return {currentPanel: 0, queueUpdated: false}; + }...
f643f6e42d40fe05cd367b689c87f2551261de9e
src/components/register-in-contest/register-screenshots.jsx
src/components/register-in-contest/register-screenshots.jsx
"use strict"; import $ from "jquery"; import React from "react"; import _ from "lodash"; import DeepLinkedStateMixin from "react-deep-link-state"; import { ButtonInput, Input } from "react-bootstrap"; import FormMixin from "../../mixins/form" require("blueimp-file-upload"); export default React.createClass({ disp...
Add screenshot tentative implementation 2
Add screenshot tentative implementation 2
JSX
mit
palcu/infoeducatie-ui,infoeducatie/infoeducatie-ui,infoeducatie/infoeducatie-ui,palcu/infoeducatie-ui,infoeducatie/infoeducatie-ui,palcu/infoeducatie-ui
--- +++ @@ -0,0 +1,36 @@ +"use strict"; + +import $ from "jquery"; +import React from "react"; +import _ from "lodash"; +import DeepLinkedStateMixin from "react-deep-link-state"; +import { ButtonInput, Input } from "react-bootstrap"; + +import FormMixin from "../../mixins/form" + +require("blueimp-file-upload"); + +e...
dd9c4c577ffbc258ada22a90d04be1a65198880c
photoshop.jsx
photoshop.jsx
#target photoshop var PSLayerUtil = function() { this._colorRef = new ActionReference(); this._colorRef.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt')); } PSLayerUtil.LayerColors = { Red: 'Rd ', Orange: 'Orng', Yellow: 'Ylw ', Green: 'Grn ', Blue: 'Bl ', Violet: ...
Create Photoshop layer util class.
Create Photoshop layer util class.
JSX
mit
mazgi/Anice
--- +++ @@ -0,0 +1,38 @@ +#target photoshop + +var PSLayerUtil = function() { + this._colorRef = new ActionReference(); + this._colorRef.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt')); +} +PSLayerUtil.LayerColors = { + Red: 'Rd ', + Orange: 'Orng', + Yellow: 'Ylw ', + Gre...
ed5695de6ff6a8e4e77346bdfddbaebd57d55c93
assets/js/components/organisms/SurveyQuestion.jsx
assets/js/components/organisms/SurveyQuestion.jsx
import React, { Component, PropTypes } from 'react' import { Well, Input } from 'react-bootstrap' import { selectSurveyQuestionResponse } from './../../redux/survey/survey-actions' class SurveyQuestion extends Component { makeSelection(questionId, answer, event) { this.props.dispatch(selectSurveyQuestio...
import React, { Component, PropTypes } from 'react' import { Well, Input } from 'react-bootstrap' import { selectSurveyQuestionResponse } from './../../redux/survey/survey-actions' class SurveyQuestion extends Component { makeSelection(questionId, answer, event) { this.props.dispatch(selectSurveyQuestio...
Simplify function that checks if the radio button is checked on.
Simplify function that checks if the radio button is checked on.
JSX
mit
wbprice/okcandidate,kmcurry/okcandidate,Code4HR/okcandidate,stanzheng/okcandidate
--- +++ @@ -15,10 +15,8 @@ this.props.dispatch(selectSurveyQuestionResponse(questionId, answer)) } - getValue(answer) { - if (this.props.question.selectedAnswer === answer.id) { - return 'on' - } + getChecked(answer) { + return this.props.question.selectedAnswer === answer.id } rende...
246eb0c7a5a70b4e1f4d688169d3f77a72dda968
client/source/components/User/NotificationsListEntry.jsx
client/source/components/User/NotificationsListEntry.jsx
import React, {Component} from 'react'; import { Grid, Row, Col, Badge, Glyphicon, FormControl, Button } from 'react-bootstrap'; export default ({user, text, handleUserClick}) => { return ( <Row height={50} style={{borderBottom: "1px solid rgba(128,128,128, 0.2)"}}> <Col xs={2} md={2}> ...
Implement new NotificationListEntry component to dispaly of new notification response parameter.
Implement new NotificationListEntry component to dispaly of new notification response parameter.
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,16 @@ +import React, {Component} from 'react'; +import { Grid, Row, Col, Badge, Glyphicon, FormControl, Button } from 'react-bootstrap'; + +export default ({user, text, handleUserClick}) => { + + return ( + <Row height={50} style={{borderBottom: "1px solid rgba(128,128,128, 0.2)"}}> + ...
9ec9164b943e29971e4d5a886d1cc34808049db8
packages/richtext/src/components/StyleButton.jsx
packages/richtext/src/components/StyleButton.jsx
import React from 'react' import IconButton from 'material-ui/IconButton' import compose from 'recompose/compose' import mapProps from 'recompose/mapProps' import { injectButtonStyles } from './EditorStyles' const preventDefault = event => event.preventDefault() const wrapPrevent = callback => (event) => { even...
import React from 'react' import IconButton from 'material-ui/IconButton' import compose from 'recompose/compose' import mapProps from 'recompose/mapProps' import { injectButtonStyles } from './EditorStyles' const preventDefault = event => event.preventDefault() const wrapPrevent = callback => (event) => { even...
Refactor DraftEditor to use JSS
Refactor DraftEditor to use JSS
JSX
mit
mindhivenz/packages,mindhivenz/packages
--- +++ @@ -39,6 +39,9 @@ inlineStyle, children, styles, + focused, // eslint-disable-line no-unused-vars + theme, // eslint-disable-line no-unused-vars + prepareStyles, // eslint-disable-line no-unused-vars ...other }) => ({ styles,
b3268abb70089615494ede43e293db865eb51e12
t/compile_error/074.assign-to-const-member.todo.jsx
t/compile_error/074.assign-to-const-member.todo.jsx
class Test { static const STATIC_VAR = "static"; const INSTANCE_VAR = "instance"; static function run() : void { Test.STATIC_VAR = "new value"; (new Test()).INSTANCE_VAR + "new value"; } }
Add a TODO test to prevent to set values to const properties
Add a TODO test to prevent to set values to const properties
JSX
mit
jsx/JSX,mattn/JSX,jsx/JSX,mattn/JSX,dj31416/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX
--- +++ @@ -0,0 +1,10 @@ +class Test { + static const STATIC_VAR = "static"; + const INSTANCE_VAR = "instance"; + + static function run() : void { + Test.STATIC_VAR = "new value"; + (new Test()).INSTANCE_VAR + "new value"; + } +} +
fcfae1331facd23095e007e3b3095c42a735b7c7
src/app.jsx
src/app.jsx
/** * @jsx React.DOM */ 'use strict'; var React = require('react'); var {Routes, Route} = require('react-router'); React.renderComponent( <Routes location="history"> <Route name="app" path="/" handler={require('./layouts/Default')}> <Route name="home" path="/" handler={require('./pages/Home')} /> ...
/** * @jsx React.DOM */ 'use strict'; var React = require('react'); var {Routes, Route} = require('react-router'); // Export React so the devtools can find it (window !== window.top ? window.top : window).React = React; React.renderComponent( <Routes location="history"> <Route name="app" path="/" handler={r...
Add support of React Dev Tools
Add support of React Dev Tools
JSX
mit
aaandrew/website,tlin108/chaf,schnerd/react-starter-kit,ZoeyYoung/react-starter-kit,alexmasselot/medlineGeoWebFrontend,sloppylopez/react-starter-kit,alexmasselot/react-starter-kit,f15gdsy/react-starter-kit,HoomanGriz/react-starter-kit,zbrukas/wwf-store,domenicosolazzo/react-starter-kit,piscis/react-starter-kit,cabouffa...
--- +++ @@ -6,6 +6,9 @@ var React = require('react'); var {Routes, Route} = require('react-router'); + +// Export React so the devtools can find it +(window !== window.top ? window.top : window).React = React; React.renderComponent( <Routes location="history">
1372bb05de9d528806ef28bd4892d4e99af1a9dd
app/components/index.jsx
app/components/index.jsx
var React = require('react'); var ReactDom = require('react-dom'); var App = React.createClass({ render: function() { return ( <div> <h1>Hello from Shiver!</h1> <a href="/auth/twitch">Login</a> </div> ); } }); ReactDom.render(<App/>, document.getElementById('app'));
Add a test React component.
Add a test React component.
JSX
mit
bryanveloso/shiver-electron,bryanveloso/shiver-electron
--- +++ @@ -0,0 +1,15 @@ +var React = require('react'); +var ReactDom = require('react-dom'); + +var App = React.createClass({ + render: function() { + return ( + <div> + <h1>Hello from Shiver!</h1> + <a href="/auth/twitch">Login</a> + </div> + ); + } +}); + +ReactDom.render(<App/>, do...
694ef9bca95669e500bcb1af57c666ac79995fbd
components/org.wso2.carbon.business.rules.web/src/components/auth/Constants.jsx
components/org.wso2.carbon.business.rules.web/src/components/auth/Constants.jsx
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache....
Add constants related to sso login for BR's
Add constants related to sso login for BR's
JSX
apache-2.0
wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics
--- +++ @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the Li...
32d32f4120e6b2f6671a16c5d8599213e96086f6
src/app/views/datasets-new/edit-metadata/DatasetReviewActions.jsx
src/app/views/datasets-new/edit-metadata/DatasetReviewActions.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; const propTypes = { disabled: PropTypes.bool, reviewState: PropTypes.string, userEmail: PropTypes.string.isRequired, lastEditedBy: PropTypes.string, onSubmit: PropTypes.func, onApprove: PropTypes.func, notInCollec...
Add dataset review actions component
Add dataset review actions component
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,59 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +const propTypes = { + disabled: PropTypes.bool, + reviewState: PropTypes.string, + userEmail: PropTypes.string.isRequired, + lastEditedBy: PropTypes.string, + onSubmit: PropTypes.func, + onApp...
8e385439aabb602b43f76d6d2735ddb94b9d0fcb
client/app/lib/helpers/railsNotificationBar.jsx
client/app/lib/helpers/railsNotificationBar.jsx
import React from 'react'; import { render } from 'react-dom'; import ProviderWrapper from 'lib/components/ProviderWrapper'; import NotificationBar from 'lib/components/NotificationBar'; import { getOrCreateNode } from 'lib/helpers/railsHelpers'; // Renders a react notification bar with the given message. function ren...
Implement a helper to render notification bar through normal javascript
Implement a helper to render notification bar through normal javascript
JSX
mit
Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2
--- +++ @@ -0,0 +1,20 @@ +import React from 'react'; +import { render } from 'react-dom'; +import ProviderWrapper from 'lib/components/ProviderWrapper'; +import NotificationBar from 'lib/components/NotificationBar'; +import { getOrCreateNode } from 'lib/helpers/railsHelpers'; + +// Renders a react notification bar wi...
7f4bd8b33daab2faf910d488f82787d4c355a708
src/js/components/DuplicableRowControls.jsx
src/js/components/DuplicableRowControls.jsx
var React = require("react/addons"); var DuplicableRowControls = React.createClass({ displayName: "DuplicableRowControls", propTypes: { handleAddRow: React.PropTypes.func.isRequired, handleRemoveRow: React.PropTypes.func.isRequired }, render: function () { return ( <div className="controls"> ...
var classNames = require("classnames"); var React = require("react/addons"); var DuplicableRowControls = React.createClass({ displayName: "DuplicableRowControls", propTypes: { disableRemoveButton: React.PropTypes.bool, handleAddRow: React.PropTypes.func.isRequired, handleRemoveRow: React.PropTypes.func...
Allow setting disabled on remove button
Allow setting disabled on remove button
JSX
apache-2.0
Raffo/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,Raffo/marathon-ui
--- +++ @@ -1,15 +1,24 @@ +var classNames = require("classnames"); var React = require("react/addons"); var DuplicableRowControls = React.createClass({ displayName: "DuplicableRowControls", propTypes: { + disableRemoveButton: React.PropTypes.bool, handleAddRow: React.PropTypes.func.isRequired, ...
00576f83fdd62c9398052c8c6de4fdb60edc1038
src/react-chayns-gallery/component/Gallery.jsx
src/react-chayns-gallery/component/Gallery.jsx
import React from 'react'; import PropTypes from 'prop-types'; import MoreImages from './MoreImages'; import ImageContainer from './ImageContainer'; export default class Gallery extends React.Component { static propTypes = { urls: PropTypes.array.isRequired, height: PropTypes.number, width:...
Create base component for gallery
Create base component for gallery
JSX
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -0,0 +1,82 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import MoreImages from './MoreImages'; +import ImageContainer from './ImageContainer'; + +export default class Gallery extends React.Component { + static propTypes = { + urls: PropTypes.array.isRequired, + heig...
9f4619f0295af10e209b5a029fd813a60d862332
SingularityUI/app/components/dashboard/MyStarredRequests.jsx
SingularityUI/app/components/dashboard/MyStarredRequests.jsx
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { Row, Col } from 'react-bootstrap'; import UITable from '../common/table/UITable'; import { Starred, RequestId, Type, LastDeploy, DeployUser, State } from '../requests/Columns'; import * as RequestsSelectors from '../../selector...
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { Row, Col } from 'react-bootstrap'; import UITable from '../common/table/UITable'; import { Starred, RequestId, Type, LastDeploy, State, DeployUser, Instances } from '../requests/Columns'; import * as RequestsSelectors from '../...
Add instances back to the starred requests table, and revert order of Status and Deploy User
Add instances back to the starred requests table, and revert order of Status and Deploy User
JSX
apache-2.0
hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,HubSpot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,HubSpot/Singularity,HubSpot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,...
--- +++ @@ -4,7 +4,7 @@ import { Row, Col } from 'react-bootstrap'; import UITable from '../common/table/UITable'; -import { Starred, RequestId, Type, LastDeploy, DeployUser, State } from '../requests/Columns'; +import { Starred, RequestId, Type, LastDeploy, State, DeployUser, Instances } from '../requests/Column...
0c3505c1656946c89d6a01fecd1e36ec32e29e9a
src/js/components/__tests__/spinner.spec.jsx
src/js/components/__tests__/spinner.spec.jsx
import React from 'react'; import { shallow } from 'enzyme'; import { Spinner } from '../'; describe('Spinner', () => { const shallowRender = () => shallow(<Spinner />); it('should render without throwing an error', () => { const component = shallowRender(); expect(component.find('.spinner').l...
Add test coverage to Spinner component
Add test coverage to Spinner component
JSX
mit
CarlaCrandall/React-Calendar,CarlaCrandall/React-Calendar
--- +++ @@ -0,0 +1,39 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import { Spinner } from '../'; + +describe('Spinner', () => { + const shallowRender = () => shallow(<Spinner />); + + it('should render without throwing an error', () => { + const component = shallowRender(); + ...
c7a2b43d6ae423671d43334bc4c059f30d76abee
ditto/static/js/components/LeftRightAlign.jsx
ditto/static/js/components/LeftRightAlign.jsx
var React = require('react'); var LeftRightAlign = React.createClass({ render: function () { var left = React.cloneElement(this.props.children[0], {style: {float: 'left'}}); var right = React.cloneElement(this.props.children[1], {style: {float: 'right'}}); return ( <div className="clearfix"> {left} {righ...
Add component to left and right align some text
Add component to left and right align some text
JSX
bsd-3-clause
Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto
--- +++ @@ -0,0 +1,15 @@ +var React = require('react'); + +var LeftRightAlign = React.createClass({ + render: function () { + var left = React.cloneElement(this.props.children[0], {style: {float: 'left'}}); + var right = React.cloneElement(this.props.children[1], {style: {float: 'right'}}); + return ( + <div c...
c47567dbef87e429bf41e918b4b8da773c6821de
imports/ui/components/appState.jsx
imports/ui/components/appState.jsx
import React, { Component } from 'react'; import { PropTypes } from 'prop-types'; class AppState extends Component { constructor(props) { super(props); this.state = { error: {}, }; this.setAppState = this.setAppState.bind(this); } setAppState(updater, callback) { // newState can be obj...
Add new AppState component for global management states
Add new AppState component for global management states
JSX
mit
ggallon/rock,ggallon/rock
--- +++ @@ -0,0 +1,48 @@ +import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; + +class AppState extends Component { + constructor(props) { + super(props); + this.state = { + error: {}, + }; + this.setAppState = this.setAppState.bind(this); + } + + setAppState(updater...
67253d3f6bb282cfe5c2354e04bc5ae82ee8cc1a
app/assets/javascripts/components/FixedMenuTemplate.js.jsx
app/assets/javascripts/components/FixedMenuTemplate.js.jsx
var FixedMenuTemplate = React.createClass({ render: function(){ return ( <div className="fixed-menu-template"> <p> <a href="/issues/new"> Submit a New Issue </a> </p> <p> <a href="/dashboard"> Dashboard </a> </p> <p> <a href="/discover"> Discover </a> </p> <p> Log Out </p> </d...
Add Fix Menu Template component
Add Fix Menu Template component
JSX
mit
TimCannady/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter
--- +++ @@ -0,0 +1,13 @@ +var FixedMenuTemplate = React.createClass({ + + render: function(){ + return ( + <div className="fixed-menu-template"> + <p> <a href="/issues/new"> Submit a New Issue </a> </p> + <p> <a href="/dashboard"> Dashboard </a> </p> + <p> <a href="/discover"> Discover </a> </...
0c6cc01ab990382f1fe6970b693c4d3fa0cb79b6
src/components/link-preview/scroll-helpers/foldable-content.jsx
src/components/link-preview/scroll-helpers/foldable-content.jsx
import React from 'react'; import classnames from 'classnames'; import {ELEMENT_RESIZE_EVENT} from './events'; export default class FoldableContent extends React.Component { static propTypes = { maxUnfoldedHeight: React.PropTypes.number.isRequired, foldedHeight: React.PropTypes.number.isRequired, }; st...
Add a component that hide tall content under the “Expand preview” link
Add a component that hide tall content under the “Expand preview” link
JSX
mit
kadmil/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client
--- +++ @@ -0,0 +1,65 @@ +import React from 'react'; +import classnames from 'classnames'; + +import {ELEMENT_RESIZE_EVENT} from './events'; + +export default class FoldableContent extends React.Component { + static propTypes = { + maxUnfoldedHeight: React.PropTypes.number.isRequired, + foldedHeight: React.Pro...
874bc8abb944b2b59c163c5abcdf096f9db58c6d
src/app/components/form-error-summary/FormErrorSummary.jsx
src/app/components/form-error-summary/FormErrorSummary.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; const propTypes = { errors: PropTypes.arrayOf(PropTypes.string) } class FormErrorSummary extends Component { constructor(props) { super(props); } render() { if (!this.props.errors.length) { retur...
Add form error sumamry componeent that lists all errors on a form
Add form error sumamry componeent that lists all errors on a form
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,33 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +const propTypes = { + errors: PropTypes.arrayOf(PropTypes.string) +} + +class FormErrorSummary extends Component { + constructor(props) { + super(props); + } + render() { + if (!this....
7b73c183b466d0a3a74501f2ee33b3e44b587f69
src/components/lazy-component.jsx
src/components/lazy-component.jsx
import React, { Suspense, useState, useEffect, useMemo } from 'react'; import ErrorBoundary from './error-boundary'; export function DelayedSuspense({ fallback, delay = 500, children }) { const withDelay = fallback && delay > 0; const [showFallback, setShowFallback] = useState(!withDelay); useEffect(() => { ...
Add a DelayedSuspense and lazyComponent helpers
Add a DelayedSuspense and lazyComponent helpers DelayedSuspense makes fallback element visible after some delay (500 ms by default). lazyComponent creates a component via React.lazy and wraps it by DelayedSuspense and ErrorBoundary.
JSX
mit
FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client
--- +++ @@ -0,0 +1,29 @@ +import React, { Suspense, useState, useEffect, useMemo } from 'react'; +import ErrorBoundary from './error-boundary'; + +export function DelayedSuspense({ fallback, delay = 500, children }) { + const withDelay = fallback && delay > 0; + const [showFallback, setShowFallback] = useState(!wit...
bce07b396d588cfcc7b10a4275f5002e31d3e6ff
src/DirectChatToggleContactsButton.test.jsx
src/DirectChatToggleContactsButton.test.jsx
import React from 'react'; import { shallow } from 'enzyme'; import BoxToolButton from './BoxToolButton'; import DirectChatToggleContactsButton from './DirectChatToggleContactsButton'; test('DirectChatToggleContactsButton notifies DirectChat when clicked', () => { let received = false; const wrapper = shallow( ...
Test direct chat toggle button click
Test direct chat toggle button click
JSX
mit
react-admin-lte/react-admin-lte,react-admin-lte/react-admin-lte,jonmpqts/reactjs-admin-lte
--- +++ @@ -0,0 +1,22 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import BoxToolButton from './BoxToolButton'; +import DirectChatToggleContactsButton from './DirectChatToggleContactsButton'; + +test('DirectChatToggleContactsButton notifies DirectChat when clicked', () => { + let received = fal...
a45b8d4337a2a19c0a0162c00bd2c4d8f75c98c8
extensions/lite/views/Information/index.jsx
extensions/lite/views/Information/index.jsx
import React, { Component } from 'react' import { Row, Col } from 'react-bootstrap' import InformationComponent from '~/components/Information' import HeroComponent from '~/components/Hero' class InformationHeroRowComponent extends Component { render() { return <Row> <Col sm={12} md={8}> <Inf...
Create a separate component for lite version
Create a separate component for lite version
JSX
agpl-3.0
botpress/botpress,botpress/botpress,botpress/botpress,botpress/botpress
--- +++ @@ -0,0 +1,25 @@ +import React, { Component } from 'react' +import { + Row, + Col +} from 'react-bootstrap' + +import InformationComponent from '~/components/Information' +import HeroComponent from '~/components/Hero' + +class InformationHeroRowComponent extends Component { + + render() { + return <Row>...
c5eda35b432e0ac883751dd260ed62e73910ca3d
src/components/link-preview/scroll-helpers/scroll-safe.jsx
src/components/link-preview/scroll-helpers/scroll-safe.jsx
import React from 'react'; import _ from 'lodash'; import ResizeTracker from './resize-tracker'; import FoldableContent from './foldable-content'; import ScrollCompensator from './scroll-compensator'; /** * ScrollSafe is a decorator for react classes. It provides: * 1) automatic scroll compensation for the nested...
Add a decorator, combining scroll-related helper components
Add a decorator, combining scroll-related helper components It combines ResizeTracker, FoldableContent and ScrollCompensator
JSX
mit
davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client
--- +++ @@ -0,0 +1,59 @@ +import React from 'react'; +import _ from 'lodash'; + +import ResizeTracker from './resize-tracker'; +import FoldableContent from './foldable-content'; +import ScrollCompensator from './scroll-compensator'; + +/** + * ScrollSafe is a decorator for react classes. It provides: + * 1) automat...
b6d9feb576f5d34347d1341fc654ea9250624d01
client/views/tracks.jsx
client/views/tracks.jsx
/** @jsx React.DOM */ module("views/tracks", function(require) { var MusicTrack = require("models/tracks").Track; var FileListReader = require("lib/file-list-reader"); var Track = React.createClass({ addToQueue: function() { this.props.queue.add(this.props.track); }, render: function() { ...
Implement the Track and TrackList views
Implement the Track and TrackList views
JSX
agpl-3.0
tOkeshu/GhettoBlaster,tOkeshu/GhettoBlaster
--- +++ @@ -0,0 +1,58 @@ +/** @jsx React.DOM */ + +module("views/tracks", function(require) { + var MusicTrack = require("models/tracks").Track; + var FileListReader = require("lib/file-list-reader"); + + var Track = React.createClass({ + addToQueue: function() { + this.props.queue.add(this.props.track...
243641236957817912875f67444f4d25a6e80a01
src/app/components/radio-buttons/RadioList.jsx
src/app/components/radio-buttons/RadioList.jsx
import React, { Component } from "react"; import PropTypes from "prop-types"; import Radio from "./RadioButton"; const propTypes = { radioData: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.string.isRequired, value: PropTypes.string.isRequired, label: PropTypes.stri...
Add new radio list component
Add new radio list component
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,70 @@ +import React, { Component } from "react"; +import PropTypes from "prop-types"; +import Radio from "./RadioButton"; + +const propTypes = { + radioData: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string.isRequired, + value: PropTypes.string.isRequire...
48e859346ff5158ce4285af3ee4d03a7afeaf917
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/select-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/select-viewer.jsx
import React from "react"; import "~/style/_select-viewer.scss"; import PropTypes from "prop-types"; export default class WonSelectViewer extends React.Component { render() { const icon = this.props.detail.icon && ( <svg className="selectv__header__icon"> <use xlinkHref={this.props.detail.icon} hr...
Implement selectviewer as react components
Implement selectviewer as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,55 @@ +import React from "react"; + +import "~/style/_select-viewer.scss"; +import PropTypes from "prop-types"; + +export default class WonSelectViewer extends React.Component { + render() { + const icon = this.props.detail.icon && ( + <svg className="selectv__header__icon"> + <use ...
8452cd1857c074205efc22c81c7dc2e44428bde6
app/scripts/components/FormFields/ImageUpload.jsx
app/scripts/components/FormFields/ImageUpload.jsx
import React, { PropTypes } from 'react' import { Field } from 'redux-form'; import ImageFileUploader from 'components/ImageFileUploader'; class ImageUpload extends React.Component { render() { const { name, width, height } = this.props; return ( <Field name={name} component={(field) =>...
Add an image upload form field
Add an image upload form field
JSX
apache-2.0
rgee/Game-Editor,rgee/Game-Editor
--- +++ @@ -0,0 +1,27 @@ +import React, { PropTypes } from 'react' +import { Field } from 'redux-form'; +import ImageFileUploader from 'components/ImageFileUploader'; + +class ImageUpload extends React.Component { + render() { + const { name, width, height } = this.props; + return ( + <Field + name...
11eba895e59e7d2faa8307aaf7166b9200bc1396
js/components/checkTweetNumber.jsx
js/components/checkTweetNumber.jsx
/** @jsx React.DOM */ var CheckTweetNumber = React.createClass({ getInitialState: function() { return { checked: false }; }, handleChange: function(e) { EventSystem.publish('input.check.show', { key: "showNumber", value: e.target.checked }); this.setState({ checked: e.targ...
Add new component: option check to show the tweet number
Add new component: option check to show the tweet number
JSX
mit
dburgos/tweet-splitter,dburgos/tweet-splitter
--- +++ @@ -0,0 +1,31 @@ +/** @jsx React.DOM */ +var CheckTweetNumber = React.createClass({ + getInitialState: function() { + return { + checked: false + }; + }, + + handleChange: function(e) { + EventSystem.publish('input.check.show', { + key: "showNumber", + value: e.target.checked + ...
b8facb2cc86ceaf8e63d0f21a6aca32f67616368
test/client/spec/components/api.spec.jsx
test/client/spec/components/api.spec.jsx
import React from "react/addons"; import API from "src/components/api"; const TestUtils = React.addons.TestUtils; describe("components/api", function () { it("renders propType documentation table", function () { const renderer = TestUtils.createRenderer(); const sourceFake = { props: { name:...
Add test for API component
Add test for API component
JSX
mit
aurelienshz/ecology,aurelienshz/ecology,FormidableLabs/ecology,FormidableLabs/ecology
--- +++ @@ -0,0 +1,43 @@ +import React from "react/addons"; + +import API from "src/components/api"; + +const TestUtils = React.addons.TestUtils; + +describe("components/api", function () { + + it("renders propType documentation table", function () { + const renderer = TestUtils.createRenderer(); + const sourc...
8787361bbf9c15acb937e0619f6814d9dd646dd8
src/app/views/users/UsersController.jsx
src/app/views/users/UsersController.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; // UsersController.propTypes = { // }; class UsersController extends Component { render() { return ( <div className="grid grid--justify-space-around"> <div className="grid__col-4"> ...
Add basic users controllers component
Add basic users controllers component
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,27 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +// UsersController.propTypes = { + +// }; + + +class UsersController extends Component { + render() { + return ( + <div className="grid grid--justify-space-around"> + <di...
0f2cc7a349c0e776bd7d3e9a316659a9f1482224
modules/janeswalk/components/WithLinks.jsx
modules/janeswalk/components/WithLinks.jsx
import React from 'react'; export default ({ children }) => { const formatted = children.split(/ /).map(word => { if (word.match(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/))...
Add module to put links into text
Add module to put links into text
JSX
mit
jkoudys/janeswalk-web,jkoudys/janeswalk-web,jkoudys/janeswalk-web
--- +++ @@ -0,0 +1,16 @@ +import React from 'react'; + +export default ({ children }) => { + const formatted = children.split(/ /).map(word => { + if (word.match(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\...
9ae2ec42883d779d23593579454e6804fc73c4e0
web/src/components/common/Backend.jsx
web/src/components/common/Backend.jsx
import 'babel-polyfill'; import 'isomorphic-fetch'; const BACKEND_URL = 'http://localhost:5000' import React, {Component} from 'react'; export function fetchJson(path) { // use this function to make a GET request. const url = `${BACKEND_URL}${path}` return fetch(url) .then(response => response.jso...
Add wrapper for http requests
Add wrapper for http requests
JSX
mit
Drakulix/knex,Drakulix/knex,Drakulix/knex,Drakulix/knex
--- +++ @@ -0,0 +1,62 @@ +import 'babel-polyfill'; +import 'isomorphic-fetch'; +const BACKEND_URL = 'http://localhost:5000' + import React, {Component} from 'react'; + + export function fetchJson(path) { + // use this function to make a GET request. + const url = `${BACKEND_URL}${path}` + + return fetch(ur...
a4b14c1dc0ad47bb5f32bb2d0904882e8a81a4a8
client/source/components/User/NotificationsListEntry.jsx
client/source/components/User/NotificationsListEntry.jsx
import React, {Component} from 'react'; import { Grid, Row, Col, Badge, Glyphicon, FormControl, Button } from 'react-bootstrap'; export default ({user, text, handleUserClick}) => { return ( <Row height={50} style={{borderBottom: "1px solid rgba(128,128,128, 0.2)"}}> <Col xs={2} md={2}> ...
Implement new NotificationListEntry component to dispaly of new notification response parameter.
Implement new NotificationListEntry component to dispaly of new notification response parameter.
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,16 @@ +import React, {Component} from 'react'; +import { Grid, Row, Col, Badge, Glyphicon, FormControl, Button } from 'react-bootstrap'; + +export default ({user, text, handleUserClick}) => { + + return ( + <Row height={50} style={{borderBottom: "1px solid rgba(128,128,128, 0.2)"}}> + ...
82b9df02eca752ef259ab34081018ee5615c26b2
client/js/components/assessments/sentence_sandbox/sentence_sandbox.jsx
client/js/components/assessments/sentence_sandbox/sentence_sandbox.jsx
import React from "react"; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd-html5-backend'; import Word from "../fill_the_blank_dnd/word"; import DraggableWord from "../fill_the_blank_dnd/draggable_word"; import Dropzone from "../fill_the_b...
Add a sentence sandbox component
Add a sentence sandbox component
JSX
mit
atomicjolt/open_assessments,atomicjolt/OpenAssessmentsClient,atomicjolt/OpenAssessmentsClient,atomicjolt/OpenAssessmentsClient,atomicjolt/open_assessments,atomicjolt/open_assessments
--- +++ @@ -0,0 +1,48 @@ +import React from "react"; +import { DragDropContext } from 'react-dnd'; +import HTML5Backend from 'react-dnd-html5-backend'; + +import Word from "../fill_the_blank_dnd/word"; +import DraggableWord from "../fill_the_blank_dnd/draggable_word"; +import Drop...
99c903bb6e992e623428642110a72a827578f3c3
app/assets/javascripts/components/search_results_list.es6.jsx
app/assets/javascripts/components/search_results_list.es6.jsx
class SearchResultsList extends React.Component { render() { return ( <ul className="dropdown-menu" id="autocomplete-items"> <li> <a href={`/search?q=${this.props.term}`}> <span className="glyphicon glyphicon-search"></span> Search for <strong>{this.props.term}</strong> ...
class SearchResultsList extends React.Component { render() { return ( <ul className="dropdown-menu" id="autocomplete-items"> <li> <a href={`/search?q=${this.props.term}`}> <span className="glyphicon glyphicon-search"></span> Search for <strong>{this.props.term}</strong> ...
Change the method names in SearchResultsList component
Change the method names in SearchResultsList component
JSX
mit
dev-warner/Revinyl-Product,kenny-hibino/stories,dev-warner/Revinyl-Product,kenny-hibino/stories,aamin005/Firdowsspace,aamin005/Firdowsspace,aamin005/Firdowsspace,dev-warner/Revinyl-Product,kenny-hibino/stories
--- +++ @@ -8,9 +8,9 @@ <span className="glyphicon glyphicon-search"></span> Search for <strong>{this.props.term}</strong> </a> </li> - {this.renderPostHeader()} + {this.renderPostHeading()} {this.renderPosts()} - {this.renderUserHeader()} + {this....
d2039485e7c38bb3d9cbedf0cdbbf3edb6d311fd
GeonodeDebug.jsx
GeonodeDebug.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import GeoNodeViewer from './geonode.jsx'; import enMessages from 'boundless-sdk/locale/en.js'; import {IntlProvider} from 'react-intl'; class GeoNodeViewerDebug extends React.Component { constructor(props) { super(props); this.state = { config: th...
Add debugViewer to add config urls and change the map
Add debugViewer to add config urls and change the map just paste in geonode config urls and they get parsed via a proxy and then the config is used to update the GeonodeViewer and therefore the map makes is easy to test certain confogurations
JSX
mit
GeoNode/geonode-client,GeoNode/geonode-client,GeoNode/geonode-client,GeoNode/geonode-client
--- +++ @@ -0,0 +1,44 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import GeoNodeViewer from './geonode.jsx'; +import enMessages from 'boundless-sdk/locale/en.js'; +import {IntlProvider} from 'react-intl'; + +class GeoNodeViewerDebug extends React.Component { + constructor(props) { + super(p...
a5e2f8de90f77dd6482f92cbfdff8d8cc05b6640
spec/react/container.test.jsx
spec/react/container.test.jsx
import { describe, it, before, beforeEach, after, afterEach } from 'mocha'; import assert from 'power-assert'; import _ from 'lodash'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import Logger from '../../src/logger'; import { createStore, destroyStore, getAllStores, destroyAllStores }...
Add spec for react container.
Add spec for react container.
JSX
mit
kamito/ch4
--- +++ @@ -0,0 +1,58 @@ + +import { describe, it, before, beforeEach, after, afterEach } from 'mocha'; +import assert from 'power-assert'; +import _ from 'lodash'; +import React from 'react'; +import TestUtils from 'react-addons-test-utils'; + +import Logger from '../../src/logger'; +import { createStore, destroySto...
3a29face102e0294321125e71de591481c525aac
docs/Tag.jsx
docs/Tag.jsx
import React, { PropTypes } from 'react' export default function Tag ({text, inverted = false}) { return ( <span className={`demo-tag ${inverted && 'inverted'}`}>{text}</span> ) } Tag.propTypes = { text: PropTypes.string, inverted: PropTypes.bool }
Create tag component for new docs
Create tag component for new docs
JSX
mit
miduga/react-slidy
--- +++ @@ -0,0 +1,12 @@ +import React, { PropTypes } from 'react' + +export default function Tag ({text, inverted = false}) { + return ( + <span className={`demo-tag ${inverted && 'inverted'}`}>{text}</span> + ) +} + +Tag.propTypes = { + text: PropTypes.string, + inverted: PropTypes.bool +}
44b7222ae34af9a1b86f415a8f00977752bc3c46
app/components/GradesStats.jsx
app/components/GradesStats.jsx
import React, { Component } from 'react'; class GradesStats extends Component { render() { const { assessment } = this.props; if(!assessment) { return ( <div className="chart-container"> <h5 className="pre-stats-text">Click on an Assessment or Category to begin.</h5> </div> ...
Refactor Grades Stats into its own component
Refactor Grades Stats into its own component
JSX
mit
joelseq/SourceGrade,joelseq/SourceGrade
--- +++ @@ -0,0 +1,23 @@ +import React, { Component } from 'react'; + +class GradesStats extends Component { + render() { + const { assessment } = this.props; + + if(!assessment) { + return ( + <div className="chart-container"> + <h5 className="pre-stats-text">Click on an Assessment or Cat...
4c49ae1701f5b75c20a76ac681b91d9b98f2b299
src/views/splash/beta/small-top-banner.jsx
src/views/splash/beta/small-top-banner.jsx
const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const React = require('react'); const FlexRow = require('../../../components/flex-row/flex-row.jsx'); const TitleBanner = require('../../../components/title-banner/title-banner.jsx'); require('./top-b...
Create small top banner component
Create small top banner component
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -0,0 +1,21 @@ +const FormattedMessage = require('react-intl').FormattedMessage; +const injectIntl = require('react-intl').injectIntl; +const React = require('react'); + +const FlexRow = require('../../../components/flex-row/flex-row.jsx'); +const TitleBanner = require('../../../components/title-banner/titl...
64873eeb40160ec75d6884efbf350976963beac1
src/components/AlertButtons.jsx
src/components/AlertButtons.jsx
/* * When adding buttons to the bottom of a Bootstrap alert, * you typically want those buttons to * - be right-aligned; * - not be flush up against the text they're below; and * - not be flush up against each other. * * Unfortunately, these are not the default settings, because * - right-alignment isn'...
Add AlertButtonToolbar, AlertButton to fix spacing
Add AlertButtonToolbar, AlertButton to fix spacing
JSX
mit
WChargin/lc3,WChargin/lc3
--- +++ @@ -0,0 +1,52 @@ +/* + * When adding buttons to the bottom of a Bootstrap alert, + * you typically want those buttons to + * - be right-aligned; + * - not be flush up against the text they're below; and + * - not be flush up against each other. + * + * Unfortunately, these are not the default settings, ...
942b48533d01fddffc18101057816f559f1a0fad
app/Resources/client/jsx/organism/search/quickSearch.jsx
app/Resources/client/jsx/organism/search/quickSearch.jsx
$(document).ready(function(){ //autocomplete for organism search $("#search_organism").autocomplete({ position: { my: "right top", at: "right bottom" }, source: function (request, response) { var search = request.term; $.ajax({ url: "{{...
Add quick search jsx template for organism page
Add quick search jsx template for organism page
JSX
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -0,0 +1,35 @@ +$(document).ready(function(){ + //autocomplete for organism search + $("#search_organism").autocomplete({ + position: { + my: "right top", at: "right bottom" + }, + source: function (request, response) { + var search = request.term; + ...
9deb39f4db0bf9035ba1a577af52bcb5c8026b6f
app/components/signUp/signUp.jsx
app/components/signUp/signUp.jsx
import React from 'react'; export default React.createClass({ render: function () { return ( <div className="box"> <p className="control"> <label className="label">Name</label> <input className="input" type="text" placeholder="Ernest Hemingway...
Add a sign up component
Add a sign up component
JSX
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
--- +++ @@ -0,0 +1,34 @@ +import React from 'react'; + +export default React.createClass({ + render: function () { + return ( + <div className="box"> + <p className="control"> + <label className="label">Name</label> + <input + className="input" + type="text" + ...
90a1a2a6b115de6f9a455c60eb37ab0648c505e0
src/Dots.jsx
src/Dots.jsx
import React, { Component, PropTypes } from 'react' import { Paper } from 'material-ui' const styles = { root: { display: 'block' }, dot: { width: 10, height: 10, background: 'rgba(255,255,255,1)', marginLeft: 3, marginRight: 3, float: 'left' }, dotInactiv: { width: 10, he...
Add dots component to display index.
Add dots component to display index.
JSX
mit
TeamWertarbyte/material-auto-rotating-carousel
--- +++ @@ -0,0 +1,65 @@ +import React, { Component, PropTypes } from 'react' +import { Paper } from 'material-ui' + +const styles = { + root: { + display: 'block' + }, + dot: { + width: 10, + height: 10, + background: 'rgba(255,255,255,1)', + marginLeft: 3, + marginRight: 3, + float: 'left' +...
cb5ef75ceebdfb31249a86a060e8801c5418b87e
django_cradmin/apps/django_cradmin_js/staticsources/django_cradmin_js/source/filterlist/components/paginators/BoxLoadMorePaginator.jsx
django_cradmin/apps/django_cradmin_js/staticsources/django_cradmin_js/source/filterlist/components/paginators/BoxLoadMorePaginator.jsx
import React from 'react' import PropTypes from 'prop-types' import LoadMorePaginator from './LoadMorePaginator' import BemUtilities from '../../../utilities/BemUtilities' /** * Just like {@link LoadMorePaginator}, except that the button is * wrapped with a paragraph. * * See {@link BoxLoadMorePaginator.defaultPro...
Add load more paginator for box
Add load more paginator for box
JSX
bsd-3-clause
appressoas/django_cradmin,appressoas/django_cradmin,appressoas/django_cradmin
--- +++ @@ -0,0 +1,65 @@ +import React from 'react' +import PropTypes from 'prop-types' +import LoadMorePaginator from './LoadMorePaginator' +import BemUtilities from '../../../utilities/BemUtilities' + +/** + * Just like {@link LoadMorePaginator}, except that the button is + * wrapped with a paragraph. + * + * See {...
731f2c9576608e7219c13ee704a13d250f5bd7f0
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/location-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/location-viewer.jsx
import React from "react"; import "~/style/_location-viewer.scss"; import { get } from "../../../utils.js"; import WonAtomMap from "../../atom-map.jsx"; import PropTypes from "prop-types"; export default class WonLocationViewer extends React.Component { constructor(props) { super(props); this.state = { ...
Implement locationviewer as react components
Implement locationviewer as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,79 @@ +import React from "react"; + +import "~/style/_location-viewer.scss"; +import { get } from "../../../utils.js"; +import WonAtomMap from "../../atom-map.jsx"; + +import PropTypes from "prop-types"; + +export default class WonLocationViewer extends React.Component { + constructor(props) { + ...
58ac1efd6fcbe067e0ccb3dc7e311b84671382f5
client/modules/Challenges/Challenges.jsx
client/modules/Challenges/Challenges.jsx
/* eslint-disable max-len */ import React from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import Header from 'components/Header/Header'; import Footer from 'components/Footer/Footer'; import Info from './components/Info/Info'; import Category from './components/Category/Category';...
/* eslint-disable max-len */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import Header from 'components/Header/Header'; import Footer from 'components/Footer/Footer'; import Info from './components/Info/Info'; import Category from './components/Cate...
Use API data on Challenge index
Use API data on Challenge index
JSX
mit
davidcluu/civicchallenge-frontend,creativecolab/civicchallenge-frontend
--- +++ @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import React from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; @@ -10,33 +10,6 @@ import Category from './components/Category/Category'; import styles from './Challenges.scss'...
d151c587aa0d531153bdce1338b63f4bea623518
ui/src/message_popup/renderers/minimal_text_response_test.jsx
ui/src/message_popup/renderers/minimal_text_response_test.jsx
/* @flow weak */ import React from 'react'; import {shallow} from 'enzyme'; import {expect} from 'chai'; import sinon from 'sinon'; import MinimalTextResponse from './minimal_text_response.jsx'; function testProps(props) { return { onLogMessage: sinon.spy(), onResponseSubmitted: sinon.spy(), ...props ...
Add tests to start fixing two types of text responses
Add tests to start fixing two types of text responses
JSX
mit
mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows
--- +++ @@ -0,0 +1,33 @@ +/* @flow weak */ +import React from 'react'; + +import {shallow} from 'enzyme'; +import {expect} from 'chai'; +import sinon from 'sinon'; + +import MinimalTextResponse from './minimal_text_response.jsx'; + + +function testProps(props) { + return { + onLogMessage: sinon.spy(), + onResp...
65579c4a65555ac4bbdf60008adf6bfcbbe01447
src/app/components/Panel/Panel.test.jsx
src/app/components/Panel/Panel.test.jsx
import React from 'react' import { shallow } from 'enzyme' import Panel from './Panel' describe('Panel', () => { let component const mockCloseAction = jest.fn() beforeEach(() => { component = shallow( <Panel isPanelVisible closeAction={mockCloseAction}> <div /> </Panel>, ) }) i...
Test added for the panel component
Test added for the panel component
JSX
mpl-2.0
DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas_prototype,Amsterdam/atlas
--- +++ @@ -0,0 +1,31 @@ +import React from 'react' +import { shallow } from 'enzyme' + +import Panel from './Panel' + +describe('Panel', () => { + let component + const mockCloseAction = jest.fn() + + beforeEach(() => { + component = shallow( + <Panel isPanelVisible closeAction={mockCloseAction}> + ...
a1d1c2b1f3aa362f621b3826199e34cc58ba40fb
test/watch-stores-test.jsx
test/watch-stores-test.jsx
/*globals describe, it*/ /*eslint no-unused-expressions: false*/ import chai, {expect} from 'chai'; /* Must import testdom before React. */ import testdom from 'testdom'; testdom('<html><body></body></html>'); import React from 'react'; import Fluxxor from 'fluxxor'; import 'react/addons'; const {TestUtils} = React....
Add bare minimum test for store-watch.
Add bare minimum test for store-watch.
JSX
mit
eddieantonio/fluxxor-components
--- +++ @@ -0,0 +1,48 @@ +/*globals describe, it*/ +/*eslint no-unused-expressions: false*/ +import chai, {expect} from 'chai'; + +/* Must import testdom before React. */ +import testdom from 'testdom'; +testdom('<html><body></body></html>'); + +import React from 'react'; +import Fluxxor from 'fluxxor'; + +import 're...
529c4d2c8ab0f34c58a6ee1c5857023876b5b626
t/run/096.null-for-function-arg.todo.jsx
t/run/096.null-for-function-arg.todo.jsx
/*EXPECTED null */ class Test { static function f(funcArg : function():void) : void { log funcArg; } static function run() : void { Test.f(null); } }
Add a TODO test to give null as a function arg
Add a TODO test to give null as a function arg
JSX
mit
dj31416/JSX,jsx/JSX,dj31416/JSX,mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX,mattn/JSX,dj31416/JSX,jsx/JSX
--- +++ @@ -0,0 +1,13 @@ +/*EXPECTED +null +*/ + +class Test { + static function f(funcArg : function():void) : void { + log funcArg; + } + + static function run() : void { + Test.f(null); + } +}
4b08cf688f27edd3032aa2c560696c40c67cf50f
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
Apply new theme for API Category delete
Apply new theme for API Category delete
JSX
apache-2.0
praminda/carbon-apimgt,tharikaGitHub/carbon-apimgt,nuwand/carbon-apimgt,chamindias/carbon-apimgt,chamilaadhi/carbon-apimgt,ruks/carbon-apimgt,isharac/carbon-apimgt,bhathiya/carbon-apimgt,tharikaGitHub/carbon-apimgt,chamilaadhi/carbon-apimgt,prasa7/carbon-apimgt,tharikaGitHub/carbon-apimgt,tharindu1st/carbon-apimgt,jaad...
--- +++ @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License...
10907710e35a5e5e656f602b60b03db22c4950d6
app/javascript/components/aggregate_status_card.jsx
app/javascript/components/aggregate_status_card.jsx
import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import PfAggregateStatusCard from './pf_aggregate_status_card'; const AggregateStatusCard = ({ providerId, providerType }) => { const [data, setCardData] = useState({ loading: true }); useEffect(() => { const url = `/${pr...
Implement AggregateStatusCard in React (provider dashboard).
Implement AggregateStatusCard in React (provider dashboard).
JSX
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
--- +++ @@ -0,0 +1,64 @@ +import React, { useEffect, useState } from 'react'; +import PropTypes from 'prop-types'; + +import PfAggregateStatusCard from './pf_aggregate_status_card'; + +const AggregateStatusCard = ({ providerId, providerType }) => { + const [data, setCardData] = useState({ loading: true }); + + useE...
67fb23f6b6200bb2c728904a108434d2401c0575
client/src/js/components/Viruses/HMM/Toolbar.jsx
client/src/js/components/Viruses/HMM/Toolbar.jsx
/** * @license * The MIT License (MIT) * Copyright 2015 Government of Canada * * @author * Ian Boyes * * @exports VirusToolbar */ 'use strict'; var React = require('react'); var Icon = require('virtool/js/components/Base/Icon.jsx'); var Flex = require('virtool/js/components/Base/Flex.jsx'); var PushButton =...
Add HMM toolbar for filtering and importing annotations
Add HMM toolbar for filtering and importing annotations
JSX
mit
virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool
--- +++ @@ -0,0 +1,119 @@ +/** + * @license + * The MIT License (MIT) + * Copyright 2015 Government of Canada + * + * @author + * Ian Boyes + * + * @exports VirusToolbar + */ + +'use strict'; + +var React = require('react'); + +var Icon = require('virtool/js/components/Base/Icon.jsx'); +var Flex = require('virtool/js...
f80d18a9b6b20e8f209df064afbf789caa7e9678
example/js/init.jsx
example/js/init.jsx
'use strict'; import React from 'react/addons'; import App from './app'; let appWrapperEl = document.getElementById('app-wrapper'), loadApp = e => React.render(<App />, appWrapperEl); document.addEventListener('DOMContentLoaded', loadApp);
Build the jsx index source
Build the jsx index source
JSX
mit
renemonroy/react-row,renemonroy/react-row
--- +++ @@ -0,0 +1,9 @@ +'use strict'; + +import React from 'react/addons'; +import App from './app'; + +let appWrapperEl = document.getElementById('app-wrapper'), + loadApp = e => React.render(<App />, appWrapperEl); + +document.addEventListener('DOMContentLoaded', loadApp);
c4240bd87fd7d9b9e16e0b5524827f56c559d6b5
src/browser/components/UpdaterPage/UpdaterPage.stories.jsx
src/browser/components/UpdaterPage/UpdaterPage.stories.jsx
// Copyright (c) 2015-2016 Yuya Ochiai // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import {storiesOf} from '@storybook/react'; import {action} from '@storybook/addon-actions'; import UpdaterPage from '../UpdaterPage.jsx'; ...
Add storybook file for UpdaterPage
Add storybook file for UpdaterPage
JSX
apache-2.0
mattermost/desktop,mattermost/desktop,mattermost/desktop,yuya-oc/electron-mattermost,yuya-oc/electron-mattermost,mattermost/desktop,yuya-oc/desktop,mattermost/desktop,yuya-oc/desktop,yuya-oc/electron-mattermost,yuya-oc/desktop
--- +++ @@ -0,0 +1,52 @@ +// Copyright (c) 2015-2016 Yuya Ochiai +// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +import React from 'react'; +import {storiesOf} from '@storybook/react'; + +import {action} from '@storybook/addon-actions'; + +import Up...
78968df16d12af4d41ca5a31e179c8994e3fb857
app/server/bootstrap.jsx
app/server/bootstrap.jsx
Meteor.startup(() => { if (Meteor.users.find().count() === 0) { Accounts.createUser({ email: "dev@usecamino.com", password: "sherpa" }); } });
Add dummy user for development
Add dummy user for development
JSX
mit
fjaguero/camino,fjaguero/camino
--- +++ @@ -0,0 +1,10 @@ +Meteor.startup(() => { + + if (Meteor.users.find().count() === 0) { + Accounts.createUser({ + email: "dev@usecamino.com", + password: "sherpa" + }); + } + +});
ee1cffe867801dd54949283cda2db4f7c41ada23
src/scripts/components/lib/Adjustable.jsx
src/scripts/components/lib/Adjustable.jsx
/** * @jsx React.DOM */ /** * To adjust the size of the area */ 'use strict'; var emptyFunction = require('react/lib/emptyFunction'); var Adjustable = React.createClass({ render: function() { return ( <div /> ); } }); module.exports = Adjustable;
Create a component to make the div area adjustable
Create a component to make the div area adjustable
JSX
mit
haohcraft/react-webpack-starter
--- +++ @@ -0,0 +1,22 @@ +/** + * @jsx React.DOM + */ + +/** + * To adjust the size of the area + */ +'use strict'; + +var emptyFunction = require('react/lib/emptyFunction'); + +var Adjustable = React.createClass({ + + render: function() { + return ( + <div /> + ); + } + +}); + +module.exports = Adjustable;
9a84fd97376d9f18c97d0a066e9c94bf730fdf41
app/assets/javascripts/views/number_input_view.js.jsx
app/assets/javascripts/views/number_input_view.js.jsx
/** @jsx React.DOM */ var NumberInput = React.createClass({ componentWillMount: function() { this.setState({ amount: this.props.startingAmount, editable: this.props.alwaysEditable }); }, componentDidMount: function() { this.listenForChanges(this.refs.inputField && this.refs.inputField.ge...
Add number_input_view to version control
Add number_input_view to version control
JSX
agpl-3.0
assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta
--- +++ @@ -0,0 +1,95 @@ +/** @jsx React.DOM */ + +var NumberInput = React.createClass({ + componentWillMount: function() { + this.setState({ + amount: this.props.startingAmount, + editable: this.props.alwaysEditable + }); + }, + + componentDidMount: function() { + this.listenForChanges(this.ref...
0679f444877006966a737654897309c969aed660
src/components/head/new_page.jsx
src/components/head/new_page.jsx
/** * @license Apache-2.0 * * Copyright (c) 2021 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...
Add component for updating the document head when navigating to a new page
Add component for updating the document head when navigating to a new page
JSX
apache-2.0
stdlib-js/www,stdlib-js/www,stdlib-js/www
--- +++ @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2021 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...
1683161581bb8f71bfb364ed4ace13135f68a4a1
app/app/components/home/RegisteredUserHome.jsx
app/app/components/home/RegisteredUserHome.jsx
import React from 'react'; import {Link} from 'react-router' import auth from '../../utils/auth.jsx' export default class RegisteredUserHome extends React.Component { componentWillMount() { auth.getUser(localStorage.id).then((res) => { console.log(res.data) this.user = res.data.user }) } render(){ retur...
Rename and add home page component for logged in userse
Rename and add home page component for logged in userse
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
--- +++ @@ -0,0 +1,20 @@ +import React from 'react'; +import {Link} from 'react-router' +import auth from '../../utils/auth.jsx' + +export default class RegisteredUserHome extends React.Component { + componentWillMount() { + auth.getUser(localStorage.id).then((res) => { + console.log(res.data) + this.user = res....