chore: deprecated style added to api table

This commit is contained in:
Junior Garcia 2024-12-10 18:12:04 -03:00
parent 78c09280e3
commit 720a8dd726
5 changed files with 21 additions and 3 deletions

View File

@ -205,9 +205,20 @@ const Link = ({href, children}: {href?: string; children?: React.ReactNode}) =>
);
};
const InlineCodeChip = ({children}: {children?: React.ReactNode}) => {
const InlineCodeChip = ({
children,
className,
}: {
children?: React.ReactNode;
className?: string;
}) => {
return (
<InlineCode className="before:hidden after:hidden text-tiny rounded-md text-default-600 bg-default-100 dark:bg-default-100/80 px-1.5 py-0.5">
<InlineCode
className={clsx(
"before:hidden after:hidden text-tiny rounded-md text-default-600 bg-default-100 dark:bg-default-100/80 px-1.5 py-0.5",
className,
)}
>
{children}
</InlineCode>
);
@ -218,6 +229,7 @@ interface APITableProps {
attribute: string;
type: string;
description: string;
deprecated?: boolean;
default?: string;
}[];
}
@ -237,7 +249,9 @@ export const APITable: React.FC<APITableProps> = ({data}) => {
{data.map((item, index) => (
<TableRow key={index} className="[&>td]:px-2 [&>td]:py-1.5 [&>td]:first:pt-4">
<TableCell className="flex items-center gap-1 font-mono text-small whitespace-nowrap">
<InlineCodeChip>{item.attribute}</InlineCodeChip>
<InlineCodeChip className={item.deprecated ? "line-through" : ""}>
{item.attribute}
</InlineCodeChip>
{item.description && (
<>
{/* Desktop tooltip */}

View File

@ -306,6 +306,7 @@ building buttons that work well across devices and interaction methods.
},
{
attribute: "onClick",
deprecated: true,
type: "MouseEventHandler",
description: "The native button click event handler (Deprecated) use onPress instead.",
default: "-"

View File

@ -772,6 +772,7 @@ you to customize each item individually.
},
{
attribute: "onClick",
deprecated: true,
type: "MouseEventHandler",
description: "The native button click event handler (**Deprecated**) use **onPress** instead.",
default: "-"

View File

@ -275,6 +275,7 @@ In case you need to customize the link even further, you can use the `useLink` h
},
{
attribute: "onClick",
deprecated: true,
type: "MouseEventHandler",
description: "The native link click event handler (Deprecated) use onPress instead.",
default: "-"

View File

@ -657,6 +657,7 @@ You can customize the `Listbox` items style by using the `itemClasses` prop and
},
{
attribute: "onClick",
deprecated: true,
type: "MouseEventHandler",
description: "The native button click event handler (Deprecated) use onPress instead.",
default: "-"