Skip to content

Commit 48129dd

Browse files
committed
feat: Replace tag font size for a style text prop
1 parent f69dda4 commit 48129dd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ The component takes 3 compulsory props - `items`, `uniqueKey` and `onSelectedIte
159159
| styleSelectorContainer | No | (Style) Style the Container of the Selector when user clicks on the dropdown|
160160
| styleTextDropdown | No | (Text Style) Style text of the Dropdown |
161161
| styleTextDropdownSelected | No | (Text Style) Style text of the Dropdown selected |
162+
| styleTextTag | No | (Text Style) Style text of the tag |
162163
| submitButtonColor | No | (String) Background color for submit button |
163164
| submitButtonText | No | (String) Text displayed on submit button |
164165
| tagBorderColor | No | (String) Border color for each selected item |
166+
| tagContainerStyle | No | (Style) Style the container of the tag view |
165167
| tagRemoveIconColor | No | (String) Color to be used for the remove icon in selected items list |
166168
| tagTextColor | No | (String) Text color for selected items list |
167169
| textColor | No | (String) Color for selected item name displayed as label for multiselect |

lib/react-native-multi-select.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export default class MultiSelect extends Component {
4141
tagBorderColor: PropTypes.string,
4242
tagTextColor: PropTypes.string,
4343
tagContainerStyle: ViewPropTypes.style,
44-
tagFontSize: PropTypes.number,
4544
fontFamily: PropTypes.string,
4645
tagRemoveIconColor: PropTypes.string,
4746
onSelectedItemsChange: PropTypes.func.isRequired,
@@ -65,6 +64,7 @@ export default class MultiSelect extends Component {
6564
styleSelectorContainer: ViewPropTypes.style,
6665
styleTextDropdown: Text.propTypes.style,
6766
styleTextDropdownSelected: Text.propTypes.style,
67+
styleTextTag: Text.propTypes.style,
6868
altFontFamily: PropTypes.string,
6969
hideSubmitButton: PropTypes.bool,
7070
hideDropdown: PropTypes.bool,
@@ -178,11 +178,11 @@ export default class MultiSelect extends Component {
178178
tagContainerStyle,
179179
tagRemoveIconColor,
180180
tagBorderColor,
181-
tagFontSize,
182181
uniqueKey,
183182
tagTextColor,
184183
selectedItems,
185-
displayKey
184+
displayKey,
185+
styleTextTag
186186
} = this.props;
187187
const actualSelectedItems = optionalSelectedItems || selectedItems;
188188
return actualSelectedItems.map(singleSelectedItem => {
@@ -207,8 +207,9 @@ export default class MultiSelect extends Component {
207207
{
208208
flex: 1,
209209
color: tagTextColor,
210-
fontSize: tagFontSize || 15
210+
fontSize: 15
211211
},
212+
styleTextTag && styleTextTag,
212213
fontFamily ? { fontFamily } : {}
213214
]}
214215
numberOfLines={1}

0 commit comments

Comments
 (0)