Skip to content

Commit

Permalink
Counter: pin to chakra components (rx.chakra)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackie-pc committed Jan 31, 2024
1 parent 1375cbe commit 76298ff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions counter/counter/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ def random(self):

def index():
"""The main view."""
return rx.center(
rx.vstack(
rx.heading(State.count),
rx.hstack(
rx.button("Decrement", on_click=State.decrement, color_scheme="red"),
rx.button(
return rx.chakra.center(
rx.chakra.vstack(
rx.chakra.heading(State.count),
rx.chakra.hstack(
rx.chakra.button("Decrement", on_click=State.decrement, color_scheme="red"),
rx.chakra.button(
"Randomize",
on_click=State.random,
background_image="linear-gradient(90deg, rgba(255,0,0,1) 0%, rgba(0,176,34,1) 100%)",
color="white",
),
rx.button("Increment", on_click=State.increment, color_scheme="green"),
rx.chakra.button("Increment", on_click=State.increment, color_scheme="green"),
),
padding="1em",
bg="#ededed",
Expand Down

0 comments on commit 76298ff

Please sign in to comment.