Skip to content

Commit

Permalink
🛁 Cleanup: RNIModalSheetViewDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Sep 27, 2024
1 parent e533692 commit 427af51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
20 changes: 4 additions & 16 deletions ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public final class RNIModalSheetViewDelegate: UIView, RNIContentView {
case onModalDidHide;
};

public enum Events: String, CaseIterable {
case placeholderEvent;
}
public static var propKeyPathMap: PropKeyPathMap {
return [:];
};

// MARK: Properties
// ----------------
Expand Down Expand Up @@ -120,21 +120,9 @@ extension RNIModalSheetViewDelegate: RNIContentViewDelegate {
index: NSInteger,
superBlock: () -> Void
) {
// no-op
childComponentView.removeFromSuperview();
}

public func notifyDidSetProps(sender: RNIContentViewParentDelegate) {
// no-op
};

public func notifyOnUpdateLayoutMetrics(
sender: RNIContentViewParentDelegate,
oldLayoutMetrics: RNILayoutMetrics,
newLayoutMetrics: RNILayoutMetrics
) {
// no-op
};

public func notifyOnViewCommandRequest(
sender: RNIContentViewParentDelegate,
forCommandName commandName: String,
Expand Down
4 changes: 1 addition & 3 deletions src/components/ModalSheetView/ModalSheetView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const ModalSheetView = React.forwardRef<
setModalSheetContentMap
] = React.useState<ModalSheetContentMap>({});


const isModalContentLazy = props.isModalContentLazy ?? true;

const shouldMountModalContents =
Expand Down Expand Up @@ -91,8 +90,6 @@ export const ModalSheetView = React.forwardRef<
const shouldEnableDebugBackgroundColors =
props.shouldEnableDebugBackgroundColors ?? false;



const children = React.Children.map(props.children, (child) => {
return React.cloneElement(
child as React.ReactElement<ModalSheetViewContentProps>,
Expand All @@ -105,6 +102,7 @@ export const ModalSheetView = React.forwardRef<

return (
<RNIModalSheetView
{...props}
ref={ref => nativeRef.current = ref}
style={styles.nativeModalSheet}
>
Expand Down

0 comments on commit 427af51

Please sign in to comment.