From dc8015f0802965de9c8bed5c04691710d16fc16f Mon Sep 17 00:00:00 2001 From: jbpenrath Date: Tue, 20 Aug 2024 11:52:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84(react)=20use=20overflow=20auto=20i?= =?UTF-8?q?nstead=20of=20scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, Tooltip and Datagrid components are set to always scroll bar. This is weird, as the scrollbar is always shown even if this is not needed. Instead, we use `auto` value to display it only when it is needed --- .changeset/hip-masks-love.md | 5 +++++ packages/react/src/components/DataGrid/_index.scss | 2 +- packages/react/src/components/Tooltip/_index.scss | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/hip-masks-love.md diff --git a/.changeset/hip-masks-love.md b/.changeset/hip-masks-love.md new file mode 100644 index 000000000..1c0583add --- /dev/null +++ b/.changeset/hip-masks-love.md @@ -0,0 +1,5 @@ +--- +"@openfun/cunningham-react": patch +--- + +Use `overflow:auto` instead of `overflow:scroll` diff --git a/packages/react/src/components/DataGrid/_index.scss b/packages/react/src/components/DataGrid/_index.scss index 4426c2e41..af706bac3 100644 --- a/packages/react/src/components/DataGrid/_index.scss +++ b/packages/react/src/components/DataGrid/_index.scss @@ -17,7 +17,7 @@ &__table__container { width: 100%; - overflow: scroll; + overflow: auto; > table { border-collapse: collapse; diff --git a/packages/react/src/components/Tooltip/_index.scss b/packages/react/src/components/Tooltip/_index.scss index a185babcc..e90588c67 100644 --- a/packages/react/src/components/Tooltip/_index.scss +++ b/packages/react/src/components/Tooltip/_index.scss @@ -74,7 +74,7 @@ } &__content { - overflow: scroll; + overflow: auto; } }