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
2021-10-24 05:19:39 +02:00

32 lines
607 B
TypeScript

import Image from 'next/image'
import { Language } from 'utils/authentication'
export interface LanguageFlagProps {
language: Language
}
export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
const { language } = props
return (
<>
<Image
width={35}
height={35}
src={`/images/svg/languages/${language}.svg`}
alt={language}
/>
<p className='language-title'>{language.toUpperCase()}</p>
<style jsx>
{`
.language-title {
margin: 0 8px 0 10px;
}
`}
</style>
</>
)
}