1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Make ConnectedStatusIndicator clickable (#8297)

This commit is contained in:
Whymarrh Whitby 2020-04-07 18:53:18 -02:30 committed by GitHub
parent f7a53926b3
commit 6aa8e78006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

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

View File

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