Skip to content

EPMRPP-111250 || Add headerClassName prop to the Modal#234

Closed
siarheirazuvalau wants to merge 2 commits intodevelopfrom
feature/EPMRPP-111250-add-headerClassName-prop-to-Modal
Closed

EPMRPP-111250 || Add headerClassName prop to the Modal#234
siarheirazuvalau wants to merge 2 commits intodevelopfrom
feature/EPMRPP-111250-add-headerClassName-prop-to-Modal

Conversation

@siarheirazuvalau
Copy link
Contributor

@siarheirazuvalau siarheirazuvalau commented Feb 3, 2026

Description

  • added headerclassName prop to Modal to customize modal header
  • refactored code to remove FC<...> notation

Summary by CodeRabbit

  • New Features

    • Modals now support custom header styling via an optional header class.
    • Modal headers include a visible close button for easier dismissal.
  • Refactor

    • Component signatures and type declarations updated for clearer internal typing (no user-facing behavior change).

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Walkthrough

Modal and ModalHeader signatures changed from FC to explicit function exports with ReactElement return types; headerClassName / className props were added and threaded through; createFooter prop type widened to allow null; a close button was added to ModalHeader.

Changes

Cohort / File(s) Summary
Modal component
src/components/modal/modal.tsx
Replaced FC<ModalProps> export with export const Modal = (...): ReactElement; added headerClassName?: string to ModalProps and passed it to ModalHeader; widened createFooter type to `((closeHandler: () => void) => ReactNode)
ModalHeader component
src/components/modal/modalHeader/modalHeader.tsx
Replaced FC<ModalHeaderProps> export with export const ModalHeader = (...): ReactElement; added className?: string to props and included it in root className composition; rendered a BaseIconButton with CloseIcon in the header.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • AmsterGet
  • allaprischepa
  • maria-hambardzumian

Poem

🐰 I hopped in to tweak a header's dress,

A little className to make it bless.
I swapped the types and added a close,
Now modals sparkle where the moonlight glows.
Hop, code, hop — a tiny change, no stress!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a headerClassName prop to the Modal component, which aligns with the primary objective and file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/EPMRPP-111250-add-headerClassName-prop-to-Modal

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@siarheirazuvalau siarheirazuvalau changed the title EPMRPP-111250 || Add headeClassName prop to the Modal EPMRPP-111250 || Add headerClassName prop to the Modal Feb 3, 2026
@siarheirazuvalau
Copy link
Contributor Author

After discussion with UX team we decided leave code "as is", so I'm closing this PR without merging.

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