mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore: deprecated style added to api table
This commit is contained in:
parent
78c09280e3
commit
720a8dd726
@ -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 (
|
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}
|
{children}
|
||||||
</InlineCode>
|
</InlineCode>
|
||||||
);
|
);
|
||||||
@ -218,6 +229,7 @@ interface APITableProps {
|
|||||||
attribute: string;
|
attribute: string;
|
||||||
type: string;
|
type: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
deprecated?: boolean;
|
||||||
default?: string;
|
default?: string;
|
||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
@ -237,7 +249,9 @@ export const APITable: React.FC<APITableProps> = ({data}) => {
|
|||||||
{data.map((item, index) => (
|
{data.map((item, index) => (
|
||||||
<TableRow key={index} className="[&>td]:px-2 [&>td]:py-1.5 [&>td]:first:pt-4">
|
<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">
|
<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 && (
|
{item.description && (
|
||||||
<>
|
<>
|
||||||
{/* Desktop tooltip */}
|
{/* Desktop tooltip */}
|
||||||
|
|||||||
@ -306,6 +306,7 @@ building buttons that work well across devices and interaction methods.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
attribute: "onClick",
|
attribute: "onClick",
|
||||||
|
deprecated: true,
|
||||||
type: "MouseEventHandler",
|
type: "MouseEventHandler",
|
||||||
description: "The native button click event handler (Deprecated) use onPress instead.",
|
description: "The native button click event handler (Deprecated) use onPress instead.",
|
||||||
default: "-"
|
default: "-"
|
||||||
|
|||||||
@ -772,6 +772,7 @@ you to customize each item individually.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
attribute: "onClick",
|
attribute: "onClick",
|
||||||
|
deprecated: true,
|
||||||
type: "MouseEventHandler",
|
type: "MouseEventHandler",
|
||||||
description: "The native button click event handler (**Deprecated**) use **onPress** instead.",
|
description: "The native button click event handler (**Deprecated**) use **onPress** instead.",
|
||||||
default: "-"
|
default: "-"
|
||||||
|
|||||||
@ -275,6 +275,7 @@ In case you need to customize the link even further, you can use the `useLink` h
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
attribute: "onClick",
|
attribute: "onClick",
|
||||||
|
deprecated: true,
|
||||||
type: "MouseEventHandler",
|
type: "MouseEventHandler",
|
||||||
description: "The native link click event handler (Deprecated) use onPress instead.",
|
description: "The native link click event handler (Deprecated) use onPress instead.",
|
||||||
default: "-"
|
default: "-"
|
||||||
|
|||||||
@ -657,6 +657,7 @@ You can customize the `Listbox` items style by using the `itemClasses` prop and
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
attribute: "onClick",
|
attribute: "onClick",
|
||||||
|
deprecated: true,
|
||||||
type: "MouseEventHandler",
|
type: "MouseEventHandler",
|
||||||
description: "The native button click event handler (Deprecated) use onPress instead.",
|
description: "The native button click event handler (Deprecated) use onPress instead.",
|
||||||
default: "-"
|
default: "-"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user