15 lines
405 B
TypeScript
15 lines
405 B
TypeScript
import type { LinkComponentBaseProps } from '@inertiajs/core';
|
|
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<LinkComponentBaseProps['href']>,
|
|
): string {
|
|
return typeof href === 'string' ? href : href.url;
|
|
}
|