Files
decky-frontend-lib/src/deck-components/Toggle.tsx

15 lines
379 B
TypeScript
Raw Normal View History

2022-05-10 23:38:10 +02:00
import { FC } from 'react';
import { CommonUIModule } from '../webpack';
export interface ToggleProps {
value: boolean;
2022-05-10 23:38:10 +02:00
disabled?: boolean;
onChange?(checked: boolean): void;
navRef?: any; // TODO figure out what this is
2022-05-10 23:38:10 +02:00
}
export const Toggle = Object.values(CommonUIModule).find((mod: any) =>
mod?.render?.toString()?.includes('.ToggleOff)'),
2022-05-10 23:38:10 +02:00
) as FC<ToggleProps>;