Skip to content

Commit 809a2bf

Browse files
mperrotticolebemis
authored andcommitted
Fix code example renders (#1969)
* removes deprecated Octicons export from docs scope * undo the change of order in exports * adds comment about why we do not export octicons-react default export * Update docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js * Update export Co-authored-by: Cole Bemis <colebemis@github.com>
1 parent 2a08f5e commit 809a2bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ const ReactRouterLink = ({to, ...props}) => {
1212
return <a href={to} {...props} />
1313
}
1414

15+
// Exclude octicons-react's default export because it's deprecated
16+
const {default: _, ...octiconComponents} = octicons
17+
1518
export default function resolveScope(metastring) {
1619
return {
1720
...doctocatComponents,
1821
...primerComponents,
19-
...octicons,
22+
...octiconComponents,
2023
...(metastring.includes('drafts') ? drafts : {}),
2124
...(metastring.includes('deprecated') ? deprecated : {}),
2225
ReactRouterLink,

0 commit comments

Comments
 (0)