diff --git a/.changeset/unlucky-carrots-shop.md b/.changeset/unlucky-carrots-shop.md new file mode 100644 index 000000000..31e08c690 --- /dev/null +++ b/.changeset/unlucky-carrots-shop.md @@ -0,0 +1,9 @@ +--- +"@localyze-pluto/components": minor +--- + +[Select] Add width properties so it's easier to set width for the SelectPopover: + +- `sameWidth` to make the popover the same width as the select +- `popoverMaxWidth` to set a max width for the popover +- `popoverWidth` to set a fixed width for the popover diff --git a/packages/components/src/components/Select/Select.stories.tsx b/packages/components/src/components/Select/Select.stories.tsx index addae92b7..87f99d45e 100644 --- a/packages/components/src/components/Select/Select.stories.tsx +++ b/packages/components/src/components/Select/Select.stories.tsx @@ -65,6 +65,61 @@ export const Default = (): JSX.Element => { ); }; +export const SameWidth = (): JSX.Element => { + const selectID = useUID(); + const helpTextID = useUID(); + return ( + + + + Please choose one of the values. + + ); +}; + +export const WithMaxWidth = (): JSX.Element => { + const selectID = useUID(); + const helpTextID = useUID(); + return ( + + +