Fixed button inside of button

This commit is contained in:
Lucas Oliveira 2024-06-07 08:17:26 -03:00
commit 57b7fc3203
2 changed files with 9 additions and 10 deletions

View file

@ -81,14 +81,16 @@ export default function Header(): JSX.Element {
<span className="ml-4 text-2xl">⛓️</span> <span className="ml-4 text-2xl">⛓️</span>
</Link> </Link>
{showArrowReturnIcon && ( {showArrowReturnIcon && (
<button <Button
variant="none"
size="none"
onClick={() => { onClick={() => {
checkForChanges(); checkForChanges();
redirectToLastLocation(); redirectToLastLocation();
}} }}
> >
<IconComponent name="ChevronLeft" className="w-4" /> <IconComponent name="ChevronLeft" className="w-4" />
</button> </Button>
)} )}
<MenuBar /> <MenuBar />
@ -186,7 +188,9 @@ export default function Header(): JSX.Element {
<Separator orientation="vertical" /> <Separator orientation="vertical" />
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<button <Button
variant="none"
size="none"
data-testid="user-profile-settings" data-testid="user-profile-settings"
className={ className={
"h-7 w-7 rounded-full focus-visible:outline-0 " + "h-7 w-7 rounded-full focus-visible:outline-0 " +

View file

@ -33,19 +33,14 @@ const HeaderComponent = ({
<> <>
<div className="flex w-full items-center justify-between gap-4"> <div className="flex w-full items-center justify-between gap-4">
<div className="flex items-center justify-self-start"> <div className="flex items-center justify-self-start">
<Button <a onClick={handleClick} className="cursor-pointer text-sm">
variant="none"
size="none"
onClick={handleClick}
className="text-sm"
>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox checked={!shouldSelectAll} id="terms" /> <Checkbox checked={!shouldSelectAll} id="terms" />
<span className="label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"> <span className="label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{shouldSelectAll ? "Select All" : "Unselect All"} {shouldSelectAll ? "Select All" : "Unselect All"}
</span> </span>
</div> </div>
</Button> </a>
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div> <div>