Skip to content

Commit 27d7796

Browse files
committed
improvement(search): simplify source setup and preserve account handoffs
1 parent cbfe70d commit 27d7796

28 files changed

Lines changed: 1647 additions & 381 deletions
Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
import type { ReactNode } from 'react'
2-
import { RESOURCE_LIST_GRID } from '@/app/workspace/[workspaceId]/settings/components/settings-resource-row'
2+
import {
3+
RESOURCE_LIST_GRID,
4+
RESOURCE_LIST_STACK,
5+
} from '@/app/workspace/[workspaceId]/settings/components/settings-resource-row'
36
import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section'
47

58
interface IntegrationSectionProps {
69
label: string
10+
description?: string
11+
layout?: 'grid' | 'list'
712
children: ReactNode
813
}
914

1015
/**
1116
* Labeled section used throughout the integrations surface: the shared
1217
* {@link SettingsSection} label/divider chrome wrapped around the shared
13-
* responsive card grid, so the integrations list, the connected credentials
18+
* resource grid or list, so the integrations list, the connected credentials
1419
* list, and the integration detail templates cannot drift from settings.
1520
*/
16-
export function IntegrationSection({ label, children }: IntegrationSectionProps) {
21+
export function IntegrationSection({
22+
label,
23+
description,
24+
layout = 'grid',
25+
children,
26+
}: IntegrationSectionProps) {
1727
return (
1828
<SettingsSection label={label}>
19-
<div className={RESOURCE_LIST_GRID}>{children}</div>
29+
{description && (
30+
<p className='mb-3 text-[var(--text-muted)] text-caption leading-relaxed'>{description}</p>
31+
)}
32+
<div className={layout === 'list' ? RESOURCE_LIST_STACK : RESOURCE_LIST_GRID}>{children}</div>
2033
</SettingsSection>
2134
)
2235
}

0 commit comments

Comments
 (0)