reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Allow conditional props

Open picklelo opened this issue 3 years ago β€’ 1 comments

We should be able to do something like

pc.button(
    "hello",
    color=pc.cond(State.condition, "red", "green")
)

Currently the only way to achieve this is to do

pc.cond(
    State.condition,
    pc.button(color="red"),
    pc.button(color="green")
)

picklelo avatar Jan 13 '23 23:01 picklelo

@ElijahAhianyo is taking this on

picklelo avatar Jan 24 '23 22:01 picklelo