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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default background color & border that make it harder to customize the from style prop #18

Open
0had0 opened this issue Mar 4, 2022 · 0 comments

Comments

@0had0
Copy link

0had0 commented Mar 4, 2022

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @alessiocancian/[email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@alessiocancian/react-native-actionsheet/lib/ActionSheetCustom.js b/node_modules/@alessiocancian/react-native-actionsheet/lib/ActionSheetCustom.js
index 548e08b..7f60a37 100644
--- a/node_modules/@alessiocancian/react-native-actionsheet/lib/ActionSheetCustom.js
+++ b/node_modules/@alessiocancian/react-native-actionsheet/lib/ActionSheetCustom.js
@@ -140,7 +140,7 @@ class ActionSheet extends React.Component {
   _createButton (title, index) {
     const styles = getMergedStyles(this.props.styles)
     const { buttonUnderlayColor, cancelButtonIndex, destructiveButtonIndex, disabledIndexes, disabledColor } = this.props
-    const tintColor = this.props.tintColor || this._isDarkMode() ? "#4793FF" : "#007AFF"
+    const tintColor = this.props.tintColor ?? (this._isDarkMode() ? "#4793FF" : "#007AFF")
     const fontColor = destructiveButtonIndex === index ? WARN_COLOR : tintColor
     const isCancel = cancelButtonIndex === index
     const buttonBoxStyle = isCancel ? styles.cancelButtonBox : styles.buttonBox
@@ -217,9 +217,9 @@ class ActionSheet extends React.Component {
                 scrollEnabled ? { flex: 1 } : {},
                 { flexDirection: "column" },
                 Platform.OS == "ios" ? {
-                  backgroundColor: darkMode ? "#DCDCDE55" : "#fffb",
+                  // backgroundColor: darkMode ? "#DCDCDE55" : "#fffb",
                 } : {
-                  backgroundColor: darkMode ? "#2C2C2E" : "#fff",
+                  // backgroundColor: darkMode ? "#2C2C2E" : "#fff",
                 },
               ]}
               blurType={darkMode ? "prominent" : "light"}
@@ -227,7 +227,7 @@ class ActionSheet extends React.Component {
             >
               {this._renderTitle()}
               {this._renderMessage()}
-              <View style={this._getBorderTopStyle()} />
+              {/* <View style={this._getBorderTopStyle()} /> */}
               <ScrollView indicatorStyle={darkMode ? "white" : "black"} scrollEnabled={scrollEnabled} style={scrollEnabled ? { flex: 1 } : {}}>{this._renderOptions()}</ScrollView>
             </BlurView>
             <View style={[boxStyle, { marginTop: 8, backgroundColor: darkMode ? "#2C2C2E" : "#fff" }]}>

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