Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/useLazyRipple/useLazyRipple.d.ts 1.14 KB
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
25
26
27
28
29
30
31
32
  import * as React from 'react';
  import { TouchRippleActions } from "../ButtonBase/TouchRipple.js";
  type ControlledPromise<T = unknown> = Promise<T> & {
    resolve: Function;
    reject: Function;
  };
  /**
   * Lazy initialization container for the Ripple instance. This improves
   * performance by delaying mounting the ripple until it's needed.
   */
  export declare class LazyRipple {
    /** React ref to the ripple instance */
    ref: React.RefObject<TouchRippleActions | null>;
    /** If the ripple component should be mounted */
    shouldMount: boolean;
    /** Promise that resolves when the ripple component is mounted */
    private mounted;
    /** If the ripple component has been mounted */
    private didMount;
    /** React state hook setter */
    private setShouldMount;
    static create(): LazyRipple;
    static use(): LazyRipple;
    constructor();
    mount(): ControlledPromise<unknown>;
    mountEffect: () => void;
    start(...args: Parameters<TouchRippleActions['start']>): void;
    stop(...args: Parameters<TouchRippleActions['stop']>): void;
    pulsate(...args: Parameters<TouchRippleActions['pulsate']>): void;
  }
  export default function useLazyRipple(): LazyRipple;
  export {};