File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
apps/website/screens/migration/components Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,21 @@ import Example from "@/common/example/Example";
88import previousExample from "./examples/previous" ;
99import newExample from "./examples/new" ;
1010
11+ const groupItemType = `{
12+ badge?: ReactElement;
13+ icon?: string | SVG;
14+ label: string;
15+ items: (Item)[];
16+ }` ;
17+
18+ const itemType = `{
19+ badge?: ReactElement;
20+ icon?: string | SVG;
21+ label: string;
22+ onSelect?: () => void;
23+ selected?: boolean;
24+ }` ;
25+
1126const sections = [
1227 {
1328 title : "Introduction" ,
@@ -179,22 +194,11 @@ const sections = [
179194 The < Code > navItems</ Code > prop accepts an array of < Code > Item</ Code > and
180195 < Code > GroupItem</ Code > objects. Each < Code > GroupItem</ Code > has the following structure:
181196 </ p >
182- < ExtendedTableCode > { `{
183- badge?: ReactElement;
184- icon?: string | SVG;
185- label: string;
186- items: (Item)[];
187- }` } </ ExtendedTableCode >
197+ < ExtendedTableCode > { groupItemType } </ ExtendedTableCode >
188198 < p >
189199 Each < Code > Item</ Code > has the following structure:
190200 </ p >
191- < ExtendedTableCode > { `{
192- badge?: ReactElement;
193- icon?: string | SVG;
194- label: string;
195- onSelect?: () => void;
196- selected?: boolean;
197- }` } </ ExtendedTableCode >
201+ < ExtendedTableCode > { itemType } </ ExtendedTableCode >
198202 </ td >
199203 </ tr >
200204 </ tbody >
@@ -390,7 +394,7 @@ const Components16MigrationPage = () => (
390394 </ DxcFlex >
391395 </ PageHeading >
392396 < QuickNavContainer sections = { sections } startHeadingLevel = { 2 } />
393- < DocFooter githubLink = "https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/migration/Components16Page .tsx" />
397+ < DocFooter githubLink = "https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/migration/components/Components16MigrationPage .tsx" />
394398 </ DxcFlex >
395399) ;
396400
You can’t perform that action at this time.
0 commit comments