import { default as React } from 'react'; import { AllowedHTMLTags, PolymorphicComponentPropWithRef } from '../../../helpers/polymorphic/types'; import { UnknownType } from '../../../types/commonTypes'; import { IconWithoutBackgroundProps } from '../../base/icon/icon'; import { ButtonColor, ButtonType } from '../button/button'; export type ButtonContentProps, A> = PolymorphicComponentPropWithRef, { /** * Button children */ children: React.ReactNode; /** * Additional custom class name. */ className?: string; /** * Button visual type * @default primary */ visualType?: ButtonType; /** * If button should take all the space it has */ fullWidth?: boolean; /** * Color scheme of the button. The 'text' value is only supported when visualType is 'link'. * @default default */ color?: ButtonColor; /** * Button size */ size?: 'default' | 'small' | 'large'; /** * Name of the icon when button only has an icon in it. */ icon?: string | IconWithoutBackgroundProps; /** * Name of the icon we want to show on the left. */ iconLeft?: string | IconWithoutBackgroundProps; /** * Name of the icon we want to show on the right. */ iconRight?: string | IconWithoutBackgroundProps; /** * Underline the button text */ underline?: boolean; /** * If button is active and should keep its hover state. */ isHovered?: boolean; /** * If button is active and should keep it's active state. */ isActive?: boolean; /** * If button is in loading state and should show spinner. * When isLoading is true, button does not trigger onClick event. * @default false */ isLoading?: boolean; /** * Skip applying button/link styles * Useful when you just want to use Button or Link logic without the styles * In this case icon, iconLeft and iconRight are ignored */ noStyle?: boolean; /** * Internal use only */ renderWrapperElement?: unknown; /** * Automatically show tooltip for icon-only buttons. * @default true */ showTooltip?: boolean; } & P>; export type ButtonContentComponent = , A>(props: ButtonContentProps) => React.ReactNode; /** * Shares the rendering logic between `Link` and `Button`. We don't export it from the component library. */ export declare const ButtonContent: ButtonContentComponent; export default ButtonContent;