git init
This commit is contained in:
12
resources/js/lib/utils.ts
Normal file
12
resources/js/lib/utils.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { InertiaLinkProps } from '@inertiajs/vue3';
|
||||
import { clsx } from 'clsx';
|
||||
import type { ClassValue } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export function toUrl(href: NonNullable<InertiaLinkProps['href']>) {
|
||||
return typeof href === 'string' ? href : href?.url;
|
||||
}
|
||||
Reference in New Issue
Block a user