From c68096a04bd5dff3367b955e986a84d7552f9bfb Mon Sep 17 00:00:00 2001 From: Rene Haas Date: Mon, 29 Jul 2024 11:47:15 +0200 Subject: [PATCH] improve examples --- examples/angular/src/app/app.component.ts | 5 +++-- examples/angular/src/main.ts | 4 +++- examples/angular/src/styles.css | 20 ++++++++----------- examples/browser/index.html | 2 +- examples/browser/script.js | 11 ++++++++-- examples/browser/styles.css | 20 ++++++++----------- examples/node/index.html | 2 +- examples/node/src/script.js | 11 ++++++++-- examples/node/styles.css | 20 ++++++++----------- examples/overlayscrollbars/index.html | 2 +- .../src/bodyOverlayScrollbars.ts | 6 +++++- examples/overlayscrollbars/src/index.ts | 3 +++ examples/overlayscrollbars/styles.css | 20 ++++++++----------- examples/react/src/App.tsx | 3 ++- examples/react/src/index.css | 20 ++++++++----------- examples/react/src/main.tsx | 3 +++ examples/solid/src/App.tsx | 3 ++- examples/solid/src/index.css | 20 ++++++++----------- examples/solid/src/index.tsx | 3 +++ examples/svelte/src/App.svelte | 3 ++- examples/svelte/src/app.css | 20 ++++++++----------- examples/svelte/src/main.ts | 3 +++ examples/vue/src/App.vue | 3 ++- examples/vue/src/main.css | 20 ++++++++----------- examples/vue/src/main.ts | 3 +++ 25 files changed, 119 insertions(+), 111 deletions(-) diff --git a/examples/angular/src/app/app.component.ts b/examples/angular/src/app/app.component.ts index 443e9476..2141259a 100644 --- a/examples/angular/src/app/app.component.ts +++ b/examples/angular/src/app/app.component.ts @@ -16,6 +16,7 @@ const initBodyOverlayScrollbars = (force?: boolean) => { scrollbars: { theme: 'os-theme-light', + clickScroll: true, }, } ).state().destroyed; @@ -29,7 +30,7 @@ const initBodyOverlayScrollbars = (force?: boolean) => OverlayScrollbars Ngx -
+

Events:

{{ observedEvent.key }} diff --git a/examples/angular/src/main.ts b/examples/angular/src/main.ts index 17a5cd4e..250c1b3b 100644 --- a/examples/angular/src/main.ts +++ b/examples/angular/src/main.ts @@ -1,7 +1,9 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - +import { OverlayScrollbars, ClickScrollPlugin } from 'overlayscrollbars'; import { AppModule } from './app/app.module'; +OverlayScrollbars.plugin(ClickScrollPlugin); + platformBrowserDynamic() .bootstrapModule(AppModule) .catch((err) => console.error(err)); diff --git a/examples/angular/src/styles.css b/examples/angular/src/styles.css index 6c3945a2..cc7d595c 100644 --- a/examples/angular/src/styles.css +++ b/examples/angular/src/styles.css @@ -104,30 +104,26 @@ img { height: 100%; } -.slot { - border-radius: 6px; +.overlayscrollbars-ngx { width: 16rem; height: 16rem; margin: 0 auto; - flex: none; -} - -.overlayscrollbars-ngx { - width: 100%; - height: 100%; + resize: both; overflow: auto; - border: 2px solid var(--foreground-color); border-radius: 6px; + border: 2px solid var(--foreground-color); box-shadow: rgb(var(--foreground-color-rgb) / 0.14) 0 0.875rem 3.125rem; } .logo { - width: 180%; - height: 180%; + width: 32rem; + height: 32rem; padding: 1rem; - display: inline-block; + display: block; pointer-events: none; user-select: none; + backdrop-filter: brightness(88%) contrast(1.012); + margin: 0 auto; } .title { diff --git a/examples/browser/index.html b/examples/browser/index.html index e9b4cf41..07ec7409 100644 --- a/examples/browser/index.html +++ b/examples/browser/index.html @@ -33,7 +33,7 @@

OverlayScrollbars

-
+