You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
447 B
15 lines
447 B
import type { Updater } from '@tanstack/vue-table' |
|
import type { Ref } from 'vue' |
|
import { type ClassValue, clsx } from 'clsx' |
|
import { twMerge } from 'tailwind-merge' |
|
|
|
export function cn(...inputs: ClassValue[]) { |
|
return twMerge(clsx(inputs)) |
|
} |
|
|
|
export function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) { |
|
ref.value |
|
= typeof updaterOrValue === 'function' |
|
? updaterOrValue(ref.value) |
|
: updaterOrValue |
|
}
|
|
|