Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use createVariantComponent as well
Browse files Browse the repository at this point in the history
dan-lee committed Jan 31, 2025
1 parent 9e47c0a commit 7ab6d2c
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions packages/zudoku/src/lib/plugins/openapi/playground/ParamsGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
import { type ReactNode } from "react";
import { cn } from "../../../util/cn.js";
import createVariantComponent from "../../../util/createVariantComponent.js";

const ParamsGrid = createVariantComponent(
"div",
"grid grid-cols-[2fr_3fr] gap-2 items-center",
);

export const ParamsGridItem = ({
children,
className,
}: {
children: ReactNode;
className?: string;
}) => {
return (
<div
className={cn(
"group hover:bg-accent/40 px-3 grid col-span-full grid-cols-subgrid",
className,
)}
>
{children}
</div>
);
};
export const ParamsGridItem = createVariantComponent(
"div",
"group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid",
);

export default ParamsGrid;

0 comments on commit 7ab6d2c

Please sign in to comment.