Mention default <Text> style in CLAUDE.md (#10705)

This commit is contained in:
Samuel Newman
2026-06-03 17:39:31 +03:00
committed by GitHub
parent a046d8d96a
commit 21679b66dd
+7 -3
View File
@@ -206,7 +206,7 @@ function MyComponent() {
return ( return (
<View style={[a.flex_row, a.gap_md, a.p_lg, t.atoms.bg]}> <View style={[a.flex_row, a.gap_md, a.p_lg, t.atoms.bg]}>
<Text style={[a.text_md, a.font_bold, t.atoms.text]}>Hello</Text> <Text style={[a.text_md, a.font_bold, t.atoms.text_contrast_high]}>Hello</Text>
</View> </View>
) )
} }
@@ -414,12 +414,16 @@ import {Text, H1, H2, P} from '#/components/Typography'
<H1 style={[a.text_xl, a.font_bold]}>Heading</H1> <H1 style={[a.text_xl, a.font_bold]}>Heading</H1>
<P>Paragraph text with default styling.</P> <P>Paragraph text with default styling.</P>
<Text style={[a.text_sm, t.atoms.text_contrast_medium]}>Custom text</Text> <Text style={[a.text_md, t.atoms.text_contrast_medium]}>Custom text</Text>
// For text with emoji, add the emoji prop // For text with emoji, add the emoji prop. User-generated text (e.g. display names)
// will almost certainly contain emoji, so only omit it when the text is static and
// does not contain an emoji
<Text emoji>Hello! 👋</Text> <Text emoji>Hello! 👋</Text>
``` ```
The `Text` component's default style is `[a.text_sm, a.leading_snug, t.atoms.text]`.
### TextField ### TextField
```tsx ```tsx