Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
header component
Oleg Isonenf893a9ee17e3
diff --git a/apps/designer/app/designer/features/sidebar-left/lib/header.tsx b/apps/designer/app/designer/features/sidebar-left/lib/header.tsxnew file mode 100644index 0000000000..93ec87fb47--- /dev/null+++ b/apps/designer/app/designer/features/sidebar-left/lib/header.tsx@@ -0,0 +1,36 @@+import { Flex, IconButton, Text } from "@webstudio-is/design-system";+import { Separator } from "@webstudio-is/design-system";+import { Cross1Icon } from "@webstudio-is/icons";++type HeaderProps = {+ title: string;+ isClosable?: boolean;+ onClose?: () => void;+};++export const Header = ({ title, isClosable = true, onClose }: HeaderProps) => {+ return (+ <>+ <Flex+ css={{ height: 40, paddingLeft: "$3" }}+ align="center"+ justify="between"+ >+ <Text size="1" css={{ fontWeight: "bold" }}>+ {title}+ </Text>+ {isClosable && (+ <IconButton+ onClick={() => onClose?.()}+ size="1"+ css={{ marginRight: "$2" }}+ aria-label="Close"+ >+ <Cross1Icon />+ </IconButton>+ )}+ </Flex>+ <Separator />+ </>+ );+};