From d1aa74829d564af9402112234c0c71b226ac7147 Mon Sep 17 00:00:00 2001 From: Ana Paula Vale Date: Fri, 27 Sep 2024 15:08:04 +0100 Subject: [PATCH] fix: set sameWidth from Select as default true (#1744) --- .changeset/four-games-nail.md | 5 +++++ packages/components/src/components/Select/Select.stories.tsx | 5 +++-- packages/components/src/components/Select/Select.tsx | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changeset/four-games-nail.md diff --git a/.changeset/four-games-nail.md b/.changeset/four-games-nail.md new file mode 100644 index 000000000..8eed667d8 --- /dev/null +++ b/.changeset/four-games-nail.md @@ -0,0 +1,5 @@ +--- +"@localyze-pluto/components": minor +--- + +[Select]: Fix: set sameWidth prop as default as we used before diff --git a/packages/components/src/components/Select/Select.stories.tsx b/packages/components/src/components/Select/Select.stories.tsx index 87f99d45e..a9ff4215d 100644 --- a/packages/components/src/components/Select/Select.stories.tsx +++ b/packages/components/src/components/Select/Select.stories.tsx @@ -65,7 +65,7 @@ export const Default = (): JSX.Element => { ); }; -export const SameWidth = (): JSX.Element => { +export const SameWidthAsFalse = (): JSX.Element => { const selectID = useUID(); const helpTextID = useUID(); return ( @@ -76,7 +76,8 @@ export const SameWidth = (): JSX.Element => { id={selectID} items={selectItems} name="select" - sameWidth + popoverWidth="150px" + sameWidth={false} /> Please choose one of the values. diff --git a/packages/components/src/components/Select/Select.tsx b/packages/components/src/components/Select/Select.tsx index f1b6908b2..2d9b40f3b 100644 --- a/packages/components/src/components/Select/Select.tsx +++ b/packages/components/src/components/Select/Select.tsx @@ -146,7 +146,7 @@ const Select = React.forwardRef( setValue, size = "small", value, - sameWidth, + sameWidth = true, popoverWidth, popoverMaxWidth, ...props