Improve and standardize title styling of CustomCard#7655
Conversation
Extend the Card HOC with titleFont, showTitleDivider, and titleHeading props so the title prop can render as a seamless heading without the default Ant Design header divider and padding. Add storybook coverage with side-by-side comparison stories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile SummaryThis PR refactors the
Confidence Score: 2/5
Important Files Changed
|
gilluminate
left a comment
There was a problem hiding this comment.
LGTM! Just need to fix that lint error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@gilluminate error resolved! |
Description Of Changes
Extend the CustomCard HOC with new props for title rendering:
showTitleDivider(boolean) — toggle the header/body bordertitleHeading(boolean) — wrap the title in<Typography.Title level={5}>and collapse header padding so it flows seamlessly into the bodyAlso adds CSS overrides in
.titleHeadingto handle Ant Design's conditional tab padding rules, and changes.inlineHeaderalign-itemsfromcentertoflex-startfor better tab alignment.Code Changes
clients/fidesui/src/hoc/CustomCard.tsx— addtitleFont,showTitleDivider,titleHeadingprops with style/class logicclients/fidesui/src/hoc/CustomCard.module.scss— add.titleHeadingclass with tab padding overrides; change.inlineHeaderalign-items to flex-startclients/fidesui/src/hoc/CustomCard.stories.tsx— new storybook file with basic prop stories, side-by-side comparison stories, and tab storySteps to Confirm
cd clients/fidesui && npm run storybookDefault,MonoTitle,NoDivider,ClassicHeaderstories render correctlyCompare: *stories show visually similar output between existing and new approachesWithTabsstory shows inline title + tabs with no extra paddingPre-Merge Checklist
🤖 Generated with Claude Code