Open valentinpalkovic opened 2 weeks ago
To resolve the issue where the color control automatically opens, ensure that the startOpen
prop is correctly set to false
by default in the ColorControl
component. Check the implementation in Color.tsx
and verify the stories in Color.stories.tsx
.
Color.tsx
, ensure startOpen
is set to false
by default:export const ColorControl: FC<ColorControlProps> = ({
name,
value: initialValue,
onChange,
onFocus,
onBlur,
presetColors,
startOpen = false, // Ensure this is set to false
argType,
}) => {
// ...
};
Color.stories.tsx
, verify that the startOpen
prop is not set to true
unless explicitly needed:export const StartOpen: Story = {
args: {
startOpen: true, // Only set to true for this specific story
},
};
This should prevent the color picker from opening automatically unless specified.
/code/lib/blocks/src/controls/Color.tsx /code/lib/blocks/src/controls/Color.stories.tsx /code/addons/controls/src/manager.tsx
Describe the bug
When visiting a story with a color control, the control will automatically open
Reproduction steps
Additional context
No response