slanted-gamedev-toolz
Version:
A slanted mix of tools for your brilliant ideas in game design.
18 lines (17 loc) • 700 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { colors } from "../../theme/palettes/colors";
import { LangBtns } from "./LangBtns";
import { useLocalization } from "./useLocalization";
export const getMenuText = (texts, langCode) => {
if (!langCode)
return texts["_en"];
const res = texts[langCode];
if (!res) {
return texts["_en"];
}
return texts[langCode];
};
export const LocalizationSelect = ({ hideTitle, size = 70, fontColor = colors.azureBlue, }) => {
const { setLanguage, langCode } = useLocalization();
return (_jsx(LangBtns, { langCode: langCode, setLanguage: setLanguage, hideTitle: hideTitle, size: size, fontColor: fontColor }));
};