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

feature/default_network_editable
Alex Donesky 3 years ago committed by GitHub
parent 433cf6339d
commit ad6715511e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui/components/app/network-display/index.scss
  2. 1
      ui/components/app/network-display/network-display.js

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

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

Loading…
Cancel
Save