Skip to content

Commit

Permalink
docs: override debug prop when show all demo (ant-design#40130)
Browse files Browse the repository at this point in the history
* docs: override debug prop when show all demo

* chore: add annotation
  • Loading branch information
PeachScript authored Jan 10, 2023
1 parent 0f64e15 commit 5137568
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .dumi/theme/builtins/DemoWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
const visibleDemos = showDebug ? items : items.filter((item) => !item.previewerProps.debug);
const filteredItems = visibleDemos.map((item) => ({
...item,
previewerProps: { ...item.previewerProps, expand: expandAll },
previewerProps: {
...item.previewerProps,
expand: expandAll,
// always override debug property, because dumi will hide debug demo in production
debug: false,
},
}));

return (
Expand Down

0 comments on commit 5137568

Please sign in to comment.