style(menu): set landing tile bg to bg-secondary for consistency with mod tiles

This commit is contained in:
dragonwocky 2023-01-31 22:26:24 +11:00
parent 5640b12139
commit 0daf0a38c2
Signed by: dragonwocky
GPG Key ID: 7998D08F7D7BD7A8
2 changed files with 4 additions and 5 deletions
src
api
core/menu/components

View File

@ -547,7 +547,7 @@ const h = (type, props, ...children) => {
for (const prop in props ?? {}) {
if (typeof props[prop] === "undefined") continue;
if (htmlAttributes.includes(prop) || prop.startsWith("data-")) {
if (typeof props[prop] === "boolean" && !prop.startsWith("data-")) {
if (typeof props[prop] === "boolean") {
if (!props[prop]) continue;
elem.setAttribute(prop, "");
} else elem.setAttribute(prop, props[prop]);

View File

@ -9,10 +9,9 @@ import { extendProps } from "../state.mjs";
function Tile({ icon, title, tagName, ...props }, ...children) {
const { html } = globalThis.__enhancerApi;
extendProps(props, {
class: `px-[16px] py-[12px]
flex items-center gap-[12px] rounded-[4px]
border-(& [color:var(--theme--fg-border)])
hover:bg-[color:var(--theme--bg-hover)]`,
class: `flex items-center gap-[12px] px-[16px] py-[12px]
bg-[color:var(--theme--bg-secondary)] hover:bg-[color:var(--theme--bg-hover)]
rounded-[4px] border-(& [color:var(--theme--fg-border)])`,
});
tagName ??= props["href"] ? "a" : "button";
return html`<${tagName} ...${props}>