1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01:00
.profile/components/Footer/LanguageButton.tsx
2021-04-18 01:56:23 +02:00

30 lines
548 B
TypeScript

import setLanguage from 'next-translate/setLanguage'
interface LanguageButtonProps {
lang: string
}
export const LanguageButton: React.FC<LanguageButtonProps> = (props) => {
return (
<>
<span
onClick={async () => await setLanguage(props.lang)}
className='important'
>
{props.children}
</span>
<style jsx>
{`
span {
cursor: pointer;
}
span:hover {
text-decoration: underline;
}
`}
</style>
</>
)
}