UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

87 lines (86 loc) 2.69 kB
import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/button'; import type { UseComponentIconsProps } from '../composables/useComponentIcons'; import type { LinkProps } from '../types'; import type { ComponentConfig } from '../types/utils'; type Button = ComponentConfig<typeof theme, AppConfig, 'button'>; export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | 'trailingIcon'>, Omit<LinkProps, 'raw' | 'custom'> { label?: string; /** * @defaultValue 'air-secondary-no-accent' */ color?: Button['variants']['color']; activeColor?: Button['variants']['color']; /** * @defaultValue 'normal' */ depth?: Button['variants']['depth']; activeDepth?: Button['variants']['depth']; /** * @defaultValue 'md' */ size?: Button['variants']['size']; /** * Rounds the corners of the button * @defaultValue false */ rounded?: boolean; /** * Render the button full width * @defaultValue false */ block?: boolean; /** * Set loading state automatically based on the `@click` promise state * @defaultValue false */ loadingAuto?: boolean; /** * Disable uppercase label * @defaultValue true */ normalCase?: boolean; /** * Shows LoaderWaitIcon in loading mode * @defaultValue false */ useWait?: boolean; /** * Shows LoaderClockIcon icon in loading mode * @defaultValue false */ useClock?: boolean; /** * Shows icons.ChevronDownSIcon on the right side * @defaultValue false */ useDropdown?: boolean; onClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>; class?: any; /** * The class to apply when the link is active * @defaultValue '' */ activeClass?: string; /** * The class to apply when the link is inactive * @defaultValue '' */ inactiveClass?: string; b24ui?: Button['slots']; } export interface ButtonSlots { leading(props?: {}): any; default(props?: {}): any; trailing(props?: {}): any; } declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, { type: "reset" | "submit" | "button"; normalCase: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>; export default _default; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };