-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47782 from waterim/feat-47376-Company-cards-empty…
…-state [NO QA] Feat: company cards empty state
- Loading branch information
Showing
10 changed files
with
794 additions
and
13 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions
49
assets/images/simple-illustrations/simple-illustration__magnifyingglass-money.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
57 changes: 57 additions & 0 deletions
57
src/pages/workspace/companyCards/WorkspaceCompanyCardPageEmptyState.tsx
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,57 @@ | ||
import React, {useCallback} from 'react'; | ||
import {View} from 'react-native'; | ||
import FeatureList from '@components/FeatureList'; | ||
import type {FeatureListItem} from '@components/FeatureList'; | ||
import * as Illustrations from '@components/Icon/Illustrations'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; | ||
import colors from '@styles/theme/colors'; | ||
|
||
const companyCardFeatures: FeatureListItem[] = [ | ||
{ | ||
icon: Illustrations.CreditCardsNew, | ||
translationKey: 'workspace.moreFeatures.companyCards.feed.features.support', | ||
}, | ||
{ | ||
icon: Illustrations.HandCard, | ||
translationKey: 'workspace.moreFeatures.companyCards.feed.features.assignCards', | ||
}, | ||
{ | ||
icon: Illustrations.MagnifyingGlassMoney, | ||
translationKey: 'workspace.moreFeatures.companyCards.feed.features.automaticImport', | ||
}, | ||
]; | ||
|
||
function WorkspaceCompanyCardPageEmptyState() { | ||
const {translate} = useLocalize(); | ||
const styles = useThemeStyles(); | ||
const {shouldUseNarrowLayout} = useResponsiveLayout(); | ||
|
||
const startFlow = useCallback(() => { | ||
// TODO: Add Card Feed Flow https://github.com/Expensify/App/issues/47376 | ||
}, []); | ||
|
||
return ( | ||
<View style={[styles.mt3, shouldUseNarrowLayout ? styles.workspaceSectionMobile : styles.workspaceSection]}> | ||
<FeatureList | ||
menuItems={companyCardFeatures} | ||
title={translate('workspace.moreFeatures.companyCards.feed.title')} | ||
subtitle={translate('workspace.moreFeatures.companyCards.subtitle')} | ||
ctaText={translate('workspace.moreFeatures.companyCards.feed.ctaTitle')} | ||
ctaAccessibilityLabel={translate('workspace.moreFeatures.companyCards.feed.ctaTitle')} | ||
onCtaPress={startFlow} | ||
illustrationBackgroundColor={colors.blue700} | ||
illustration={Illustrations.CompanyCardsEmptyState} | ||
illustrationStyle={styles.emptyStateCardIllustration} | ||
illustrationContainerStyle={[styles.emptyStateCardIllustrationContainer, styles.justifyContentStart]} | ||
titleStyles={styles.textHeadlineH1} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
WorkspaceCompanyCardPageEmptyState.displayName = 'WorkspaceCompanyCardPageEmptyState'; | ||
|
||
export default withPolicyAndFullscreenLoading(WorkspaceCompanyCardPageEmptyState); |
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
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