FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(CatalogTile): Add iconAlt property by jcaianirh · Pull Request #2715 · patternfly/patternfly-react · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
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
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class CatalogTile extends React.Component {
href,
onClick,
iconImg,
iconAlt,
iconClass,
badges,
title,
Expand Down Expand Up @@ -116,7 +117,7 @@ class CatalogTile extends React.Component {
return (
<OuterComponent>
<div className="catalog-tile-pf-header">
{iconImg && <img className="catalog-tile-pf-icon" src={iconImg} alt="" />}
{iconImg && <img className="catalog-tile-pf-icon" src={iconImg} alt={iconAlt} />}
{!iconImg && iconClass && <span className={`catalog-tile-pf-icon ${iconClass}`} />}
{this.renderBadges(badges)}
</div>
Expand Down Expand Up @@ -148,6 +149,8 @@ CatalogTile.propTypes = {
onClick: PropTypes.func,
/** URL of an image for the item's icon */
iconImg: PropTypes.string,
/** Alternate text for the item's icon */
iconAlt: PropTypes.string,
/** Class for the image when an icon is to be used (exclusive from iconImg) */
iconClass: PropTypes.string,
/** Array of badges */
Expand All @@ -173,6 +176,7 @@ CatalogTile.defaultProps = {
href: null,
onClick: null,
iconImg: null,
iconAlt: '',
iconClass: null,
badges: [],
vendor: null,
Expand Down

Back | FazBrowse Home | New Git URL