Skip to content

feat(PageHeader): add Lucide icon selector and iconAlign prop#69

Merged
garrity-miepub merged 1 commit into
mainfrom
feature/page-header-updates
Feb 4, 2026
Merged

feat(PageHeader): add Lucide icon selector and iconAlign prop#69
garrity-miepub merged 1 commit into
mainfrom
feature/page-header-updates

Conversation

@garrity-miepub

Copy link
Copy Markdown
Collaborator

Stories improvements:

  • Add interactive icon dropdown control with 15 Lucide React icons (Home, Settings, User, Users, Calendar, FileText, Building, Briefcase, Chart, Shield, Bell, Search, Stethoscope, Hospital, ClipboardList)
  • Add iconAlign radio control to toggle between 'top' and 'center'
  • Disable controls for ReactNode props (actions, children) to prevent Storybook serialization errors

Component enhancements:

  • Add iconAlign prop with 'top' | 'center' options (default: 'center')
  • When iconAlign='top', icon aligns with the top of title/subtitle instead of vertically centering
  • Adds subtle mt-1 offset when top-aligned for better visual balance
page-header.mov

Stories improvements:
- Add interactive icon dropdown control with 15 Lucide React icons
  (Home, Settings, User, Users, Calendar, FileText, Building,
  Briefcase, Chart, Shield, Bell, Search, Stethoscope, Hospital,
  ClipboardList)
- Add iconAlign radio control to toggle between 'top' and 'center'
- Disable controls for ReactNode props (actions, children) to prevent
  Storybook serialization errors

Component enhancements:
- Add iconAlign prop with 'top' | 'center' options (default: 'center')
- When iconAlign='top', icon aligns with the top of title/subtitle
  instead of vertically centering
- Adds subtle mt-1 offset when top-aligned for better visual balance
Copilot AI review requested due to automatic review settings February 4, 2026 00:13
@garrity-miepub garrity-miepub marked this pull request as ready for review February 4, 2026 00:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 PageHeader component with configurable icon alignment and upgrades its Storybook stories with a Lucide icon selector and safer controls for ReactNode props.

Changes:

  • Add an iconAlign prop ('top' | 'center', default 'center') to PageHeader and adjust layout classes so the icon can align with the title top or be vertically centered, including a subtle mt-1 offset when top-aligned.
  • Extend the PageHeader Storybook story with a selectable set of 15 Lucide icons via a mapped icon control and an iconAlign radio control.
  • Disable actions and children Storybook controls to avoid serialization errors for ReactNode props.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/PageHeader/PageHeader.tsx Adds the iconAlign prop and conditionally applies flex alignment and margin classes to support top vs center icon alignment.
src/components/PageHeader/PageHeader.stories.tsx Introduces a Lucide icon registry and Storybook icon select control, adds an iconAlign radio control, and disables actions/children controls.

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

@garrity-miepub garrity-miepub merged commit b857459 into main Feb 4, 2026
16 checks passed
@garrity-miepub garrity-miepub deleted the feature/page-header-updates branch February 4, 2026 00:18
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