selvamk-js / sharingan-rn-modal-dropdown

A simple and customizable react-native dropdown created using react-native-modal and react-native-paper.
MIT License
86 stars 29 forks source link

transparent round #46

Open dusan-ivanco opened 2 years ago

dusan-ivanco commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch sharingan-rn-modal-dropdown@1.4.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/sharingan-rn-modal-dropdown/src/Dropdown/index.tsx b/node_modules/sharingan-rn-modal-dropdown/src/Dropdown/index.tsx
index 62216af..30442a3 100644
--- a/node_modules/sharingan-rn-modal-dropdown/src/Dropdown/index.tsx
+++ b/node_modules/sharingan-rn-modal-dropdown/src/Dropdown/index.tsx
@@ -326,7 +326,7 @@ const Dropdown: React.FC<IDropdownProps> = props => {
         >
           <View
             style={{
-              backgroundColor: colors.background,
+              backgroundColor: floating ? colors.background : 'transparent',
               width: !floating ? contMeasure.vWidth : 'auto',
               left: !floating ? contMeasure.vx : 0,
               top: !floating ? contMeasure.vy : 100,
diff --git a/node_modules/sharingan-rn-modal-dropdown/src/GroupDropdown/index.tsx b/node_modules/sharingan-rn-modal-dropdown/src/GroupDropdown/index.tsx
index 68ba362..789b43e 100644
--- a/node_modules/sharingan-rn-modal-dropdown/src/GroupDropdown/index.tsx
+++ b/node_modules/sharingan-rn-modal-dropdown/src/GroupDropdown/index.tsx
@@ -350,7 +350,7 @@ const GroupDropdown: React.FC<IGroupDropdownProps> = props => {
           >
             <View
               style={{
-                backgroundColor: 'transparent',
+                backgroundColor: floating ? colors.background : 'transparent',
                 width: !floating ? contMeasure.vWidth : 'auto',
                 left: !floating ? contMeasure.vx : 0,
                 top: !floating ? contMeasure.vy : 100,
diff --git a/node_modules/sharingan-rn-modal-dropdown/src/MultiselectDropdown/index.tsx b/node_modules/sharingan-rn-modal-dropdown/src/MultiselectDropdown/index.tsx
index 291e90e..5f624f6 100644
--- a/node_modules/sharingan-rn-modal-dropdown/src/MultiselectDropdown/index.tsx
+++ b/node_modules/sharingan-rn-modal-dropdown/src/MultiselectDropdown/index.tsx
@@ -412,7 +412,7 @@ const MultiselectDropdown: React.FC<IMultiselectDropdownProps> = props => {
         >
           <View
             style={{
-              backgroundColor: colors.background,
+              backgroundColor: floating ? colors.background : 'transparent',
               width: !floating ? contMeasure.vWidth : 'auto',
               left: !floating ? contMeasure.vx : 0,
               top: !floating ? contMeasure.vy : 100,

This issue body was partially generated by patch-package.