mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
docs(popover): simplify external element example
This commit is contained in:
parent
0f8a57b9d2
commit
a3204cc131
2 changed files with 19 additions and 36 deletions
|
@ -36,12 +36,6 @@ Set `closeOnOutsideClick` to set `open` to `false` when clicking outside of the
|
|||
</Popover>
|
||||
</div>
|
||||
|
||||
## Manage open state with a Button
|
||||
|
||||
You can bind the `open` prop and manage the open state of the popover with an external button.
|
||||
|
||||
<FileSource src="/framed/Popover/WithButton" />
|
||||
|
||||
## Popover alignment
|
||||
|
||||
Customize the popover alignment using the `align` prop. Valid values include: `"top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top"`.
|
||||
|
@ -153,4 +147,10 @@ Possible `align` values include `"top"`, `"top-left"`, `"top-right"`, `"bottom"`
|
|||
<Popover highContrast open>
|
||||
<div style="padding: var(--cds-spacing-05)">Content</div>
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## External element
|
||||
|
||||
Use the `open` prop to manage state with an external element, like a button.
|
||||
|
||||
<FileSource src="/framed/Popover/WithButton" />
|
Loading…
Add table
Add a link
Reference in a new issue