fix(CommandPalette): add Storybook controls for component props#51
Merged
garrity-miepub merged 2 commits intomainfrom Feb 2, 2026
Merged
fix(CommandPalette): add Storybook controls for component props#51garrity-miepub merged 2 commits intomainfrom
garrity-miepub merged 2 commits intomainfrom
Conversation
- Add comprehensive argTypes configuration for CommandPalette props - Add text controls for placeholder and className - Add boolean control for isLoading - Disable controls for complex props (emptyState, renderItem, footer) - Add action handler for onSelect callback - Add default args at meta level for initial control values - Add Playground story with wrapper component that: - Properly uses useCommandPalette hook within provider context - Passes all args through to CommandPalette component - Syncs placeholder with CommandPaletteTrigger - Preserve all existing stories (Default, OpenByDefault, TriggerButton, CustomTrigger, Loading, Empty) unchanged The Playground story enables dynamic manipulation of placeholder and isLoading props via the Storybook Controls panel while maintaining proper hook usage within the CommandPaletteProvider context.
There was a problem hiding this comment.
Pull request overview
This PR enhances the CommandPalette Storybook documentation by adding comprehensive controls for interactive prop manipulation.
Changes:
- Added argTypes configuration with controls for simple props (placeholder, isLoading, className) and disabled controls for complex props (emptyState, renderItem, footer)
- Added default args at meta level for placeholder and isLoading
- Created a new Playground story with a wrapper component that properly uses the useCommandPalette hook within provider context and syncs the placeholder prop between CommandPalette and CommandPaletteTrigger
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Args are inherited from meta-level configuration, so duplicating them in the story is unnecessary.
Deploying ui with
|
| Latest commit: |
6f93273
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d43e87f8.ui-6d0.pages.dev |
| Branch Preview URL: | https://feature-command-palette-upda.ui-6d0.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Playground story enables dynamic manipulation of placeholder and isLoading props via the Storybook Controls panel while maintaining proper hook usage within the CommandPaletteProvider context.
command-palette-update.mov