feat(translations): add crowdin live support (#4177)
This commit is contained in:
@@ -14,3 +14,4 @@ export { IntegrationAvatar } from "./integration-avatar";
|
||||
export { BetaBadge } from "./beta-badge";
|
||||
export { MaskedImage } from "./masked-image";
|
||||
export { MaskedOrNormalImage } from "./masked-or-normal-image";
|
||||
export { LanguageIcon } from "./language-icon";
|
||||
|
||||
11
packages/ui/src/components/language-icon.tsx
Normal file
11
packages/ui/src/components/language-icon.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Image } from "@mantine/core";
|
||||
|
||||
import type { LanguageIconDefinition } from "@homarr/translation";
|
||||
|
||||
export const LanguageIcon = ({ icon }: { icon: LanguageIconDefinition }) => {
|
||||
if (icon.type === "flag") {
|
||||
return <span className={`fi fi-${icon.flag}`} style={{ borderRadius: 4 }}></span>;
|
||||
}
|
||||
|
||||
return <Image src={icon.url} style={{ width: "1.3333em", height: "1.3333em" }} fit="contain" alt="Language icon" />;
|
||||
};
|
||||
Reference in New Issue
Block a user