Skip to content

Commit

Permalink
📖 Add dropdown story with forced direction
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Nov 18, 2023
1 parent 0aa38a1 commit 8c04c68
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/docs/stories/Dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,27 @@
position: absolute;
right: 70px;
}

.out-of-bounds-example.no-direction-change.uktdropdown {
position: relative;
margin-top: 220px;
}

.out-of-bounds-example.no-direction-change .uktdropdown-trigger {
width: 255px;
}

.out-of-bounds-example.no-direction-change.uktdropdown .uktdropdown-body {
top: 100%;
}

#anchor--uikit-controls-dropdown--out-of-bounds-with-no-direction-change
.innerZoomElementWrapper
> * {
overflow: auto;
height: 200px;
}

#anchor--uikit-controls-dropdown--out-of-bounds-with-no-direction-change .sb-story {
height: 230px;
}
16 changes: 16 additions & 0 deletions packages/docs/stories/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,19 @@ export const OutOfBoundsAtRight: Story = {
placeholder: 'Show above & to the left',
},
};

export const OutOfBoundsWithNoDirectionChange: Story = {
args: {
children: (
<ul>
<li>Antarctica</li>
<li>Arctic Circle</li>
<li>North Pole</li>
</ul>
),
className: 'out-of-bounds-example no-direction-change',
isSearchable: true,
name: 'outofboundsatbottomnodirectionchange',
placeholder: 'Show below even though it goes out of bounds',
},
};

0 comments on commit 8c04c68

Please sign in to comment.