site/quartz/util/lang.ts
2024-04-05 02:03:11 +02:00

14 lines
307 B
TypeScript

export function capitalize(s: string): string {
return s.substring(0, 1).toUpperCase() + s.substring(1)
}
export function classNames(
displayClass?: "mobile-only" | "desktop-only",
...classes: string[]
): string {
if (displayClass) {
classes.push(displayClass)
}
return classes.join(" ")
}