-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor theming of
MenuItem
(#1597)
   --------- Co-authored-by: Julia Wegmayr <julia.wegmayr@vivid-planet.com>
- Loading branch information
1 parent
ef8c531
commit 1a1d831
Showing
4 changed files
with
167 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@comet/admin": major | ||
--- | ||
|
||
`MenuItem` no longer supports props from MUI's `ListItem` but those from `ListItemButton` instead |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { ListItemProps } from "@mui/material/ListItem"; | ||
import { ListItemButtonProps } from "@mui/material"; | ||
import * as React from "react"; | ||
|
||
import { MenuItem, MenuItemProps } from "./Item"; | ||
|
||
export type MenuItemAnchorLinkProps = MenuItemProps & ListItemProps & React.HTMLProps<HTMLAnchorElement>; | ||
export type MenuItemAnchorLinkProps = MenuItemProps & ListItemButtonProps & React.HTMLProps<HTMLAnchorElement>; | ||
|
||
// @ts-expect-error "component"-property is used as described in the documentation https://mui.com/material-ui/react-list/, but type is missing in ListItemButtonProps | ||
export const MenuItemAnchorLink: React.FC<MenuItemAnchorLinkProps> = (props) => <MenuItem selected={false} component="a" {...props} />; |