hongluan-ui
Version:
Hongluan Component Library for Vue 3
58 lines (57 loc) • 1.49 kB
TypeScript
import type { ExtractPropTypes, PropType, StyleValue } from 'vue';
export declare type BadgePosition = 'lt' | 'rt' | 'lb' | 'rb';
export declare const badgeProps: {
/**
* @description display value.
*/
value: {
type: PropType<string | number>;
default: string;
};
/**
* @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.
*/
max: {
type: NumberConstructor;
default: number;
};
position: PropType<BadgePosition>;
offset: PropType<string[]>;
/**
* @description if a little dot is displayed.
*/
dot: BooleanConstructor;
round: BooleanConstructor;
hidden: BooleanConstructor;
/**
* @description badge type.
*/
type: {
type: PropType<"success" | "info" | "warning" | "danger" | "link" | "primary">;
validator: (val: string) => boolean;
};
/**
* @description whether to show badge when value is zero.
*/
showZero: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description background color of the Badge
*/
color: StringConstructor;
/**
* @description custom class name of badge
*/
badgeClass: {
type: StringConstructor;
};
/**
* @description CSS style of badge
*/
badgeStyle: {
type: PropType<StyleValue>;
};
};
export declare type BadgeProps = ExtractPropTypes<typeof badgeProps>;