UNPKG

@opencloud-eu/design-system

Version:

OpenCloud Design System is used to design OpenCloud UI components

102 lines (101 loc) 3.22 kB
import { RouteLocationRaw } from 'vue-router'; import { AppearanceType, SizeType } from '../../helpers'; export interface Props { /** * @docs The appearance of the button. * @default outline */ appearance?: AppearanceType; /** * @docs The aria label of the button. Needs to be present if the button doesn't have a visible label. */ ariaLabel?: string; /** * @docs Material design color role. * @default secondary */ colorRole?: 'primary' | 'primaryContainer' | 'primaryFixed' | 'secondary' | 'secondaryContainer' | 'secondaryFixed' | 'tertiary' | 'tertiaryContainer' | 'tertiaryFixed' | 'surface' | 'surfaceContainer' | 'chrome'; /** * @docs Determines if the button is disabled. * @default false */ disabled?: boolean; /** * @docs The gap size between content elements of the button. * @default medium */ gapSize?: SizeType | 'none'; /** * @docs The href if the `type` is set to `a'. */ href?: string; /** * @docs The alignment of the button content. * @default center */ justifyContent?: 'left' | 'center' | 'right' | 'space-around' | 'space-between' | 'space-evenly'; /** * @docs Determines if a spinner should be shown inside the button. * @default false */ showSpinner?: boolean; /** * @docs The size of the button. * @default medium */ size?: 'small' | 'medium' | 'large'; /** * @docs The type of the button element. Only takes effect if the `type` is set to `button`. * @default button */ submit?: 'null' | 'button' | 'submit' | 'reset'; /** * @docs The target of the button if the `type` is set to `a`. */ target?: '_blank' | '_self' | '_parent' | '_top'; /** * @docs The route location if the `type` is set to `router-link`. */ to?: RouteLocationRaw; /** * @docs The type of the button element. * @default button */ type?: 'button' | 'a' | 'router-link'; /** * @docs Determines if the button should have no hover effect. * @default false */ noHover?: boolean; } export interface Emits { /** * @docs Emitted when the button has been clicked. */ (e: 'click', event: MouseEvent): void; } export interface Slots { /** * @docs Button content. */ default?: () => unknown; } declare function __VLS_template(): { attrs: Partial<{}>; slots: Readonly<Slots> & Slots; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { click: (event: MouseEvent) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ onClick?: (event: MouseEvent) => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };