Skip to content

Commit bfc1ceb

Browse files
feat(iOS): enriched text lineHeight
1 parent 982c0ca commit bfc1ceb

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

ios/EnrichedTextView.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ - (void)updateProps:(Props::Shared const &)props
154154
stylePropChanged = YES;
155155
}
156156

157+
// lineHeight
158+
if (newViewProps.lineHeight != oldViewProps.lineHeight) {
159+
[newConfig setPrimaryLineHeight:newViewProps.lineHeight];
160+
stylePropChanged = YES;
161+
}
162+
157163
// fontWeight
158164
if (newViewProps.fontWeight != oldViewProps.fontWeight) {
159165
if (!newViewProps.fontWeight.empty()) {

src/spec/EnrichedTextNativeComponent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export interface NativeProps extends ViewProps {
100100
// These should not be passed as regular props
101101
color?: ColorValue;
102102
fontSize?: Float;
103+
lineHeight?: Float;
103104
fontFamily?: string;
104105
fontWeight?: string;
105106
fontStyle?: string;

0 commit comments

Comments
 (0)