@momo-kits/title 0.165.1-expo.1 → 0.165.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.tsx +8 -1
- package/package.json +1 -1
- package/styles.ts +0 -1
package/index.tsx
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
Text,
|
|
17
17
|
Typography,
|
|
18
18
|
useScaleSize,
|
|
19
|
+
exportFontFamily,
|
|
19
20
|
} from '@momo-kits/foundation';
|
|
20
21
|
import styles from './styles';
|
|
21
22
|
import { TitleProps } from './types';
|
|
@@ -75,6 +76,7 @@ const Title: FC<TitleProps> = ({
|
|
|
75
76
|
[key: string]: any;
|
|
76
77
|
} = { ...styles, ...dynamicStyles };
|
|
77
78
|
const typography = `${type}_${size}`;
|
|
79
|
+
const titleFontFamily = exportFontFamily('bold');
|
|
78
80
|
const isSection = type === 'section';
|
|
79
81
|
const numberOfLines = showTrailingAction || !!badgeLabel ? 1 : 2;
|
|
80
82
|
const buttonTypo: Typography =
|
|
@@ -137,6 +139,7 @@ const Title: FC<TitleProps> = ({
|
|
|
137
139
|
numberOfLines={numberOfLines}
|
|
138
140
|
style={[
|
|
139
141
|
styleSheet[typography],
|
|
142
|
+
{ fontFamily: titleFontFamily },
|
|
140
143
|
styles.title,
|
|
141
144
|
{
|
|
142
145
|
maxWidth:
|
|
@@ -260,7 +263,11 @@ const Title: FC<TitleProps> = ({
|
|
|
260
263
|
{...setAutomationID(componentId + '|title-text')}
|
|
261
264
|
allowFontScaling={false}
|
|
262
265
|
numberOfLines={numberOfLines}
|
|
263
|
-
style={[
|
|
266
|
+
style={[
|
|
267
|
+
styleSheet[typography],
|
|
268
|
+
{ fontFamily: titleFontFamily },
|
|
269
|
+
styles.title,
|
|
270
|
+
]}
|
|
264
271
|
>
|
|
265
272
|
{title}
|
|
266
273
|
</RNText>
|
package/package.json
CHANGED