Blame view

天文台pc/tianwentai-ui/node_modules/@radix-ui/react-toggle/dist/index.d.mts 913 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  import * as React from 'react';
  import { Primitive } from '@radix-ui/react-primitive';
  
  type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
  interface ToggleProps extends PrimitiveButtonProps {
      /**
       * The controlled state of the toggle.
       */
      pressed?: boolean;
      /**
       * The state of the toggle when initially rendered. Use `defaultPressed`
       * if you do not need to control the state of the toggle.
       * @defaultValue false
       */
      defaultPressed?: boolean;
      /**
       * The callback that fires when the state of the toggle changes.
       */
      onPressedChange?(pressed: boolean): void;
  }
  declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
  declare const Root: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
  
  export { Root, Toggle, type ToggleProps };