10
10
load_source_with_environment ,
11
11
)
12
12
from ...metadata import get_component_metadata
13
- from .radio_check import inputs as input_radio_check
14
13
from .size import inputs as input_size
15
14
from .text_label import text_input as input_text_label
16
15
from .textarea import textareas as input_textarea
17
16
from .validation import inputs as input_validation
17
+ from .radio_check_inline import inline_inputs
18
18
19
19
HERE = Path (__file__ ).parent
20
20
24
24
input_validation_source = (HERE / "validation.py" ).read_text ()
25
25
input_radio_check_source = (HERE / "radio_check.py" ).read_text ()
26
26
input_textarea_source = (HERE / "textarea.py" ).read_text ()
27
+ input_radio_check_inline_source = (HERE / "radio_check_inline.py" ).read_text ()
28
+ input_radio_check_standalone_source = (
29
+ HERE / "radio_check_standalone.py"
30
+ ).read_text ()
27
31
28
32
29
33
def get_content (app ):
@@ -109,8 +113,39 @@ def get_content(app):
109
113
"padding."
110
114
)
111
115
),
112
- ExampleContainer (input_radio_check ),
116
+ ExampleContainer (
117
+ load_source_with_environment (
118
+ input_radio_check_source , "inputs" , {"app" : app }
119
+ )
120
+ ),
113
121
HighlightedSource (input_radio_check_source ),
122
+ html .P (
123
+ dcc .Markdown (
124
+ "Use the `inline` keyword to make the radioitems or "
125
+ "checklists fit next to each other on a line."
126
+ )
127
+ ),
128
+ ExampleContainer (inline_inputs ),
129
+ HighlightedSource (input_radio_check_inline_source ),
130
+ html .P (
131
+ dcc .Markdown (
132
+ "If you need more granular control over checkboxes "
133
+ "and radio buttons, you can also create standalone "
134
+ "components. Bind callbacks to the `checked` keyword "
135
+ "to react to changes in the input state. To attach "
136
+ "a label, create a FormGroup with `check=True` and "
137
+ "use the label's `html_for` keyword to bind it to "
138
+ "the checkbox."
139
+ )
140
+ ),
141
+ ExampleContainer (
142
+ load_source_with_environment (
143
+ input_radio_check_standalone_source ,
144
+ "standalone_radio_check" ,
145
+ {"app" : app },
146
+ )
147
+ ),
148
+ HighlightedSource (input_radio_check_standalone_source ),
114
149
ApiDoc (
115
150
get_component_metadata ("src/components/input/Input.js" ),
116
151
component_name = "Input" ,
@@ -127,4 +162,12 @@ def get_content(app):
127
162
get_component_metadata ("src/components/input/Checklist.js" ),
128
163
component_name = "Checklist" ,
129
164
),
165
+ ApiDoc (
166
+ get_component_metadata ("src/components/input/Checkbox.js" ),
167
+ component_name = "Checkbox" ,
168
+ ),
169
+ ApiDoc (
170
+ get_component_metadata ("src/components/input/RadioButton.js" ),
171
+ component_name = "RadioButton" ,
172
+ ),
130
173
]
0 commit comments