-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TS migration] Migrate 'getContextMenuItemStyles' style to TypeScript
- Loading branch information
1 parent
1ff328b
commit 3d30bef
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import styles from '../styles'; | ||
import GetContextMenuItemStyle from './types'; | ||
|
||
export default () => [styles.popoverMenuItem]; | ||
const getContextMenuItemStyle: GetContextMenuItemStyle = () => [styles.popoverMenuItem]; | ||
|
||
export default getContextMenuItemStyle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import styles from '../styles'; | ||
import variables from '../variables'; | ||
import GetContextMenuItemStyle from './types'; | ||
|
||
export default (windowWidth) => { | ||
if (windowWidth > variables.mobileResponsiveWidthBreakpoint) { | ||
const GetContextMenuItemStyles: GetContextMenuItemStyle = (windowWidth) => { | ||
if (windowWidth && windowWidth > variables.mobileResponsiveWidthBreakpoint) { | ||
return [styles.popoverMenuItem, styles.contextMenuItemPopoverMaxWidth]; | ||
} | ||
return [styles.popoverMenuItem]; | ||
}; | ||
|
||
export default GetContextMenuItemStyles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {ViewStyle} from 'react-native'; | ||
|
||
type GetContextMenuItemStyle = (windowWidth?: number) => ViewStyle[]; | ||
|
||
export default GetContextMenuItemStyle; |