Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Mar 19, 2022
1 parent 561adf1 commit 2951b23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/ui/src/ui/treemap/treemap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import cx from 'classnames';
import PropTypes from 'prop-types';

import squarify from './treemap-squarify';
import css from './treemap.module.css'
import css from './treemap.module.css';

const getPercentageValue = (value, ref) => `${(value / ref ) * 100}%`;
const getPercentageValue = (value, ref) => `${(value / ref) * 100}%`;

const DefaultItem = ({ item, ...restProps }) => (
<div {...restProps}>
Expand Down Expand Up @@ -38,7 +38,7 @@ export const Treemap = ({ className, data, Item }) => {
const height = containerRef?.current?.clientHeight || 210;

const values = data.map(({ value }) => value);
const itemCoordinates = squarify(values, width, height, 0, 0);
const itemCoordinates = squarify(values, width, height);

const newItems = data.map((item, index) => {
const coordinates = itemCoordinates[index];
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/ui/treemap/treemap.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
}

.item {
padding: var(--space-xxsmall);
position: absolute;
display: flex;
align-items: center;
Expand Down

0 comments on commit 2951b23

Please sign in to comment.