fix(Table): export TableRow and TableColumn types

Resolves nuxt/ui#2373
This commit is contained in:
Benjamin Canac
2024-10-15 11:05:06 +02:00
parent 4de8f2e2f7
commit c36964b5ea
3 changed files with 19 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ export * from './popper'
export * from './progress'
export * from './range'
export * from './select'
export * from './table'
export * from './tabs'
export * from './textarea'
export * from './toggle'

13
src/runtime/types/table.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
export interface TableRow {
[key: string]: any
}
export interface TableColumn {
key: string
sortable?: boolean
sort?: (a: any, b: any, direction: 'asc' | 'desc') => number
direction?: 'asc' | 'desc'
class?: string
rowClass?: string
[key: string]: any
}