Add edit button to Group Profile card
Signed-off-by: roylisto.pradana <roylisto.pradana@grabtaxi.com>
This commit is contained in:
committed by
roylisto
parent
d5c83bb889
commit
b7cd1f3151
@@ -37,7 +37,6 @@ const useStyles = makeStyles(theme => ({
|
||||
},
|
||||
},
|
||||
header: {
|
||||
display: 'inline-block',
|
||||
padding: theme.spacing(2, 2, 2, 2.5),
|
||||
},
|
||||
headerTitle: {
|
||||
@@ -121,6 +120,7 @@ type Props = {
|
||||
children?: ReactNode;
|
||||
headerStyle?: object;
|
||||
headerProps?: CardHeaderProps;
|
||||
action?: ReactNode;
|
||||
actionsClassName?: string;
|
||||
actions?: ReactNode;
|
||||
cardClassName?: string;
|
||||
@@ -141,6 +141,7 @@ export const InfoCard = ({
|
||||
children,
|
||||
headerStyle,
|
||||
headerProps,
|
||||
action,
|
||||
actionsClassName,
|
||||
actions,
|
||||
cardClassName,
|
||||
@@ -190,6 +191,7 @@ export const InfoCard = ({
|
||||
}}
|
||||
title={title}
|
||||
subheader={subheader}
|
||||
action={action}
|
||||
style={{ ...headerStyle }}
|
||||
titleTypographyProps={titleTypographyProps}
|
||||
{...headerProps}
|
||||
|
||||
@@ -33,10 +33,12 @@ import {
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
Tooltip,
|
||||
IconButton,
|
||||
} from '@material-ui/core';
|
||||
import AccountTreeIcon from '@material-ui/icons/AccountTree';
|
||||
import EmailIcon from '@material-ui/icons/Email';
|
||||
import GroupIcon from '@material-ui/icons/Group';
|
||||
import EditIcon from '@material-ui/icons/Edit';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import React from 'react';
|
||||
import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core-components';
|
||||
@@ -80,6 +82,18 @@ export const GroupProfileCard = ({
|
||||
title={<CardTitle title={displayName} />}
|
||||
subheader={description}
|
||||
variant={variant}
|
||||
action={
|
||||
<IconButton
|
||||
aria-label="Edit"
|
||||
// disabled={!entityMetadataEditUrl}
|
||||
title="Edit Metadata"
|
||||
onClick={() => {
|
||||
// window.open(entityMetadataEditUrl ?? '#', '_blank');
|
||||
}}
|
||||
>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
}
|
||||
>
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} sm={2} xl={1}>
|
||||
|
||||
Reference in New Issue
Block a user