Skip to content

ExpandableOverlay - fix dialog props #2675

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

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions src/incubator/expandableOverlay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,29 @@ export interface RenderCustomOverlayProps extends ExpandableOverlayMethods {
visible: boolean;
}

export interface _DialogPropsOld {
/**
* The props to pass to the dialog expandable container
*/
dialogProps?: DialogPropsOld;
migrateDialog?: false;
}

export interface _DialogPropsNew {
/**
* The props to pass to the dialog expandable container
*/
dialogProps?: DialogPropsNew;
/**
* Migrate the Dialog to DialogNew (make sure you use only new props in dialogProps)
*/
migrateDialog: true;
}

export type DialogProps = _DialogPropsOld | _DialogPropsNew;

export type ExpandableOverlayProps = TouchableOpacityProps &
DialogProps &
PropsWithChildren<{
/**
* The content to render inside the expandable modal/dialog
Expand All @@ -31,14 +53,6 @@ export type ExpandableOverlayProps = TouchableOpacityProps &
* The props to pass to the modal expandable container
*/
modalProps?: ModalProps;
/**
* The props to pass to the dialog expandable container
*/
dialogProps?: DialogPropsOld | DialogPropsNew;
/**
* Migrate the Dialog to DialogNew (make sure you use only new props in dialogProps)
*/
migrateDialog?: boolean;
/**
* Whether to render a modal top bar (relevant only for modal)
*/
Expand Down