Skip to content

Commit

Permalink
Merge pull request Expensify#26065 from pasyukevich/migrate-ts/getRep…
Browse files Browse the repository at this point in the history
…ortActionContextMenuStyles

[No QA] [TS migration] Migrate 'getReportActionContextMenuStyles.js' style to TypeScript
  • Loading branch information
aldo-expensify authored Aug 31, 2023
2 parents d937164 + 453341e commit 3d4d671
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import {CSSProperties} from 'react';
import {ViewStyle} from 'react-native';
import styles from './styles';
import variables from './variables';
import themeColors from './themes/default';

const defaultWrapperStyle = {
type StylesArray = Array<ViewStyle | CSSProperties>;

const defaultWrapperStyle: ViewStyle | CSSProperties = {
backgroundColor: themeColors.componentBG,
};

const miniWrapperStyle = [
const miniWrapperStyle: StylesArray = [
styles.flexRow,
defaultWrapperStyle,
{
Expand All @@ -18,16 +22,15 @@ const miniWrapperStyle = [
},
];

const bigWrapperStyle = [styles.flexColumn, defaultWrapperStyle];
const bigWrapperStyle: StylesArray = [styles.flexColumn, defaultWrapperStyle];

/**
* Generate the wrapper styles for the ReportActionContextMenu.
*
* @param {Boolean} isMini
* @param {Boolean} isSmallScreenWidth
* @returns {Array}
* @param isMini
* @param isSmallScreenWidth
*/
function getReportActionContextMenuStyles(isMini, isSmallScreenWidth) {
function getReportActionContextMenuStyles(isMini: boolean, isSmallScreenWidth: boolean): StylesArray {
if (isMini) {
return miniWrapperStyle;
}
Expand Down

0 comments on commit 3d4d671

Please sign in to comment.