Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/dev/s2-docs/pages/s2/Picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ Use the `renderValue` prop to provide a custom element to display selected items
```tsx render
"use client";
import {Avatar, AvatarGroup, Picker, PickerItem, Text} from '@react-spectrum/s2';
import {style} from '@react-spectrum/s2/style' with {type: 'macro'};

///- begin collapse -///
let users = [
Expand All @@ -269,7 +270,7 @@ function Example() {
selectionMode={"multiple"}
///- begin highlight -///
renderValue={(selectedItems) => (
<AvatarGroup aria-label="Selected users">
<AvatarGroup aria-label="Selected users" styles={style({marginX: 4})}>
{selectedItems.map(item => (
<Avatar key={item.id} src={item.avatar} alt={item.name} />
))}
Expand Down