1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[CL-428] create drawer component (#12812)

* remove private/protected/lifecycle fields from Storybook docs table

* move theme override decorator into util method

* implement base drawer component

* update bit-layout to be drawer container

* create drawer helper components

* expose new APIs to DS barrel file

* write docs

* update docs; add role input

* use host directive instead of service

* clean up logic a tad

* add start slot to story

* update docs

* Apply suggestions from code review

Co-authored-by: Victoria League <vleague@bitwarden.com>

* update docs

* Update libs/components/src/drawer/drawer.mdx

Co-authored-by: Victoria League <vleague@bitwarden.com>

* update docs / stories

* add non text element to drawer

---------

Co-authored-by: Victoria League <vleague@bitwarden.com>
This commit is contained in:
Will Martin
2025-01-16 15:43:04 -05:00
committed by GitHub
parent 3917f50fdd
commit ea052b9e07
23 changed files with 634 additions and 55 deletions

View File

@@ -1,17 +0,0 @@
import { componentWrapperDecorator } from "@storybook/angular";
/**
* Render a story that uses `position: fixed`
* Used in layout and navigation components
**/
export const positionFixedWrapperDecorator = (wrapper?: (story: string) => string) =>
componentWrapperDecorator(
/**
* Applying a CSS transform makes a `position: fixed` element act like it is `position: relative`
* https://github.com/storybookjs/storybook/issues/8011#issue-490251969
*/
(story) =>
/* HTML */ `<div class="tw-scale-100 tw-h-screen tw-border-2 tw-border-solid tw-border-[red]">
${wrapper ? wrapper(story) : story}
</div>`,
);