Skip to content

Commit

Permalink
fix: horizontal metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriiMelnikOnix committed Mar 8, 2022
1 parent e246b7d commit 473f134
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions src/components/Topology/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ import clsx from "clsx";
import { FormatProperty } from "./property";

export const Metrics = ({ items, row }) => (
<div
className={clsx(
"grid rounded-b-8px divide-x flex-1",
`grid-cols-${items.length}`
)}
>
<div className="flex rounded-b-8px divide-x flex-1 justify-between items-center">
{items.map((item) => (
<div
key={item.name}
className={clsx("text-gray-800 px-2 align-middle text-center flex", {
"flex-col": !row,
"flex-row items-center justify-center": row
})}
className={clsx(
"text-gray-800 px-2 align-middle text-center flex flex-1",
{
"flex-col": !row,
"flex-row items-center justify-center": row
}
)}
>
<h6 className="text-gray-color text-xs mb-0.5">
{item.name}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Topology/topology-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function TopologyCard({
</div>
<div className="flex flex-nowrap bg-lightest-gray rounded-b-8px">
{metricsInFooter ? (
<div className="flex p-4 flex-1">
<div className="flex py-4 flex-1">
<Metrics items={heading} />
</div>
) : (
Expand Down

0 comments on commit 473f134

Please sign in to comment.