You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReactfrom'react'importSwipeToDeletefrom'react-swipe-to-delete-ios'
...
<SwipeToDeleteonDelete={handleDelete}// required// optionalheight={50}// defaulttransitionDuration={250}// defaultdeleteWidth={75}// defaultdeleteThreshold={75}// defaultshowDeleteAction={true}//defaultdeleteColor="rgba(252, 58, 48, 1.00)"// defaultdeleteText="Delete"// defaultdeleteComponent={<DeleteComponent/>}// not defaultdisabled={false}// defaultid="swiper-1"// not defaultclassName="my-swiper"// not defaultrtl={false}// defaultonDeleteConfirm={(onSuccess,onCancel)=>{// not default - default is nullif(window.confirm("Do you really want to delete this item ?")){onSuccess();}else{onCancel();}}}>{children}</SwipeToDelete>
Props
Prop
Type
Default
onDelete
function
required
onDeleteConfirm
function
null
height
number
50
transitionDuration
number (ms)
250
deleteWidth
number (px)
75
deleteThreshold
number (%)
75
showDeleteAction
bool
true
deleteColor
string
"rgba(252, 58, 48, 1.00)"
deleteText
string
"Delete" (deleteText or deleteComponent)
deleteComponent
node
null (deleteText or deleteComponent)
disabled
bool
false
rtl
bool
false
id
string
''
className
string
''
Component structure
Knowing the Component structure might help you customise with your own CSS.