Skip to content

Commit 45fa958

Browse files
chpalacCharles Assuncao
andauthored
fix(ChatMessage): remove compactBody default prop from ChatMessage (#18874)
* fix: remove compactBody default prop from ChatMessage * add changelog Co-authored-by: Charles Assuncao <charles.assuncao@microsoft.com>
1 parent 2b6f9b6 commit 45fa958

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/fluentui/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2323
- Wrap ChatMessage header elements correctly @Hirse ([#18837](https://github.com/microsoft/fluentui/pull/18837))
2424
- Align ChatMessageDetails color with ChatMessage header @Hirse ([#18840](https://github.com/microsoft/fluentui/pull/18840))
2525
- Fix compact hover background in dark themes @Hirse ([#18842](https://github.com/microsoft/fluentui/pull/18842))
26+
- Fix children conflict with compactBody in `ChatMessage` @chassunc ([#18874](https://github.com/microsoft/fluentui/pull/18874))
2627
- Fix `Tooltip` trigger order of props being spread @chassunc ([#18875](https://github.com/microsoft/fluentui/pull/18875))
2728

2829
### Features

packages/fluentui/react-northstar/src/components/Chat/ChatMessage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export const ChatMessage: ComponentWithAs<'div', ChatMessageProps> &
502502
if (density === 'compact') {
503503
const headerElement = createShorthand(ChatMessageHeader, header);
504504

505-
const bodyElement = Box.create(compactBody, {
505+
const bodyElement = Box.create(compactBody || {}, {
506506
defaultProps: () =>
507507
getA11Props('compactBody', {
508508
className: chatMessageSlotClassNames.compactBody,
@@ -593,7 +593,6 @@ ChatMessage.displayName = 'ChatMessage';
593593
ChatMessage.defaultProps = {
594594
accessibility: chatMessageBehavior,
595595
badgePosition: 'end',
596-
compactBody: {},
597596
positionActionMenu: true,
598597
reactionGroupPosition: 'start',
599598
};

0 commit comments

Comments
 (0)