From bc33c0ed9c3000d65ec1a18ec09e052b19bbb356 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Wed, 19 Jun 2024 17:01:37 +0200 Subject: [PATCH] Fix plugin scrollbar (#181) --- .changeset/few-apes-smell.md | 5 +++++ package-lock.json | 4 ++-- ui-src/components/Wrapper/Wrapper.module.css | 4 ---- ui-src/components/Wrapper/Wrapper.tsx | 7 +------ ui-src/index.html | 2 +- ui-src/main.css | 4 ++-- 6 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 .changeset/few-apes-smell.md diff --git a/.changeset/few-apes-smell.md b/.changeset/few-apes-smell.md new file mode 100644 index 00000000..3cd8e01d --- /dev/null +++ b/.changeset/few-apes-smell.md @@ -0,0 +1,5 @@ +--- +"penpot-exporter": patch +--- + +Fix scrollbar showing up randomly diff --git a/package-lock.json b/package-lock.json index b7d4c6a0..e981ff70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "penpot-exporter", - "version": "0.6.1", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "penpot-exporter", - "version": "0.6.1", + "version": "0.7.0", "license": "MPL2.0", "dependencies": { "@create-figma-plugin/ui": "^3.2", diff --git a/ui-src/components/Wrapper/Wrapper.module.css b/ui-src/components/Wrapper/Wrapper.module.css index 1ec1b442..4ee7818d 100644 --- a/ui-src/components/Wrapper/Wrapper.module.css +++ b/ui-src/components/Wrapper/Wrapper.module.css @@ -1,7 +1,3 @@ .wrapper { padding: 1.5rem 1rem 1rem; - - .wrapper-overflow { - /* Empty class used to detect overflow on the body */ - } } diff --git a/ui-src/components/Wrapper/Wrapper.tsx b/ui-src/components/Wrapper/Wrapper.tsx index 6aaa0132..f49632e2 100644 --- a/ui-src/components/Wrapper/Wrapper.tsx +++ b/ui-src/components/Wrapper/Wrapper.tsx @@ -1,4 +1,3 @@ -import classNames from 'classnames'; import { CSSProperties, PropsWithChildren, forwardRef } from 'react'; import styles from './Wrapper.module.css'; @@ -11,11 +10,7 @@ type WrapperProps = PropsWithChildren & { const Wrapper = forwardRef( ({ style, overflowing = false, children }: WrapperProps, ref) => { return ( -
+
{children}
); diff --git a/ui-src/index.html b/ui-src/index.html index 4f6e97c8..25b3dd2f 100644 --- a/ui-src/index.html +++ b/ui-src/index.html @@ -5,7 +5,7 @@ Penpot Exporter - +
diff --git a/ui-src/main.css b/ui-src/main.css index 74694661..513815b3 100644 --- a/ui-src/main.css +++ b/ui-src/main.css @@ -1,3 +1,3 @@ -body :not:has(.wrapper-overflow) { - overflow-y: hidden; +body:has(div[data-overflowing='true']) { + overflow-y: visible !important; }