From 149af457641fed13069766ff37f17a797083ef6a Mon Sep 17 00:00:00 2001 From: Evgeni Razumov Date: Mon, 4 May 2020 11:36:20 +0300 Subject: [PATCH] feat: add rootStyle props (#187) * feat: zIndex property * fix: replace zIndex property to rootStyle for more customization * fix: remove zIndex type property * fix: remove modalElevation property --- docs/PROPS.md | 16 ++++++++-------- src/index.tsx | 4 ++-- src/options.ts | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/PROPS.md b/docs/PROPS.md index 682ef9e2..217a419a 100644 --- a/docs/PROPS.md +++ b/docs/PROPS.md @@ -144,6 +144,14 @@ An animated custom React node that will inherit of the onScroll/gesture events Multiple objects way to style the different part of Modalize. +### `rootStyle` + +Define the style of the root modal component. + +| Type | Required | +| ----- | -------- | +| style | No | + ### `modalStyle` Define the style of the modal (includes handle/header/children/footer). @@ -178,14 +186,6 @@ Define the style of the children renderer (only the inside part). | ----- | -------- | | style | No | -### `modalElevation` - -A number to define the elevation of the modal on Android. Useful if you have other elements of your app using other values of elevation. - -| Type | Required | Platform | -| ------ | -------- | -------- | -| number | No | Android | - ## Layout ### `snapPoint` diff --git a/src/index.tsx b/src/index.tsx index bb59d10b..a4d295b8 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -61,11 +61,11 @@ const ModalizeBase = ( customRenderer, // Styles + rootStyle, modalStyle, handleStyle, overlayStyle, childrenStyle, - modalElevation, // Layout snapPoint, @@ -814,7 +814,7 @@ const ModalizeBase = ( const renderModalize = ( { */ customRenderer?: JSX.Element; + /** + * Define the style of the root modal component. + */ + rootStyle?: TStyle; + /** * Define the style of the modal (includes handle/header/children/footer). */ @@ -94,11 +99,6 @@ export interface IProps { */ childrenStyle?: TStyle; - /** - * A number to define the elevation of the modal on Android. Useful if you have other elements of your app using other values of elevation (Android specific). - */ - modalElevation?: number; - /** * A number that will enable the snapping feature and create an intermediate point before opening the modal to full screen. */