1
0
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:
Nidhi Kumari 2023-07-13 23:31:10 +05:30 committed by Dan J Miller
parent 3c981d78d5
commit 710101991c
2 changed files with 23 additions and 7 deletions

View File

@ -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>

View File

@ -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
}
} }