import { AsElementProps } from "../../../types/shared.mjs"; import { PolymorphicComponentProps } from "../../../internal/factory/create-polymorphic-factory.mjs"; import { BaseProps } from "../../core/base/Base.mjs"; import React, { ReactNode } from "react"; //#region src/components/form-elements/button/Button.d.ts type ButtonProps = { variant?: 'primary' | 'secondary' | 'secondary-solid' | 'reverse' | 'warning' | 'login'; small?: boolean; disabled?: boolean; preventDoubleClick?: boolean; type?: 'button' | 'submit' | 'reset'; /** * An icon to render inside the button, for example ``. When set, the * `nhsuk-button--icon` modifier is applied and any text is wrapped in a * `nhsuk-button__content` element. */ icon?: ReactNode; /** * Where to render the icon relative to the button text. Defaults to `start`. */ iconPlacement?: 'start' | 'end'; } & BaseProps; declare const Button: ((props: PolymorphicComponentProps) => React.ReactElement) & Omit`. When set, the * `nhsuk-button--icon` modifier is applied and any text is wrapped in a * `nhsuk-button__content` element. */ icon?: ReactNode; /** * Where to render the icon relative to the button text. Defaults to `start`. */ iconPlacement?: "start" | "end"; } & { className?: string; } & { children?: ReactNode | undefined; } & AsElementProps & Omit, "small" | "className" | "children" | "variant" | "as" | "disabled" | "type" | "preventDoubleClick" | "icon" | "iconPlacement"> & { ref?: any; renderRoot?: (props: any) => any; }) | ({ variant?: "primary" | "secondary" | "secondary-solid" | "reverse" | "warning" | "login"; small?: boolean; disabled?: boolean; preventDoubleClick?: boolean; type?: "button" | "submit" | "reset"; /** * An icon to render inside the button, for example ``. When set, the * `nhsuk-button--icon` modifier is applied and any text is wrapped in a * `nhsuk-button__content` element. */ icon?: ReactNode; /** * Where to render the icon relative to the button text. Defaults to `start`. */ iconPlacement?: "start" | "end"; } & { className?: string; } & { children?: ReactNode | undefined; } & { as: keyof React.JSX.IntrinsicElements | React.JSXElementConstructor; renderRoot?: (props: Record) => any; })>, never> & Record; //#endregion export { Button, ButtonProps };