Skip to content

Commit

Permalink
replicate ui
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Oct 4, 2023
1 parent c90413b commit dc77ac2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gooey_ui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,16 @@ def controllable_tabs(
) -> tuple[list[state.NestingCtx], int]:
index = state.session_state.get(key, 0)
for i, label in enumerate(labels):
if button(label, key=f"tab-{i}", type="primary", disabled=i == index):
if button(
label,
key=f"tab-{i}",
type="primary",
className="replicate-nav",
style={
"background": "black" if i == index else "white",
"color": "white" if i == index else "black",
},
):
state.session_state[key] = index = i
state.experimental_rerun()
ctxs = []
Expand Down

0 comments on commit dc77ac2

Please sign in to comment.