Skip to content

Commit 2eaa829

Browse files
fix(clerk-js): Add data variant and color props to text component (#7535)
1 parent 4914442 commit 2eaa829

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/eleven-bears-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Add `data-variant` and `data-color` attributes to the Text component.

packages/clerk-js/src/ui/primitives/Text.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export const Text = React.forwardRef<HTMLElement, TextProps>((props, ref) => {
4848
return (
4949
<As
5050
{...applyDataStateProps(filterProps(rest))}
51+
data-variant={props.variant || 'body'}
52+
data-color={props.colorScheme || 'inherit'}
5153
css={applyVariants(props) as any}
5254
ref={ref as unknown as any}
5355
/>

0 commit comments

Comments
 (0)