diff --git a/.storybook/stories/button/button-group.stories.ts b/.storybook/stories/button/button-group.stories.ts index 29facc7c4d..5f8498e3bb 100644 --- a/.storybook/stories/button/button-group.stories.ts +++ b/.storybook/stories/button/button-group.stories.ts @@ -4,7 +4,13 @@ * The full license information can be found in LICENSE in the root directory of this project. */ -import { CLR_MENU_POSITIONS, ClrButtonGroup, ClrButtonGroupModule, commonStringsDefault } from '@clr/angular'; +import { + CLR_MENU_POSITIONS, + ClrButtonGroup, + ClrButtonGroupModule, + ClrLoadingModule, + commonStringsDefault, +} from '@clr/angular'; import { moduleMetadata, StoryFn, StoryObj } from '@storybook/angular'; import { CommonModules } from 'helpers/common'; @@ -12,13 +18,14 @@ export default { title: 'Button/Button Group', decorators: [ moduleMetadata({ - imports: [...CommonModules, ClrButtonGroupModule], + imports: [...CommonModules, ClrButtonGroupModule, ClrLoadingModule], }), ], component: ClrButtonGroup, argTypes: { // inputs clrMenuPosition: { defaultValue: 'bottom-left', control: { type: 'radio', options: CLR_MENU_POSITIONS } }, + loading: { defaultValue: false, control: { type: 'boolean' } }, clrToggleButtonAriaLabel: { defaultValue: commonStringsDefault.rowActions }, // methods getMoveIndex: { control: { disable: true }, table: { disable: true } }, @@ -49,8 +56,10 @@ const ButtonGroupTemplate: StoryFn = args => ({ + {{content}} {{i + 1}} ({ [disabled]="disabled" (click)="click($event)" > + {{content}} `, @@ -81,10 +83,16 @@ const ButtonAllTemplate: Story = args => ({
Primary Buttons
- +
Old Outline Buttons
- +
New Outline Buttons
@@ -109,7 +117,11 @@ const ButtonAllTemplate: Story = args => ({
Small Outline Buttons
- + @@ -124,7 +136,11 @@ const ButtonAllTemplate: Story = args => ({
New Outline Links
- {{type}} + + + {{type}} + +
Flat Links
Default @@ -164,6 +180,7 @@ const ButtonLinkTemplate: StoryFn = args => ({ [disabled]="disabled" (click)="click($event)" > + {{content}} `, diff --git a/.storybook/stories/button/buttons-loading.stories.ts b/.storybook/stories/button/buttons-loading.stories.ts index acdb71ddf1..cfc6d50eaf 100644 --- a/.storybook/stories/button/buttons-loading.stories.ts +++ b/.storybook/stories/button/buttons-loading.stories.ts @@ -36,9 +36,9 @@ export default { const ButtonLoadingStatesTemplate: StoryFn = args => ({ template: `
{{stateName}}
- + - + `, props: args, }); diff --git a/projects/angular/src/button/_buttons.clarity.scss b/projects/angular/src/button/_buttons.clarity.scss index 7c3ce90352..37552a9e50 100644 --- a/projects/angular/src/button/_buttons.clarity.scss +++ b/projects/angular/src/button/_buttons.clarity.scss @@ -255,6 +255,12 @@ height: buttons-variables.$clr-btn-appearance-form-height; padding: buttons-variables.$clr-btn-appearance-form-padding; + + .clr-loading-btn-content { + display: flex; + gap: tokens.$cds-global-space-5; + align-items: center; + } } //Clarity Buttons diff --git a/projects/angular/src/button/button-loading/loading-button.ts b/projects/angular/src/button/button-loading/loading-button.ts index 1f3ec0ee89..d883d6e83e 100644 --- a/projects/angular/src/button/button-loading/loading-button.ts +++ b/projects/angular/src/button/button-loading/loading-button.ts @@ -17,17 +17,17 @@ const MIN_BUTTON_WIDTH = 42; selector: 'button[clrLoading]', template: ` - + - - + + - - + + diff --git a/projects/demo/src/app/buttons/button-loading.html b/projects/demo/src/app/buttons/button-loading.html index 0e40218fdf..62af339ca5 100644 --- a/projects/demo/src/app/buttons/button-loading.html +++ b/projects/demo/src/app/buttons/button-loading.html @@ -16,6 +16,7 @@

Loading Buttons with Disabled Input

class="btn btn-primary" (click)="disabledDemo()" > + Disable After Success

Small Loading Buttons

- +