
* Removed old macaw and material * Add trpc router that fetches shop address info * Config page layout with header and address * display default addres * Draft channels list * add v2 config model * Render address overrides * Render address overrides ui * connect address form * reset address form * implement removing conifg * connect dashboard sites * update webhook * Add ConfigV1 to ConfigV2 transformer * Cleanup v1 router, abstract v2 * Implement runtime migrations * Implement migration service in controllers * test for configuration service * test for app cofnig * draft test for router * refactor webhook * Unify Address schema to single one * Extractr data fetching from form
36 lines
854 B
TypeScript
36 lines
854 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={13} {...props}>
|
|
<Box>
|
|
<Text as="h2" variant={"heading"} size={"large"} marginBottom={4}>
|
|
{heading}
|
|
</Text>
|
|
{sideContent}
|
|
</Box>
|
|
<Box
|
|
borderStyle={"solid"}
|
|
borderColor={"neutralPlain"}
|
|
borderWidth={1}
|
|
padding={includePadding ? 8 : 0}
|
|
borderRadius={4}
|
|
>
|
|
{mainContent}
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|