Skip to content

fix(DateRangePicker): add Storybook controls for component props#53

Merged
garrity-miepub merged 2 commits intomainfrom
feature/date-range-picker-updates
Feb 3, 2026
Merged

fix(DateRangePicker): add Storybook controls for component props#53
garrity-miepub merged 2 commits intomainfrom
feature/date-range-picker-updates

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

fix(DateRangePicker): add Storybook controls for component props

  • Add comprehensive argTypes configuration for DateRangePicker props
  • Add boolean controls for showPrint and showExport
  • Add text controls for placeholder, dateFormat, and className
  • Disable controls for complex/controlled props (value, activePreset, presets, labels)
  • Add action handlers for onChange, onPrint, onExport callbacks
  • Add default args at meta level with sensible defaults
  • Create PlaygroundDemo wrapper component that:
    • Manages internal state for value and activePreset (required for picker functionality)
    • Passes through all controllable props from Storybook args
    • Allows controls to work while maintaining full interactivity
  • Add Playground story with showPrint and showExport enabled by default
  • Preserve all existing stories unchanged (Default, WithPrintExport, Preselected,
    CustomLabels, FilterDropdown, FilterVariants, Mobile)

The Storybook Controls panel now allows dynamic toggling of showPrint,
showExport, placeholder, and other props while maintaining the date
picker's stateful functionality.

dte-range-picker.mov

Copilot AI review requested due to automatic review settings February 3, 2026 00:15
@garrity-miepub garrity-miepub marked this pull request as ready for review February 3, 2026 00:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the DateRangePicker Storybook documentation by adding comprehensive controls configuration and a new interactive Playground story. The changes enable dynamic manipulation of component props through Storybook's Controls panel while maintaining full component interactivity.

Changes:

  • Added argTypes configuration for all DateRangePicker props with appropriate control types and descriptions
  • Created a new Playground story with a wrapper component that manages internal state for value and activePreset
  • Added action handlers for onChange, onPrint, and onExport callbacks to enable event logging in Storybook

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add onChange prop to PlaygroundProps interface
- Call onChange callback in handler to log events in Storybook Actions panel
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 3, 2026

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e8dcdf
Status: ✅  Deploy successful!
Preview URL: https://c487e1f8.ui-6d0.pages.dev
Branch Preview URL: https://feature-date-range-picker-up.ui-6d0.pages.dev

View logs

@garrity-miepub garrity-miepub merged commit 5466772 into main Feb 3, 2026
10 checks passed
@garrity-miepub garrity-miepub deleted the feature/date-range-picker-updates branch February 3, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants