diff --git a/src/styles/utilities/userSelect/index.native.js b/src/styles/utilities/userSelect/index.native.ts similarity index 52% rename from src/styles/utilities/userSelect/index.native.js rename to src/styles/utilities/userSelect/index.native.ts index 0d1dfe97aa1d..0d1a34ef2473 100644 --- a/src/styles/utilities/userSelect/index.native.js +++ b/src/styles/utilities/userSelect/index.native.ts @@ -1,4 +1,6 @@ -export default { +import UserSelectStyles from './types'; + +const userSelect: UserSelectStyles = { userSelectText: { userSelect: 'text', }, @@ -6,3 +8,5 @@ export default { userSelect: 'none', }, }; + +export default userSelect; diff --git a/src/styles/utilities/userSelect/index.js b/src/styles/utilities/userSelect/index.ts similarity index 63% rename from src/styles/utilities/userSelect/index.js rename to src/styles/utilities/userSelect/index.ts index c6b71170cf14..6b9f26131b5e 100644 --- a/src/styles/utilities/userSelect/index.js +++ b/src/styles/utilities/userSelect/index.ts @@ -1,4 +1,6 @@ -export default { +import UserSelectStyles from './types'; + +const userSelect: UserSelectStyles = { userSelectText: { userSelect: 'text', WebkitUserSelect: 'text', @@ -8,3 +10,5 @@ export default { WebkitUserSelect: 'none', }, }; + +export default userSelect; diff --git a/src/styles/utilities/userSelect/types.ts b/src/styles/utilities/userSelect/types.ts new file mode 100644 index 000000000000..67a8c9c7b9b6 --- /dev/null +++ b/src/styles/utilities/userSelect/types.ts @@ -0,0 +1,5 @@ +import {CSSProperties} from 'react'; + +type UserSelectStyles = Record<'userSelectText' | 'userSelectNone', Partial>>; + +export default UserSelectStyles;