mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 01:21:18 -08:00
fix: render Text children explicitly in wrapper components
This commit is contained in:
3 files changed
+19
-8
No files matched your search
@@ -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,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>
|
||||
)
|
||||
);
|
||||
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user