-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
124 improving ux and align it with the familyco one (#125)
* fix: ux improvements * fix: badge renaming * fix: colors * fix: tests * fix: comment store link
- Loading branch information
1 parent
b984755
commit 430431f
Showing
30 changed files
with
526 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './icons'; | ||
export * from './images'; | ||
export * from './styles'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { css } from 'lit'; | ||
import { Colors } from '../../constants/colors'; | ||
|
||
export const buttonStyle = css` | ||
button { | ||
font-family: 'Inter', sans-serif; | ||
cursor: pointer; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
border: none; | ||
border-radius: 12px; | ||
padding: 12px; | ||
font-size: 15px; | ||
font-weight: 500; | ||
width: 100%; | ||
gap: 10px; | ||
} | ||
button.LIGHT { | ||
background-color: ${Colors.XXLightGrey}; | ||
color: ${Colors.LightBlack}; | ||
} | ||
button.LIGHT:hover { | ||
background-color: ${Colors.XLightGrey}; | ||
} | ||
button.LIGHT:active { | ||
background-color: ${Colors.LightGrey}; | ||
} | ||
button.DARK { | ||
background-color: ${Colors.XXDarkGrey}; | ||
color: ${Colors.XXLightGrey}; | ||
} | ||
button.DARK:hover { | ||
background-color: ${Colors.XDarkGrey}; | ||
} | ||
button.DARK:active { | ||
background-color: ${Colors.DarkGrey}; | ||
} | ||
`; | ||
|
||
export const triggerButtonStyle = css` | ||
button { | ||
font-family: 'Inter', sans-serif; | ||
cursor: pointer; | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: center; | ||
border: none; | ||
border-radius: 12px; | ||
padding: 12px; | ||
} | ||
button.LIGHT { | ||
background-color: ${Colors.XXLightGrey}; | ||
color: ${Colors.LightBlack}; | ||
} | ||
button.LIGHT:hover { | ||
background-color: ${Colors.XLightGrey}; | ||
} | ||
button.LIGHT:active { | ||
background-color: ${Colors.LightGrey}; | ||
} | ||
button.DARK { | ||
background-color: ${Colors.LightBlack}; | ||
color: ${Colors.XXLightGrey}; | ||
} | ||
button.DARK:hover { | ||
background-color: ${Colors.XLightBlack}; | ||
} | ||
button.DARK:active { | ||
background-color: ${Colors.XXLightBlack}; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './button'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { css, html, LitElement, type TemplateResult } from 'lit'; | ||
import { customElement, property } from 'lit/decorators.js'; | ||
import { type ThemeMode } from '../constants'; | ||
import { friendlyAddress, getPicassoImage } from '../utils/account'; | ||
import { triggerButtonStyle } from '../assets'; | ||
|
||
@customElement('vwk-connected-address-button') | ||
export class AddressButton extends LitElement { | ||
static override styles = [ | ||
triggerButtonStyle, | ||
css` | ||
button { | ||
padding: 9px 12px; | ||
} | ||
/* Style for the wallet address */ | ||
.wallet-address { | ||
font-size: 14px; | ||
margin-left: 8px; | ||
font-family: 'Inter', sans-serif; | ||
} | ||
.address-icon { | ||
width: 23px; | ||
height: 23px; | ||
margin-right: 4px; | ||
border-radius: 50%; | ||
} | ||
`, | ||
]; | ||
|
||
@property() | ||
address?: string; | ||
|
||
@property() | ||
mode: ThemeMode = 'DARK'; | ||
|
||
@property({ type: Function }) | ||
onClick? = undefined; | ||
|
||
render(): TemplateResult { | ||
return html` <button | ||
class="wallet-button ${this.mode}" | ||
@click=${this.onClick} | ||
> | ||
<img | ||
class="address-icon" | ||
src=${getPicassoImage(this.address ?? '')} | ||
/> | ||
<span class="wallet-address" | ||
>${friendlyAddress(this.address ?? '')}</span | ||
> | ||
</button>`; | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'vwk-connected-address-button': AddressButton; | ||
} | ||
} |
Oops, something went wrong.