Skip to content

Commit 0c93480

Browse files
committed
make live-scope a function
1 parent 07c9ad0 commit 0c93480

File tree

1 file changed

+43
-41
lines changed

1 file changed

+43
-41
lines changed

docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -45,45 +45,47 @@ const ReactRouterLink = ({to, ...props}) => {
4545
return <a href={to} {...props} />
4646
}
4747

48-
export default {
49-
...doctocatComponents,
50-
...primerComponents,
51-
...(metastring.includes('drafts') ? drafts : {}),
52-
ReactRouterLink,
53-
State,
54-
CheckIcon,
55-
SearchIcon,
56-
ZapIcon,
57-
XIcon,
58-
DotIcon,
59-
OctofaceIcon,
60-
PersonIcon,
61-
MailIcon,
62-
GitCommitIcon,
63-
FlameIcon,
64-
MarkGithubIcon,
65-
NoteIcon,
66-
ProjectIcon,
67-
FilterIcon,
68-
GearIcon,
69-
TypographyIcon,
70-
VersionsIcon,
71-
LinkIcon,
72-
LawIcon,
73-
StarIcon,
74-
AlertIcon,
75-
ArrowRightIcon,
76-
KebabHorizontalIcon,
77-
PencilIcon,
78-
ArchiveIcon,
79-
TrashIcon,
80-
CalendarIcon,
81-
IterationsIcon,
82-
NumberIcon,
83-
SingleSelectIcon,
84-
Dialog2,
85-
ConfirmationDialog,
86-
useConfirm,
87-
AnchoredOverlay,
88-
SelectPanel
48+
export default function resolveScope(metastring) {
49+
return {
50+
...doctocatComponents,
51+
...primerComponents,
52+
...(metastring.includes('drafts') ? drafts : {}),
53+
ReactRouterLink,
54+
State,
55+
CheckIcon,
56+
SearchIcon,
57+
ZapIcon,
58+
XIcon,
59+
DotIcon,
60+
OctofaceIcon,
61+
PersonIcon,
62+
MailIcon,
63+
GitCommitIcon,
64+
FlameIcon,
65+
MarkGithubIcon,
66+
NoteIcon,
67+
ProjectIcon,
68+
FilterIcon,
69+
GearIcon,
70+
TypographyIcon,
71+
VersionsIcon,
72+
LinkIcon,
73+
LawIcon,
74+
StarIcon,
75+
AlertIcon,
76+
ArrowRightIcon,
77+
KebabHorizontalIcon,
78+
PencilIcon,
79+
ArchiveIcon,
80+
TrashIcon,
81+
CalendarIcon,
82+
IterationsIcon,
83+
NumberIcon,
84+
SingleSelectIcon,
85+
Dialog2,
86+
ConfirmationDialog,
87+
useConfirm,
88+
AnchoredOverlay,
89+
SelectPanel
90+
}
8991
}

0 commit comments

Comments
 (0)