fix: only phrasing content is allowed inside buttons meaning no div or p elements, these are now replaced by span

This commit is contained in:
Christian Andolf
2024-10-25 15:44:30 +02:00
parent 0036fa1a68
commit 69ed852fc4
12 changed files with 56 additions and 43 deletions

View File

@@ -68,7 +68,7 @@ export default function MobileMenu({
})}
onClick={() => toggleDropdown(DropdownTypeEnum.HamburgerMenu)}
>
<span className={styles.bar}></span>
<span className={styles.bar} />
</button>
<Modal className={styles.modal} isOpen={isHamburgerMenuOpen}>
<Dialog

View File

@@ -47,8 +47,10 @@ export default function MyPagesMenu({
onClick={() => toggleDropdown(DropdownTypeEnum.MyPagesMenu)}
>
<Avatar initials={getInitials(user.firstName, user.lastName)} />
<Subtitle type="two">
{intl.formatMessage({ id: "Hi" })} {user.firstName}!
<Subtitle type="two" asChild>
<span>
{intl.formatMessage({ id: "Hi" })} {user.firstName}!
</span>
</Subtitle>
<ChevronDownIcon
className={`${styles.chevron} ${isMyPagesMenuOpen ? styles.isExpanded : ""}`}

View File

@@ -42,8 +42,8 @@ export default function MegaMenu({
onClick={() => toggleMegaMenu(false)}
>
<ChevronLeftIcon color="red" />
<Subtitle type="one" color="burgundy">
{title}
<Subtitle type="one" color="burgundy" asChild>
<span>{title}</span>
</Subtitle>
</button>
</div>