mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
Merge branch 'next' into norbert/sb-798-figure-out-plan-for-package-structure-rework
This commit is contained in:
commit
ec73fa036b
@ -9,7 +9,9 @@ addons.register(ADDON_ID, (api: API) => {
|
||||
addons.addPanel(ADDON_ID, {
|
||||
title() {
|
||||
const rows = useArgTypes();
|
||||
const controlsCount = Object.values(rows).filter((argType) => argType?.control).length;
|
||||
const controlsCount = Object.values(rows).filter(
|
||||
(argType) => argType?.control && !argType?.table?.disable
|
||||
).length;
|
||||
const suffix = controlsCount === 0 ? '' : ` (${controlsCount})`;
|
||||
return `Controls${suffix}`;
|
||||
},
|
||||
|
@ -18,5 +18,7 @@ export const DisableTable = {
|
||||
|
||||
export const DisableControl = {
|
||||
args: { a: 'a', b: 'b' },
|
||||
b: { control: { disable: true } },
|
||||
argTypes: {
|
||||
b: { control: { disable: true } },
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user