Skip to content

Commit 581fdce

Browse files
author
Terry Tsai
authored
Merge pull request #1 from scootnetworks/ttt/disable-font-scaling
Disable font scaling
2 parents fba3295 + 551e1d7 commit 581fdce

2 files changed

Lines changed: 255 additions & 136 deletions

File tree

index.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,23 @@ type Props = {
1212
children?: string,
1313
rules: Object,
1414
whitelist: Array,
15-
blacklist: Array
16-
}
15+
blacklist: Array,
16+
allowFontScaling?: boolean
17+
};
1718

1819
type DefaultProps = Props & {
19-
children: string
20-
}
20+
children: string,
21+
allowFontScaling: boolean
22+
};
2123

2224
class Markdown extends Component<DefaultProps, Props, void> {
2325
static defaultProps = {
2426
styles: initialStyles,
2527
children: '',
2628
rules: {},
2729
whitelist: [],
28-
blacklist: []
30+
blacklist: [],
31+
allowFontScaling: true
2932
}
3033

3134
/** Post processes rules to strip out unwanted styling options
@@ -49,7 +52,7 @@ class Markdown extends Component<DefaultProps, Props, void> {
4952
_.merge(
5053
{},
5154
SimpleMarkdown.defaultRules,
52-
initialRules(mergedStyles),
55+
initialRules(mergedStyles, this.props.allowFontScaling),
5356
this.props.rules
5457
)
5558
)

0 commit comments

Comments
 (0)