You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
384 B
24 lines
384 B
/**
|
|
* A toggle button using bootstrap
|
|
*/
|
|
|
|
const Toggle = ({ active, children }) => {
|
|
return (
|
|
<button
|
|
type="button"
|
|
className={`btn btn-toggle ${active ? 'active' : ''}`}
|
|
data-toggle="button"
|
|
aria-pressed="false"
|
|
autocomplete="off"
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
};
|
|
|
|
Toggle.defaultProps = {
|
|
active: false,
|
|
};
|
|
|
|
export default Toggle;
|