Apply font to Select.Option
elements
Based on whether or not the element is for a RTL or LTR language
This commit is contained in:
parent
8518b5f491
commit
ed0d493a17
3 changed files with 14 additions and 13 deletions
|
@ -17,6 +17,7 @@ export function LanguageSelect({ locale }: Props) {
|
|||
key={i}
|
||||
className={classNames(
|
||||
"flex h-6 w-full justify-center no-underline mb-1 rounded border-accent",
|
||||
l.direction === "rtl" ? "font-cairo" : "font-kanit",
|
||||
l.direction,
|
||||
l.name === locale.name ? "active" : undefined,
|
||||
)}
|
||||
|
|
|
@ -11,14 +11,14 @@ import { formatNumber } from "~/lib/t";
|
|||
.querySelector("meta[name='revision']")!
|
||||
.getAttribute("content")!;
|
||||
const fonts = (() => {
|
||||
const f = [
|
||||
item.font("Cairo Regular", "url(/fonts/cairo-regular.ttf)"),
|
||||
item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)"),
|
||||
];
|
||||
if (doc.dir === "rtl") {
|
||||
return [
|
||||
item.font("Cairo Regular", "url(/fonts/cairo-regular.ttf)"),
|
||||
item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf)"),
|
||||
];
|
||||
} else {
|
||||
return [item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)")];
|
||||
f.push(item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf)"));
|
||||
}
|
||||
return f;
|
||||
})();
|
||||
|
||||
postman(
|
||||
|
|
|
@ -12,15 +12,15 @@ import { formatNumber } from "~/lib/t";
|
|||
.querySelector("meta[name='revision']")!
|
||||
.getAttribute("content")!;
|
||||
const fonts = (() => {
|
||||
const f = [
|
||||
item.font("Cairo Regular", "url(/fonts/cairo-regular.ttf)"),
|
||||
item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)"),
|
||||
];
|
||||
if (doc.dir === "rtl") {
|
||||
return [
|
||||
item.font("Cairo Regular", "url(/fonts/cairo-regular.ttf)"),
|
||||
item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf)"),
|
||||
item.font("Amiri Regular", "url(/fonts/amiri-regular.ttf)"),
|
||||
];
|
||||
} else {
|
||||
return [item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)")];
|
||||
f.push(item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf)"));
|
||||
f.push(item.font("Amiri Regular", "url(/fonts/amiri-regular.ttf)"));
|
||||
}
|
||||
return f;
|
||||
})();
|
||||
|
||||
postman(
|
||||
|
|
Loading…
Reference in a new issue