This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import get from 'lodash.get'; | |
import { FormGroup, Input, Option } from 'bootstrap-styled'; | |
import translate from '../../i18n/translate'; | |
import FieldTitle from '../../util/FieldTitle'; | |
export class SelectInput extends Component { | |
/* | |
* Using state to bypass a redux-form comparison but which prevents re-rendering |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Step extends React.Component { // eslint-disable-line react/prefer-stateless-function | |
static defaultProps = { | |
status: 'inactive', | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stepsConstructor = []; | |
for (let i = 0; i < children.length; i++) { | |
const step = children[i].props; | |
const stepPreparation = {}; | |
stepPreparation.settings = {}; | |
stepPreparation.options = {}; | |
stepPreparation.settings.name = step.name; | |
stepPreparation.settings.status = step.status; | |
if (step.options) { | |
Object.assign(stepPreparation.options, step.options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import Provider from 'react-redux/lib/components/Provider'; | |
import PropTypes from 'prop-types'; | |
import BootstrapProvider from 'bootstrap-styled/lib/BootstrapProvider'; | |
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; | |
import theme from '../../src/theme'; | |
import reducer from '../../src/reducer'; | |
export default class Wrapper extends Component { // eslint-disable-line react/prefer-stateless-function | |
static propTypes = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* StepProgress.js | |
* | |
*/ | |
import React, { Children, cloneElement } from 'react'; | |
import PropTypes from 'prop-types'; | |
import cn from 'classnames'; | |
import { createStructuredSelector } from 'reselect'; | |
import { compose } from 'redux'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nextProps.filter = [A, B]; | |
A.Theme.default = { | |
1: red, | |
2: blue, | |
} | |
B.Theme.default = { | |
2: purple, | |
3: green, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentThemes = [A, B]; | |
bsComponents = {a: { test: true }, b: { test: true }, c: { test: false }, d: { test: true }}; | |
for (let i = 0; componentThemes.length > i; i++) { | |
for (const key in bsComponents) { | |
if (key === componentThemes[i].toLowerCase()) { | |
filteredTheme = Object.assign({}, bsComponents[key].defaultProps.theme); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (globalConfigurationThemes.filter((key) => key.match('gray-scale'))) { | |
if (themeToJs.filter((key) => key.match(grayScale))) { | |
// Object.assign(filteredTheme, { [key]: themeToJs[key] }); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get colors from theme | |
if (globalConfigurationThemes.filter((key) => key.match('colors'))) { | |
for (let i = 0; bsColors.length > i; i++) { | |
for (const key in themeToJs) { | |
if (key === '$' + bsColors[i]) { | |
Object.assign(filteredTheme, {[key]: themeToJs[key]}); | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get grayscale from theme | |
if (globalConfigurationThemes.filter((key) => key.match('gray-scale'))) { | |
if (themeToJs.filter((key) => key.match(grayScale))) { | |
for (const key in themeToJs) { | |
Object.assign(filteredTheme, { [key]: themeToJs[key] }); | |
} | |
} | |
} |
OlderNewer