import { Paper, PaperProps } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import clsx from "clsx"; import { ReactNode } from "react"; const useStyles = makeStyles((theme) => ({ root: { height: 96, padding: "0 32px", display: "flex", alignItems: "center", justifyContent: "space-between", }, leftColumn: { marginRight: "auto", }, rightColumn: {}, iconColumn: { marginRight: 24, }, appName: { fontSize: 24, margin: 0 }, appAuthor: { fontSize: 12, textTransform: "uppercase", color: theme.palette.text.secondary, fontWeight: 500, margin: 0, }, bottomMargin: { marginBottom: 32, }, })); type Props = { name: string; author: string; rightColumnContent?: ReactNode; icon?: ReactNode; bottomMargin?: boolean; } & PaperProps; export function MainBar({ name, author, rightColumnContent, className, icon, bottomMargin, }: Props) { const styles = useStyles(); return ( {icon &&
{icon}
}

{name}

{author}

{rightColumnContent}
); }