From 43ca3fe338f9a539c3e67f8ff8fabf73e0e3e18f Mon Sep 17 00:00:00 2001 From: Kristof Colpaert Date: Wed, 23 Nov 2022 14:10:38 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=92=84=20Make=20MessageProps=20extend?= =?UTF-8?q?=20BoxProps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/message/Message.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/message/Message.tsx b/src/components/message/Message.tsx index 2ba4eaab7..8238bffdb 100644 --- a/src/components/message/Message.tsx +++ b/src/components/message/Message.tsx @@ -5,7 +5,7 @@ import { IconCloseMediumOutline, IconWarningBadgedMediumFilled, } from '@teamleader/ui-icons'; -import Box from '../box'; +import Box, { BoxProps } from '../box'; import Button from '../button'; import ButtonGroup from '../buttonGroup'; import Icon from '../icon'; @@ -52,7 +52,7 @@ const iconMap = { warning: IconWarningBadgedMediumFilled, }; -export interface MessageProps { +export interface MessageProps extends Omit { /** The content to display inside the message. */ children: React.ReactNode; /** If true, the message will be rendered inline instead of taking full width. */ From 35ecb5ff21752509262f03057f3596fb9d8ec1d9 Mon Sep 17 00:00:00 2001 From: Kristof Colpaert Date: Wed, 23 Nov 2022 14:12:56 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Make=20Message=20title=20opt?= =?UTF-8?q?ional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/message/Message.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/message/Message.tsx b/src/components/message/Message.tsx index 8238bffdb..1f528da02 100644 --- a/src/components/message/Message.tsx +++ b/src/components/message/Message.tsx @@ -68,7 +68,7 @@ export interface MessageProps extends Omit { /** A status type to determine color and icon */ status?: Status; /** The message title */ - title: React.ReactNode; + title?: React.ReactNode; } const Message: GenericComponent = ({ From 144593204b7ea23cd8bddbcb88efaf6894c906ee Mon Sep 17 00:00:00 2001 From: Kristof Colpaert Date: Wed, 23 Nov 2022 14:27:42 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 252d5a248..bc8a0b0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Changed +- `Message`: Make `MessageProps` extend the `BoxProps` and make `title` property optional ([@kristofcolpaert](https://github.com/kristofcolpaert)) in [#2465](https://github.com/teamleadercrm/ui/pull/2465)) + ### Deprecated ### Removed From daaa6c0b6fc46e8b3f899cfe6d260238b9c7c691 Mon Sep 17 00:00:00 2001 From: Kristof Colpaert Date: Wed, 23 Nov 2022 15:03:14 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=92=84=20Update=20Message=20stories?= =?UTF-8?q?=20to=20include=20scenario=20without=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/message/message.stories.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/message/message.stories.tsx b/src/components/message/message.stories.tsx index 6f9a4e86c..32ccef7e7 100644 --- a/src/components/message/message.stories.tsx +++ b/src/components/message/message.stories.tsx @@ -85,3 +85,12 @@ export const WithStatus = () => ( ); + +export const WithoutTitle = () => ( + + + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod{' '} + tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. + + +);