mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: toggle auto remount
This commit is contained in:
@@ -6,9 +6,10 @@ type Props = {
|
||||
toggle: (v: boolean) => void;
|
||||
enabledLabel: string;
|
||||
disabledLabel: string;
|
||||
disabled?: boolean;
|
||||
};
|
||||
|
||||
export const OnOff = ({ isOn, toggle, enabledLabel, disabledLabel }: Props) => {
|
||||
export const OnOff = ({ isOn, toggle, enabledLabel, disabledLabel, disabled }: Props) => {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
@@ -19,7 +20,7 @@ export const OnOff = ({ isOn, toggle, enabledLabel, disabledLabel }: Props) => {
|
||||
)}
|
||||
>
|
||||
<span>{isOn ? enabledLabel : disabledLabel}</span>
|
||||
<Switch checked={isOn} onCheckedChange={toggle} />
|
||||
<Switch disabled={disabled} checked={isOn} onCheckedChange={toggle} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user