tweak widths

This commit is contained in:
Severiano Badajoz
2020-05-28 16:07:09 -07:00
parent 618c4f1a98
commit 7db76d323b
@@ -22,6 +22,8 @@ import * as globals from "../../../globals";
}; };
}) })
class Category extends React.Component { class Category extends React.Component {
_labelWidth = globals.leftSidebarWidth - 80;
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
@@ -141,11 +143,12 @@ class Category extends React.Component {
<input disabled id={checkboxID} checked type="checkbox" /> <input disabled id={checkboxID} checked type="checkbox" />
<span className="bp3-control-indicator" /> <span className="bp3-control-indicator" />
</label> </label>
<Truncate fontSize={12} size={globals.maxControlsWidth}> <Truncate fontSize={12} size={this._labelWidth}>
<span <span
style={{ style={{
cursor: "pointer", cursor: "pointer",
display: "inline-block", display: "inline-block",
width: this._labelWidth,
}} }}
> >
{metadataField} {metadataField}
@@ -242,11 +245,11 @@ class Category extends React.Component {
}} }}
style={{ style={{
cursor: "pointer", cursor: "pointer",
display: "inline-block", width: this._labelWidth,
}} }}
onClick={this.handleCategoryClick} onClick={this.handleCategoryClick}
> >
<Truncate fontSize={12} size={220}> <Truncate fontSize={14} size={this._labelWidth}>
<span>{metadataField}</span> <span>{metadataField}</span>
</Truncate> </Truncate>
{isExpanded ? ( {isExpanded ? (