Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/Hub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -26,9 +26,9 @@ export const Hub = memo(
height,
onSuccess,
onClose,
onCancel,
accountId,
showFooterLinks,
onCloseLabel,
}: HubProps) => {
const { data: settings } = useQuery({
queryKey: ['settings'],
Expand All @@ -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}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/StackOneHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface StackOneHubProps {
accountId?: string;
onSuccess?: (account: { id: string; provider: string }) => void;
onClose?: () => void;
onCancel?: () => void;
onCloseLabel?: string;
showFooterLinks?: boolean;
}

Expand All @@ -42,7 +42,7 @@ export const StackOneHub: React.FC<StackOneHubProps> = ({
accountId,
onSuccess,
onClose,
onCancel,
onCloseLabel,
showFooterLinks,
}) => {
const defaultBaseUrl = 'https://api.stackone.com';
Expand Down Expand Up @@ -109,7 +109,7 @@ export const StackOneHub: React.FC<StackOneHubProps> = ({
onSuccess={onSuccess}
accountId={accountId}
onClose={onClose}
onCancel={onCancel}
onCloseLabel={onCloseLabel}
showFooterLinks={showFooterLinks}
/>
</QueryClientProvider>
Expand Down
9 changes: 7 additions & 2 deletions src/modules/integration-picker/IntegrationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<IntegrationPickerProps> = ({
Expand All @@ -28,6 +28,7 @@ export const IntegrationPicker: React.FC<IntegrationPickerProps> = ({
onClose,
dashboardUrl,
showFooterLinks = true,
onCloseLabel,
}) => {
const isHubLinkAccountReleaseEnabled = useFeatureFlags('hub_link_account_release');
const [selectedCategory, setSelectedCategory] = useState<string | null>(null);
Expand Down Expand Up @@ -93,7 +94,11 @@ export const IntegrationPicker: React.FC<IntegrationPickerProps> = ({
glassFooter
footer={
connectionState.success ? (
<SuccessCardFooter onClose={onClose} showFooterLinks={showFooterLinks} />
<SuccessCardFooter
onClose={onClose}
showFooterLinks={showFooterLinks}
onCloseLabel={onCloseLabel}
/>
) : (
<CardFooter
selectedIntegration={selectedIntegration}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ import {
interface CardFooterProps {
onClose?: () => void;
showFooterLinks?: boolean;
onCloseLabel?: string;
}

const SuccessCardFooter: React.FC<CardFooterProps> = ({ showFooterLinks = true, onClose }) => {
const SuccessCardFooter: React.FC<CardFooterProps> = ({
showFooterLinks = true,
onClose,
onCloseLabel,
}) => {
const hasFooterLinks = showFooterLinks;
const hasClose = Boolean(onClose);

Expand All @@ -35,7 +40,7 @@ const SuccessCardFooter: React.FC<CardFooterProps> = ({ showFooterLinks = true,
<Flex direction={FlexDirection.Horizontal} justify={FlexJustify.Right}>
<Spacer direction="horizontal" size={10}>
<Button size="small" variant="filled" onClick={onClose}>
Close
{onCloseLabel ?? 'Close'}
</Button>
</Spacer>
</Flex>
Expand Down
Loading