@momo-kits/title 0.169.4 → 0.169.5
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 +5 -4
- package/package.json +1 -1
package/index.tsx
CHANGED
|
@@ -21,6 +21,10 @@ import {
|
|
|
21
21
|
import styles from './styles';
|
|
22
22
|
import { TitleProps } from './types';
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Section or card heading with optional icon, badge, description and either a
|
|
26
|
+
* right action (chevron or text button) or a trailing chevron after the title.
|
|
27
|
+
*/
|
|
24
28
|
const Title: FC<TitleProps> = ({
|
|
25
29
|
accessibilityLabel,
|
|
26
30
|
title = 'Title',
|
|
@@ -44,7 +48,6 @@ const Title: FC<TitleProps> = ({
|
|
|
44
48
|
const [badgeWidth, setBadgeWidth] = useState(0);
|
|
45
49
|
const [contentWidth, setContentWidth] = useState(0);
|
|
46
50
|
|
|
47
|
-
// Dynamic styles using useScaleSize hook
|
|
48
51
|
const dynamicStyles = {
|
|
49
52
|
card_small: {
|
|
50
53
|
fontSize: useScaleSize(14),
|
|
@@ -210,9 +213,7 @@ const Title: FC<TitleProps> = ({
|
|
|
210
213
|
const lineHeight = styleSheet[typography].lineHeight;
|
|
211
214
|
|
|
212
215
|
return (
|
|
213
|
-
<View
|
|
214
|
-
style={[styles.actionRightView, { height: lineHeight }]}
|
|
215
|
-
>
|
|
216
|
+
<View style={[styles.actionRightView, { height: lineHeight }]}>
|
|
216
217
|
{!buttonTitle ? (
|
|
217
218
|
<TouchableOpacity
|
|
218
219
|
onPress={onPressRightAction}
|