Don't show <img> when there is no icon
This commit is contained in:
parent
ab6897c205
commit
ab702edb4b
1 changed files with 2 additions and 4 deletions
|
|
@ -100,14 +100,12 @@ const Select = React.forwardRef<HTMLButtonElement, Props>(function select(
|
|||
placeholder={props.placeholder}
|
||||
ref={forwardedRef}
|
||||
>
|
||||
{props.icon ? <img alt={props.icon.alt} src={props.icon.src} /> : ''}
|
||||
{props.icon?.src && <img alt={props.icon.alt} src={props.icon.src} />}
|
||||
<RadixSelect.Value placeholder={props.trigger?.placeholder} />
|
||||
{!props.disabled ? (
|
||||
{!props.disabled && (
|
||||
<RadixSelect.Icon className={styles.icon}>
|
||||
<ChevronIcon />
|
||||
</RadixSelect.Icon>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</RadixSelect.Trigger>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue