mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fixed button in wallet-overview (#19920)
* fixed button in wallet-overview * lint fix * updated selector css with class
This commit is contained in:
parent
3c981d78d5
commit
710101991c
@ -28,13 +28,25 @@ export default function IconButton({
|
|||||||
{renderWrapper(
|
{renderWrapper(
|
||||||
<>
|
<>
|
||||||
<div className="icon-button__circle">{Icon}</div>
|
<div className="icon-button__circle">{Icon}</div>
|
||||||
<Text ellipsis variant={TextVariant.bodySm}>
|
{label.length > 9 ? (
|
||||||
{label.length > 12 ? (
|
<Tooltip title={label} position="bottom">
|
||||||
<Tooltip title={label}>{label}</Tooltip>
|
<Text
|
||||||
) : (
|
className="icon-button__label"
|
||||||
label
|
ellipsis
|
||||||
)}
|
variant={TextVariant.bodySm}
|
||||||
</Text>
|
>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
<Text
|
||||||
|
className="icon-button__label"
|
||||||
|
ellipsis
|
||||||
|
variant={TextVariant.bodySm}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</>,
|
</>,
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
@ -29,4 +29,8 @@
|
|||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__label {
|
||||||
|
width: 60px; //for ellipsis keeping the width same as icon-button used here
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user