Skip to content

Commit 52a7da2

Browse files
committed
Add .bslib-input-switch class rstudio/bslib#741
1 parent 096b7cc commit 52a7da2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

shiny/ui/_input_check_radio.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,26 @@ def input_switch(
124124
~shiny.ui.input_radio_buttons
125125
"""
126126

127-
return _input_checkbox(id, label, "form-check form-switch", value, width=width)
127+
return _input_checkbox(
128+
id,
129+
label,
130+
"bslib-input-switch form-switch",
131+
value,
132+
width=width,
133+
)
128134

129135

130136
def _input_checkbox(
131137
id: str,
132138
label: TagChild,
133-
class_: str = "form-check",
139+
class_: str = "bslib-input-checkbox",
134140
value: bool = False,
135141
*,
136142
width: Optional[str] = None,
137143
) -> Tag:
138144
return div(
139145
div(
146+
{"class": "form-check"},
140147
tags.input(
141148
id=resolve_id(id),
142149
class_="form-check-input",

0 commit comments

Comments
 (0)