Introduce color property to the Modal component (#468)#614
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new color property for the Modal component, enabling it to display colors from the Feedback color collection. It also updates the documentation and tests accordingly.
- Added support for a new "color" prop in Modal.jsx, allowing for feedback color styling.
- Updated the Modal README to include a demo showcasing color variants.
- Revised the design collections documentation and extended tests to verify the new property.
Reviewed Changes
Copilot reviewed 4 out of 10 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/Modal/README.md | Added a new documentation section with an example of using the "color" prop. |
| src/components/Modal/Modal.jsx | Integrated the "color" prop in the component and updated its PropTypes. |
| src/docs/foundation/collections.md | Enhanced the collections table with descriptions for each color collection. |
| src/components/Modal/tests/Modal.test.jsx | Introduced tests for the "color" prop using feedbackColorPropTest. |
Files not reviewed (6)
- src/components/Modal/Modal.module.scss: Language not supported
- src/components/Modal/ModalBody.module.scss: Language not supported
- src/components/Modal/ModalFooter.module.scss: Language not supported
- src/components/Modal/ModalHeader.module.scss: Language not supported
- src/components/Modal/_settings.scss: Language not supported
- src/theme.scss: Language not supported
Comments suppressed due to low confidence (1)
src/components/Modal/tests/Modal.test.jsx:35
- Consider adding tests for invalid values for the 'color' prop to ensure that the Modal defaults or handles unexpected values appropriately.
...feedbackColorPropTest,...
adamkudrna
force-pushed
the
feature/468-modal-colors
branch
from
March 24, 2025 16:47
a1f5fe5 to
fbf6af2
Compare
mbohal
requested changes
Mar 26, 2025
bedrich-schindler
approved these changes
Mar 31, 2025
adamkudrna
force-pushed
the
feature/468-modal-colors
branch
from
April 11, 2025 16:20
fbf6af2 to
abe61fc
Compare
`Modal` can now be colored via the `color` prop, using a value from the Feedback Colors collection.
adamkudrna
force-pushed
the
feature/468-modal-colors
branch
from
April 11, 2025 16:40
abe61fc to
3028631
Compare
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.
Modalcan now be colored via thecolorprop, using a value from the Feedback Colors collection.New custom properties in shape of
--rui-Modal--<COLOR>__<PROPERTY>have been introduced where:<COLOR>is a value from supported color collections (check the docs to see which collections are supported),<PROPERTY>is one ofborder-colororbackground-color.Closes #468.