diff --git a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component.html b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component.html index dcd0496ed30..7a1815b86ed 100644 --- a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component.html +++ b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component.html @@ -1,31 +1,21 @@ - -
- -
- - - - - -
- +
+ + @if (showAcctSwitcher && hasLoggedInAccount) { + + } +
diff --git a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts index 7a30e15582c..57ef285bdf5 100644 --- a/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts +++ b/apps/browser/src/popup/components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts @@ -238,6 +238,11 @@ export const DefaultContentExample: Story = { }, ], }), + parameters: { + chromatic: { + viewports: [380, 1280], + }, + }, }; // Dynamic Content Example diff --git a/libs/components/src/anon-layout/anon-layout-wrapper.component.html b/libs/components/src/anon-layout/anon-layout-wrapper.component.html index 73a3d34261b..1079329448b 100644 --- a/libs/components/src/anon-layout/anon-layout-wrapper.component.html +++ b/libs/components/src/anon-layout/anon-layout-wrapper.component.html @@ -7,6 +7,7 @@ [hideCardWrapper]="hideCardWrapper" [hideBackgroundIllustration]="hideBackgroundIllustration" > + diff --git a/libs/components/src/anon-layout/anon-layout-wrapper.stories.ts b/libs/components/src/anon-layout/anon-layout-wrapper.stories.ts index 76fcc8976c7..63181e04649 100644 --- a/libs/components/src/anon-layout/anon-layout-wrapper.stories.ts +++ b/libs/components/src/anon-layout/anon-layout-wrapper.stories.ts @@ -130,6 +130,15 @@ export class DefaultSecondaryOutletExampleComponent {} }) export class DefaultEnvSelectorOutletExampleComponent {} +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection +@Component({ + selector: "bit-header-actions-outlet-example-component", + template: "

Header Actions Outlet Example:
your header actions component goes here

", + standalone: false, +}) +export class DefaultHeaderActionsOutletExampleComponent {} + export const DefaultContentExample: Story = { render: (args) => ({ props: args, @@ -171,6 +180,11 @@ export const DefaultContentExample: Story = { component: DefaultEnvSelectorOutletExampleComponent, outlet: "environment-selector", }, + { + path: "", + component: DefaultHeaderActionsOutletExampleComponent, + outlet: "header-actions", + }, ], }, ], diff --git a/libs/components/src/anon-layout/anon-layout.component.html b/libs/components/src/anon-layout/anon-layout.component.html index 15f7d107542..edb73bbf588 100644 --- a/libs/components/src/anon-layout/anon-layout.component.html +++ b/libs/components/src/anon-layout/anon-layout.component.html @@ -5,13 +5,19 @@ 'tw-min-h-full': clientType === 'browser' || clientType === 'desktop', }" > - - - +
+ @if (!hideLogo()) { + + + + } +
+ +
+
@let iconInput = icon(); @@ -25,7 +31,7 @@
- + @if (title()) {

{{ title() }} @@ -34,9 +40,11 @@

{{ title() }}

-
+ } -
{{ subtitle() }}
+ @if (subtitle()) { +
{{ subtitle() }}
+ }
- + @if (!hideFooter()) { + + } @if (!hideBackgroundIllustration()) {
+ @if (includeHeaderActions) { +
+ +
+ }
Thin Content
@@ -116,7 +126,7 @@ export default { hideLogo: { control: "boolean" }, hideFooter: { control: "boolean" }, hideBackgroundIllustration: { control: "boolean" }, - + includeHeaderActions: { control: "boolean" }, contentLength: { control: "radio", options: ["normal", "long", "thin"], @@ -138,6 +148,7 @@ export default { hideBackgroundIllustration: false, contentLength: "normal", showSecondary: false, + includeHeaderActions: false, }, } satisfies Meta; @@ -188,6 +199,12 @@ export const SecondaryContent: Story = { }, }; +export const WithHeaderActions: Story = { + args: { + includeHeaderActions: true, + }, +}; + export const NoTitle: Story = { args: { title: undefined } }; export const NoSubtitle: Story = { args: { subtitle: undefined } };