Skip to content

Commit 3387dc5

Browse files
Copilothotlong
andcommitted
fix: use md: breakpoint for 2-column grid layouts in DetailSection
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 857dc1f commit 3387dc5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/plugin-detail/src/DetailSection.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ export const DetailSection: React.FC<DetailSectionProps> = ({
200200
className={cn(
201201
"grid gap-3 sm:gap-4",
202202
effectiveColumns === 1 ? "grid-cols-1" :
203-
effectiveColumns === 2 ? "grid-cols-1 sm:grid-cols-2" :
204-
effectiveColumns === 3 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3" :
205-
"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
203+
effectiveColumns === 2 ? "grid-cols-1 md:grid-cols-2" :
204+
effectiveColumns === 3 ? "grid-cols-1 md:grid-cols-2 lg:grid-cols-3" :
205+
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
206206
)}
207207
>
208208
{layoutFields.map(renderField)}

packages/plugin-detail/src/__tests__/DetailSection.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('DetailSection', () => {
112112
const { container } = render(
113113
<DetailSection section={section} data={{}} />
114114
);
115-
// The grid container should have the sm:grid-cols-2 class
115+
// The grid container should have the md:grid-cols-2 class
116116
const grid = container.querySelector('.grid');
117117
expect(grid).toBeTruthy();
118118
expect(grid!.className).toContain('md:grid-cols-2');

0 commit comments

Comments
 (0)