mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Make ConnectedStatusIndicator clickable (#8297)
This commit is contained in:
parent
f7a53926b3
commit
6aa8e78006
@ -14,10 +14,12 @@ export default class ConnectedStatusIndicator extends Component {
|
||||
|
||||
static propTypes = {
|
||||
status: PropTypes.oneOf([ STATUS_CONNECTED, STATUS_CONNECTED_TO_ANOTHER_ACCOUNT, STATUS_NOT_CONNECTED ]),
|
||||
onClick: PropTypes.func,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
status: STATUS_NOT_CONNECTED,
|
||||
onClick: null,
|
||||
}
|
||||
|
||||
renderStatusCircle = () => {
|
||||
@ -49,10 +51,10 @@ export default class ConnectedStatusIndicator extends Component {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<div className="connected-status-indicator">
|
||||
<button className="connected-status-indicator" onClick={this.props.onClick}>
|
||||
{ this.renderStatusCircle() }
|
||||
{ this.renderStatusText() }
|
||||
</div>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,10 @@
|
||||
align-items: center;
|
||||
place-self: center start;
|
||||
|
||||
background: none;
|
||||
font-size: inherit;
|
||||
padding: 8px 0;
|
||||
|
||||
&__green-circle, &__yellow-circle, &__grey-circle {
|
||||
border-radius: 4px;
|
||||
height: 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user