(props: SelectGroupLabelProps)
| 159 | /// ``` |
| 160 | #[component] |
| 161 | pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element { |
| 162 | let mut ctx: SelectGroupContext = use_context(); |
| 163 | |
| 164 | let id = use_unique_id(); |
| 165 | let id = use_id_or(id, props.id); |
| 166 | |
| 167 | use_effect(move || { |
| 168 | ctx.labeled_by.set(Some(id())); |
| 169 | }); |
| 170 | |
| 171 | let render = use_context::<ListboxContext>().render; |
| 172 | |
| 173 | rsx! { |
| 174 | if render () { |
| 175 | div { |
| 176 | // Set the ID for the label |
| 177 | id, |
| 178 | ..props.attributes, |
| 179 | {props.children} |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | } |
nothing calls this directly
no test coverage detected