new-personal-site/components/lib/elements/Paper.tsx
Benjamin Toby 5587024789 Updates
2025-01-05 07:25:38 +01:00

33 lines
861 B
TypeScript

import React, { DetailedHTMLProps, HTMLAttributes } from "react";
import { twMerge } from "tailwind-merge";
/**
* # General paper
* @className_wrapper twui-paper
*/
export default function Paper({
variant,
linkProps,
...props
}: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
variant?: "normal";
linkProps?: DetailedHTMLProps<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
HTMLAnchorElement
>;
}) {
return (
<div
{...props}
className={twMerge(
"flex flex-col items-start p-4 rounded bg-white dark:bg-white/10 gap-4",
"border border-slate-200 dark:border-white/10 border-solid w-full",
"twui-paper",
props.className
)}
>
{props.children}
</div>
);
}