Skip to content

Commit af11036

Browse files
Copilothotlong
andcommitted
Fix code review issues: backward compatibility and documentation consistency
Fixed pagination renderer to handle both currentPage and legacy page properties. Fixed toggle-group documentation to use selectionType instead of type property and removed icons that weren't rendering. All 123 static pages build successfully and all 205 tests passing. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 46b7445 commit af11036

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/components/disclosure/toggle-group.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ The Toggle Group component allows users to toggle between multiple options.
1212
<ComponentDemo
1313
schema={{
1414
type: 'toggle-group',
15-
type: 'single',
15+
selectionType: 'single',
1616
items: [
17-
{ value: 'left', icon: 'align-left' },
18-
{ value: 'center', icon: 'align-center' },
19-
{ value: 'right', icon: 'align-right' }
17+
{ value: 'left', label: 'Left' },
18+
{ value: 'center', label: 'Center' },
19+
{ value: 'right', label: 'Right' }
2020
]
2121
}}
2222
title="Single Selection"
@@ -27,11 +27,11 @@ The Toggle Group component allows users to toggle between multiple options.
2727
<ComponentDemo
2828
schema={{
2929
type: 'toggle-group',
30-
type: 'multiple',
30+
selectionType: 'multiple',
3131
items: [
32-
{ value: 'bold', icon: 'bold' },
33-
{ value: 'italic', icon: 'italic' },
34-
{ value: 'underline', icon: 'underline' }
32+
{ value: 'bold', label: 'Bold' },
33+
{ value: 'italic', label: 'Italic' },
34+
{ value: 'underline', label: 'Underline' }
3535
]
3636
}}
3737
title="Multiple Selection"

packages/components/src/renderers/basic/pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ComponentRegistry.register('pagination',
1919
...paginationProps
2020
} = props;
2121

22-
const currentPage = schema.currentPage || 1;
22+
const currentPage = schema.currentPage || schema.page || 1;
2323
const totalPages = schema.totalPages || 1;
2424
const showEllipsis = totalPages > 7;
2525

0 commit comments

Comments
 (0)