Skip to content

Commit

Permalink
🛠 Refactor: Rename in ModalView
Browse files Browse the repository at this point in the history
Summary:
* Rename `modalContainer` to `modalContentContainer`
* Rename `_handleOnLayout` to `_handleOnLayoutModalContentContainer`
  • Loading branch information
dominicstop committed Jan 9, 2023
1 parent e0823df commit 51c883d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ModalView/ModalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class ModalView extends
return true;
}

_handleOnLayout: ViewProps['onLayout'] = () => {
_handleOnLayoutModalContentContainer: ViewProps['onLayout'] = () => {
const { didOnLayout } = this;
didOnLayout && didOnLayout();
};
Expand Down Expand Up @@ -377,9 +377,9 @@ export class ModalView extends
>
{state.visible && (
<View
style={[styles.modalContainer, props.containerStyle]}
style={[styles.modalContentContainer, props.containerStyle]}
collapsable={false}
onLayout={this._handleOnLayout}
onLayout={this._handleOnLayoutModalContentContainer}
>
{React.cloneElement(props.children as any, {
getModalRef: this._handleGetModalRef,
Expand Down Expand Up @@ -435,7 +435,7 @@ const styles = StyleSheet.create({
height: 0,
overflow: 'hidden',
},
modalContainer: {
modalContentContainer: {
position: 'absolute',
},
});

0 comments on commit 51c883d

Please sign in to comment.