Skip to content

Commit ca4bb8f

Browse files
fix(ui): Add data-attrs to text component (#7537)
1 parent f1f1d09 commit ca4bb8f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.changeset/shaggy-jobs-decide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/ui/src/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)