vtex-apps / product-summary

VTEX Product Summary app
11 stars 51 forks source link

Add class to parent that holds the vtex-product-summary-2-x-item #315

Closed carlosviniciusananias closed 3 years ago

carlosviniciusananias commented 3 years ago

What problem is this solving? The block is encapsulated by a div with generic classes (inline-flex justify-end absolute w-100 bottom-0 left-0) which makes it impossible to apply styling... By applying cssHandles to this div we will now be able to position it as needed.

Add in ProductSummaryImage.tsx

Line 23:
const CSS_HANDLES = [
  ...
  'summaryItemContainer',
] as const

-

Line 157: 
function CollectionWrapper({
  ...
  classes,

-

Line 165: const { handles } = useCssHandles(CSS_HANDLES, { classes })

-

Line 168:
<CollectionBadges collectionBadgesText={collections} className={handles.summaryItemContainer}>

A small example

Captura de tela de 2021-05-30 13-45-32

How does this PR make you feel? 🔗

image

vtex-io-ci-cd[bot] commented 3 years ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

vtex-io-docs-bot[bot] commented 3 years ago

Beep boop :robot:

I noticed you didn't make any changes at the docs/ folder

In order to keep track, I'll create an issue if you decide now is not a good time

victorhmp commented 3 years ago

Hi @carlosviniciusananias ! Thanks for the pull request! Could you please provide a workspace with this code linked?

Also, please update the docs and CHANGELOG :)

victorhmp commented 3 years ago

Closing this due to it being stale.