Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions src/components/BaseWidgetItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import variables from '@styles/variables';
import CONST from '@src/CONST';
import type IconAsset from '@src/types/utils/IconAsset';
import Button from './Button';
import type {ButtonProps} from './Button';
import Icon from './Icon';
import {PressableWithoutFeedback} from './Pressable';
import Text from './Text';
Expand Down Expand Up @@ -34,9 +35,12 @@ type BaseWidgetItemProps = {

/** Optional: fill color for the icon (defaults to white) */
iconFill?: string;

/** Additional props to pass to the Button component for styling control */
buttonProps?: Partial<ButtonProps>;
};

function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, onCtaPress, iconFill}: BaseWidgetItemProps) {
function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, onCtaPress, iconFill, buttonProps}: BaseWidgetItemProps) {
const styles = useThemeStyles();
const theme = useTheme();
const {shouldUseNarrowLayout} = useResponsiveLayout();
Expand Down Expand Up @@ -65,9 +69,11 @@ function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, on
<Button
text={ctaText}
onPress={onCtaPress}
success
small
style={styles.widgetItemButton}
// Prop spreading allows parent components to pass additional button styling props (e.g., danger: true, success: true)
// eslint-disable-next-line react/jsx-props-no-spreading
{...buttonProps}
/>
</View>
)}
Expand Down
6 changes: 6 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8305,6 +8305,12 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
cta: 'Antrag',
offer50off: {title: 'Erhalte 50 % Rabatt auf dein erstes Jahr!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} verbleibend`},
offer25off: {title: 'Erhalten Sie 25 % Rabatt auf Ihr erstes Jahr!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'Tag' : 'Tage'} verbleiben`},
ctaFix: 'Beheben',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `${feedName}-Firmenkartenverbindung reparieren` : 'Verbindung der Firmenkarte reparieren'),
subtitle: 'Arbeitsbereich > Firmenkarten',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName}-Verbindung reparieren`, subtitle: 'Arbeitsbereich > Buchhaltung'},
addShippingAddress: {title: 'Wir benötigen Ihre Versandadresse', subtitle: 'Gib eine Adresse an, um deine Expensify Card zu erhalten.', cta: 'Adresse hinzufügen'},
activateCard: {title: 'Aktiviere deine Expensify Card', subtitle: 'Bestätige deine Karte und beginne mit dem Ausgeben.', cta: 'Aktivieren'},
},
Expand Down
9 changes: 9 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ const translations = {
timeSensitiveSection: {
title: 'Time sensitive',
cta: 'Claim',
ctaFix: 'Fix',
offer50off: {
title: 'Get 50% off your first year!',
subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} remaining`,
Expand All @@ -1005,6 +1006,14 @@ const translations = {
title: 'Get 25% off your first year!',
subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'day' : 'days'} remaining`,
},
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Fix ${feedName} company card connection` : 'Fix company card connection'),
subtitle: 'Workspace > Company cards',
},
fixAccountingConnection: {
title: ({integrationName}: {integrationName: string}) => `Fix ${integrationName} connection`,
subtitle: 'Workspace > Accounting',
},
addShippingAddress: {
title: 'We need your shipping address',
subtitle: 'Provide an address to receive your Expensify Card.',
Expand Down
9 changes: 9 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ const translations: TranslationDeepObject<typeof en> = {
timeSensitiveSection: {
title: 'Requiere atención inmediata',
cta: 'Reclamar',
ctaFix: 'Corrige',
offer50off: {
title: '¡Obtén 50% de descuento en tu primer año!',
subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restantes`,
Expand All @@ -750,6 +751,14 @@ const translations: TranslationDeepObject<typeof en> = {
title: '¡Obtén 25% de descuento en tu primer año!',
subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'día' : 'días'} restantes`,
},
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Reconectar la tarjeta corporativa de ${feedName}` : 'Reconectar la tarjeta corporativa'),
subtitle: 'Espacio de trabajo > Tarjetas de empresa',
},
fixAccountingConnection: {
title: ({integrationName}: {integrationName: string}) => `Reconectar con ${integrationName}`,
subtitle: 'Espacio de trabajo > Contabilidad',
},
addShippingAddress: {
title: 'Necesitamos tu dirección de envío',
subtitle: 'Proporciona una dirección para recibir tu Tarjeta Expensify.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8311,6 +8311,12 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
cta: 'Demande',
offer50off: {title: 'Obtenez 50 % de réduction sur votre première année !', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restant`},
offer25off: {title: 'Obtenez 25 % de réduction sur votre première année !', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'jour' : 'jours'} restants`},
ctaFix: 'Corriger',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Réparer la connexion de carte d’entreprise ${feedName}` : 'Corriger la connexion de la carte d’entreprise'),
subtitle: 'Espace de travail > Cartes d’entreprise',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Réparer la connexion ${integrationName}`, subtitle: 'Espace de travail > Comptabilité'},
addShippingAddress: {title: 'Nous avons besoin de votre adresse de livraison', subtitle: 'Indiquez une adresse pour recevoir votre carte Expensify.', cta: 'Ajouter une adresse'},
activateCard: {title: 'Activer votre carte Expensify', subtitle: 'Validez votre carte et commencez à dépenser.', cta: 'Activer'},
},
Expand Down
6 changes: 6 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8291,6 +8291,12 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
cta: 'Richiesta',
offer50off: {title: 'Ottieni il 50% di sconto sul tuo primo anno!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} rimanenti`},
offer25off: {title: 'Ottieni il 25% di sconto sul tuo primo anno!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'giorno' : 'giorni'} rimanenti`},
ctaFix: 'Correggi',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Correggi la connessione della carta aziendale ${feedName}` : 'Correggi connessione carta aziendale'),
subtitle: 'Spazio di lavoro > Carte aziendali',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Correggi la connessione ${integrationName}`, subtitle: 'Area di lavoro > Contabilità'},
addShippingAddress: {title: 'Abbiamo bisogno del tuo indirizzo di spedizione', subtitle: 'Fornisci un indirizzo per ricevere la tua Expensify Card.', cta: 'Aggiungi indirizzo'},
activateCard: {title: 'Attiva la tua Expensify Card', subtitle: 'Convalida la tua carta e inizia a spendere.', cta: 'Attiva'},
},
Expand Down
6 changes: 6 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8203,6 +8203,12 @@ Expensify の使い方をお見せするための*テストレシート*がこ
cta: '申請',
offer50off: {title: '初年度が50%オフ!', subtitle: ({formattedTime}: {formattedTime: string}) => `残り${formattedTime}`},
offer25off: {title: '初年度が25%オフ!', subtitle: ({days}: {days: number}) => `残り ${days} ${days === 1 ? '日' : '日'}`},
ctaFix: '修正',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `${feedName} 会社カード接続を修正` : '会社カード接続を修正'),
subtitle: 'ワークスペース > 会社カード',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName} 接続を修正`, subtitle: 'ワークスペース > 会計'},
addShippingAddress: {title: '配送先住所が必要です', subtitle: 'Expensify Card を受け取る住所を入力してください。', cta: '住所を追加'},
activateCard: {title: 'Expensify Card を有効化', subtitle: 'カードを認証して、すぐに支出を始めましょう。', cta: '有効化'},
},
Expand Down
6 changes: 6 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8267,6 +8267,12 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
cta: 'Declaratie',
offer50off: {title: 'Krijg 50% korting op je eerste jaar!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} resterend`},
offer25off: {title: 'Krijg 25% korting op je eerste jaar!', subtitle: ({days}: {days: number}) => `Nog ${days} ${days === 1 ? 'dag' : 'dagen'} resterend`},
ctaFix: 'Oplossen',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Verbinding voor bedrijfskaart ${feedName} herstellen` : 'Verbinding bedrijfskaart repareren'),
subtitle: 'Workspace > Bedrijfskaarten',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName}-verbinding repareren`, subtitle: 'Werkruimte > Boekhouding'},
addShippingAddress: {title: 'We hebben je verzendadres nodig', subtitle: 'Voer een adres in om je Expensify Card te ontvangen.', cta: 'Adres toevoegen'},
activateCard: {title: 'Activeer je Expensify Card', subtitle: 'Valideer je kaart en begin met uitgeven.', cta: 'Activeren'},
},
Expand Down
6 changes: 6 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8251,6 +8251,12 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
cta: 'Roszczenie',
offer50off: {title: 'Uzyskaj 50% zniżki na pierwszy rok!', subtitle: ({formattedTime}: {formattedTime: string}) => `Pozostało: ${formattedTime}`},
offer25off: {title: 'Uzyskaj 25% zniżki na pierwszy rok!', subtitle: ({days}: {days: number}) => `Pozostało ${days} ${days === 1 ? 'dzień' : 'dni'}`},
ctaFix: 'Napraw',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Napraw połączenie firmowej karty ${feedName}` : 'Napraw połączenie karty firmowej'),
subtitle: 'Workspace > Karty firmowe',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Napraw połączenie z ${integrationName}`, subtitle: 'Workspace > Księgowość'},
addShippingAddress: {title: 'Potrzebujemy Twojego adresu do wysyłki', subtitle: 'Podaj adres, na który mamy wysłać Twoją kartę Expensify.', cta: 'Dodaj adres'},
activateCard: {title: 'Aktywuj swoją kartę Expensify', subtitle: 'Zweryfikuj swoją kartę i zacznij wydawać.', cta: 'Aktywuj'},
},
Expand Down
6 changes: 6 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8261,6 +8261,12 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
cta: 'Solicitação',
offer50off: {title: 'Ganhe 50% de desconto no seu primeiro ano!', subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restante`},
offer25off: {title: 'Ganhe 25% de desconto no seu primeiro ano!', subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'dia' : 'dias'} restantes`},
ctaFix: 'Corrigir',
fixCompanyCardConnection: {
title: ({feedName}: {feedName: string}) => (feedName ? `Corrigir conexão do cartão corporativo ${feedName}` : 'Corrigir conexão do cartão corporativo'),
subtitle: 'Espaço de trabalho > Cartões corporativos',
},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Corrigir conexão do ${integrationName}`, subtitle: 'Workspace > Contabilidade'},
addShippingAddress: {title: 'Precisamos do seu endereço de entrega', subtitle: 'Forneça um endereço para receber seu Expensify Card.', cta: 'Adicionar endereço'},
activateCard: {title: 'Ative seu Cartão Expensify', subtitle: 'Valide seu cartão e comece a gastar.', cta: 'Ativar'},
},
Expand Down
3 changes: 3 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8019,6 +8019,9 @@ ${reportName}
cta: '报销申请',
offer50off: {title: '首年立享五折优惠!', subtitle: ({formattedTime}: {formattedTime: string}) => `剩余 ${formattedTime}`},
offer25off: {title: '首次年度订阅立享 25% 折扣!', subtitle: ({days}: {days: number}) => `剩余 ${days} ${days === 1 ? '天' : '天'}`},
ctaFix: '修复',
fixCompanyCardConnection: {title: ({feedName}: {feedName: string}) => (feedName ? `修复 ${feedName} 公司卡连接` : '修复公司卡连接'), subtitle: '工作区 > 公司卡片'},
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `修复 ${integrationName} 连接`, subtitle: '工作区 > 会计'},
addShippingAddress: {title: '我们需要您的收货地址', subtitle: '请提供一个地址以接收您的 Expensify Card。', cta: '添加地址'},
activateCard: {title: '激活您的 Expensify Card', subtitle: '验证您的卡片并开始消费。', cta: '激活'},
},
Expand Down
Loading
Loading