use super::prelude::*;
use crate::tree::AttributeMap;
pub fn render_radio_button(
ctx: &mut HtmlContext,
name: &str,
checked: bool,
attributes: &AttributeMap,
) {
debug!("Creating radio button (name '{name}', checked {checked})");
ctx.html().input().attr(attr!(
"name" => name,
"type" => "radio",
"checked"; if checked;;
attributes,
));
}
pub fn render_checkbox(ctx: &mut HtmlContext, checked: bool, attributes: &AttributeMap) {
debug!("Creating checkbox (checked {checked})");
ctx.html().input().attr(attr!(
"type" => "checkbox",
"checked"; if checked;;
attributes,
));
}