diff --git a/src/Hub.tsx b/src/Hub.tsx index b1b4915..0b7159d 100644 --- a/src/Hub.tsx +++ b/src/Hub.tsx @@ -13,7 +13,7 @@ interface HubProps { height: string; onSuccess?: (account: { id: string; provider: string }) => void; onClose?: () => void; - onCancel?: () => void; + onCloseLabel?: string; accountId?: string; showFooterLinks?: boolean; } @@ -26,9 +26,9 @@ export const Hub = memo( height, onSuccess, onClose, - onCancel, accountId, showFooterLinks, + onCloseLabel, }: HubProps) => { const { data: settings } = useQuery({ queryKey: ['settings'], @@ -45,7 +45,7 @@ export const Hub = memo( height={height} onSuccess={onSuccess} onClose={onClose} - onCancel={onCancel} + onCloseLabel={onCloseLabel} accountId={accountId ?? settings?.existing_account_id} showFooterLinks={showFooterLinks} /> diff --git a/src/StackOneHub.tsx b/src/StackOneHub.tsx index 401390d..3697269 100644 --- a/src/StackOneHub.tsx +++ b/src/StackOneHub.tsx @@ -28,7 +28,7 @@ interface StackOneHubProps { accountId?: string; onSuccess?: (account: { id: string; provider: string }) => void; onClose?: () => void; - onCancel?: () => void; + onCloseLabel?: string; showFooterLinks?: boolean; } @@ -42,7 +42,7 @@ export const StackOneHub: React.FC = ({ accountId, onSuccess, onClose, - onCancel, + onCloseLabel, showFooterLinks, }) => { const defaultBaseUrl = 'https://api.stackone.com'; @@ -109,7 +109,7 @@ export const StackOneHub: React.FC = ({ onSuccess={onSuccess} accountId={accountId} onClose={onClose} - onCancel={onCancel} + onCloseLabel={onCloseLabel} showFooterLinks={showFooterLinks} /> diff --git a/src/modules/integration-picker/IntegrationPicker.tsx b/src/modules/integration-picker/IntegrationPicker.tsx index 3beef05..a6045e5 100644 --- a/src/modules/integration-picker/IntegrationPicker.tsx +++ b/src/modules/integration-picker/IntegrationPicker.tsx @@ -15,8 +15,8 @@ interface IntegrationPickerProps { dashboardUrl?: string; onSuccess?: (account: { id: string; provider: string }) => void; onClose?: () => void; - onCancel?: () => void; showFooterLinks?: boolean; + onCloseLabel?: string; } export const IntegrationPicker: React.FC = ({ @@ -28,6 +28,7 @@ export const IntegrationPicker: React.FC = ({ onClose, dashboardUrl, showFooterLinks = true, + onCloseLabel, }) => { const isHubLinkAccountReleaseEnabled = useFeatureFlags('hub_link_account_release'); const [selectedCategory, setSelectedCategory] = useState(null); @@ -93,7 +94,11 @@ export const IntegrationPicker: React.FC = ({ glassFooter footer={ connectionState.success ? ( - + ) : ( void; showFooterLinks?: boolean; + onCloseLabel?: string; } -const SuccessCardFooter: React.FC = ({ showFooterLinks = true, onClose }) => { +const SuccessCardFooter: React.FC = ({ + showFooterLinks = true, + onClose, + onCloseLabel, +}) => { const hasFooterLinks = showFooterLinks; const hasClose = Boolean(onClose); @@ -35,7 +40,7 @@ const SuccessCardFooter: React.FC = ({ showFooterLinks = true,