Skip to content

Commit

Permalink
Add dropdown-menu-subcontent
Browse files Browse the repository at this point in the history
  • Loading branch information
p-malecki committed Nov 18, 2024
1 parent b93c0dd commit 3a9bad2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function DeviceSettingsDropdown({ children, disabled }: DeviceSettingsDropdownPr
</DropdownMenu.SubTrigger>
<DropdownMenu.Portal>
<DropdownMenu.SubContent
className="dropdown-menu-content"
className="dropdown-menu-subcontent"
sideOffset={2}
alignOffset={-5}>
{resetOptions.map((option, index) => (
Expand Down Expand Up @@ -225,7 +225,7 @@ const BiometricsItem = () => {
</DropdownMenu.SubTrigger>

<DropdownMenu.Portal>
<DropdownMenu.SubContent className="dropdown-menu-content">
<DropdownMenu.SubContent className="dropdown-menu-subcontent">
<DropdownMenu.Item
className="dropdown-menu-item"
onSelect={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ button {
all: unset;
}

.dropdown-menu-content {
.dropdown-menu-content,
.dropdown-menu-subcontent {
min-width: 220px;
background-color: var(--swm-popover-background);
border-radius: 6px;
Expand All @@ -17,10 +18,17 @@ button {
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.dropdown-menu-content[data-side="bottom"] {
.dropdown-menu-subcontent {
max-height: calc(var(--radix-dropdown-menu-content-available-height));
}

.dropdown-menu-content[data-side="bottom"],
.dropdown-menu-subcontent[data-side="bottom"] {
animation-name: slideUpAndFade;
}
.dropdown-menu-content[data-side="top"] {

.dropdown-menu-content[data-side="top"],
.dropdown-menu-subcontent[data-side="top"] {
animation-name: slideDownAndFade;
}

Expand Down

0 comments on commit 3a9bad2

Please sign in to comment.