fix: render Text children explicitly in wrapper components

This commit is contained in:
hazre committed 2026-03-02 19:00:22 +01:00
1 parent dd7d404c29
commit 3dec377aae
3 files changed
+19 -8

No files matched your search

+7 -2
View File
@@ -34,7 +34,10 @@ export const PronounPill = as<'span'>(
);
export const MessageTextBody = as<'div', css.MessageTextBodyVariants & { notice?: boolean }>(
({ as: asComp = 'div', className, preWrap, jumboEmoji, emote, notice, ...props }, ref) => (
(
{ as: asComp = 'div', children, className, preWrap, jumboEmoji, emote, notice, ...props },
ref
) => (
<Text
as={asComp}
size="T400"
@@ -42,6 +45,8 @@ export const MessageTextBody = as<'div', css.MessageTextBodyVariants & { notice?
className={classNames(css.MessageTextBody({ preWrap, jumboEmoji, emote }), className)}
{...props}
ref={ref}
/>
>
{children}
</Text>
)
);
+4 -2
View File
@@ -4,7 +4,9 @@ import classNames from 'classnames';
import * as css from './styles.css';
export const NavItemContent = as<'p', ComponentProps<typeof Text>>(
({ className, ...props }, ref) => (
<Text className={classNames(css.NavItemContent, className)} size="T300" {...props} ref={ref} />
({ children, className, ...props }, ref) => (
<Text className={classNames(css.NavItemContent, className)} size="T300" {...props} ref={ref}>
{children}
</Text>
)
);
+8 -4
View File
@@ -70,11 +70,13 @@ export const RoomCardBase = as<'div'>(({ className, ...props }, ref) => (
/>
));
export const RoomCardName = as<'h6'>(({ ...props }, ref) => (
<Text as="h6" size="H6" truncate {...props} ref={ref} />
export const RoomCardName = as<'h6'>(({ children, ...props }, ref) => (
<Text as="h6" size="H6" truncate {...props} ref={ref}>
{children}
</Text>
));
export const RoomCardTopic = as<'p'>(({ className, ...props }, ref) => (
export const RoomCardTopic = as<'p'>(({ children, className, ...props }, ref) => (
<Text
as="p"
size="T200"
@@ -82,7 +84,9 @@ export const RoomCardTopic = as<'p'>(({ className, ...props }, ref) => (
{...props}
priority="400"
ref={ref}
/>
>
{children}
</Text>
));
function ErrorDialog({