
* Bump macaw version * Add changeset * CRM update spacing mapping * Update spacing mapping for invoices app * Update products feed spacing mapping * Fix accordion in webhook status, add trigger button * Update search spacing mapping * Improve the changelog message * Update spacing mapping in EAM app
36 lines
856 B
TypeScript
36 lines
856 B
TypeScript
import { Box, PropsWithBox, Text } from "@saleor/macaw-ui/next";
|
|
import { ReactNode } from "react";
|
|
|
|
// todo move to shared
|
|
export const AppSection = ({
|
|
heading,
|
|
sideContent,
|
|
mainContent,
|
|
includePadding = false,
|
|
...props
|
|
}: PropsWithBox<{
|
|
heading: string;
|
|
sideContent?: ReactNode;
|
|
mainContent: ReactNode;
|
|
includePadding?: boolean;
|
|
}>) => {
|
|
return (
|
|
<Box as="section" __gridTemplateColumns={"400px auto"} display={"grid"} gap={10} {...props}>
|
|
<Box>
|
|
<Text as="h2" variant={"heading"} size={"large"} marginBottom={1.5}>
|
|
{heading}
|
|
</Text>
|
|
{sideContent}
|
|
</Box>
|
|
<Box
|
|
borderStyle={"solid"}
|
|
borderColor={"neutralPlain"}
|
|
borderWidth={1}
|
|
padding={includePadding ? 5 : 0}
|
|
borderRadius={4}
|
|
>
|
|
{mainContent}
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|