Clay: Card with images: API difference between 2.x and 3.x

Created on 21 Oct 2020  路  3Comments  路  Source: liferay/clay

With (Image) Card components in 2.x, we had the possibility to pass an aspectRatioClasses attribute to the ClayImageCard component that would set those CSS classes on it's img element.

With 3.x, I'm using CardWithInfo to display an image and the "behaviour" has changed a bit:
We always set the default CSS classes and have no aspectRatioClasses prop (and additionally
we can pass flushHorizontal and flushVertical which is nice).

It would be nice to add that back if you could or at least consider what we want to do about this.

I don't see lots of usages in DXP using GitHub's search, but there might be more.

What do you guys think?

question

All 3 comments

Hey guys,

I think I didn't read this line correctly. So passing imgProps = {className: 'foobar'} would do the same, is that correct?

Hey @julien, sorry for delay! yes 馃榿

@matuzalemsteles no need to be sorry and thanks!

Was this page helpful?
0 / 5 - 0 ratings