Skip to content

Commit f4824c4

Browse files
committed
fix: apply fillWidth class to message components for consistent styling
1 parent b7c5d8c commit f4824c4

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/components/molecule/message-group/compact.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function _CompactMessageGroup(props: _MessageGroupProps) {
3030
{timestamp}
3131
</Typo.Footnote>
3232
</Row>
33-
<div>
33+
<div className={fillWidth}>
3434
{Children.map(children, (child) => {
3535
if (isValidElement<MessageProps>(child)) {
3636
return cloneElement(child, { variant: 'compact', sender });

src/components/molecule/message/compact.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import { _Message } from '@/components/atom/message';
22
import { Paragraph } from '@/components/atom/typography';
33
import { Column } from '@/components/layout/column';
4+
import { fillWidth } from '@/styles/utils.css';
45
import { spacing } from '@/tokens/attribute.css';
56
import type { _MessageProps } from './types';
67

78
export function _CompactMessage(props: _MessageProps) {
89
const { reply, reactions = [], children } = props;
910

1011
return (
11-
<Column gap={spacing[6]}>
12-
<Column align='start'>
12+
<Column className={fillWidth} gap={spacing[6]}>
13+
<Column className={fillWidth} align='start'>
1314
{reply && (
1415
<_Message.Reply author={reply.author}>{reply.content}</_Message.Reply>
1516
)}
1617
{typeof children === 'string' ? (
17-
<Paragraph.Body>{children}</Paragraph.Body>
18+
<Paragraph.Body className={fillWidth}>{children}</Paragraph.Body>
1819
) : (
1920
children
2021
)}

0 commit comments

Comments
 (0)