diff --git a/src/components/Grid/style.css b/src/components/Grid/style.css index 37864c9fa..ea1857cd3 100644 --- a/src/components/Grid/style.css +++ b/src/components/Grid/style.css @@ -17,8 +17,8 @@ position: relative; width: 100%; min-height: 1px; - padding-right: 20px; - padding-left: 20px; + padding-right: 10px; + padding-left: 10px; flex: 1 1 0; /* grow shrink basis */ max-width: 100%; diff --git a/src/components/VmDetails/BaseCard.js b/src/components/VmDetails/BaseCard.js index a4d9f3b0f..95c4c3458 100644 --- a/src/components/VmDetails/BaseCard.js +++ b/src/components/VmDetails/BaseCard.js @@ -4,18 +4,16 @@ import { Badge, Button, Card, - CardHeading, + CardHeader, CardTitle, CardBody, CardFooter, - Icon, - noop, - excludeKeys, -} from 'patternfly-react' +} from '@patternfly/react-core' import style from './style.css' import CardEditButton from './CardEditButton' import { Tooltip } from '_/components/tooltips' +import { CheckIcon, TimesIcon } from '@patternfly/react-icons/dist/esm/icons' /** * Base VM details card. Support common layouts and view vs edit modes. @@ -76,7 +74,7 @@ class BaseCard extends React.Component { } renderChildren (childProps) { - const children = this.props.children || noop + const children = this.props.children || (() => {}) return typeof children === 'function' ? children(childProps) : React.isValidElement(children) @@ -87,7 +85,7 @@ class BaseCard extends React.Component { render () { const { title = undefined, - icon = undefined, + icon: TheIcon = undefined, itemCount = undefined, editMode = undefined, editable = true, @@ -101,13 +99,18 @@ class BaseCard extends React.Component { const editing = editMode === undefined ? this.state.edit : editMode const hasHeading = !!title const hasBadge = itemCount !== undefined - const hasIcon = icon && icon.type && icon.name const RenderChildren = this.renderChildren return ( - + {hasHeading && ( - + + + + {TheIcon && } + {title} + {hasBadge && {itemCount}} + - - {hasIcon && } - {title} - {hasBadge && {itemCount}} - - + )} @@ -143,10 +141,8 @@ class BaseCard extends React.Component { {editing && ( - - +