fix: special requests
This commit is contained in:
@@ -25,6 +25,7 @@ import type {
|
||||
} from "./select"
|
||||
|
||||
export default function Select({
|
||||
className = "",
|
||||
"aria-label": ariaLabel,
|
||||
defaultSelectedKey,
|
||||
items,
|
||||
@@ -54,7 +55,7 @@ export default function Select({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container} ref={setRef}>
|
||||
<div className={`${styles.container} ${className}`} ref={setRef}>
|
||||
<ReactAriaSelect
|
||||
aria-label={ariaLabel}
|
||||
className={`${styles.select} ${discreet && styles.discreet}`}
|
||||
@@ -68,11 +69,26 @@ export default function Select({
|
||||
<Body asChild fontOnly>
|
||||
<Button className={styles.input} data-testid={name}>
|
||||
<span className={styles.inputContentWrapper} tabIndex={tabIndex}>
|
||||
<Label required={required} size={discreet ? "discreet" : "small"}>
|
||||
{label}
|
||||
{discreet && `:`}
|
||||
</Label>
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{({ isPlaceholder, selectedText }) => (
|
||||
<>
|
||||
<Label
|
||||
required={required}
|
||||
size={discreet ? "discreet" : "small"}
|
||||
>
|
||||
{label}
|
||||
{discreet && `:`}
|
||||
</Label>
|
||||
{isPlaceholder ? (
|
||||
placeholder ? (
|
||||
<Body color="uiTextPlaceholder"> {placeholder}</Body>
|
||||
) : null
|
||||
) : (
|
||||
selectedText
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</SelectValue>
|
||||
</span>
|
||||
<SelectChevron
|
||||
{...(discreet ? { color: "baseButtonTextOnFillNormal" } : {})}
|
||||
|
||||
Reference in New Issue
Block a user