Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added submitButtonTextStyle, and submitButtonStyle #214

Open
simdanonline opened this issue Apr 20, 2023 · 0 comments
Open

Added submitButtonTextStyle, and submitButtonStyle #214

simdanonline opened this issue Apr 20, 2023 · 0 comments

Comments

@simdanonline
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch react-native-multiple-select@0.5.12 for the project I'm working on.

I added submitButtonTextStyle, and submitButtonStyle for who ever wants to able to style something else asides submit button color.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-multiple-select/index.d.ts b/node_modules/react-native-multiple-select/index.d.ts
index 07da82c..828be31 100644
--- a/node_modules/react-native-multiple-select/index.d.ts
+++ b/node_modules/react-native-multiple-select/index.d.ts
@@ -39,6 +39,8 @@ export interface MultiSelectProps {
     hideDropdown?: boolean;
     submitButtonColor?: string;
     submitButtonText?: string;
+    submitButtonTextStyle?: StyleProp<TextStyle>;
+    submitButtonStyle?: StyleProp<ViewStyle>;
     textColor?: string;
     fontSize?: number;
     fixedHeight?: boolean;
diff --git a/node_modules/react-native-multiple-select/lib/react-native-multi-select.js b/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
index 9b7a0d7..7169295 100644
--- a/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
+++ b/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
@@ -71,6 +71,8 @@ export default class MultiSelect extends Component {
     hideDropdown: PropTypes.bool,
     submitButtonColor: PropTypes.string,
     submitButtonText: PropTypes.string,
+    submitButtonTextStyle: TextPropTypes.style,
+    submitButtonStyle: ViewPropTypes.style,
     textColor: PropTypes.string,
     fontSize: PropTypes.number,
     fixedHeight: PropTypes.bool,
@@ -577,6 +579,8 @@ export default class MultiSelect extends Component {
       styleTextDropdownSelected,
       searchIcon,
       styleIndicator,
+      submitButtonTextStyle,
+      submitButtonStyle,
     } = this.props;
     const { searchTerm, selector } = this.state;
     return (
@@ -647,13 +651,15 @@ export default class MultiSelect extends Component {
                   onPress={() => this._submitSelection()}
                   style={[
                     styles.button,
-                    { backgroundColor: submitButtonColor }
+                    { backgroundColor: submitButtonColor },
+                    submitButtonStyle,
                   ]}
                 >
                   <Text
                     style={[
                       styles.buttonText,
-                      fontFamily ? { fontFamily } : {}
+                      fontFamily ? { fontFamily } : {},
+                      submitButtonTextStyle,
                     ]}
                   >
                     {submitButtonText}

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant