Breadcrumbs and icon update

Signed-off-by: lukzerom <lukzerom@gmail.com>
This commit is contained in:
lukzerom
2021-12-16 22:43:05 +01:00
parent d26904b836
commit b594bab67d
2 changed files with 17 additions and 5 deletions
+8 -2
View File
@@ -14,9 +14,9 @@
* limitations under the License.
*/
import { IconComponent, useApp } from '@backstage/core-plugin-api';
import MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';
import React, { ComponentProps } from 'react';
import { useApp, IconComponent } from '@backstage/core-plugin-api';
type IconComponentProps = ComponentProps<IconComponent>;
@@ -27,7 +27,13 @@ function useSystemIcon(key: string, props: IconComponentProps) {
}
// Should match the list of overridable system icon keys in @backstage/core-app-api
/** @public */
/**
* Broken Image {@link https://materialui.co/icon/broken-image | Icon} from material UI library
*
* @public
* @remarks
*
*/
export function BrokenImageIcon(props: IconComponentProps) {
return useSystemIcon('brokenImage', props);
}
@@ -14,13 +14,13 @@
* limitations under the License.
*/
import { withStyles } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import MaterialBreadcrumbs from '@material-ui/core/Breadcrumbs';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import Popover from '@material-ui/core/Popover';
import { withStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import MaterialBreadcrumbs from '@material-ui/core/Breadcrumbs';
import React, { ComponentProps, Fragment } from 'react';
type Props = ComponentProps<typeof MaterialBreadcrumbs>;
@@ -51,7 +51,13 @@ const StyledBox = withStyles(
{ name: 'BackstageBreadcrumbsStyledBox' },
)(Box);
/** @public */
/**
* Breadcrumbs component to show navigation hierarchical structure
*
* @public
* @remarks
*
*/
export function Breadcrumbs(props: Props) {
const { children, ...restProps } = props;
const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(