Files
tailwind-ui-library/components/layout/Spacer.tsx
T
2026-10-01 08:02:47 +01:00

31 lines
671 B
TypeScript

import _ from "lodash";
import type { DetailedHTMLProps, HTMLAttributes } from "react";
import { twMerge } from "tailwind-merge";
type Props = DetailedHTMLProps<
HTMLAttributes<HTMLDivElement>,
HTMLDivElement
> & {
horizontal?: boolean;
};
/**
* # Space Component
* @className twui-spacer
*/
export default function Spacer({ horizontal, ...props }: Props) {
return (
<div
{...props}
className={twMerge(
"",
horizontal ? "w-10" : "w-full h-10",
"twui-spacer",
props.className,
)}
>
{props.children}
</div>
);
}