Skip to content

Commit

Permalink
Merge pull request #25832 from pasyukevich/ts-migrate/userSelect
Browse files Browse the repository at this point in the history
[No QA] [TS migration] Migrate 'userSelect' style to TypeScript
  • Loading branch information
deetergp authored Aug 26, 2023
2 parents d17d0c7 + acd61b7 commit 253db32
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
export default {
import UserSelectStyles from './types';

const userSelect: UserSelectStyles = {
userSelectText: {
userSelect: 'text',
},
userSelectNone: {
userSelect: 'none',
},
};

export default userSelect;
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default {
import UserSelectStyles from './types';

const userSelect: UserSelectStyles = {
userSelectText: {
userSelect: 'text',
WebkitUserSelect: 'text',
Expand All @@ -8,3 +10,5 @@ export default {
WebkitUserSelect: 'none',
},
};

export default userSelect;
5 changes: 5 additions & 0 deletions src/styles/utilities/userSelect/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {CSSProperties} from 'react';

type UserSelectStyles = Record<'userSelectText' | 'userSelectNone', Partial<Pick<CSSProperties, 'userSelect' | 'WebkitUserSelect'>>>;

export default UserSelectStyles;

0 comments on commit 253db32

Please sign in to comment.