fix: improve overall rendering v3 (#25)

Follow-up of #15

Co-authored-by: Walidoux <ma.walidkorchi@icloud.com>
This commit is contained in:
Divlo
2022-04-07 16:54:05 +02:00
committed by GitHub
parent d2b0e8831c
commit a64325f5b8
37 changed files with 2498 additions and 2254 deletions

View File

@ -7,7 +7,12 @@ import { Arrow } from './Arrow'
import { LanguageFlag } from './LanguageFlag'
import i18n from '../../../i18n.json'
export const Language: React.FC = () => {
export interface LanguageProps {
className?: string
}
export const Language: React.FC<LanguageProps> = (props) => {
const { className } = props
const { lang: currentLanguage } = useTranslation()
const [hiddenMenu, setHiddenMenu] = useState(true)
@ -46,7 +51,8 @@ export const Language: React.FC = () => {
<ul
data-cy='languages-list'
className={classNames(
'absolute -bottom-16 z-10 mt-3 mr-4 flex w-24 list-none flex-col items-center justify-center rounded-lg bg-white p-0 shadow-light dark:bg-black dark:shadow-dark',
className,
'absolute top-16 z-10 mr-4 flex w-24 list-none flex-col items-center justify-center rounded-lg bg-white p-0 shadow-lightFlag dark:bg-black dark:shadow-darkFlag',
{ hidden: hiddenMenu }
)}
>

View File

@ -10,6 +10,7 @@ export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
return (
<>
<Image
quality={100}
width={35}
height={35}
src={`/images/svg/languages/${language}.svg`}

View File

@ -0,0 +1 @@
export * from './Language'