-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db82737
commit b9ebe1d
Showing
2 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
new-log-viewer/src/components/SidebarContainer/PanelTabs/CustomTabPanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react"; | ||
|
||
import { | ||
DialogContent, | ||
DialogTitle, | ||
TabPanel, | ||
Typography, | ||
} from "@mui/joy"; | ||
|
||
|
||
interface CustomTabPanelProps { | ||
children: React.ReactNode, | ||
tabName: string, | ||
title: string, | ||
} | ||
|
||
/** | ||
* Renders a customized tab panel to be extended for displaying extra information in the sidebar. | ||
* | ||
* @param props | ||
* @param props.children | ||
* @param props.tabName | ||
* @param props.title | ||
* @return | ||
*/ | ||
const CustomTabPanel = ({children, tabName, title}: CustomTabPanelProps) => { | ||
return ( | ||
<TabPanel value={tabName}> | ||
<DialogTitle> | ||
<Typography | ||
fontSize={14} | ||
fontWeight={400} | ||
level={"body-md"} | ||
textTransform={"uppercase"} | ||
> | ||
{title} | ||
</Typography> | ||
</DialogTitle> | ||
<DialogContent> | ||
{children} | ||
</DialogContent> | ||
</TabPanel> | ||
); | ||
}; | ||
|
||
|
||
export default CustomTabPanel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters