Download frontend/src/components/LangToggle.tsx from devrup404/sadar: direct link, hf CLI and curl.
- Browser
- Download file 434 Bytes
-
https://huggingface.co/spaces/devrup404/sadar/resolve/main/frontend/src/components/LangToggle.tsx
- Command line
-
hf download hf://spaces/devrup404/sadar/frontend/src/components/LangToggle.tsx
-
curl -L -o LangToggle.tsx https://huggingface.co/spaces/devrup404/sadar/resolve/main/frontend/src/components/LangToggle.tsx
434 Bytes
| import { useLang } from "../i18n"; | |
| export default function LangToggle() { | |
| const { lang, toggle } = useLang(); | |
| return ( | |
| <button onClick={toggle} title="Language / Idioma"> | |
| <span style={{ color: lang === "en" ? "var(--info)" : "var(--muted)" }}>EN</span> | |
| <span style={{ color: "var(--muted)" }}> / </span> | |
| <span style={{ color: lang === "es" ? "var(--info)" : "var(--muted)" }}>ES</span> | |
| </button> | |
| ); | |
| } | |