From 5abf169dc6e44b9c72d819a0567fb3389b1e9641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=8C=AB?= Date: Sun, 18 Jun 2023 11:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20highlight=20scroll=20erro?= =?UTF-8?q?r=20(#37)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix: highlight scroll error * 📸 chore: update snapshot --------- Co-authored-by: rdmclin2 --- src/Highlight/style.ts | 1 + tests/__snapshots__/demo.test.tsx.snap | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Highlight/style.ts b/src/Highlight/style.ts index e07995b4..f01f03dd 100644 --- a/src/Highlight/style.ts +++ b/src/Highlight/style.ts @@ -23,6 +23,7 @@ export const useStyles = createStyles( typeStylish, css` position: relative; + overflow: auto; margin: 0; border-radius: ${token.borderRadius}px; transition: background-color 100ms ${token.motionEaseOut}; diff --git a/tests/__snapshots__/demo.test.tsx.snap b/tests/__snapshots__/demo.test.tsx.snap index 59af603b..a716e114 100644 --- a/tests/__snapshots__/demo.test.tsx.snap +++ b/tests/__snapshots__/demo.test.tsx.snap @@ -16369,6 +16369,7 @@ exports[` > renders basic.tsx correctly 1`] = ` background-color: #2b303b; border: 1px solid #2b303b; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1); @@ -16728,6 +16729,7 @@ exports[` > renders lineNumber.tsx correctly 1`] = ` background-color: #fafafa; border: 1px solid #fafafa; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1); @@ -17125,6 +17127,7 @@ exports[` > renders theme.tsx correctly 1`] = ` background-color: #fafafa; border: 1px solid #fafafa; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1); @@ -18464,6 +18467,7 @@ exports[` > renders buttonAssets.tsx correctly 1`] = ` background-color: #fafafa; border: 1px solid #fafafa; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1); @@ -20154,6 +20158,7 @@ exports[` > renders controlledPresence.tsx correctly 1`] = ` background-color: #fafafa; border: 1px solid #fafafa; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1); @@ -21758,6 +21763,7 @@ exports[` > renders defaultAssets.tsx correctly 1`] = ` background-color: #2b303b; border: 1px solid #2b303b; position: relative; + overflow: auto; margin: 0; border-radius: 6px; -webkit-transition: background-color 100ms cubic-bezier(0.215, 0.61, 0.355, 1);