diff --git a/packages/ui/dropdown/src/dropdown.types.ts b/packages/ui/dropdown/src/dropdown.types.ts index 22e7ac561..be423d5e1 100644 --- a/packages/ui/dropdown/src/dropdown.types.ts +++ b/packages/ui/dropdown/src/dropdown.types.ts @@ -143,6 +143,9 @@ interface DropdownProps "className" >, SuiStyleType { + /** + * The type of dropdown. + */ type?: "" | "default" | "select" | "select-checkbox" | "select-variable" /** * The label for the dropdown. diff --git a/packages/ui/dropdown/stories/tabs/TabCode.mdx b/packages/ui/dropdown/stories/tabs/TabCode.mdx index a00f1b679..26d6ba47b 100644 --- a/packages/ui/dropdown/stories/tabs/TabCode.mdx +++ b/packages/ui/dropdown/stories/tabs/TabCode.mdx @@ -4,7 +4,6 @@ import { buttonCode } from "@wpmudev/sui-tooltip/stories/tabs/Examples/Types.mdx
-

The dropdown label

@@ -46,7 +45,7 @@ import { buttonCode } from "@wpmudev/sui-tooltip/stories/tabs/Examples/Types.mdx

Indicates the color of the button, check Button component for allowed values

- +

Custom classNames(s) for further styling

@@ -68,6 +67,63 @@ import { buttonCode } from "@wpmudev/sui-tooltip/stories/tabs/Examples/Types.mdx
+ +

Represents the type of the Dropdown

+

+ Allowed values + + + + + + +

+
+ + +

whther to hide the label of the button or not

+
+ + +

When set to true the Dropdown will have a full width

+
+ + +

Set this to true if you want the Dropdown to be closed onClick

+
+ + +

Detects when the Dropdown is toggled, the first parameter represents the state

+
+ + +

Whether to dsiplay the search field or not

+
+ + +

Whether to dsiplay the search field or not

+
+ + +

Whether the options are asynchronous or not

+
+ + +

This prop represnt the settings of the async Dropdown, it has two properties: perPage, and totlaItems, both are numbers

+
+ + +

The function used to fetch the options

+
+ + +

Width for the menu in pixels

+
+ + +

Placeholder text for the search field

+
+

The menu items to be rendered, each item is an object that could be either a Menu Group or a Menu Item.

@@ -178,9 +234,7 @@ import { buttonCode } from "@wpmudev/sui-tooltip/stories/tabs/Examples/Types.mdx } />
- - \ No newline at end of file