fix(catalog-react): make EntityInfoCard fill available container height
Set `height: 100%` on EntityInfoCard so cards fill their grid cell, matching the row height of sibling cards. This replaces the behavior previously provided by `variant="gridItem"` on the old InfoCard. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -23,6 +23,14 @@ import {
|
||||
Text,
|
||||
Flex,
|
||||
} from '@backstage/ui';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import classNames from 'classnames';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
root: {
|
||||
height: '100%',
|
||||
},
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export interface EntityInfoCardProps {
|
||||
@@ -36,9 +44,10 @@ export interface EntityInfoCardProps {
|
||||
/** @public */
|
||||
export function EntityInfoCard(props: EntityInfoCardProps) {
|
||||
const { title, headerActions, footerActions, children, className } = props;
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
<Card className={className}>
|
||||
<Card className={classNames(classes.root, className)}>
|
||||
{title && (
|
||||
<CardHeader>
|
||||
<Flex justify="between" align="center">
|
||||
|
||||
Reference in New Issue
Block a user