Skip to content

Commit

Permalink
migrate user select styles to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
pasyukevich committed Aug 24, 2023
1 parent 00efce4 commit acd61b7
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 acd61b7

Please sign in to comment.