Skip to content

Commit

Permalink
[Toggle] Fix numeric string pixel value for marginLeft, fixes mui#3942
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Apr 12, 2016
1 parent 3aa0d16 commit 063441a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Toggle/Toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class Toggle extends React.Component {
);

if (this.state.switched) {
thumbStyles.marginLeft = `-${thumbStyles.width}`;
thumbStyles.marginLeft = 0 - thumbStyles.width;
}

const toggleElementStyles = Object.assign({},
Expand Down

1 comment on commit 063441a

@antoinerousseau
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just -thumbStyles.width? readability?

Please sign in to comment.