Adjust text positioning and rotation for product stock limited banners

Update CSS `transform` property in `ImageEditor` component to handle specific translations, rotations, and line heights for "Stock limité" ribbon text based on its position.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/nlpElis
This commit is contained in:
michaelschal committed 2025-10-13 06:38:10 +00:00
1 parent b8bb605d04
commit 6919ae9873
2 files changed
+5 -1

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

+5 -1
View File
@@ -759,7 +759,11 @@ export default function ImageEditor() {
ribbon.text.length <= 11 ? '20px' : '16px',
lineHeight: ribbon.text === "Stock limité" ? '1.2' : 'normal',
whiteSpace: ribbon.text === "Stock limité" ? 'normal' : 'nowrap',
padding: ribbon.text === "Stock limité" ? '0 10px' : '0'
transform: ribbon.text === "Stock limité"
? (ribbon.position === "north_west"
? 'translate(-50%, -50%) rotate(-45deg) translateY(-20px) translateX(-8px)'
: 'translate(50%, -50%) rotate(45deg) translateY(-20px) translateX(8px)')
: undefined
}}
>
{ribbon.text === "Stock limité" ? (