Skip to content

Commit

Permalink
feat(react,vue): add position absolute for modal default style
Browse files Browse the repository at this point in the history
  • Loading branch information
zoomchan-cxj committed Apr 27, 2022
1 parent 484d6c6 commit 7bbed56
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
4 changes: 2 additions & 2 deletions examples/android-demo/res/vendor.android.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
v-if="dialogIsVisible"
animationType="slide"
:transparent="true"
class="dialog-demo"
:supportedOrientations="supportedOrientations"
@show="onShow"
@requestClose="onClose"
Expand Down Expand Up @@ -153,22 +152,12 @@ export default {
text-align: center;
}
.dialog-demo {
position: absolute;
}
.dialog-demo-wrapper {
background-color: #40b88377;
position: absolute;
top: 0;
left: 0;
}
.dialog-2-demo-wrapper {
background-color: #444444ee;
position: absolute;
top: 0;
left: 0;
justify-content: center;
align-items: center;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/ios-demo/res/vendor.ios.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/hippy-react/src/components/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ interface ModalProps {
const styles = StyleSheet.create({
modal: {
position: 'absolute',
collapsable: false,
},
container: {
position: 'absolute',
Expand Down
4 changes: 4 additions & 0 deletions packages/hippy-vue-native-components/src/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ function registerDialog(Vue) {
defaultNativeProps: {
transparent: true,
immersionStatusBar: true,
collapsable: false,
},
defaultNativeStyle: {
position: 'absolute',
},
},
});
Expand Down

0 comments on commit 7bbed56

Please sign in to comment.