tweak widths

This commit is contained in:
Severiano Badajoz
2020-05-28 16:08:02 -07:00
parent 7db76d323b
commit cb94a1057f
@@ -324,6 +324,11 @@ class CategoryValue extends React.Component {
const valueToggleLabel = `value-toggle-checkbox-${displayString}`; const valueToggleLabel = `value-toggle-checkbox-${displayString}`;
const labelWidth =
colorAccessor && !isColorBy
? globals.leftSidebarWidth - 145 - 15 - 100
: globals.leftSidebarWidth - 145 - 15;
return ( return (
<div <div
key={i} key={i}
@@ -376,18 +381,12 @@ class CategoryValue extends React.Component {
onMouseLeave={this.handleMouseEnter} onMouseLeave={this.handleMouseEnter}
/> />
</label> </label>
<Truncate <Truncate size={labelWidth} fontSize={12}>
size={
colorAccessor && !isColorBy
? globals.leftSidebarWidth - 145 - 26 - 120
: globals.leftSidebarWidth - 145 - 26
}
fontSize={12}
>
<span <span
data-testid={`categorical-value-${metadataField}-${displayString}`} data-testid={`categorical-value-${metadataField}-${displayString}`}
data-testclass="categorical-value" data-testclass="categorical-value"
style={{ style={{
width: labelWidth,
color: color:
displayString === globals.unassignedCategoryLabel displayString === globals.unassignedCategoryLabel
? "#ababab" ? "#ababab"
@@ -400,7 +399,6 @@ class CategoryValue extends React.Component {
overflow: "hidden", overflow: "hidden",
lineHeight: "1.1em", lineHeight: "1.1em",
height: "1.1em", height: "1.1em",
wordBreak: "break-all",
verticalAlign: "middle", verticalAlign: "middle",
}} }}
> >