Skip to content

Commit

Permalink
style(dropdown): fix popper width
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudmanson committed Sep 22, 2023
1 parent e8b456d commit 0dad97c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/components/src/core/Dropdown/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const Dropdown = (props: Args): JSX.Element => {
onChange={noop}
options={GITHUB_LABELS}
DropdownMenuProps={{
PopperBaseProps: {
sx: { width: "300px" },
},
groupBy: (option: DefaultDropdownMenuOption) =>
option.section as string,
}}
Expand Down Expand Up @@ -150,7 +153,7 @@ export const InsideModal = {
skip: true,
},
},
render: function InsideModalComponent(): JSX.Element {
render: function InsideModalComponent(props: Args): JSX.Element {
const [value, setValue] = useState<
DefaultDropdownMenuOption | DefaultDropdownMenuOption[] | null
>([GITHUB_LABELS[0], GITHUB_LABELS[1]]);
Expand All @@ -168,6 +171,7 @@ export const InsideModal = {
value={value}
multiple
InputDropdownProps={{ sdsStyle: "square" }}
{...props}
/>
</Dialog>
);
Expand Down Expand Up @@ -206,6 +210,9 @@ const ControlledDropdownDemo = (props: Args): JSX.Element => {
onChange={handleChange}
data-testid="dropdown"
DropdownMenuProps={{
PopperBaseProps: {
sx: { width: "300px" },
},
groupBy: (option: DefaultDropdownMenuOption) =>
option.section as string,
title: "Github Labels",
Expand Down Expand Up @@ -244,6 +251,11 @@ const TestDemo = (props: Args): JSX.Element => {
label="Click Target"
onChange={noop}
options={GITHUB_LABELS}
DropdownMenuProps={{
PopperBaseProps: {
sx: { width: "300px" },
},
}}
{...props}
data-testid="dropdown"
/>
Expand Down

0 comments on commit 0dad97c

Please sign in to comment.