UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

74 lines (73 loc) 1.99 kB
import { KeyframeIdent, ThemeProps } from "../../core/system/index.types.js"; import { Component } from "../../core/components/index.types.js"; import "../../core/index.js"; import { HTMLMotionProps } from "../motion/index.types.js"; import { RotateStyle } from "./rotate.style.js"; import "../../index.js"; import * as react85 from "react"; import { ReactNode } from "react"; //#region src/components/rotate/rotate.d.ts interface RotateProps extends Omit<HTMLMotionProps<"button">, "onChange" | "rotate">, ThemeProps<RotateStyle> { /** * Passing React elements to "from" is required. */ from: ReactNode; /** * Passing React elements to "to" is required. */ to: ReactNode; /** * You can set the initial state. * * @default 'from' */ defaultValue?: KeyframeIdent; /** * The animation delay. * * @default 0 */ delay?: number; /** * If `true`, the component is disabled. * * @default false */ disabled?: boolean; /** * The animation duration. * * @default 0.4 */ duration?: number; /** * If `true`, the component is readonly. * * @default false */ readOnly?: boolean; /** * The animation rotation. * * @default 45 */ rotate?: number; /** * Use this when you want to control the animation from outside the component. */ value?: KeyframeIdent; /** * This is a callback function that is called when the animation state changes. */ onChange?: (value: KeyframeIdent) => void; } declare const RotatePropsContext: react85.Context<Partial<RotateProps> | undefined>, useRotatePropsContext: () => Partial<RotateProps> | undefined; /** * `Rotate` is an animation component that alternately rotates two elements as they switch. * * @see https://yamada-ui.com/docs/components/rotate */ declare const Rotate: Component<"button", RotateProps>; //#endregion export { Rotate, RotateProps, RotatePropsContext, useRotatePropsContext }; //# sourceMappingURL=rotate.d.ts.map