-
Notifications
You must be signed in to change notification settings - Fork 106
feat(helper-text): add pf-helper-text element #2947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
bennypowers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a changeset
…n docs with pf-icon
What I did
Created a new custom element using LitElement.
Implemented a status property with options: 'default', 'success', 'warning', 'error', 'indeterminate'.
Added support for custom icons via icon and icon-set properties.
Added a slot named "icon" for overriding the default icon with a custom SVG.
Added a default slot for the text content.
Styled the element so that the text and icon colors correspond to the status.
Testing Instructions
- Import the element in a demo page:
<script type="module"> import '@patternfly/elements/pf-icon/pf-icon.js'; import '@patternfly/elements/pf-helper-text/pf-helper-text.js'; </script>- Add elements with different statuses and icons:
Default helper text Warning helper text Success helper textThe text appears correctly.
The icon matches the status or the custom icon if provided.
The slot "icon" can be overridden with a custom SVG.
Notes to Reviewers