From 87140b8174bd88b89bb095ff8fe03e3d52b8ab62 Mon Sep 17 00:00:00 2001 From: Deniz Saganak Date: Wed, 22 Nov 2023 14:15:17 +0100 Subject: [PATCH] feart(ui-library): add a wrapper div --- .../buttons/text-button/index.stories.ts | 2 +- .../actions/buttons/text-button/index.ts | 54 ++++++++++--------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/packages/ui-library/src/components/actions/buttons/text-button/index.stories.ts b/packages/ui-library/src/components/actions/buttons/text-button/index.stories.ts index aa1d5ccdf..506cfb774 100644 --- a/packages/ui-library/src/components/actions/buttons/text-button/index.stories.ts +++ b/packages/ui-library/src/components/actions/buttons/text-button/index.stories.ts @@ -47,7 +47,7 @@ const args: BlrTextButtonType = { theme: 'Light', variant: 'cta', size: 'md', - buttonDisplay: 'inline', + buttonDisplay: 'block', label: 'Button', hasIcon: true, iconPosition: 'leading', diff --git a/packages/ui-library/src/components/actions/buttons/text-button/index.ts b/packages/ui-library/src/components/actions/buttons/text-button/index.ts index 6f672dfe4..be8fc7b64 100644 --- a/packages/ui-library/src/components/actions/buttons/text-button/index.ts +++ b/packages/ui-library/src/components/actions/buttons/text-button/index.ts @@ -100,7 +100,11 @@ export class BlrTextButton extends LitElement { })} ` : nothing} - ${this.label} + ${this.label}
+ button
+ button +
${this.hasIcon && this.iconPosition === 'trailing' ? html`
${BlrIconRenderFunction({ @@ -115,29 +119,31 @@ export class BlrTextButton extends LitElement { return html` - - ${this.focused ? html`` : nothing} - ${this.loading - ? html` - ${BlrLoaderRenderFunction({ - size: loaderSizeVariant, - variant: loaderVariant, - loadingStatus: this.loadingStatus, - theme: this.theme, - })} - ${labelAndIconGroup} - ` - : labelAndIconGroup} - `; +
+ + ${this.focused ? html`` : nothing} + ${this.loading + ? html` + ${BlrLoaderRenderFunction({ + size: loaderSizeVariant, + variant: loaderVariant, + loadingStatus: this.loadingStatus, + theme: this.theme, + })} + ${labelAndIconGroup} + ` + : labelAndIconGroup} + +
`; } } }