Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD] Create a useResponsiveLayout hook #31476

Closed
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dd7bbd9
Create a useResponsiveLayout hook
rayane-djouah Nov 17, 2023
0a99449
Fix SignInPageLayout to use useResponsiveLayout
rayane-djouah Nov 17, 2023
19364ab
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Nov 29, 2023
133e0df
run prettier
rayane-djouah Nov 29, 2023
eda6755
fix lint errors
rayane-djouah Nov 29, 2023
a74abfc
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 8, 2023
3c8333e
fix bug: Unable to open any kind of popover
rayane-djouah Dec 8, 2023
358c55d
replace remaining usage of isSmallScreenWidth from useWindowDimension…
rayane-djouah Dec 8, 2023
8a79ce8
run prettier
rayane-djouah Dec 8, 2023
f6251db
rename isSmallScreenWidth prop to shouldUseNarrowLayout
rayane-djouah Dec 8, 2023
a790b14
remove unused imports
rayane-djouah Dec 8, 2023
016d6ae
fix typescript error
rayane-djouah Dec 8, 2023
6a4873c
fix typescript error
rayane-djouah Dec 8, 2023
19290b4
revert replacing useWindowDimensions with useResponsiveLayout due to …
rayane-djouah Dec 9, 2023
b7cd209
fix lint error
rayane-djouah Dec 9, 2023
ab3beed
fix Typescript error
rayane-djouah Dec 10, 2023
1d02130
run prettier
rayane-djouah Dec 10, 2023
285f68e
replace use of useWindowDimensions with useResponsiveLayout in AuthSc…
rayane-djouah Dec 10, 2023
a858dbb
fix bug: useResponsiveLayout shouldUseNarrowLayout is false when catc…
rayane-djouah Dec 10, 2023
b00a367
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 12, 2023
109ac5d
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 14, 2023
ee2b743
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 14, 2023
9ce3c16
fix lint error
rayane-djouah Dec 14, 2023
e0a675e
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 15, 2023
feffd8c
Merge branch 'main' into useResponsiveLayout-hook
rayane-djouah Dec 21, 2023
5d4b8ac
fix lint error
rayane-djouah Dec 21, 2023
0ae04fb
readding deleted code when resolving conflicts
rayane-djouah Dec 21, 2023
437a16d
run prettier
rayane-djouah Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import _ from 'underscore';
import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction';
import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as ContextMenuActions from '@pages/home/report/ContextMenu/ContextMenuActions';
import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu';
Expand Down Expand Up @@ -40,7 +40,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
[],
);

const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

let linkRef;

Expand All @@ -50,7 +50,7 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
} else {
linkProps.href = href;
}
const defaultTextStyle = DeviceCapabilities.canUseTouchScreen() || isSmallScreenWidth ? {} : {...styles.userSelectText, ...styles.cursorPointer};
const defaultTextStyle = DeviceCapabilities.canUseTouchScreen() || shouldUseNarrowLayout ? {} : {...styles.userSelectText, ...styles.cursorPointer};
const isEmail = Str.isValidEmail(href.replace(/mailto:/i, ''));

return (
Expand Down
6 changes: 3 additions & 3 deletions src/components/AttachmentPicker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Popover from '@components/Popover';
import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager';
import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
import useLocalize from '@hooks/useLocalize';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import * as FileUtils from '@libs/fileDownload/FileUtils';
import useThemeStyles from '@styles/useThemeStyles';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -109,7 +109,7 @@ function AttachmentPicker({type, children, shouldHideCameraOption}) {
const onCanceled = useRef();

const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

/**
* A generic handling when we don't know the exact reason for an error
Expand Down Expand Up @@ -313,7 +313,7 @@ function AttachmentPicker({type, children, shouldHideCameraOption}) {
anchorPosition={styles.createMenuPosition}
onModalHide={onModalHide.current}
>
<View style={!isSmallScreenWidth && styles.createMenuContainer}>
<View style={!shouldUseNarrowLayout && styles.createMenuContainer}>
{_.map(menuItemData, (item, menuIndex) => (
<MenuItem
key={item.textTranslationKey}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {PixelRatio, View} from 'react-native';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useThemeStyles from '@styles/useThemeStyles';

Expand All @@ -15,8 +16,9 @@ const defaultProps = {

function AttachmentCarouselCellRenderer(props) {
const styles = useThemeStyles();
const {windowWidth, isSmallScreenWidth} = useWindowDimensions();
const modalStyles = styles.centeredModalStyles(isSmallScreenWidth, true);
const {windowWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const modalStyles = styles.centeredModalStyles(shouldUseNarrowLayout, true);
const style = [props.style, styles.h100, {width: PixelRatio.roundToNearestPixel(windowWidth - (modalStyles.marginHorizontal + modalStyles.borderWidth) * 2)}];

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';
import Tooltip from '@components/Tooltip';
import useLocalize from '@hooks/useLocalize';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@styles/themes/useTheme';
import useThemeStyles from '@styles/useThemeStyles';

Expand Down Expand Up @@ -42,13 +42,13 @@ function CarouselButtons({page, attachments, shouldShowArrows, onBack, onForward
const isForwardDisabled = page === _.size(attachments) - 1;

const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

return shouldShowArrows ? (
<>
{!isBackDisabled && (
<Tooltip text={translate('common.previous')}>
<View style={[styles.attachmentArrow, isSmallScreenWidth ? styles.l2 : styles.l8]}>
<View style={[styles.attachmentArrow, shouldUseNarrowLayout ? styles.l2 : styles.l8]}>
<Button
small
innerStyles={[styles.arrowIcon]}
Expand All @@ -64,7 +64,7 @@ function CarouselButtons({page, attachments, shouldShowArrows, onBack, onForward
)}
{!isForwardDisabled && (
<Tooltip text={translate('common.next')}>
<View style={[styles.attachmentArrow, isSmallScreenWidth ? styles.r2 : styles.r8]}>
<View style={[styles.attachmentArrow, shouldUseNarrowLayout ? styles.r2 : styles.r8]}>
<Button
small
innerStyles={[styles.arrowIcon]}
Expand Down
8 changes: 5 additions & 3 deletions src/components/EmojiPicker/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Dimensions} from 'react-native';
import _ from 'underscore';
import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent';
import withViewportOffsetTop from '@components/withViewportOffsetTop';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import calculateAnchorPosition from '@libs/calculateAnchorPosition';
import * as StyleUtils from '@styles/StyleUtils';
Expand Down Expand Up @@ -33,7 +34,8 @@ const EmojiPicker = forwardRef((props, ref) => {
const onModalHide = useRef(() => {});
const onEmojiSelected = useRef(() => {});
const emojiSearchInput = useRef();
const {isSmallScreenWidth, windowHeight} = useWindowDimensions();
const {windowHeight} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

/**
* Show the emoji picker menu.
Expand Down Expand Up @@ -125,7 +127,7 @@ const EmojiPicker = forwardRef((props, ref) => {
const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => {
if (!emojiPopoverAnchor.current) {
// In small screen width, the window size change might be due to keyboard open/hide, we should avoid hide EmojiPicker in those cases
if (isEmojiPickerVisible && !isSmallScreenWidth) {
if (isEmojiPickerVisible && !shouldUseNarrowLayout) {
hideEmojiPicker();
}
return;
Expand All @@ -140,7 +142,7 @@ const EmojiPicker = forwardRef((props, ref) => {
}
emojiPopoverDimensionListener.remove();
};
}, [isEmojiPickerVisible, isSmallScreenWidth, emojiPopoverAnchorOrigin]);
}, [isEmojiPickerVisible, shouldUseNarrowLayout, emojiPopoverAnchorOrigin]);

// There is no way to disable animations, and they are really laggy, because there are so many
// emojis. The best alternative is to set it to 1ms so it just "pops" in and out
Expand Down
6 changes: 4 additions & 2 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import EmojiSkinToneList from '@components/EmojiPicker/EmojiSkinToneList';
import Text from '@components/Text';
import TextInput from '@components/TextInput';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus';
Expand Down Expand Up @@ -53,7 +54,8 @@ function EmojiPickerMenu(props) {

const styles = useThemeStyles();

const {isSmallScreenWidth, windowHeight} = useWindowDimensions();
const {windowHeight} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

// Ref for the emoji search input
const searchInputRef = useRef(null);
Expand Down Expand Up @@ -475,7 +477,7 @@ function EmojiPickerMenu(props) {
<View
style={[
styles.emojiPickerContainer,
StyleUtils.getEmojiPickerStyle(isSmallScreenWidth),
StyleUtils.getEmojiPickerStyle(shouldUseNarrowLayout),
// Disable pointer events so that onHover doesn't get triggered when the items move while we're scrolling
arePointerEventsDisabled ? styles.pointerEventsNone : styles.pointerEventsAuto,
]}
Expand Down
6 changes: 4 additions & 2 deletions src/components/HeaderPageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, {useMemo} from 'react';
import {ScrollView, View} from 'react-native';
import _ from 'underscore';
import useNetwork from '@hooks/useNetwork';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
import * as StyleUtils from '@styles/StyleUtils';
Expand Down Expand Up @@ -53,7 +54,8 @@ const defaultProps = {
function HeaderPageLayout({backgroundColor, children, footer, headerContainerStyles, scrollViewContainerStyles, childrenContainerStyles, style, headerContent, ...propsToPassToHeader}) {
const theme = useTheme();
const styles = useThemeStyles();
const {windowHeight, isSmallScreenWidth} = useWindowDimensions();
const {windowHeight} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const {isOffline} = useNetwork();
const appBGColor = StyleUtils.getBackgroundColorStyle(theme.appBG);
const {titleColor, iconFill} = useMemo(() => {
Expand Down Expand Up @@ -85,7 +87,7 @@ function HeaderPageLayout({backgroundColor, children, footer, headerContainerSty
{Browser.isSafari() && (
<View style={styles.dualColorOverscrollSpacer}>
<View style={[styles.flex1, StyleUtils.getBackgroundColorStyle(backgroundColor || theme.appBG)]} />
<View style={[isSmallScreenWidth ? styles.flex1 : styles.flex3, appBGColor]} />
<View style={[shouldUseNarrowLayout ? styles.flex1 : styles.flex3, appBGColor]} />
</View>
)}
<ScrollView
Expand Down
6 changes: 3 additions & 3 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import SubscriptAvatar from '@components/SubscriptAvatar';
import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import useLocalize from '@hooks/useLocalize';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import DateUtils from '@libs/DateUtils';
import DomUtils from '@libs/DomUtils';
import {getGroupChatName} from '@libs/GroupChatUtils';
Expand Down Expand Up @@ -68,7 +68,7 @@ function OptionRowLHN(props) {
const styles = useThemeStyles();
const popoverAnchor = useRef(null);
const isFocusedRef = useRef(true);
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

const {translate} = useLocalize();

Expand Down Expand Up @@ -125,7 +125,7 @@ function OptionRowLHN(props) {
* @param {Object} [event] - A press event.
*/
const showPopover = (event) => {
if (!isFocusedRef.current && isSmallScreenWidth) {
if (!isFocusedRef.current && shouldUseNarrowLayout) {
return;
}
setIsContextMenuActive(true);
Expand Down
6 changes: 3 additions & 3 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ExpensiMark from 'expensify-common/lib/ExpensiMark';
import React, {useEffect, useMemo} from 'react';
import {View} from 'react-native';
import _ from 'underscore';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import ControlSelection from '@libs/ControlSelection';
import convertToLTR from '@libs/convertToLTR';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
Expand Down Expand Up @@ -89,7 +89,7 @@ const MenuItem = React.forwardRef((props, ref) => {
const theme = useTheme();
const styles = useThemeStyles();
const style = StyleUtils.combineStyles(props.style, styles.popoverMenuItem);
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const [html, setHtml] = React.useState('');

const isDeleted = _.contains(style, styles.offlineFeedback.deleted);
Expand Down Expand Up @@ -175,7 +175,7 @@ const MenuItem = React.forwardRef((props, ref) => {
{(isHovered) => (
<PressableWithSecondaryInteraction
onPress={props.shouldCheckActionAllowedOnPress ? Session.checkIfActionIsAllowed(onPressAction, props.isAnonymousAction) : onPressAction}
onPressIn={() => props.shouldBlockSelection && isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressIn={() => props.shouldBlockSelection && shouldUseNarrowLayout && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={ControlSelection.unblock}
onSecondaryInteraction={props.onSecondaryInteraction}
style={({pressed}) => [
Expand Down
9 changes: 6 additions & 3 deletions src/components/Modal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {View} from 'react-native';
import ReactNativeModal from 'react-native-modal';
import {useSafeAreaInsets} from 'react-native-safe-area-context';
import usePrevious from '@hooks/usePrevious';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import ComposerFocusManager from '@libs/ComposerFocusManager';
import useNativeDriver from '@libs/useNativeDriver';
Expand Down Expand Up @@ -43,7 +44,8 @@ function BaseModal(
) {
const theme = useTheme();
const styles = useThemeStyles();
const {windowWidth, windowHeight, isSmallScreenWidth} = useWindowDimensions();
const {windowWidth, windowHeight} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

const safeAreaInsets = useSafeAreaInsets();

Expand Down Expand Up @@ -137,13 +139,14 @@ function BaseModal(
{
windowWidth,
windowHeight,
isSmallScreenWidth,
isSmallScreenWidth: shouldUseNarrowLayout,
rayane-djouah marked this conversation as resolved.
Show resolved Hide resolved
},
shouldUseNarrowLayout,
popoverAnchorPosition,
innerContainerStyle,
outerStyle,
),
[innerContainerStyle, isSmallScreenWidth, outerStyle, popoverAnchorPosition, type, windowHeight, windowWidth],
[innerContainerStyle, shouldUseNarrowLayout, outerStyle, popoverAnchorPosition, type, windowHeight, windowWidth],
);

const {
Expand Down
6 changes: 4 additions & 2 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, {useCallback, useEffect, useState} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useWindowDimensions from '@hooks/useWindowDimensions';
import compose from '@libs/compose';
import * as HeaderUtils from '@libs/HeaderUtils';
Expand Down Expand Up @@ -72,7 +73,8 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction,
const moneyRequestReport = parentReport;
const isSettled = ReportUtils.isSettled(moneyRequestReport.reportID);
const isApproved = ReportUtils.isReportApproved(moneyRequestReport);
const {isSmallScreenWidth, windowWidth} = useWindowDimensions();
const {windowWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();

// Only the requestor can take delete the request, admins can only edit it.
const isActionOwner = lodashGet(parentReportAction, 'actorAccountID') === lodashGet(session, 'accountID', null);
Expand Down Expand Up @@ -126,7 +128,7 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction,
}}
policy={policy}
personalDetails={personalDetails}
shouldShowBackButton={isSmallScreenWidth}
shouldShowBackButton={shouldUseNarrowLayout}
onBackButtonPress={() => Navigation.goBack(ROUTES.HOME, false, true)}
/>
{isPending && (
Expand Down
6 changes: 3 additions & 3 deletions src/components/PDFView/PDFPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Button from '@components/Button';
import Text from '@components/Text';
import TextInput from '@components/TextInput';
import useLocalize from '@hooks/useLocalize';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import * as Browser from '@libs/Browser';
import shouldDelayFocus from '@libs/shouldDelayFocus';
import useThemeStyles from '@styles/useThemeStyles';
Expand Down Expand Up @@ -43,7 +43,7 @@ const defaultProps = {

function PDFPasswordForm({isFocused, isPasswordInvalid, shouldShowLoadingIndicator, onSubmit, onPasswordUpdated, onPasswordFieldFocused}) {
const styles = useThemeStyles();
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const {translate} = useLocalize();

const [password, setPassword] = useState('');
Expand Down Expand Up @@ -113,7 +113,7 @@ function PDFPasswordForm({isFocused, isPasswordInvalid, shouldShowLoadingIndicat
return shouldShowForm ? (
<ScrollView
keyboardShouldPersistTaps="handled"
style={styles.getPDFPasswordFormStyle(isSmallScreenWidth)}
style={styles.getPDFPasswordFormStyle(shouldUseNarrowLayout)}
contentContainerStyle={styles.p5}
>
<View style={styles.mb4}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/PopoverMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Text from '@components/Text';
import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions';
import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager';
import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@styles/useThemeStyles';
import CONST from '@src/CONST';
import {defaultProps as createMenuDefaultProps, propTypes as createMenuPropTypes} from './popoverMenuPropTypes';
Expand Down Expand Up @@ -52,7 +52,7 @@ const defaultProps = {

function PopoverMenu(props) {
const styles = useThemeStyles();
const {isSmallScreenWidth} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const selectedItemIndex = useRef(null);
const [focusedIndex, setFocusedIndex] = useArrowKeyFocusManager({initialFocusedIndex: -1, maxIndex: props.menuItems.length - 1, isActive: props.isVisible});

Expand Down Expand Up @@ -96,7 +96,7 @@ function PopoverMenu(props) {
withoutOverlay={props.withoutOverlay}
shouldSetModalVisibility={props.shouldSetModalVisibility}
>
<View style={isSmallScreenWidth ? {} : styles.createMenuContainer}>
<View style={shouldUseNarrowLayout ? {} : styles.createMenuContainer}>
{!_.isEmpty(props.headerText) && <Text style={[styles.createMenuHeaderText, styles.ml3]}>{props.headerText}</Text>}
{_.map(props.menuItems, (item, menuIndex) => (
<MenuItem
Expand Down
Loading
Loading