chore: language button

This commit is contained in:
ascarbek 2023-03-27 19:09:51 +06:00
parent f86254c8ef
commit 09445411a3
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,15 @@
import { EarthSvg } from '$app/components/_shared/svg/EarthSvg';
import { useState } from 'react';
import { LanguageSelectPopup } from '$app/components/_shared/LanguageSelectPopup';
export const LanguageButton = () => {
const [showPopup, setShowPopup] = useState(false);
return (
<>
<button onClick={() => setShowPopup(!showPopup)} className={'h-5 w-5'}>
<EarthSvg></EarthSvg>
</button>
{showPopup && <LanguageSelectPopup onClose={() => setShowPopup(false)}></LanguageSelectPopup>}
</>
);
};

View File

@ -2,6 +2,7 @@ import { Button } from '../../_shared/Button';
import { Details2Svg } from '../../_shared/svg/Details2Svg';
import { usePageOptions } from './PageOptions.hooks';
import { OptionsPopup } from './OptionsPopup';
import { LanguageButton } from '$app/components/layout/HeaderPanel/LanguageButton';
export const PageOptions = () => {
const { showOptionsPopup, onOptionsClick, onClose, onSignOutClick } = usePageOptions();
@ -13,7 +14,9 @@ export const PageOptions = () => {
Share
</Button>
<button id='option-button' className={'relative h-8 w-8'} onClick={onOptionsClick} >
<LanguageButton></LanguageButton>
<button id='option-button' className={'relative h-8 w-8'} onClick={onOptionsClick}>
<Details2Svg></Details2Svg>
</button>
</div>