Add ButtonGroupLayout Component
This commit is contained in:
parent
db23d06fb2
commit
c188639b1c
4 changed files with 35 additions and 9 deletions
29
frontend/src/components/basics/ButtonGroupLayout.tsx
Normal file
29
frontend/src/components/basics/ButtonGroupLayout.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue