// utils import { FunctionComponent } from "react"; import { ITopBar } from "./props"; import cn from "classnames"; import { applyDefaultProps } from "@/utils/componentModifiers"; // components import Card from "@/components/basic/Card"; // styles import "./styles.scss"; const TopBar: FunctionComponent = ({ title, subtitle, titleAlign = "center", leftElement, rightElement, card, }) => { card = applyDefaultProps({ p: { py: 12 } }, card); return (
{leftElement && (
{leftElement}
)}
{title}
{subtitle &&
{subtitle}
}
{rightElement && (
{rightElement}
)}
); }; export default TopBar;