For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi,
I'm trying to make response UI in checkout extensions.
I wanted to set my text size based upon the viewport size.
Without using the style helper i used this
<TextBlock size="extraSmall" emphasis='bold' inlineAlignment='center'> {'My Text'} </TextBlock>
This is setting extraSmall size to all screen resolutions
And using style helper, i used the below code
<TextBlock size={Style.default("medium")
.when({viewportInlineSize: {min: 'small'}}, "extraSmall")
.when({viewportInlineSize: {min: 'medium'}}, "small")
.when({viewportInlineSize: {min: 'large'}}, "medium")} emphasis='bold' inlineAlignment='center'>
{'My Text'}
</TextBlock>
This is not working as per what i have given and the text size has been constant (i think its taking base) in all screen resolutions..
Kindly someone share some insights pls..
This isn't working for me either when trying to hide a View or Text, using the visibility property. So far, I've only seen it work with Grid layouts and layout width. It definitely doesn't do what it claims it's supposed to do.