@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
22 lines (21 loc) • 1.01 kB
TypeScript
import { CSSAnimationObject, Token } from "../../core/css/index.types.js";
import "../../core/index.js";
//#region src/hooks/use-animation/index.d.ts
type CSSObject = Token<CSSAnimationObject, "animations"> | Token<CSSAnimationObject, "animations">[];
/**
* `useAnimation` is a custom hook that implements animations similar to CSS `keyframes`.
*
* @see https://yamada-ui.com/docs/hooks/use-animation
*/
declare const useAnimation: (cssObj: CSSObject) => string;
/**
* `useDynamicAnimation` is a custom hook used to switch animations.
*
* @see https://yamada-ui.com/docs/hooks/use-dynamic-animation
*/
declare const useDynamicAnimation: <Y extends Token<CSSAnimationObject, "animations">[] | {
[key: string]: CSSObject;
}>(arrayOrObj: Y, init?: (keyof Y)[] | keyof Y) => [string | undefined, (key: ((key: (keyof Y)[] | keyof Y | undefined) => (keyof Y)[] | keyof Y) | (keyof Y)[] | keyof Y) => void];
//#endregion
export { useAnimation, useDynamicAnimation };
//# sourceMappingURL=index.d.ts.map