mirror of
https://github.com/theoludwig/react-component-form.git
synced 2024-07-17 07:30:13 +02:00
25 lines
489 B
TypeScript
25 lines
489 B
TypeScript
|
import Image from 'next/image'
|
||
|
|
||
|
export interface LanguageFlagProps {
|
||
|
language: string
|
||
|
}
|
||
|
|
||
|
export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
|
||
|
const { language } = props
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<Image
|
||
|
quality={100}
|
||
|
width={35}
|
||
|
height={35}
|
||
|
src={`/images/languages/${language}.svg`}
|
||
|
alt={language}
|
||
|
/>
|
||
|
<p data-cy='language-flag-text' className='mx-2 text-base'>
|
||
|
{language.toUpperCase()}
|
||
|
</p>
|
||
|
</>
|
||
|
)
|
||
|
}
|