Skip to content

Commit

Permalink
feat(createStoryMetaSettings): opt-out from autodocs instead of opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Apr 21, 2024
1 parent 4c07b84 commit 7e48ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import BaseInput from "../BaseInput";

const metaSettings = createStoryMetaSettingsDecorator({
component: BaseInput,
isInternal: true,
shouldCreateAutodocsPage: true
isInternal: true
});

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,9 @@ export function createStoryMetaSettings({

export default createStoryMetaSettings;

function prepareTags(isInternal: boolean = false, shouldCreateAutodocsPage: boolean = false) {
const tags: Tag[] = [];
if (isInternal) {
tags.push('internal');
function prepareTags(isInternal: boolean = false, shouldCreateAutodocsPage: boolean = true): Tag[] {
if (!isInternal) {
return [];
}
if (shouldCreateAutodocsPage) {
tags.push('autodocs');
}
return tags;
return shouldCreateAutodocsPage ? ['internal', 'autodocs'] : ['internal'];
}

0 comments on commit 7e48ea3

Please sign in to comment.