Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
fix: compact mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xstelea committed Aug 10, 2023
1 parent 0bb2b07 commit b7daab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/components/connect-button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, css, html } from 'lit'
import { customElement, property, state } from 'lit/decorators.js'
import { customElement, property } from 'lit/decorators.js'
import { config } from '../config'
import './popover/popover'
import './button/button'
Expand Down Expand Up @@ -88,10 +88,8 @@ export class ConnectButton extends LitElement {
@property({ type: String })
avatarUrl: string = ''

@state()
state = {
compact: false,
}
@property({ type: Boolean, state: true })
compact = false

get hasSharedData(): boolean {
return !!(this.accounts.length || this.personaData.length)
Expand Down Expand Up @@ -151,7 +149,7 @@ export class ConnectButton extends LitElement {
?fullWidth=${this.fullWidth}
@onClick=${this.togglePopover}
@onResize=${(event: CustomEvent) => {
this.state.compact = event.detail.offsetWidth === 42
this.compact = event.detail.offsetWidth === 40
}}
><div>${buttonText}</div></radix-button
>`
Expand Down Expand Up @@ -211,11 +209,10 @@ export class ConnectButton extends LitElement {

private popoverTemplate() {
if (!this.showPopover) return ''

return html` <radix-popover
mode="${this.mode}"
?connected=${this.connected}
?compact=${this.state.compact}
?compact=${this.compact}
class=${classMap({ popover: true, 'show-popover': this.showPopover })}
>
${this.connected
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RadixRequestsPage extends LitElement {
pageStyles,
css`
.subheader {
color: var(--color-grey-2);
color: var(--radix-card-text-dimmed-color);
margin-top: -12px;
margin-bottom: 15px;
text-align: center;
Expand Down

0 comments on commit b7daab9

Please sign in to comment.