11import React from 'react' ;
22import { View } from 'react-native' ;
33import EmptyStateComponent from '@components/EmptyStateComponent' ;
4+ import type { EmptyStateButton } from '@components/EmptyStateComponent/types' ;
45import * as Illustrations from '@components/Icon/Illustrations' ;
56import ScrollView from '@components/ScrollView' ;
67import CardRowSkeleton from '@components/Skeletons/CardRowSkeleton' ;
@@ -19,9 +20,12 @@ type EmptyCardViewProps = {
1920 isBankAccountVerified : boolean ;
2021 /** ID of the current policy */
2122 policyID ?: string ;
23+
24+ /** Buttons to display */
25+ buttons : EmptyStateButton [ ] | undefined ;
2226} ;
2327
24- function EmptyCardView ( { isBankAccountVerified, policyID} : EmptyCardViewProps ) {
28+ function EmptyCardView ( { isBankAccountVerified, policyID, buttons } : EmptyCardViewProps ) {
2529 const { translate} = useLocalize ( ) ;
2630 const styles = useThemeStyles ( ) ;
2731 const { windowHeight} = useWindowDimensions ( ) ;
@@ -35,7 +39,7 @@ function EmptyCardView({isBankAccountVerified, policyID}: EmptyCardViewProps) {
3539 contentContainerStyle = { [ styles . flexGrow1 , styles . flexShrink0 ] }
3640 addBottomSafeAreaPadding
3741 >
38- < View style = { [ { height : windowHeight - headerHeight } , styles . pt5 ] } >
42+ < View style = { [ { minHeight : windowHeight - headerHeight } , styles . pt5 ] } >
3943 < EmptyStateComponent
4044 SkeletonComponent = { CardRowSkeleton }
4145 headerMediaType = { CONST . EMPTY_STATE_MEDIA . ILLUSTRATION }
@@ -47,14 +51,15 @@ function EmptyCardView({isBankAccountVerified, policyID}: EmptyCardViewProps) {
4751 overflow : 'hidden' ,
4852 backgroundColor : colors . green700 ,
4953 } ,
50- shouldUseNarrowLayout && { maxHeight : 250 } ,
54+ shouldUseNarrowLayout && { maxHeight : 280 } ,
5155 ]
5256 : [ styles . emptyStateCardIllustrationContainer , { backgroundColor : colors . ice800 } ]
5357 }
5458 title = { translate ( `workspace.expensifyCard.${ isBankAccountVerified ? 'issueAndManageCards' : 'verificationInProgress' } ` ) }
5559 subtitle = { translate ( `workspace.expensifyCard.${ isBankAccountVerified ? 'getStartedIssuing' : 'verifyingTheDetails' } ` ) }
5660 headerContentStyles = { isBankAccountVerified ? null : styles . pendingStateCardIllustration }
5761 minModalHeight = { isBankAccountVerified ? 500 : 400 }
62+ buttons = { buttons }
5863 />
5964 </ View >
6065 < Text style = { [ styles . textMicroSupporting , styles . m5 ] } >
0 commit comments