import { FlexWrapper } from "@ente/shared/components/Container"; import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import CloseIcon from "@mui/icons-material/Close"; import { Box, IconButton, Stack, Typography } from "@mui/material"; import React from "react"; interface TitlebarProps { title: string; caption?: string; onClose: () => void; backIsClose?: boolean; onRootClose?: () => void; actionButton?: React.JSX.Element; } // TODO: Deprecated in favor of SidebarDrawerTitlebarProps where possible (will // revisit the remaining use cases once those have migrated). export const Titlebar: React.FC = ({ title, caption, onClose, backIsClose, actionButton, onRootClose, }) => { return ( <> {backIsClose ? : } {actionButton && actionButton} {!backIsClose && ( )} {title} {caption} ); };