From 27fa7625cf749c4993f687f75fe5bc0aed22d9bd Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:27:00 -0500 Subject: [PATCH] add option to make button block/inline (#10197) --- .../angular/input-password/input-password.component.html | 2 +- .../angular/input-password/input-password.component.ts | 1 + .../src/angular/input-password/input-password.stories.ts | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/auth/src/angular/input-password/input-password.component.html b/libs/auth/src/angular/input-password/input-password.component.html index 54c832fbd64..114d9b8fb8d 100644 --- a/libs/auth/src/angular/input-password/input-password.component.html +++ b/libs/auth/src/angular/input-password/input-password.component.html @@ -70,7 +70,7 @@ bitButton bitFormButton buttonType="primary" - [block]="true" + [block]="btnBlock" [loading]="loading" > {{ buttonText || ("setMasterPassword" | i18n) }} diff --git a/libs/auth/src/angular/input-password/input-password.component.ts b/libs/auth/src/angular/input-password/input-password.component.ts index 23282bd2894..0aecb6e3783 100644 --- a/libs/auth/src/angular/input-password/input-password.component.ts +++ b/libs/auth/src/angular/input-password/input-password.component.ts @@ -56,6 +56,7 @@ export class InputPasswordComponent { @Input() buttonText: string; @Input() masterPasswordPolicyOptions: MasterPasswordPolicyOptions | null = null; @Input() loading: boolean = false; + @Input() btnBlock: boolean = true; private minHintLength = 0; protected maxHintLength = 50; diff --git a/libs/auth/src/angular/input-password/input-password.stories.ts b/libs/auth/src/angular/input-password/input-password.stories.ts index feccd8ccba5..1d7459cd009 100644 --- a/libs/auth/src/angular/input-password/input-password.stories.ts +++ b/libs/auth/src/angular/input-password/input-password.stories.ts @@ -113,3 +113,12 @@ export const WithPolicy: Story = { `, }), }; + +export const InlineButton: Story = { + render: (args) => ({ + props: args, + template: ` + + `, + }), +};