Skip to content

Commit

Permalink
fix getSwizzleComponentList docs
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 13, 2023
1 parent 2355ade commit 88e7d63
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions website/docs/api/plugin-methods/extend-infrastructure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ export default function (context, options) {
Returns a list of stable components that are considered safe for swizzling. These components will be swizzlable without `--danger`. All components are considered unstable by default. If an empty array is returned, all components are considered unstable. If `undefined` is returned, all components are considered stable.

```js title="my-theme/src/index.js"
const swizzleAllowedComponents = [
'CodeBlock',
'DocSidebar',
'Footer',
'NotFound',
'SearchBar',
'hooks/useTheme',
'prism-include-languages',
];

myTheme.getSwizzleComponentList = () => swizzleAllowedComponents;
export function getSwizzleComponentList() {
return [
'CodeBlock',
'DocSidebar',
'Footer',
'NotFound',
'SearchBar',
'hooks/useTheme',
'prism-include-languages',
];
}
```

0 comments on commit 88e7d63

Please sign in to comment.