[Update] Add Font Family.
This commit is contained in:
@@ -25,6 +25,7 @@ export const Appearance = () => {
|
||||
<UiLanguageContainer />
|
||||
<UiScalingContainer />
|
||||
<MessageLogUiScalingContainer />
|
||||
<FontFamilyContainer />
|
||||
|
||||
|
||||
|
||||
@@ -184,4 +185,28 @@ const MessageLogUiScalingContainer = () => {
|
||||
track={false}
|
||||
/>
|
||||
);
|
||||
};
|
||||
import { useStore_SelectableFontFamilyList } from "@store";
|
||||
import { DropdownMenuContainer } from "../components/useSettingBox";
|
||||
import { useSelectedFontFamily } from "@logics_configs/useSelectedFontFamily";
|
||||
const FontFamilyContainer = () => {
|
||||
const { t } = useTranslation();
|
||||
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
|
||||
|
||||
const selectFunction = (selected_data) => {
|
||||
setSelectedFontFamily(selected_data.selected_id);
|
||||
};
|
||||
const { currentSelectableFontFamilyList } = useStore_SelectableFontFamilyList();
|
||||
|
||||
return (
|
||||
<DropdownMenuContainer
|
||||
dropdown_id="font_family"
|
||||
label={t("config_page.font_family.label")}
|
||||
desc={t("config_page.font_family.label")}
|
||||
selected_id={currentSelectedFontFamily.data}
|
||||
list={currentSelectableFontFamilyList.data}
|
||||
selectFunction={selectFunction}
|
||||
state={currentSelectedFontFamily.state}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user