Style, behavior improvements

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-16 15:39:12 +02:00
parent bc1853f4d8
commit ba3e8d6740
2 changed files with 7 additions and 2 deletions

View file

@ -279,7 +279,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
<div
className={clsx('fixed inset-0 z-[1000] bg-gray-500 black:bg-gray-900 no-reduce-motion:transition-opacity dark:bg-gray-700', {
'opacity-0': !(isOpen && isDisplayed),
'opacity-40': (isOpen && isDisplayed),
'opacity-60': (isOpen && isDisplayed),
})}
role='button'
onClick={handleClose}
@ -306,7 +306,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
/>
))}
{touching && (
<li className='p-2'>
<li className='p-2 px-3'>
<button
className='flex w-full appearance-none place-content-center items-center justify-center rounded-full border border-gray-700 bg-transparent p-2 text-sm font-medium text-gray-700 transition-all hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:border-gray-500 dark:text-gray-500'
onClick={onClose}

View file

@ -105,16 +105,21 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
const handleSwitchAccount = (account: AccountEntity): React.MouseEventHandler => (e) => {
e.preventDefault();
e.stopPropagation();
dispatch(switchAccount(account.id));
};
const onClickLogOut: React.MouseEventHandler = (e) => {
e.preventDefault();
e.stopPropagation();
dispatch(logOut());
};
const handleSwitcherClick: React.MouseEventHandler = (e) => {
e.preventDefault();
e.stopPropagation();
setSwitcher((prevState) => (!prevState));
};