feat(ui): make style preset menu trigger look like button

This commit is contained in:
psychedelicious 2024-08-15 14:52:24 +10:00 committed by Mary Hipp Rogers
parent bcbf8b6bd8
commit bd07c86db9

View File

@ -1,3 +1,4 @@
import type { SystemStyleObject } from '@invoke-ai/ui-library';
import { Flex, IconButton } from '@invoke-ai/ui-library'; import { Flex, IconButton } from '@invoke-ai/ui-library';
import { useStore } from '@nanostores/react'; import { useStore } from '@nanostores/react';
import { $isMenuOpen } from 'features/stylePresets/store/isMenuOpen'; import { $isMenuOpen } from 'features/stylePresets/store/isMenuOpen';
@ -7,6 +8,10 @@ import { PiCaretDownBold } from 'react-icons/pi';
import { ActiveStylePreset } from './ActiveStylePreset'; import { ActiveStylePreset } from './ActiveStylePreset';
const _hover: SystemStyleObject = {
bg: 'base.750',
};
export const StylePresetMenuTrigger = () => { export const StylePresetMenuTrigger = () => {
const isMenuOpen = useStore($isMenuOpen); const isMenuOpen = useStore($isMenuOpen);
const { t } = useTranslation(); const { t } = useTranslation();
@ -26,6 +31,9 @@ export const StylePresetMenuTrigger = () => {
borderRadius="base" borderRadius="base"
gap={1} gap={1}
role="button" role="button"
_hover={_hover}
transitionProperty="background-color"
transitionDuration="normal"
> >
<ActiveStylePreset /> <ActiveStylePreset />