mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Fix type problems
This commit is contained in:
parent
f637508fd2
commit
d2a6b08abd
@ -35,7 +35,7 @@ export const autodocsTrue: Fix<AutodocsTrueFrameworkRunOptions> = {
|
|||||||
const docs = main.getFieldValue(['docs']);
|
const docs = main.getFieldValue(['docs']);
|
||||||
|
|
||||||
const docsPageToAutodocsMapping = {
|
const docsPageToAutodocsMapping = {
|
||||||
true: 'tag',
|
true: 'tag' as const,
|
||||||
automatic: true,
|
automatic: true,
|
||||||
false: false,
|
false: false,
|
||||||
};
|
};
|
||||||
@ -53,9 +53,7 @@ export const autodocsTrue: Fix<AutodocsTrueFrameworkRunOptions> = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
prompt({ value }) {
|
prompt({ value }) {
|
||||||
const autodocsFormatted = chalk.cyan(
|
const autodocsFormatted = chalk.cyan(`docs: { autodocs: ${JSON.stringify(value ?? true)} }`);
|
||||||
`docs: { autodocs: ${JSON.stringify(value ?? true)} }`
|
|
||||||
);
|
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
return dedent`
|
return dedent`
|
||||||
@ -84,7 +82,7 @@ export const autodocsTrue: Fix<AutodocsTrueFrameworkRunOptions> = {
|
|||||||
we defaulted to having a autodocs for every story, in 7.x you need to opt in per-component.
|
we defaulted to having a autodocs for every story, in 7.x you need to opt in per-component.
|
||||||
However, we can set the \`docs.autodocs\` to true to approximate the old behaviour:
|
However, we can set the \`docs.autodocs\` to true to approximate the old behaviour:
|
||||||
|
|
||||||
${AutodocsTrueFormatted}
|
${autodocsFormatted}
|
||||||
|
|
||||||
More info: ${chalk.yellow(
|
More info: ${chalk.yellow(
|
||||||
'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs'
|
'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user