1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +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:
Nidhi Kumari 2023-07-13 23:31:10 +05:30 committed by GitHub
parent 0ba409662e
commit f17a841677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 7 deletions

View File

@ -28,13 +28,25 @@ export default function IconButton({
{renderWrapper(
<>
<div className="icon-button__circle">{Icon}</div>
<Text ellipsis variant={TextVariant.bodySm}>
{label.length > 12 ? (
<Tooltip title={label}>{label}</Tooltip>
) : (
label
)}
</Text>
{label.length > 9 ? (
<Tooltip title={label} position="bottom">
<Text
className="icon-button__label"
ellipsis
variant={TextVariant.bodySm}
>
{label}
</Text>
</Tooltip>
) : (
<Text
className="icon-button__label"
ellipsis
variant={TextVariant.bodySm}
>
{label}
</Text>
)}
</>,
)}
</button>

View File

@ -29,4 +29,8 @@
opacity: 0.3;
cursor: auto;
}
&__label {
width: 60px; //for ellipsis keeping the width same as icon-button used here
}
}