Skip to content

Commit

Permalink
docs: dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Oct 9, 2023
1 parent 5fe1ca4 commit 9de20ee
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions apps/docs/content/_components/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@

#tab-1

The `SfDropdown` component is built on top of `useDropdown` and accepts all its params.

The `SfDropdown` component is built on top of `useDropdown` and accepts all its params.

::react-only
Learn more about `useDropdown` hook in the [Hooks > useDropdown docs](/react/hooks/usedropdown).
::
::vue-only
Learn more about `useDropdown` composable in the [Composables > useDropdown docs](/vue/hooks/usedropdown).
::

::qwik-only
Learn more about `useDropdown` hook in the [Hooks > useDropdown docs](/react/hooks/usedropdown).
::

## Examples

Expand All @@ -32,6 +33,9 @@ By default, the floating content of `SfDropdown` will be placed below your trigg

<<<../../../preview/next/pages/showcases/Dropdown/BasicDropdown.tsx

::
::qwik-only
<<<../../../website/src/routes/showcases/Dropdown/BasicDropdown/index.tsx
::

</Showcase>
Expand All @@ -48,7 +52,6 @@ The floating content area has an `aria-hidden` attribute that reflects the visib

## Props


::react-only
| Prop name | Type | Default value | Possible values |
| --------- | ---- | ------------- | --------------- |
Expand All @@ -70,6 +73,17 @@ The floating content area has an `aria-hidden` attribute that reflects the visib
| `strategy` | `SfPopoverStrategy` | `'absolute'` | Positioning strategy (`absolute` or `fixed`) |
::

::qwik-only
| Prop name | Type | Default value | Possible values |
| --------- | ---- | ------------- | --------------- |
| `open` | `boolean` | | |
| `onClose`\* | `() => void` | | |
| `trigger`\* | `ReactNode` | | |
| `children` | `ReactNode` | | |
| `placement` | `SfPopoverPlacement` | `'bottom'` | Placement of floating element |
| `middleware` | `UseFloatingProps['middleware']` | | Array of `@floating-ui` middlewares |
| `strategy` | `SfPopoverStrategy` | `'absolute'` | Positioning strategy (`absolute` or `fixed`) |
::

::vue-only

Expand Down Expand Up @@ -99,6 +113,9 @@ The floating content area has an `aria-hidden` attribute that reflects the visib

<<< ../../../../packages/sfui/frameworks/react/components/SfDropdown/SfDropdown.tsx

::
::qwik-only
<<<../../../../dist/packages/qwik-storefront-ui/components/SfDropdown/index.tsx
::

::

0 comments on commit 9de20ee

Please sign in to comment.