Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp committed Jan 31, 2024
1 parent e8fb82f commit 28afbb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ export class W3mUnsupportedChainView extends LitElement {
// -- Render -------------------------------------------- //
public override render() {
return html`
<wui-flex
class="container"
flexDirection="column"
.padding=${['0', '0', '0', '0'] as const}
gap="0"
>
<wui-flex class="container" flexDirection="column" gap="0">
<wui-flex
class="container"
flexDirection="column"
Expand Down
7 changes: 3 additions & 4 deletions packages/ui/src/composites/wui-network-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class WuiNetworkImage extends LitElement {
public static override styles = [resetStyles, styles]

// -- State & Properties -------------------------------- //
@property() public size: Exclude<SizeType, 'inherit' | 'xl' | 'xs' | 'xxs'> = 'md'
@property() public size: Exclude<SizeType, 'inherit' | 'xl' | 'xs' | 'mdl' | 'xxs'> = 'md'

@property() public name = 'uknown'

Expand All @@ -25,8 +25,7 @@ export class WuiNetworkImage extends LitElement {

// -- Render -------------------------------------------- //
public override render() {
const isLg = this.size === 'lg'
const isMd = this.size === 'md'
const networkImagesBySize = { sm: networkSvgSm, md: networkSvgMd, lg: networkSvgLg }
this.style.cssText = `
--local-stroke: ${
this.selected ? 'var(--wui-color-accent-100)' : 'var(--wui-gray-glass-010)'
Expand All @@ -38,7 +37,7 @@ export class WuiNetworkImage extends LitElement {
`

// eslint-disable-next-line no-nested-ternary
return html`${this.templateVisual()} ${isLg ? networkSvgLg : isMd ? networkSvgMd : networkSvgSm}`
return html`${this.templateVisual()} ${networkImagesBySize[this.size]}`
}

// -- Private ------------------------------------------- //
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/utils/ThemeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function createRootStyles(themeVariables?: ThemeVariables) {
--wui-height-network-md: 54px;
--wui-height-network-lg: 96px;
--wui-icon-size-network-sm: 10px;
--wui-icon-size-network-sm: 16px;
--wui-icon-size-network-md: 24px;
--wui-icon-size-network-lg: 42px;
Expand Down

0 comments on commit 28afbb2

Please sign in to comment.