2023-09-29 15:26:15 +07:00
|
|
|
export function capitalize(s: string): string {
|
|
|
|
return s.substring(0, 1).toUpperCase() + s.substring(1)
|
|
|
|
}
|
2024-01-30 12:51:13 +07:00
|
|
|
|
|
|
|
export function classNames(
|
|
|
|
displayClass?: "mobile-only" | "desktop-only",
|
|
|
|
...classes: string[]
|
|
|
|
): string {
|
|
|
|
if (displayClass) {
|
|
|
|
classes.push(displayClass)
|
|
|
|
}
|
|
|
|
return classes.join(" ")
|
|
|
|
}
|