diff options
Diffstat (limited to 'src/alf')
-rw-r--r-- | src/alf/atoms.ts | 4 | ||||
-rw-r--r-- | src/alf/typography.tsx | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/alf/atoms.ts b/src/alf/atoms.ts index 5a3e6d675..c60af4862 100644 --- a/src/alf/atoms.ts +++ b/src/alf/atoms.ts @@ -951,8 +951,8 @@ export const atoms = { userSelect: 'all', }, outline_inset_1: { - outlineOffset: '-1px', - } as StyleProp<ViewStyle>, + outlineOffset: -1, + }, /* * Text decoration diff --git a/src/alf/typography.tsx b/src/alf/typography.tsx index 4f6947e0e..a3bed4e4c 100644 --- a/src/alf/typography.tsx +++ b/src/alf/typography.tsx @@ -1,12 +1,13 @@ -import React, {Children} from 'react' -import {TextProps as RNTextProps} from 'react-native' -import {StyleProp, TextStyle} from 'react-native' +import {Children} from 'react' +import {type TextProps as RNTextProps} from 'react-native' +import {type StyleProp, type TextStyle} from 'react-native' import {UITextView} from 'react-native-uitextview' import createEmojiRegex from 'emoji-regex' +import type React from 'react' import {isNative} from '#/platform/detection' import {isIOS} from '#/platform/detection' -import {Alf, applyFonts, atoms, flatten} from '#/alf' +import {type Alf, applyFonts, atoms, flatten} from '#/alf' /** * Util to calculate lineHeight from a text size atom and a leading atom @@ -110,7 +111,10 @@ export function renderChildrenWithEmoji( return child.split(EMOJI).map((stringPart, index) => [ stringPart, emojis[index] ? ( - <UITextView {...props} style={[props?.style, {fontFamily: 'System'}]}> + <UITextView + {...props} + style={[props?.style, {fontFamily: 'System'}]} + key={index}> {emojis[index]} </UITextView> ) : null, |