This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/components/Header/Language/LanguageFlag.tsx

25 lines
493 B
TypeScript
Raw Normal View History

import Image from "next/image"
2021-10-24 05:19:39 +02:00
export interface LanguageFlagProps {
2021-10-24 05:48:06 +02:00
language: string
2021-10-24 05:19:39 +02:00
}
export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
const { language } = props
return (
<>
<Image
quality={100}
2021-10-24 05:19:39 +02:00
width={35}
height={35}
src={`/images/svg/languages/${language}.svg`}
alt={language}
/>
<p data-cy="language-flag-text" className="mx-2 text-base">
2021-10-24 05:48:06 +02:00
{language.toUpperCase()}
</p>
2021-10-24 05:19:39 +02:00
</>
)
}