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.
26 lines
362 B
26 lines
362 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;
|