Skip to content

Commit

Permalink
feat(alert): apply --calcite-alert-corner-radius to internal close bu…
Browse files Browse the repository at this point in the history
…tton (#10388)

**Related Issue:**
[#7180](#7180)

## Summary
-Apply `calcite-alert-corner-radius` to internal close button.

-Make queue count's container background-color transparent.
  • Loading branch information
aPreciado88 authored Sep 25, 2024
1 parent d725293 commit f50c170
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
18 changes: 14 additions & 4 deletions packages/calcite-components/src/components/alert/alert.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,20 @@ describe("calcite-alert", () => {
shadowSelector: `.${CSS.container}`,
targetProp: "backgroundColor",
},
"--calcite-alert-corner-radius": {
shadowSelector: `.${CSS.container}`,
targetProp: "borderRadius",
},
"--calcite-alert-corner-radius": [
{
shadowSelector: `.${CSS.container}`,
targetProp: "borderRadius",
},
{
shadowSelector: `.${CSS.close}`,
targetProp: "borderStartEndRadius",
},
{
shadowSelector: `.${CSS.close}`,
targetProp: "borderEndEndRadius",
},
],
"--calcite-alert-shadow": {
shadowSelector: `.${CSS.container}`,
targetProp: "boxShadow",
Expand Down
7 changes: 4 additions & 3 deletions packages/calcite-components/src/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @prop --calcite-alert-width: Specifies the width of the component.
* @prop --calcite-alert-background-color: Specifies the component's background color.
* @prop --calcite-alert-corner-radius: Specifies the component's border radius.
* @prop --calcite-alert-corner-radius: Specifies the component's corner radius.
* @prop --calcite-alert-shadow: Specifies the component's shadow.
*/

Expand Down Expand Up @@ -81,6 +81,8 @@ $border-style: 1px solid var(--calcite-color-border-3);
.close {
@apply bg-transparent border-none cursor-pointer flex items-center justify-end outline-none self-stretch text-color-3;
-webkit-appearance: none;
border-start-end-radius: var(--calcite-alert-corner-radius, var(--calcite-border-radius));
border-end-end-radius: var(--calcite-alert-corner-radius, var(--calcite-border-radius));

@apply focus-base;
&:focus {
Expand All @@ -99,8 +101,7 @@ $border-style: 1px solid var(--calcite-color-border-3);
}

.queue-count {
@apply bg-foreground-1
cursor-default
@apply cursor-default
flex
font-medium
invisible
Expand Down

0 comments on commit f50c170

Please sign in to comment.