feat: [DS-268-InlineMessage_RDT_variation] enable left/right icon for InlineMessage Component#121
feat: [DS-268-InlineMessage_RDT_variation] enable left/right icon for InlineMessage Component#121richardblondet wants to merge 2 commits intomainfrom
Conversation
…ineMessage Component Changes to be committed: modified: src/components/Status/InlineMessage/index.tsx modified: src/components/Status/InlineMessage/styled.ts modified: src/components/Status/InlineMessage/types.ts Untracked files: package-lock.json
Changes to be committed: modified: src/components/Status/InlineMessage/InlineMessage.stories.tsx modified: src/components/Status/InlineMessage/InlineMessageDemo.tsx
|
❌ Versioning label check failed. Please apply exactly one of: Reason: missing |
There was a problem hiding this comment.
Pull request overview
This PR adds the ability to specify left and right icons for the action button in the InlineMessage component. The feature enables more flexible button styling, particularly useful for cases where the InlineMessage doesn't have its own icon but the button needs one (e.g., a "Mark complete" button with a checkmark icon).
Changes:
- Added
buttonLeftIconandbuttonRightIconoptional props to InlineMessageProps - Improved caption rendering by making it conditional when caption is not provided
- Adjusted caption styling to remove left margin when the InlineMessage has no icon
- Added story and demo examples showcasing the new functionality
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Status/InlineMessage/types.ts | Added buttonLeftIcon and buttonRightIcon optional props to the type definition |
| src/components/Status/InlineMessage/styled.ts | Enhanced inlineMessageCaptionStyles to conditionally apply left margin based on icon presence |
| src/components/Status/InlineMessage/index.tsx | Forwarded new icon props to Button component and added conditional rendering for caption |
| src/components/Status/InlineMessage/InlineMessageDemo.tsx | Added demo example showing InlineMessage without icon but with button left icon |
| src/components/Status/InlineMessage/InlineMessage.stories.tsx | Added NoIconWithButtonIcon story demonstrating the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Changes to be committed:
modified: src/components/Status/InlineMessage/index.tsx
modified: src/components/Status/InlineMessage/styled.ts
modified: src/components/Status/InlineMessage/types.ts
Untracked files:
package-lock.json
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information