2022-05-14 10:22:06 +00:00
|
|
|
import type { FunctionComponent, ReactNode, PropsWithChildren } from "react";
|
2021-09-30 21:36:47 +00:00
|
|
|
import clsx from "clsx";
|
2021-07-31 17:22:48 +00:00
|
|
|
|
|
|
|
type Props = {
|
2021-09-30 21:36:47 +00:00
|
|
|
className?: string;
|
|
|
|
footer?: ReactNode;
|
2021-07-31 17:22:48 +00:00
|
|
|
};
|
|
|
|
|
2022-05-14 10:22:06 +00:00
|
|
|
const SettingsSection: FunctionComponent<PropsWithChildren<Props>> = ({ children, footer, className }) => (
|
2021-09-30 21:36:47 +00:00
|
|
|
<section className={clsx(className, "shadow sm:rounded-md sm:overflow-hidden")}>
|
|
|
|
<div className="bg-white space-y-6 py-6 px-4 sm:p-6">{children}</div>
|
|
|
|
{footer ?? null}
|
|
|
|
</section>
|
2021-07-31 17:22:48 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export default SettingsSection;
|