Remove use of flatten where possible (#9325)

* remove use of flatten where possible

* restore flatten where it says it's needed

* missing utils alpha
This commit is contained in:
Samuel Newman
2025-11-04 15:43:08 +02:00
committed by GitHub
parent 0bcde99025
commit 1b0fbd503e
28 changed files with 67 additions and 97 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import {UITextView} from 'react-native-uitextview'
import {logger} from '#/logger'
import {atoms, flatten, useAlf, useTheme, web} from '#/alf'
import {atoms, useAlf, useTheme, web} from '#/alf'
import {
childHasEmoji,
normalizeTextStyles,
@@ -26,7 +26,7 @@ export function Text({
}: TextProps) {
const {fonts, flags} = useAlf()
const t = useTheme()
const s = normalizeTextStyles([atoms.text_sm, t.atoms.text, flatten(style)], {
const s = normalizeTextStyles([atoms.text_sm, t.atoms.text, style], {
fontScale: fonts.scaleMultiplier,
fontFamily: fonts.family,
flags,
@@ -84,7 +84,7 @@ export function P({style, ...rest}: TextProps) {
<Text
{...attr}
{...rest}
style={[atoms.text_md, atoms.leading_normal, flatten(style)]}
style={[atoms.text_md, atoms.leading_relaxed, style]}
/>
)
}