index.d.ts 1.1 KB

1234567891011121314151617181920
  1. import * as React from "react";
  2. import * as Radix from "@radix-ui/react-primitive";
  3. import { Primitive } from "@radix-ui/react-primitive";
  4. export const createSwitchScope: import("@radix-ui/react-context").CreateScope;
  5. type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
  6. export interface SwitchProps extends PrimitiveButtonProps {
  7. checked?: boolean;
  8. defaultChecked?: boolean;
  9. required?: boolean;
  10. onCheckedChange?(checked: boolean): void;
  11. }
  12. export const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
  13. type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
  14. export interface SwitchThumbProps extends PrimitiveSpanProps {
  15. }
  16. export const SwitchThumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<HTMLSpanElement>>;
  17. export const Root: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
  18. export const Thumb: React.ForwardRefExoticComponent<SwitchThumbProps & React.RefAttributes<HTMLSpanElement>>;
  19. //# sourceMappingURL=index.d.ts.map