-
Notifications
You must be signed in to change notification settings - Fork 4
AvatarGroup partitionAvatarGroupItems
Andrew Sutton edited this page Jan 26, 2024
·
2 revisions
let avatarGroup =
let names = [
"Johnie McConnell"
"Allan Munger"
"Erik Nason"
"Kristin Patterson"
"Daisy Phillips"
"Carole Poland"
"Carlos Slattery"
"Robert Tolbert"
"Kevin Sturgis"
"Charlotte Waltson"
"Elliot Woodward"
]
let spreadPartition = Fui.partitionAvatarGroupItems [
partitionAvatarGroupItemsOptions.items names
partitionAvatarGroupItemsOptions.layout.spread
]
let piePartition = Fui.partitionAvatarGroupItems [
partitionAvatarGroupItemsOptions.items names
partitionAvatarGroupItemsOptions.layout.pie
partitionAvatarGroupItemsOptions.maxInlineItems 10
]
Fui.stack [
stack.horizontal false
stack.children [
Fui.avatarGroup [
avatarGroup.layout.spread
avatarGroup.size.``56``
avatarGroup.children [
yield! spreadPartition.inlineItems |> Array.map (fun n ->
Fui.avatarGroupItem [
avatarGroupItem.name n
avatarGroupItem.key n
]
)
Fui.avatarGroupPopover [
yield! spreadPartition.overflowItems |> Array.map (fun n ->
Fui.avatarGroupItem [
avatarGroupItem.name n
avatarGroupItem.key n
]
)
]
]
]
Fui.avatarGroup [
avatarGroup.layout.pie
avatarGroup.size.``56``
avatarGroup.children [
yield! piePartition.inlineItems |> Array.map (fun n ->
Fui.avatarGroupItem [
avatarGroupItem.name n
avatarGroupItem.key n
]
)
Fui.avatarGroupPopover [
yield! piePartition.overflowItems |> Array.map (fun n ->
Fui.avatarGroupItem [
avatarGroupItem.name n
avatarGroupItem.key n
]
)
]
]
]
]
]