Skip to content

Commit 8de44f4

Browse files
authored
only append asterisk when label value is non-empty (#636)
only append asterisk when label value is non-empty (#636)
1 parent c50464e commit 8de44f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Textfield/Textfield.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export default function TextField(props: Props): JSX.Element {
156156
return (
157157
<Box className={`textfield ${className}`} sx={sx}>
158158
<label htmlFor={id} className='textfield-label'>
159-
{required ? `${label} *` : label}
159+
{required && label ? `${label} *` : label}
160160
{tooltipTitle && <IconTooltip placement='top' title={tooltipTitle} />}
161161
</label>
162162
{!display &&

0 commit comments

Comments
 (0)