24 lines
574 B
TypeScript
24 lines
574 B
TypeScript
|
import { DetailedHTMLProps, HTMLAttributes } from "react";
|
||
|
import { twMerge } from "tailwind-merge";
|
||
|
|
||
|
/**
|
||
|
* # Flexbox Column
|
||
|
* @className twui-center
|
||
|
*/
|
||
|
export default function Center({
|
||
|
...props
|
||
|
}: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>) {
|
||
|
return (
|
||
|
<div
|
||
|
{...props}
|
||
|
className={twMerge(
|
||
|
"flex flex-col items-center justify-center gap-4 p-2 w-full",
|
||
|
"twui-center",
|
||
|
props.className
|
||
|
)}
|
||
|
>
|
||
|
{props.children}
|
||
|
</div>
|
||
|
);
|
||
|
}
|