
* Extract macaw theme palette to shared package * Use MacawThemeProvider from shared package * Fix maca theme provider props * Update invoices app ui * Add noSSRwrapper to packages shared * Use external theme provider in data importer * Use external theme provider in slack * Improve margin in TitleBar * Update colors in Klaviyo * revert search to use local theme provider * revert slack to use local theme provider * Rewrite TitleBar to css modules * Add unique jss classes prefix for Klaviyo * Update apps/search/src/pages/_app.tsx Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com> * Update shy-gorillas-shop.md --------- Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
42 lines
1,021 B
TypeScript
42 lines
1,021 B
TypeScript
import { Paper, PaperProps } from "@material-ui/core";
|
|
import styles from "./title-bar.module.css";
|
|
import clsx from "clsx";
|
|
import { ReactNode } from "react";
|
|
|
|
const height = 96;
|
|
|
|
type Props = {
|
|
name: string;
|
|
author: string;
|
|
rightColumnContent?: ReactNode;
|
|
icon?: ReactNode;
|
|
bottomMargin?: boolean;
|
|
} & PaperProps;
|
|
|
|
export function TitleBar({
|
|
name,
|
|
author,
|
|
rightColumnContent,
|
|
className,
|
|
icon,
|
|
bottomMargin,
|
|
}: Props) {
|
|
return (
|
|
<div
|
|
className={clsx(styles.container, className, {
|
|
[styles.bottomMargin]: bottomMargin,
|
|
})}
|
|
>
|
|
<Paper variant="outlined" square elevation={0} className={styles.root}>
|
|
{icon && <div className={styles.iconColumn}>{icon}</div>}
|
|
<div className={styles.leftColumn}>
|
|
<h1 className={styles.appName}>{name}</h1>
|
|
<h1 className={styles.appAuthor}>{author}</h1>
|
|
</div>
|
|
<div className={styles.rightColumn}>{rightColumnContent}</div>
|
|
</Paper>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
TitleBar.height = height;
|