chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470)
This commit is contained in:
committed by
GitHub
parent
71853eafdd
commit
e4ce2f4e07
6
packages/design-system/ui/src/utils/clx.ts
Normal file
6
packages/design-system/ui/src/utils/clx.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import clsx, { type ClassValue } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
export function clx(...args: ClassValue[]) {
|
||||
return twMerge(clsx(...args));
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
const isBrowserLocaleClockType24h = () => {
|
||||
const language =
|
||||
typeof window !== "undefined" ? window.navigator.language : "en-US"
|
||||
|
||||
const hr = new Intl.DateTimeFormat(language, {
|
||||
hour: "numeric",
|
||||
}).format()
|
||||
|
||||
return Number.isInteger(Number(hr))
|
||||
}
|
||||
|
||||
export { isBrowserLocaleClockType24h }
|
||||
Reference in New Issue
Block a user