Skip to content

Commit

Permalink
Props: clean up logic
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jul 4, 2020
1 parent 0589e9f commit 56b2cc8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addons/docs/src/blocks/Props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ export const Props: FC<PropsProps> = (props) => {

const mainLabel = getComponentName(main);
if (!allComponents) {
if (!story || showComponent) {
allComponents = { [mainLabel]: main };
}
allComponents = { ...allComponents, ...subcomponents };
allComponents =
!story || showComponent ? { [mainLabel]: main, ...subcomponents } : subcomponents;
}

if (story) {
Expand Down

0 comments on commit 56b2cc8

Please sign in to comment.