Pass down theme from Card title to nested Avatar

The current approach to theme the nested avatar was by adding a div:first-child selector in the .cardTitle class.
A bit less than ergonomic.
old
Aleksander Vognild Burkow 2016-09-07 13:11:56 +02:00 committed by GitHub
parent 4d0b37e207
commit f0774034b5
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ const factory = (Avatar) => {
return (
<div className={classes} {...other}>
{typeof avatar === 'string' ? <Avatar image={avatar} /> : avatar}
{typeof avatar === 'string' ? <Avatar image={avatar} theme={theme} /> : avatar}
<div>
{title && <h5 className={theme.title}>{title}</h5>}
{children && typeof children === 'string' && (