Skip to content

Commit

Permalink
fix(mrc): fix action-banner style and alignement
Browse files Browse the repository at this point in the history
ref: #15742
Signed-off-by: LIDRISSI Hamid <[email protected]>
  • Loading branch information
seven-amid authored and anooparveti committed Mar 10, 2025
1 parent 7c18c1c commit 5feab2f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export function ActionBanner({
isDismissible={isDismissible}
color={color}
variant={variant}
className="mt-3 flex-row"
className={`mt-3 action-banner action-banner—-${color}`}
data-testid="actionBanner-message_container"
>
<div className="sm:flex sm:flex-row sm:justify-between sm:items-center">
<OdsText>
<div className="w-full">
<OdsText className="action-banner__text block">
<span
dangerouslySetInnerHTML={{
__html: message,
Expand All @@ -48,7 +48,7 @@ export function ActionBanner({
</OdsText>
{onClick && (
<OdsButton
className="sm:mt-0 mt-4 sm:ml-4 ml-0"
className="sm:mt-0 mt-4 ml-0"
data-testid="actionBanner-button"
onClick={onClick}
label={cta}
Expand All @@ -58,13 +58,12 @@ export function ActionBanner({
<OdsLink
data-testid="action-banner-link"
id="action-banner-link"
className="sm:mt-0 mt-4 sm:ml-4 ml-0"
className="sm:mt-0 mt-4 ml-0"
onClick={onClick}
href={href}
target="_blank"
>
{cta}
</OdsLink>
label={cta}
></OdsLink>
)}
</div>
</OdsMessage>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.action-banner.action-banner—-success .action-banner__text::part(text) {
color: var(--ods-color-success-700);
}

.action-banner.action-banner—-warning .action-banner__text::part(text) {
color: var(--ods-color-warning-700);
}

.action-banner.action-banner—-information .action-banner__text::part(text) {
color: var(--ods-color-information-700);
}

.action-banner.action-banner—-danger .action-banner__text::part(text) {
color: var(--ods-color-critical-700);
}

.action-banner.action-banner—-critical .action-banner__text::part(text) {
color: var(--ods-color-critical-700);
}
1 change: 1 addition & 0 deletions packages/manager-react-components/src/lib.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
@import './components/templates/update-name-modal/update-name-modal.scss';
@import './components/filters/filters.scss';
@import './components/navigation/menus/action/action.scss';
@import './components/action-banner/action-banner.scss';

0 comments on commit 5feab2f

Please sign in to comment.