chore(Badge): add type

This commit is contained in:
Benjamin Canac
2023-09-29 16:17:06 +02:00
parent ee6f0d0c49
commit d46eafb248
3 changed files with 19 additions and 5 deletions

14
src/runtime/types/badge.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
import { badge } from '../ui.config'
import type { NestedKeyOf } from '.'
import colors from '#ui-colors'
export type BadgeSize = keyof typeof badge.size
export type BadgeColor = keyof typeof badge.color | typeof colors[number]
export type BadgeVariant = keyof typeof badge.variant | NestedKeyOf<typeof badge.color>
export interface Badge {
label?: string
size?: BadgeSize
color?: BadgeColor
variant?: BadgeVariant
}

View File

@@ -1,5 +1,6 @@
export * from './accordion'
export * from './avatar'
export * from './badge'
export * from './button'
export * from './clipboard'
export * from './command-palette'