mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
d94eaa19cc
[web] Enable SSO switch on Group Settings GitOrigin-RevId: 591881eb4e6bad912de026f7a687f3b020712c2d
26 lines
561 B
TypeScript
26 lines
561 B
TypeScript
import classNames from 'classnames'
|
|
|
|
type SwitchProps = {
|
|
onChange: () => void
|
|
checked: boolean
|
|
disabled?: boolean
|
|
}
|
|
|
|
function Switch({ onChange, checked, disabled = false }: SwitchProps) {
|
|
return (
|
|
<label className={classNames('switch-input', { disabled })}>
|
|
<input
|
|
className="invisible-input"
|
|
type="checkbox"
|
|
role="switch"
|
|
autoComplete="off"
|
|
onChange={onChange}
|
|
checked={checked}
|
|
disabled={disabled}
|
|
/>
|
|
<span className="switch" />
|
|
</label>
|
|
)
|
|
}
|
|
|
|
export default Switch
|