This commit is contained in:
Manav Rathi
2024-11-04 18:00:13 +05:30
parent 27aaf78499
commit f52420df20
2 changed files with 10 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ interface TitlebarProps {
actionButton?: JSX.Element;
}
// TODO: Deprecated in favor of NestedSidebarDrawerTitlebar where possible (will
// TODO: Deprecated in favor of SidebarDrawerTitlebarProps where possible (will
// revisit the remaining use cases once those have migrated).
export const Titlebar: React.FC<TitlebarProps> = ({
title,

View File

@@ -81,7 +81,7 @@ import Close from "@mui/icons-material/Close";
import { Box, IconButton, Typography } from "@mui/material";
import React from "react";
type NestedSidebarDrawerTitlebarProps = Pick<
type SidebarDrawerTitlebarProps = Pick<
NestedSidebarDrawerVisibilityProps,
"onClose" | "onRootClose"
> & {
@@ -98,11 +98,15 @@ type NestedSidebarDrawerTitlebarProps = Pick<
/**
* A bar with a title and back / close buttons, suitable for being used in
* tandem with a {@link SidebarDrawer}.
* tandem with a {@link NestedSidebarDrawer}.
*/
export const NestedSidebarDrawerTitlebar: React.FC<
NestedSidebarDrawerTitlebarProps
> = ({ title, caption, onClose, onRootClose, actionButton }) => {
export const SidebarDrawerTitlebar: React.FC<SidebarDrawerTitlebarProps> = ({
title,
caption,
onClose,
onRootClose,
actionButton,
}) => {
return (
<>
<FlexWrapper