@fifteen/design-system-vue
Version:
Vue 3 (Composition API + Typescript) implementation of the Fifteen Design System
145 lines (144 loc) • 3.79 kB
TypeScript
import { RouteLocationRaw } from 'vue-router';
import { FButtonAnchorPoint, FButtonSize } from '../FButton';
import { Color } from '../../types/colors';
export interface FButtonLinkProps {
/**
* Target location or url
*/
location?: RouteLocationRaw | null;
/**
* Submit all form values to a form-handler
*/
submit?: boolean;
/**
* Loading state of the button
*/
loading?: boolean;
/**
* Use event preventDefault on anchor if component is rendered as a FLink
*/
preventDefault?: boolean;
/**
* Display or not the background of the button
*/
ghost?: boolean;
/**
* Display or not the outlines of the button
*/
outlined?: boolean;
/**
* Disable or not the button
*/
disabled?: boolean;
/**
* Use the button for an icon
*/
icon?: boolean;
/**
* Size of the button
*/
size?: FButtonSize;
/**
* Emit or not click event
*/
preventClick?: boolean;
/**
* Use blur method of the button
*/
preventBlurOnClick?: boolean;
/**
* Text/icon color or background color if background prop exist
*/
color?: Color;
/**
* Background color of the button
*/
background?: Color;
/**
* Color of the sliding overlay on hover
*/
hoverColor?: Color;
/**
* Focus color
*/
focusColor?: Color;
/**
* Anchor point of the button
*/
anchorPoint?: FButtonAnchorPoint;
/**
* Use a circle for the shape of the button
*/
circle?: boolean;
/**
* Disable text color, background color and button size changes on hover
*/
static?: boolean;
/**
* Link target, overrides the one computed automatically on location
*/
target?: HTMLAnchorElement['target'];
/**
* Link hreflang, overrides the one computed automatically on location
*/
hreflang?: HTMLAnchorElement['hreflang'];
/**
* RouterLink-like active class
*/
activeClass?: string | null;
/**
* RouterLink-link exact active class
*/
exactActiveClass?: string | null;
/**
* RouterLink replace prop
*/
replace?: boolean;
}
declare function __VLS_template(): {
slots: {
default?(_: {}): any;
default?(_: {}): any;
};
refs: {};
attrs: Partial<{}>;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<FButtonLinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
click: (e: MouseEvent) => any;
focus: () => any;
}, string, import('vue').PublicProps, Readonly<FButtonLinkProps> & Readonly<{
onClick?: ((e: MouseEvent) => any) | undefined;
onFocus?: (() => any) | undefined;
}>, {
submit: boolean;
color: Color;
hoverColor: Color;
replace: boolean;
circle: boolean;
size: FButtonSize;
loading: boolean;
hreflang: HTMLAnchorElement["hreflang"];
target: HTMLAnchorElement["target"];
disabled: boolean;
location: RouteLocationRaw | null;
preventDefault: boolean;
ghost: boolean;
outlined: boolean;
icon: boolean;
preventClick: boolean;
preventBlurOnClick: boolean;
background: Color;
focusColor: Color;
anchorPoint: FButtonAnchorPoint;
static: boolean;
activeClass: string | null;
exactActiveClass: string | null;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};