Skip to content

Commit

Permalink
feat!: Change colours for Alert (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga authored Nov 20, 2024
1 parent 6241262 commit 4c03c65
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/css/src/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@
}

.ams-alert--error {
background-color: var(--ams-alert-error-background-color);
border-color: var(--ams-alert-error-border-color);
}

.ams-alert--info {
background-color: var(--ams-alert-info-background-color);
border-color: var(--ams-alert-info-border-color);
}

.ams-alert--success {
background-color: var(--ams-alert-success-background-color);
border-color: var(--ams-alert-success-border-color);
}

.ams-alert--warning {
background-color: var(--ams-alert-warning-background-color);
border-color: var(--ams-alert-warning-border-color);
}
2 changes: 1 addition & 1 deletion packages/react/src/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const Alert = forwardRef(
)}
{children}
</div>
{closeable && <IconButton label={closeButtonLabel} size={alertSize} onClick={onClose} />}
{closeable && <IconButton contrastColor label={closeButtonLabel} size={alertSize} onClick={onClose} />}
</Tag>
)
},
Expand Down
12 changes: 5 additions & 7 deletions proprietary/tokens/src/components/ams/alert.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@
"padding-block": { "value": "{ams.space.md}" },
"padding-inline": { "value": "{ams.space.lg}" },
"error": {
"background-color": { "value": "{ams.brand.color.red.20}" },
"border-color": { "value": "{ams.brand.color.red.60}" }
},
"info": {
"border-color": { "value": "{ams.brand.color.blue.60}" }
"background-color": { "value": "{ams.brand.color.azure.20}" },
"border-color": { "value": "{ams.brand.color.azure.60}" }
},
"success": {
"background-color": { "value": "{ams.brand.color.green.20}" },
"border-color": { "value": "{ams.brand.color.green.60}" }
},
"warning": {
"background-color": { "value": "{ams.brand.color.orange.20}" },
"border-color": { "value": "{ams.brand.color.orange.60}" }
},
"close": {
"fill": { "value": "{ams.brand.color.neutral.100}" },
"hover": {
"fill": { "value": "{ams.brand.color.blue.60}" }
}
},
"content": {
"gap": { "value": "{ams.space.sm}" }
}
Expand Down

0 comments on commit 4c03c65

Please sign in to comment.