diff --git a/packages/manager-react-components/src/components/action-banner/action-banner.component.tsx b/packages/manager-react-components/src/components/action-banner/action-banner.component.tsx index 724c637b9065..557155e370ca 100644 --- a/packages/manager-react-components/src/components/action-banner/action-banner.component.tsx +++ b/packages/manager-react-components/src/components/action-banner/action-banner.component.tsx @@ -10,6 +10,8 @@ import { ODS_MESSAGE_VARIANT, } from '@ovhcloud/ods-components'; +import './index.css'; + export type ActionBannerProps = { message: string; cta: string; @@ -35,11 +37,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" > -
- +
+ {onClick && ( - {cta} - + label={cta} + > )}
diff --git a/packages/manager-react-components/src/components/action-banner/index.css b/packages/manager-react-components/src/components/action-banner/index.css new file mode 100644 index 000000000000..86849bf529a5 --- /dev/null +++ b/packages/manager-react-components/src/components/action-banner/index.css @@ -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); +}