Skip to main content

ModalAsk

Reusable ModalAsk component

Example

import {
Button,
createStyles,
ModalAsk,
usePopups,
useStyles,
View,
} from '@lad-tech/mobydick-core';

export const ModalsWidget = () => {
const [styles] = useStyles(styleFn);
const {openPopup} = usePopups();

return (
<View style={styles.container}>
<Button
text={'ModalAsk'}
onPress={() =>
openPopup({
Content: props => (
<ModalAsk
title={'ModalAsk'}
descriptionText={'descriptionText'}
onPressRight={props.onClose}
{...props}></ModalAsk>
),
})
}
/>
</View>
);
};

const styleFn = createStyles(({spaces}) => ({container: {gap: spaces.Space8}}));

Props

IContentProps

Inherits IContentProps

Required
title

TYPE
string

Title in ModalAsk

Required
descriptionText

TYPE
string

DescriptionText in ModalAsk

typeLeft

TYPEDEFAULT
IButtonTypesIButtonTypes.tertiary

TypeLeft for left button in ModalAsk

textLeft

TYPEDEFAULT
stringОтмена

Text for left button in ModalAsk

Required
onPressRight

TYPE
() => void

OnPress for right button in ModalAsk

typeRight

TYPEDEFAULT
IButtonTypesIButtonTypes.destructive

TypeRight for left button in ModalAsk

textRight

TYPEDEFAULT
stringУдалить

Text for right button in ModalAsk