@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
85 lines (84 loc) • 2.45 kB
TypeScript
import { LoadingScheme, ThemeProps } from "../../core/system/index.types.js";
import { Component, HTMLProps, HTMLStyledProps } from "../../core/components/index.types.js";
import "../../core/index.js";
import { ButtonStyle } from "./button.style.js";
import "../../index.js";
import * as react26 from "react";
import { ReactNode } from "react";
//#region src/components/button/button.d.ts
interface ButtonProps extends HTMLStyledProps<"button">, ThemeProps<ButtonStyle> {
/**
* The type of button. Accepts `button`, `reset`, or `submit`.
*
* @default 'button'
*/
type?: HTMLProps<"button">["type"];
/**
* If `true`, the button is represented as active.
*
* @default false
*/
active?: boolean;
/**
* If `true`, the button is disabled.
*
* @default false
*/
disabled?: boolean;
/**
* If `true`, disable ripple effects when pressing a element.
*
* @default false
*/
disableRipple?: boolean;
/**
* The icon to display at the end side of the button.
*/
endIcon?: ReactNode;
/**
* If `true`, the loading state of the button is represented.
*
* @default false
*/
loading?: boolean;
/**
* The icon to display when the button is loading.
*
* @default 'oval'
*/
loadingIcon?: LoadingScheme | ReactNode;
/**
* The message to display when the button is loading.
*/
loadingMessage?: ReactNode;
/**
* The placement of the loading indicator. Accepts `start` or `end`.
*
* @default 'start'
*/
loadingPlacement?: "end" | "start";
/**
* The icon to display at the start side of the button.
*/
startIcon?: ReactNode;
/**
* The props of the icon element.
*/
iconProps?: ButtonIconProps;
/**
* The props of the loading icon element.
*/
loadingProps?: ButtonLoadingProps;
}
declare const ButtonPropsContext: react26.Context<Partial<ButtonProps> | undefined>, useButtonPropsContext: () => Partial<ButtonProps> | undefined;
/**
* `Button` is an interactive component that allows users to perform actions such as submitting forms and toggling modals.
*
* @see https://yamada-ui.com/docs/components/button
*/
declare const Button: Component<"button", ButtonProps>;
interface ButtonLoadingProps extends HTMLStyledProps<"svg"> {}
interface ButtonIconProps extends HTMLStyledProps<"svg"> {}
//#endregion
export { Button, ButtonProps, ButtonPropsContext, useButtonPropsContext };
//# sourceMappingURL=button.d.ts.map