Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add support for scaling

ammarahm-ed0b07ac60edab
diff --git a/apps/mobile/src/components/Typography/Heading.js b/apps/mobile/src/components/Typography/Heading.js
index cb28e927e..0c7311bc7 100644
--- a/apps/mobile/src/components/Typography/Heading.js
+++ b/apps/mobile/src/components/Typography/Heading.js
@@ -14,20 +14,21 @@ import {SIZE, WEIGHT} from '../../utils/SizeUtils';
*
* @param {TextType | restTypes} props all props
*/
-const Heading = ({color, size= SIZE.xl, style, ...restProps}) => {
+const Heading = ({color, size = SIZE.xl, style, ...restProps}) => {
const [state] = useTracked();
const {colors} = state;
return (
<Text
+ allowFontScaling={true}
+ maxFontSizeMultiplier={1}
{...restProps}
style={[
{
fontFamily: WEIGHT.bold,
fontSize: size || SIZE.xl,
color: color || colors.heading,
- paddingBottom:
- Platform.OS === 'ios' ? size*0.25: null,
+ paddingBottom: Platform.OS === 'ios' ? size * 0.25 : null,
},
style,
]}></Text>
diff --git a/apps/mobile/src/components/Typography/Paragraph.js b/apps/mobile/src/components/Typography/Paragraph.js
index 8a0c8b538..c19d612d5 100644
--- a/apps/mobile/src/components/Typography/Paragraph.js
+++ b/apps/mobile/src/components/Typography/Paragraph.js
@@ -20,6 +20,8 @@ const Paragraph = ({color, size = SIZE.sm, style, ...restProps}) => {
return (
<Text
+ allowFontScaling
+ maxFontSizeMultiplier={1}
{...restProps}
style={[
{
@@ -27,8 +29,7 @@ const Paragraph = ({color, size = SIZE.sm, style, ...restProps}) => {
fontSize: size || SIZE.sm,
color: color || colors.pri,
fontWeight: '400',
- paddingBottom:
- Platform.OS === 'ios' ? size*0.25: null,
+ paddingBottom: Platform.OS === 'ios' ? size * 0.25 : null,
},
style,
]}></Text>