1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

make network-display component only clickable when passed a function for onClick (#11379)

This commit is contained in:
Alex Donesky 2021-06-30 13:21:48 -05:00 committed by GitHub
parent 433cf6339d
commit ad6715511e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,6 @@
padding: 0 10px;
border-radius: 4px;
min-height: 25px;
cursor: pointer;
user-select: none;
&--disabled {
@ -36,7 +35,6 @@
background-color: lighten($dodger-blue, 35%);
}
& .chip__label {
overflow: hidden;
text-overflow: ellipsis;
@ -56,4 +54,8 @@
width: 12px;
display: block;
}
&--clickable {
cursor: pointer;
}
}

View File

@ -74,6 +74,7 @@ export default function NetworkDisplay({
'network-display--colored': colored,
'network-display--disabled': disabled,
[`network-display--${networkType}`]: colored && networkType,
'network-display--clickable': typeof onClick === 'function',
})}
labelProps={{
variant: TYPOGRAPHY.H7,