Add ButtonGroupLayout Component

This commit is contained in:
araemer 2025-10-25 18:17:32 +02:00
parent db23d06fb2
commit c188639b1c
4 changed files with 35 additions and 9 deletions

View file

@ -0,0 +1,29 @@
import type {ReactNode} from "react";
import clsx from "clsx";
type ButtonGroupLayoutProps = {
/** Content to render inside the header */
children: ReactNode;
/** Optional additional Tailwind classes */
className?: string;
};
/**
* A layout for horizontally aligning buttons as usually a save button is accompanied by a cancel button
* @param children Children of the layout, i.e., buttons
* @param className Optional additional styles
* @constructor
*/
export default function ButtonGroupLayout({children, className = ""}: ButtonGroupLayoutProps) {
return (
<div
className={clsx(
"flex gap-4 mt-8",
className
)}
>
{children}
</div>
);
}