1
0
Fork 0

[react] fix: Background in menus

This commit is contained in:
joostdecock 2025-04-19 19:05:56 +02:00
parent d50be3718e
commit c6664cff19
2 changed files with 6 additions and 4 deletions

View file

@ -11,7 +11,7 @@ const getProps = (isActive = false) => ({
const getSubProps = (isActive) => ({
className: `tw:p-0 tw:rounded-none tw:bg-transparent tw:w-full tw:h-auto
tw:content-start tw:bg-secondary/20 tw:text-left tw:list-none`,
tw:content-start tw:text-left tw:list-none`,
})
const components = {

View file

@ -543,11 +543,13 @@ export const HeaderMenuViewMenu = (props) => {
<a
className={`tw:w-full tw:text-base-content
tw:flex tw:flex-row tw:items-center tw:gap-2 tw:md:gap-4 tw:p-2 tw:px-4
tw:hover:cursor-pointer tw:hover:text-base-content tw:hover:cursor-pointer
tw:hover:bg-secondary/20 ${viewName === state.view ? 'tw:bg-secondary/20' : ''}`}
tw:hover:cursor-pointer tw:hover:text-base-content tw:hover:cursor-pointer`}
onClick={() => update.view(viewName)}
>
<ViewIcon view={viewName} className="tw:w-6 tw:h-6 tw:grow-0 tw:text-base-content" />
<ViewIcon
view={viewName}
className={`tw:w-6 tw:h-6 tw:grow-0 ${viewName === state.view ? 'tw:text-secondary' : 'tw:text-base-content'}`}
/>
<span className="tw:text-left tw:grow tw:font-medium tw:text-base-content">
{viewLabels[viewName]?.t || viewName}
</span>