Skip to main content

modal

//Window
const Modal = () => {
const [openModal, setOpenModal] = useState(false);
return (
<>
<Button Pressing={() => setOpenModal(true)}>
<TextView cl="white">open modal</TextView>
</Button>
<Window
modalVisible={openModal}
onRequestClose={() => setOpenModal(false)}
backStyle={"red"}
animationType={"slide"}
backgroundColor="green"
modalBack={Theme.activeColors.secondary}
>
<Heading txp="center">Hi! I'm Here </Heading>
<Images
uri={"https://th.bing.com/th/id/OIG4.LgUj9FIjzUbdTSMn0mRg"}
imgS={200}
imgH={200}
/>
</Window>
</>
);
};

export default Modal;

Api References for window

ParameterTypeDescription
modalVisible booleanopen window
onRequestClosebooleanclose window
alignItemsstringalign the window.
marginTopnumbermargin top
heightnumberheight
marginnumbermargin
shadowColorstringshadowColor
shWidthnumbershadowOffset width
shHeightnumbershadowOffset height
shadowOpacitynumbershadowOpacity
shadowRadiusnumbershadowRadius
elevationnumbershadow of window
widthnumberwidth
modalBackbooleanWindow background color.
modalStyleobjectWindow style.
backStyleobjectWindow back style.
iconsbooleanclose icon
animationTypebooleanprop controls how the modal animates
transparentbooleanThe transparent prop determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
positionstringposition for closing icon
topnumbertop closing icon .
rightnumberright closing icon .
zIndexnumberzIndex closing icon .
backgroundColorstringbackgroundColor closing icon
borderRadiusnumberborderRadius closing icon .
styleanyyour custom styles

Api References for animationType window​

ParameterTypeDescription
slide stringslides in from the bottom,
fade stringfades into view,
none stringappears without an animation.,