-
Notifications
You must be signed in to change notification settings - Fork 7
Tag TagGroup
Andrew Sutton edited this page Jan 26, 2024
·
3 revisions
[<ReactComponent>]
let TagTest () =
let visibleTags, setVisibleTags = React.useState initialTags
Fui.tagGroup [
tagGroup.onDismiss (fun (v: ValueProp<string>) ->
setVisibleTags (visibleTags |> List.filter (fun t -> t.value <> v.value))
)
tagGroup.ariaLabel "Dismiss example"
tagGroup.children [
yield! visibleTags |> List.map (fun t ->
Fui.tag [
tag.dismissible true
tag.dismissIcon [
prop.ariaLabel "Remove"
]
tag.value t.value
tag.key t.value
tag.text t.children
]
)
]
]