-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
044b637
commit 07c3558
Showing
10 changed files
with
145 additions
and
83 deletions.
There are no files selected for viewing
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
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
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
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
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,39 @@ | ||
import { | ||
IconButton, | ||
IconButtonProps, | ||
Tooltip, | ||
TooltipTypeMap, | ||
} from "@mui/joy"; | ||
|
||
|
||
interface MenuBarIconButtonProps extends IconButtonProps { | ||
tooltipPlacement?: TooltipTypeMap["props"]["placement"]; | ||
} | ||
|
||
/** | ||
* An icon button for use in the menu bar. | ||
* | ||
* @param props | ||
* @param props.title Tooltip title. | ||
* @param props.tooltipPlacement | ||
* @param props.rest | ||
* @return | ||
*/ | ||
const MenuBarIconButton = ({ | ||
tooltipPlacement, | ||
title, | ||
...rest | ||
}: MenuBarIconButtonProps) => ( | ||
<Tooltip | ||
placement={tooltipPlacement ?? "bottom"} | ||
title={title} | ||
> | ||
<span> | ||
<IconButton | ||
size={"sm"} | ||
{...rest}/> | ||
</span> | ||
</Tooltip> | ||
); | ||
|
||
export default MenuBarIconButton; |
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
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.