Skip to content

Commit

Permalink
Fix position and width of select menu
Browse files Browse the repository at this point in the history
Add InsideSmallContainer variant to SelectV2
stories
  • Loading branch information
hervedombya committed Dec 5, 2023
1 parent 803435c commit eab0f28
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/components/selectv2/SelectStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ const SelectStyle = styled(Select)`
}
.sc-select__menu {
position: fixed;
width: ${({ width }) => width};
top: auto;
border: ${spacing.r1} solid
${({ isDefault }) =>
getThemePropSelector(isDefault ? 'border' : 'selectedActive')};
Expand Down
17 changes: 17 additions & 0 deletions stories/selectv2.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,20 @@ export const RoundedVariant = {
options: defaultOptions,
},
};

export const InsideSmallContainer = {
render: (args) => (
<div
style={{
display: 'flex',
height: '30vh',
alignItems: 'flex-end',
}}
>
<CustomSelect {...args}></CustomSelect>
</div>
),
args: {
options: optionsWithoutSearchBar,
},
};

0 comments on commit eab0f28

Please sign in to comment.