UNPKG

webcoreui

Version:

UI component and template library for Astro, Svelte, and React apps styled with Sass.

27 lines (23 loc) 544 B
type BadgeBase = { theme?: 'secondary' | 'outline' | 'flat' | 'info' | 'success' | 'warning' | 'alert' hover?: boolean small?: boolean rounded?: boolean transparent?: boolean className?: string } type AsSpan<T extends object = object> = BadgeBase & { onClick?: never } & T type AsButton<T extends object = object> = BadgeBase & { onClick: any } & T export type BadgeProps<T extends object = object> = | AsSpan<T> | AsButton<T>