mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[CL-444] Use Canvas story wrapper properly (#13375)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
|
||||
import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
|
||||
|
||||
import * as stories from "./popover.stories";
|
||||
|
||||
@@ -66,7 +66,7 @@ not work because there is not enough space to open the Popover to the right. The
|
||||
|
||||
The first position that "fits" is `left-start`, and therefore that is where the Popover will open.
|
||||
|
||||
<Story of={stories.LeftStart} />
|
||||
<Canvas of={stories.LeftStart} />
|
||||
|
||||
### Manually Setting a Position
|
||||
|
||||
@@ -77,7 +77,7 @@ Popover's trigger element, such as:
|
||||
<button [bitPopoverTriggerFor]="myPopover" [position]="'above-end'">Open Popover</button>
|
||||
```
|
||||
|
||||
<Story of={stories.AboveEnd} />
|
||||
<Canvas of={stories.AboveEnd} />
|
||||
|
||||
Note that if the user resizes the page and the Popover no longer fits in the viewport, the Popover
|
||||
component will fall back to the list of default positions to find the best position.
|
||||
|
||||
Reference in New Issue
Block a user