UNPKG

fastapi-rtk

Version:

A React component library for FastAPI in combination with FastAPI React Toolkit backend, built with Mantine, JsonForms, and Zustand.

12 lines (11 loc) 459 B
import { jsx } from "react/jsx-runtime"; import { BASE_LANGUAGES } from "fastapi-rtk/constants"; import { Select } from "@mantine/core"; import { useLang } from "../hooks/lang/useLang.mjs"; const LanguageSelector = (props) => { const { currentLanguage, setLanguage } = useLang(); return /* @__PURE__ */ jsx(Select, { data: BASE_LANGUAGES, value: currentLanguage, allowDeselect: false, onChange: setLanguage, ...props }); }; export { LanguageSelector };