diff --git a/.changeset/mean-fireants-sip.md b/.changeset/mean-fireants-sip.md new file mode 100644 index 00000000000..320e36bbc2d --- /dev/null +++ b/.changeset/mean-fireants-sip.md @@ -0,0 +1,5 @@ +--- +'@talend/design-system': patch +--- + +fix(Messages): set a default font-color for children element diff --git a/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx b/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx index 59be82206bf..3db50e0e51b 100644 --- a/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx +++ b/packages/design-system/src/components/Message/Primitive/MessagePrimitive.tsx @@ -99,7 +99,7 @@ export const MessagePrimitive = forwardRef( ) : null}

{description}

{link && } - {children} + {children ?
{children}
: null} {action && } {additionalIconAction && ( diff --git a/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss b/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss index 1b313206359..7c0623cc6de 100644 --- a/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss +++ b/packages/design-system/src/components/Message/Primitive/MessageStyles.module.scss @@ -5,12 +5,17 @@ border-radius: tokens.$coral-radius-s; border: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border-weak; background-color: tokens.$coral-color-neutral-background; + color: tokens.$coral-color-neutral-text-weak; height: 100%; width: 100%; border-top-left-radius: tokens.$coral-radius-s; border-bottom-left-radius: tokens.$coral-radius-s; - border-left: 0.375rem solid tokens.$coral-color-neutral-border-hover; + border-left: 0.6rem solid tokens.$coral-color-neutral-border-hover; + + &__children { + text-wrap: pretty; + } &__title { font: tokens.$coral-heading-m; diff --git a/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap b/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap index 78b695d4600..16e7e00fdcf 100644 --- a/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap +++ b/packages/design-system/src/components/Message/__snapshots__/Message.test.tsx.snap @@ -50,7 +50,11 @@ exports[`Message should render a11y html 1`] = ` - Success +
+ Success +
@@ -116,7 +120,11 @@ exports[`Message should render a11y html 1`] = ` - Destructive +
+ Destructive +
@@ -182,7 +190,11 @@ exports[`Message should render a11y html 1`] = ` - Warning +
+ Warning +
@@ -248,7 +260,11 @@ exports[`Message should render a11y html 1`] = ` - Information +
+ Information +