Skip to content

Commit

Permalink
fix: Text の color や leading などの属性を DOM から隠す (#3797)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Oct 10, 2023
1 parent ca3e0c9 commit 07c4109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ export const Text: React.FC<PropsWithChildren<TextProps & ComponentProps<'span'>
as: Component = emphasis ? 'em' : 'span',
...props
}) => {
const { size, italic, color, leading, whiteSpace, className } = props
const { size, italic, color, leading, whiteSpace, className, ...others } = props
const styles = useMemo(
() => text({ size, weight, italic, color, leading, whiteSpace, className }),
[size, weight, italic, color, leading, whiteSpace, className],
)

return <Component {...props} className={styles} />
return <Component {...others} className={styles} />
}

0 comments on commit 07c4109

Please sign in to comment.