Pricing Blog

Issue with style variable logic

  • xavi_35974-1400813540817764484

    Xavi

    29 days ago

    I'm trying to set the height of a button dynamically but I'm a bit confused on how to set the conditional logic properly. Currently, I have an "if" node that checks if the height attribute is "medium" (default). If yes, it sets the height to 2.5rem. If not, I want to add another "if" node to check if the button's height is "large". If the button is large, return 3rem, otherwise return 2rem (small). For some reason is not working properly.
    1400813541090660433-Screenshot_2025-08-01_at_13.12.14.png
  • whitep4nth3r-1400817841690902580

    salma

    29 days ago

    I'll show you a solution, one moment
  • whitep4nth3r-1400818622599008286

    salma

    29 days ago

    you need to check if the size EQUALS a value, otherwise it's just a "truthy" value
    1400818622271590451-image.png
    ❤️1
  • xavi_35974-1400827647193518101

    Xavi

    29 days ago

    Thank you so much Salma!
  • whitep4nth3r-1400827764986351656

    salma

    29 days ago

    you're welcome!