From 0063210c61733cbfe3abb2d12e1ca949baacd1ca Mon Sep 17 00:00:00 2001 From: Arwantys Date: Wed, 1 Apr 2020 12:30:51 +0200 Subject: [PATCH 1/4] Add props maxFontSizeMultiplier and allowFontScaling --- src/SelectMultiple.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/SelectMultiple.js b/src/SelectMultiple.js index f1e4fee..a128be8 100644 --- a/src/SelectMultiple.js +++ b/src/SelectMultiple.js @@ -19,7 +19,7 @@ const styleType = PropTypes.oneOfType([ const sourceType = PropTypes.oneOfType([PropTypes.object, PropTypes.number]) -// A customizable FlatList that allows you to select multiple rows +// A customiseable FlatList that allows you to select multiple rows export default class SelectMultiple extends Component { static propTypes = { items: PropTypes.arrayOf(itemType).isRequired, @@ -39,7 +39,10 @@ export default class SelectMultiple extends Component { selectedRowStyle: styleType, selectedCheckboxStyle: styleType, - selectedLabelStyle: styleType + selectedLabelStyle: styleType, + + maxFontSizeMultiplier: PropTypes.number, + allowFontScaling: PropTypes.bool } static defaultProps = { @@ -52,7 +55,9 @@ export default class SelectMultiple extends Component { maxSelect: null, checkboxSource: checkbox, selectedCheckboxSource: checkboxChecked, - renderLabel: null + renderLabel: null, + maxFontSizeMultiplier: 0, + allowFontScaling: true } constructor (props) { @@ -131,7 +136,7 @@ export default class SelectMultiple extends Component { return this.props.renderLabel(label, style, selected) } return ( - {label} + {label} ) } From 321677f082d30822bc536a5d0bf27369198297b9 Mon Sep 17 00:00:00 2001 From: Arwantys Date: Wed, 1 Apr 2020 12:33:59 +0200 Subject: [PATCH 2/4] Add props maxFontSizeMultiplier and allowFontScaling --- src/SelectMultiple.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SelectMultiple.js b/src/SelectMultiple.js index a128be8..36bfb12 100644 --- a/src/SelectMultiple.js +++ b/src/SelectMultiple.js @@ -19,7 +19,7 @@ const styleType = PropTypes.oneOfType([ const sourceType = PropTypes.oneOfType([PropTypes.object, PropTypes.number]) -// A customiseable FlatList that allows you to select multiple rows +// A customizable FlatList that allows you to select multiple rows export default class SelectMultiple extends Component { static propTypes = { items: PropTypes.arrayOf(itemType).isRequired, From 2d39314ad17421572109fb8e8d970371f59ec549 Mon Sep 17 00:00:00 2001 From: Arwantys Date: Wed, 1 Apr 2020 12:52:02 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b0cccce..fea9f0f 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,8 @@ class App extends Component { | selectedLabelStyle | [default styles](src/SelectMultiple.styles.js) | `object` | [Style](https://facebook.github.io/react-native/docs/text.html#style) for the text label when selected. | | renderLabel | null | `func` | Function for render label. | | maxSelect | null | `int` | Maximum number of selected items| +| maxFontSizeMultiplier | 0 | `int` | [maxFontSizeMultiplier](https://reactnative.dev/docs/text#maxfontsizemultiplier) for the `Text`. | +| allowFontScaling | true | `bool` | [allowFontScaling](https://reactnative.dev/docs/text#allowfontscaling) for the `Text`. | ## Contribute From 85e1abbb4b0ad80596b3064ac0b453ba8bc65045 Mon Sep 17 00:00:00 2001 From: Arwantys Date: Wed, 1 Apr 2020 12:53:25 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fea9f0f..f4e10db 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ class App extends Component { | selectedLabelStyle | [default styles](src/SelectMultiple.styles.js) | `object` | [Style](https://facebook.github.io/react-native/docs/text.html#style) for the text label when selected. | | renderLabel | null | `func` | Function for render label. | | maxSelect | null | `int` | Maximum number of selected items| -| maxFontSizeMultiplier | 0 | `int` | [maxFontSizeMultiplier](https://reactnative.dev/docs/text#maxfontsizemultiplier) for the `Text`. | +| maxFontSizeMultiplier | 0 | `number` | [maxFontSizeMultiplier](https://reactnative.dev/docs/text#maxfontsizemultiplier) for the `Text`. | | allowFontScaling | true | `bool` | [allowFontScaling](https://reactnative.dev/docs/text#allowfontscaling) for the `Text`. | ## Contribute