Skip to content

Commit 09f4f66

Browse files
authored
fix(components): fix PlaceholderStyledText <text> is not an HTML tag (#20050)
# Overview This fixes a minor error that's cluttering up the JavaScript console: ` Warning: The tag <text> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter. ` It looks like `<text>` is only valid inside SVG. For HTML documents, you're supposed to use `<span>` for a span of text. ## Test Plan and Hands on Testing Running `vitest`. ## Review requests I haven't really touched our frontend components before. Does this look right? ## Risk assessment Low.
1 parent ee3acc7 commit 09f4f66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/src/atoms/StyledText/PlaceholderStyledText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const PlaceholderStyledText = (
3838
oddStyle != null ? styleMap[oddStyle as StyleKey] : null
3939
)
4040
return (
41-
<text className={combinedClassName} style={{ color: color ?? '' }}>
41+
<span className={combinedClassName} style={{ color: color ?? '' }}>
4242
{children}
43-
</text>
43+
</span>
4444
)
4545
}

0 commit comments

Comments
 (0)