mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: language button
This commit is contained in:
parent
f86254c8ef
commit
09445411a3
@ -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>}
|
||||
</>
|
||||
);
|
||||
};
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user