Default Image

Pop Confirm

A simple and compact confirmation dialog of an action.

import { PopConfirm } from '@redshank/native';

When To Use

A simple and compact dialog used for asking for user confirmation. The difference with the confirm modal dialog is that it's more lightweight than the static popped full-screen confirm modal.

Examples

Pop Confirm

Default Pop Confirm element.

Complete Example

Complete example using Header, Content and Footer element.

Confirm delete

Confirm action example.

PopConfirm

Api props

AttributeTypeAccepted valuesDescriptionDefault
cancelTextstringTextCancel text buttonCancel
childrenReactNodeComponentContent of the modal, recommended Header``Content-
extraReactNodeComponentExtra content for show bottom modal-
okTextstringTextOk text buttonContinue
onClosefunction() => voidRequired function for close pop-
onOkfunction() => voidOptional function for continue button-
typefunctiondefault deleteOptional function for continue buttondefault
visiblebooleantrue falseShow or hidden popfalse

Header Api props

AttributeTypeAccepted valuesDescriptionDefault
descriptionstringTextRequired description text content-
imageReactNodeComponentImage for show icon in pop-
styleobjectStyleProp<ViewStyle>Style for wrapper element-
titlestringTextRequired title header text-

Content

Content Api props

AttributeTypeAccepted valuesDescriptionDefault
childrenReactNodeComponentContent of the pop-
styleobjectStyleProp<ViewStyle>Style for wrapper element-
withBorderbooleantrue falseShow or hidden border top in the elementfalse

Footer Api props

AttributeTypeAccepted valuesDescriptionDefault
childrenReactNodeComponentContent of the pop-
noPaddingbooleantrue falseAdd or remove paddingpaddingSizes.md 0
styleobjectStyleProp<ViewStyle>Style for wrapper element-
withBorderbooleantrue falseShow or hidden border top in the elementfalse

Community:

We're excited to see the community adopt @redshank/native, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!

DiscordGithub

Contributing:

PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.

Copyright © 2023 @redshank.