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:
@@ -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]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user