Skip to content

Commit

Permalink
fix: show "optional" even when no label in Dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mirovladimitrovski committed Aug 18, 2023
1 parent 035de63 commit d9f2ee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Dropdown: React.FC<Props & React.AriaAttributes> = ({

return (
<div className={classNames(styles.container, { [styles.fullWidth]: fullWidth, [styles.error]: error }, styles[size], className)}>
{label && (
{(label || !required) && (
<label htmlFor={id} className={styles.label}>
{label}
{!required ? <span>{t('optional')}</span> : null}
Expand Down

0 comments on commit d9f2ee5

Please sign in to comment.