2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
|
|
|
type BadgeSeverityType = 'info' | 'success' | 'warning' | 'danger' | undefined;
|
|
|
|
|
|
|
|
type BadgeSizeType = 'large' | 'xlarge' | undefined;
|
|
|
|
|
|
|
|
export interface BadgeProps {
|
|
|
|
/**
|
|
|
|
* Value to display inside the badge.
|
|
|
|
*/
|
|
|
|
value?: any;
|
|
|
|
/**
|
|
|
|
* Severity type of the badge.
|
|
|
|
* @see BadgeSeverityType
|
|
|
|
*/
|
|
|
|
severity?: BadgeSeverityType;
|
|
|
|
/**
|
|
|
|
* Size of the badge, valid options are 'large' and 'xlarge'.
|
|
|
|
* @see BadgeSizeType
|
|
|
|
*/
|
|
|
|
size?: BadgeSizeType;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface BadgeSlots {
|
|
|
|
/**
|
|
|
|
* Content can easily be customized with the default slot instead of using the built-in display.
|
|
|
|
*/
|
|
|
|
default: () => VNode[];
|
|
|
|
}
|
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
export declare type BadgeEmits = {};
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class Badge extends ClassComponent<BadgeProps, BadgeSlots, BadgeEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Badge: GlobalComponentConstructor<Badge>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Badge is a small status indicator for another element.
|
|
|
|
*
|
|
|
|
* Demos:
|
|
|
|
*
|
2022-09-14 11:26:01 +00:00
|
|
|
* - [Badge](https://www.primefaces.org/primevue/badge)
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
export default Badge;
|