chore(DataList): provided context for demo icons - #7750
Conversation
|
Preview: https://pf-pr-7750.surge.sh A11y report: https://pf-pr-7750-a11y.surge.sh |
| {{> data-list--icon-text data-list--icon-text--icon="times-circle" data-list--icon-text--text="1"}} | ||
| {{> data-list--icon-text data-list--icon-text--icon="code" data-list--icon-text--text="9" data-list--icon-text--screenreader-text="Code blocks"}} | ||
| {{> data-list--icon-text data-list--icon-text--icon="cube" data-list--icon-text--text="2" data-list--icon-text--screenreader-text="Workspaces"}} | ||
| {{> data-list--icon-text data-list--icon-text--icon="check-circle" data-list--icon-text--modifier="pf-m-success" data-list--icon-text--text="11" data-list--icon-text--screenreader-text="Completed"}} |
There was a problem hiding this comment.
What you have here is great and probably preferred, but just FYI in cases like this where the data-list--icon-text is so limited in scope (it should only have a single icon in it), it's totally fine to just use icon-content--modifier directly on data-list--icon-text.
| {{> data-list--icon-text data-list--icon-text--icon="check-circle" data-list--icon-text--modifier="pf-m-success" data-list--icon-text--text="11" data-list--icon-text--screenreader-text="Completed"}} | |
| {{> data-list--icon-text data-list--icon-text--icon="check-circle" icon-content--modifier="pf-m-success" data-list--icon-text--text="11" data-list--icon-text--screenreader-text="Completed"}} |
Also seeing this makes me think we should really enhance the icon component hbs to have parameters/props for icon--IsWarning, icon--IsSmall, etc
There was a problem hiding this comment.
Ah wasnt sure if that would pass through so just went with the new attr, updated to just use icon-content--modifier!
There was a problem hiding this comment.
Yep! Parameters are inherited to all nested things unless they're explicitly set/defined anywhere in the children. FWIW sometimes we add a little context wrapper like this - id-wrapper.hbs doesn't exist, so it renders nothing, but it does set a bunch of parameters/props as context for its children
|
🎉 This PR is included in version 6.3.0-prerelease.53 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #7275