siakad-itm/resources/js/lib/utils.ts
Yoga Pangestu e870a155fa
Some checks failed
tests / ci (pull_request) Has been cancelled
initial commit
2026-07-29 17:46:01 +07:00

13 lines
383 B
TypeScript

import type { InertiaLinkProps } from '@inertiajs/react';
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(url: NonNullable<InertiaLinkProps['href']>): string {
return typeof url === 'string' ? url : url.url;
}