|
1
|
import React from "react" |
|
2
|
import clsx from "clsx" |
|
3
|
import { Button, ButtonProps } from "@/components/Button" |
|
4
|
|
|
5
|
export type ModalFooterProps = { |
|
6
|
actions?: ButtonProps[] |
|
7
|
children?: React.ReactNode |
|
8
|
className?: string |
|
9
|
} |
|
10
|
|
|
11
|
export const ModalFooter = ({ |
|
12
|
actions, |
|
13
|
children, |
|
14
|
className, |
|
15
|
}: ModalFooterProps) => { |
|
16
|
return ( |
|
17
|
<div |
|
18
|
className={clsx( |
|
19
|
"py-docs_1.5 pl-0 pr-docs_2", |
|
20
|
"border-medusa-border-base border-0 border-t border-solid", |
|
21
|
"flex justify-end gap-docs_0.5", |
|
22
|
className |
|
23
|
)} |
|
24
|
> |
|
25
|
{actions?.map((action, index) => <Button {...action} key={index} />)} |
|
26
|
{children} |
|
27
|
</div> |
|
28
|
) |
|
29
|
} |