Use ToggleSwitches for binary options
Summary: We've had a bunch of different options that were all binary switches with very different ways of displaying them. This consolidates them all to use ToggleSwitches. I think it may still make sense to move them all to a sidebar as it's the case for the Analytics plugin, but that's for another diff. Reviewed By: danielbuechele Differential Revision: D14933392 fbshipit-source-id: 7ef286b61142a564a7cde6de875266ac8641704b
This commit is contained in:
committed by
Facebook Github Bot
parent
c244946be3
commit
6db83a7675
@@ -40,6 +40,7 @@ type Props = {
|
||||
* whether the button is toggled
|
||||
*/
|
||||
toggled?: boolean,
|
||||
className?: string,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -55,7 +56,11 @@ type Props = {
|
||||
export default class ToggleButton extends React.Component<Props> {
|
||||
render() {
|
||||
return (
|
||||
<StyledButton toggled={this.props.toggled} onClick={this.props.onClick} />
|
||||
<StyledButton
|
||||
className={this.props.className}
|
||||
toggled={this.props.toggled}
|
||||
onClick={this.props.onClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user