Skip to content

Commit

Permalink
feat(Slider): OnChange now returns int instead of object
Browse files Browse the repository at this point in the history
  • Loading branch information
Utzel-Butzel committed Feb 16, 2019
1 parent b05e505 commit 80a657f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"babel-loader": "^8.0.4",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-react-docgen": "^2.0.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"bowser": "^1.6.1",
"carbon-components": "^9.61.4",
"chalk": "^2.3.0",
Expand Down
18 changes: 12 additions & 6 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ Promise.all([
rimrafAsync(`${rootDir}/umd`),
])
.then(() => {
exec(`${babelPath} src -q -d es --ignore "${ignoreGlobs}"`, {
BABEL_ENV: 'es',
});
exec(`${babelPath} src -q -d lib --ignore "${ignoreGlobs}"`, {
BABEL_ENV: 'cjs',
});
exec(
`${babelPath} src -q -d es --plugins transform-remove-console --ignore "${ignoreGlobs}"`,
{
BABEL_ENV: 'es',
}
);
exec(
`${babelPath} src -q -d lib --plugins transform-remove-console --ignore "${ignoreGlobs}"`,
{
BABEL_ENV: 'cjs',
}
);
exec(
`${rollupPath} -c scripts/rollup.config.js -o umd/wfp-components-react.js`,
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class Slider extends PureComponent {
return { dragging: false };
}
if (typeof props.onChange === 'function') {
props.onChange({ value: newValue });
props.onChange(newValue);
}
return {
dragging: false,
Expand Down

0 comments on commit 80a657f

Please sign in to comment.