From 8215caad9ef613820d60309ed6fe7e8675b5e7c3 Mon Sep 17 00:00:00 2001 From: Julian Kobrynski Date: Thu, 24 Aug 2023 14:33:50 +0200 Subject: [PATCH] migrate overflowAuto to TypeScript --- src/styles/utilities/overflowAuto/index.js | 3 --- src/styles/utilities/overflowAuto/index.native.js | 4 ---- src/styles/utilities/overflowAuto/index.native.ts | 8 ++++++++ src/styles/utilities/overflowAuto/index.ts | 7 +++++++ src/styles/utilities/overflowAuto/types.ts | 5 +++++ 5 files changed, 20 insertions(+), 7 deletions(-) delete mode 100644 src/styles/utilities/overflowAuto/index.js delete mode 100644 src/styles/utilities/overflowAuto/index.native.js create mode 100644 src/styles/utilities/overflowAuto/index.native.ts create mode 100644 src/styles/utilities/overflowAuto/index.ts create mode 100644 src/styles/utilities/overflowAuto/types.ts diff --git a/src/styles/utilities/overflowAuto/index.js b/src/styles/utilities/overflowAuto/index.js deleted file mode 100644 index 358f781077d7..000000000000 --- a/src/styles/utilities/overflowAuto/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default { - overflow: 'auto', -}; diff --git a/src/styles/utilities/overflowAuto/index.native.js b/src/styles/utilities/overflowAuto/index.native.js deleted file mode 100644 index 2075ce53e3e1..000000000000 --- a/src/styles/utilities/overflowAuto/index.native.js +++ /dev/null @@ -1,4 +0,0 @@ -// Overflow auto doesn't exist in react-native so we'll default to overflow: visible -export default { - overflow: 'visible', -}; diff --git a/src/styles/utilities/overflowAuto/index.native.ts b/src/styles/utilities/overflowAuto/index.native.ts new file mode 100644 index 000000000000..34ee18db1d0a --- /dev/null +++ b/src/styles/utilities/overflowAuto/index.native.ts @@ -0,0 +1,8 @@ +import OverflowAutoStyles from './types'; + +// Overflow auto doesn't exist in react-native so we'll default to overflow: visible +const overflowAuto: OverflowAutoStyles = { + overflow: 'visible', +}; + +export default overflowAuto; diff --git a/src/styles/utilities/overflowAuto/index.ts b/src/styles/utilities/overflowAuto/index.ts new file mode 100644 index 000000000000..0eb19068738f --- /dev/null +++ b/src/styles/utilities/overflowAuto/index.ts @@ -0,0 +1,7 @@ +import OverflowAutoStyles from './types'; + +const overflowAuto: OverflowAutoStyles = { + overflow: 'auto', +}; + +export default overflowAuto; diff --git a/src/styles/utilities/overflowAuto/types.ts b/src/styles/utilities/overflowAuto/types.ts new file mode 100644 index 000000000000..faba7c2cbdb8 --- /dev/null +++ b/src/styles/utilities/overflowAuto/types.ts @@ -0,0 +1,5 @@ +import {CSSProperties} from 'react'; + +type OverflowAutoStyles = Pick; + +export default OverflowAutoStyles;