Skip to content

Commit

Permalink
fix(action): ensure consistent width to accommodate indicator when di…
Browse files Browse the repository at this point in the history
…splaying text (#6562)

**Related Issue:** #5375 

## Summary

Updates layout to include space for indicator when `text-enabled` is
set.
  • Loading branch information
jcfranco committed Mar 6, 2023
1 parent e477029 commit 2b0d704
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/action/action.scss
Expand Up @@ -70,6 +70,7 @@

.text-container--visible {
@apply w-auto flex-auto opacity-100;
margin-inline-end: theme("spacing.4");
}
}

Expand Down Expand Up @@ -213,9 +214,6 @@
&::after {
inset-block-end: auto;
}
.text-container--visible {
margin-inline-end: theme("spacing.4");
}
}
.button:hover::after,
.button:focus::after {
Expand Down
4 changes: 4 additions & 0 deletions src/components/action/action.stories.ts
Expand Up @@ -198,6 +198,10 @@ export const alignmentStartAndLargeScaleAndTextOverflow_TestOnly = (): string =>
)}
</div>`;

export const indicatorTextEnabled_TestOnly = (): string => html`
<calcite-action indicator active text="click-me" text-enabled icon="gear"></calcite-action>
`;

export const arabicLocale_TestOnly = (): string => html`
<calcite-action
dir="rtl"
Expand Down

0 comments on commit 2b0d704

Please sign in to comment.