Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions docs/lib/tsdoc/tsdoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ function FunctionSignature({
<Row key={id} id={id}>
<NameCell optional={prop.optional} name={prop.name} />
<TypeCell type={prop.type} typeLinkMap={typeLinkMap} />
<td className="p-3 block lg:table-cell lg:before:content-none before:content-['Type:_'] break-words">
{linkify(prop.type, typeLinkMap)}
<td className="p-3 table-cell break-words">
{linkify(prop.description || '', typeLinkMap)}
</td>
</Row>
);
Expand Down Expand Up @@ -175,12 +175,12 @@ function FunctionSignature({

return (
<Row key={id} id={id}>
<td className="relative block lg:table-cell pr-3">
<td className="relative table-cell pr-3">
<code className="bg-muted px-1.5 py-0.5 rounded text-xs whitespace-nowrap my-0">
{linkify(type, typeLinkMap)}
</code>
</td>
<td className="p-3 block lg:table-cell lg:before:content-none before:content-['Description:_'] break-words">
<td className="p-3 table-cell break-words">
{description && (
<p className="text-sm whitespace-pre-wrap !my-0 break-words">
{linkify(description, typeLinkMap)}
Expand Down Expand Up @@ -210,10 +210,7 @@ const Row: FC<{
return (
<tr
id={id}
className={cn(
classes.card,
'group mb-2 block lg:table-row not-last:lg:border-b lg:mb-0'
)}
className={cn(classes.card, 'group mb-2 table-row not-last:border-b')}
>
{children}
</tr>
Expand All @@ -225,7 +222,7 @@ const NameCell: FC<{
optional?: boolean;
}> = ({ name, optional }) => {
return (
<td className="relative block lg:table-cell pr-3">
<td className="relative table-cell pr-3">
{name && (
<code
className={cn(
Expand All @@ -245,9 +242,7 @@ const TypeCell: FC<{
typeLinkMap: TSDocProps['typeLinkMap'];
}> = ({ type, typeLinkMap }) => {
return (
<td className="p-3 block lg:table-cell lg:before:content-none before:content-['Type:_'] break-words">
{linkify(type, typeLinkMap)}
</td>
<td className="p-3 table-cell break-words">{linkify(type, typeLinkMap)}</td>
);
};

Expand Down Expand Up @@ -283,11 +278,9 @@ const FieldsTable: FC<{
<TypeCell type={field.type} typeLinkMap={typeLinkMap} />
<td
className={cn(
'block lg:table-cell',
description
? 'py-3 pt-0 px-3 lg:pt-3 before:content-["Type:_"] lg:before:content-none'
: 'lg:after:content-["-"]',
'break-words overflow-hidden text-sm whitespace-pre-wrap [&_a]:no-underline [&_a]:font-normal [&_a]:hover:no-underline'
'table-cell p-3',
!description && 'after:content-["-"]',
'break-words overflow-hidden text-sm [&_a]:no-underline [&_a]:font-normal [&_a]:hover:no-underline'
)}
>
{linkify(description, typeLinkMap)}
Expand Down