[dep] update to eslint 9
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ReactNode } from "react"
|
||||
import clsx from "clsx"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
interface CardProps {
|
||||
children?: ReactNode
|
||||
@@ -20,23 +20,41 @@ const Card = ({ children }: CardProps) => {
|
||||
}
|
||||
|
||||
const CardHeader = ({ children }: CardProps) => {
|
||||
return <div className="flex items-center gap-1.5 tracking-wide">{children}</div>
|
||||
return (
|
||||
<div className="flex items-center gap-1.5 tracking-wide">{children}</div>
|
||||
)
|
||||
}
|
||||
|
||||
const CardIcon = ({ children, type, className, ...rest }: CardProps) => {
|
||||
return (
|
||||
<div className={clsx("flex gap-1.5 items-center font-semibold", type === "menu" && "transition cursor-pointer hover:bg-black/5 px-2 py-1 rounded-md active:scale-95", className)} {...rest}>
|
||||
<div
|
||||
className={clsx(
|
||||
"flex gap-1.5 items-center font-semibold",
|
||||
type === "menu" &&
|
||||
"transition cursor-pointer hover:bg-black/5 px-2 py-1 rounded-md active:scale-95",
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const CardTool = ({ children }: CardProps) => {
|
||||
return <div className="flex items-center justify-end flex-grow gap-2">{children}</div>
|
||||
return (
|
||||
<div className="flex items-center justify-end flex-grow gap-2">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const CardBody = ({ children }: CardProps) => {
|
||||
return <div className="w-full h-full text-sm tracking-wide text-zinc-800">{children}</div>
|
||||
return (
|
||||
<div className="w-full h-full text-sm tracking-wide text-zinc-800">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export { Card, CardHeader, CardIcon, CardTool, CardBody }
|
||||
|
||||
Reference in New Issue
Block a user