mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-23 04:35:46 +00:00
* feat(breadcrumb): add breadcrumb component * refactor(breadcrumb): improve variable name and simplify object key passing * refactor(breadcrumb): remove unnecessary color transition * chore(breadcrumb): wip * chore: build registry * feat: update breadcrumb component * fix(breadcrumb): update code highlight * chore(www): remove menu --------- Co-authored-by: shadcn <m@shadcn.com>
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
import * as React from "react"
|
|
import { clsx, type ClassValue } from "clsx"
|
|
import { twMerge } from "tailwind-merge"
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
export function formatDate(input: string | number): string {
|
|
const date = new Date(input)
|
|
return date.toLocaleDateString("en-US", {
|
|
month: "long",
|
|
day: "numeric",
|
|
year: "numeric",
|
|
})
|
|
}
|
|
|
|
export function absoluteUrl(path: string) {
|
|
return `${process.env.NEXT_PUBLIC_APP_URL}${path}`
|
|
}
|