From c3f0b309a9f2d60f7169569034626304087c040b Mon Sep 17 00:00:00 2001 From: tomiir Date: Wed, 3 Jan 2024 16:18:28 -0600 Subject: [PATCH 1/2] fix: capped networks view grid to 70vh --- packages/scaffold/src/views/w3m-networks-view/index.ts | 2 ++ packages/scaffold/src/views/w3m-networks-view/styles.ts | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 packages/scaffold/src/views/w3m-networks-view/styles.ts diff --git a/packages/scaffold/src/views/w3m-networks-view/index.ts b/packages/scaffold/src/views/w3m-networks-view/index.ts index f3a80f8fe8..0dddcf6e0a 100644 --- a/packages/scaffold/src/views/w3m-networks-view/index.ts +++ b/packages/scaffold/src/views/w3m-networks-view/index.ts @@ -11,9 +11,11 @@ import { customElement } from '@web3modal/ui' import { LitElement, html } from 'lit' import { state } from 'lit/decorators.js' import { ifDefined } from 'lit/directives/if-defined.js' +import styles from './styles.js' @customElement('w3m-networks-view') export class W3mNetworksView extends LitElement { + public static override styles = styles // -- Members ------------------------------------------- // private unsubscribe: (() => void)[] = [] diff --git a/packages/scaffold/src/views/w3m-networks-view/styles.ts b/packages/scaffold/src/views/w3m-networks-view/styles.ts new file mode 100644 index 0000000000..030241d6ab --- /dev/null +++ b/packages/scaffold/src/views/w3m-networks-view/styles.ts @@ -0,0 +1,8 @@ +import { css } from 'lit' + +export default css` + :host > wui-grid { + max-height: 70vh; + overflow: auto; + } +` From f2e27b26dce2d52ddf9032b68b5574c5797894ff Mon Sep 17 00:00:00 2001 From: tomiir Date: Thu, 4 Jan 2024 08:28:23 -0600 Subject: [PATCH 2/2] fix: set max height to 360px to keep in sync with connection view. Removed scrollbar --- packages/scaffold/src/views/w3m-networks-view/styles.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/scaffold/src/views/w3m-networks-view/styles.ts b/packages/scaffold/src/views/w3m-networks-view/styles.ts index 030241d6ab..fae4252e75 100644 --- a/packages/scaffold/src/views/w3m-networks-view/styles.ts +++ b/packages/scaffold/src/views/w3m-networks-view/styles.ts @@ -2,7 +2,11 @@ import { css } from 'lit' export default css` :host > wui-grid { - max-height: 70vh; + max-height: 360px; overflow: auto; } + + wui-grid::-webkit-scrollbar { + display: none; + } `