Skip to content

Commit

Permalink
fix: Set icon title in CardCategory with content-type name
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Dec 9, 2024
1 parent b821cce commit 3efa6c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/ItaliaTheme/Cards/CardCategory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ const CardCategory = (props) => {
const categoryText = !href && children && (
<span className="text">{children}</span>
);
const categoryIcon = iconName && (
<Icon icon={iconName} title={intl.formatMessage(messages.categoryIcon)} />
);
const iconTitle = rest.title || intl.formatMessage(messages.categoryIcon);
const categoryIcon = iconName && <Icon icon={iconName} title={iconTitle} />;

return (
<div className={classes} {...rest}>
Expand Down

0 comments on commit 3efa6c6

Please sign in to comment.