fix(SW-1509): add support for default selected key
fixed padding per list item
This commit is contained in:
@@ -88,22 +88,27 @@ export function Select({
|
||||
|
||||
<Popover className={styles.popover} shouldFlip={false}>
|
||||
<ListBox className={styles.listBox}>
|
||||
{items.map((item, idx) => (
|
||||
<Typography variant="Body/Paragraph/mdRegular" key={idx}>
|
||||
{typeof item === 'object' ? (
|
||||
<SelectItem
|
||||
icon={item.icon || itemIcon}
|
||||
isDisabled={item.isDisabled}
|
||||
>
|
||||
{item.label}
|
||||
</SelectItem>
|
||||
) : (
|
||||
<SelectItem icon={itemIcon} isDisabled={isDisabled}>
|
||||
{item.toString()}
|
||||
</SelectItem>
|
||||
)}
|
||||
</Typography>
|
||||
))}
|
||||
{items.map((item) =>
|
||||
typeof item === 'object' ? (
|
||||
<SelectItem
|
||||
key={item.label}
|
||||
id={item.label}
|
||||
icon={item.icon || itemIcon}
|
||||
isDisabled={item.isDisabled}
|
||||
>
|
||||
{item.label}
|
||||
</SelectItem>
|
||||
) : (
|
||||
<SelectItem
|
||||
key={item}
|
||||
id={item}
|
||||
icon={itemIcon}
|
||||
isDisabled={isDisabled}
|
||||
>
|
||||
{item.toString()}
|
||||
</SelectItem>
|
||||
)
|
||||
)}
|
||||
</ListBox>
|
||||
</Popover>
|
||||
</AriaSelect>
|
||||
|
||||
Reference in New Issue
Block a user