saleor-apps-redis_apl/apps/taxes/src/modules/ui/app-section.tsx
Adrian Pilarczyk 5a4da7beed
feat: address validation suggestions (#802)
* feat:  add ping method to avatax-client

* refactor: ♻️ use avatax-auth-validation.service instead of address service

* refactor: ♻️ extract avatax-configuration-address-fragment

* refactor: ♻️ extract avatax-configuration-credentials-fragment

* refactor: ♻️ extract form-helper-text

* refactor: ♻️ extract form-section

* refactor: ♻️ extract avatax-configuration-taxes-fragment

* feat:  move verify to credentials fragment && add disabled form section

* refactor: 🚚 obfuscator

* feat:  add separate credentials and address validation services

* build: 👷 add changeset

* feat:  add address resolution message

* fix: 🐛 changeset

* refactor: ♻️ extract avataxAddressResolutionProcessor and add tests

* refactor:

* refactor: ♻️ remove brs from avatax-instructions

* refactor: ♻️ replace b with Text bodyStrong

* refactor: ♻️ state tuple to object

* refactor: ♻️ destructure some more constructors

* refactor: ♻️ memoize isLoadings & handlers
2023-07-25 11:15:18 +02:00

39 lines
840 B
TypeScript

import { Box, PropsWithBox, Text } from "@saleor/macaw-ui/next";
import React from "react";
const MAX_WIDTH = "480px";
const Header = ({ children, ...props }: PropsWithBox<{ children: React.ReactNode }>) => {
return (
<Box __maxWidth={MAX_WIDTH} {...props}>
<Text as="p" variant="body">
{children}
</Text>
</Box>
);
};
const Description = ({
title,
description,
...props
}: PropsWithBox<{
title: React.ReactNode;
description: React.ReactNode;
}>) => {
return (
<Box display="flex" flexDirection={"column"} gap={10} __maxWidth={MAX_WIDTH} {...props}>
<Text as="h3" variant="heading">
{title}
</Text>
<Box fontWeight={"bodyMedium"} fontSize={"bodyMedium"}>
{description}
</Box>
</Box>
);
};
export const Section = {
Header,
Description,
};