Add optional close callback to Dialog (#2947)

* Add optional close callback

* No emitter
This commit is contained in:
Eric Bailey 2024-02-20 18:20:59 -06:00 committed by GitHub
parent 6413b8ba8c
commit f88b165254
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 9 deletions

View file

@ -110,7 +110,11 @@ export function Dialogs() {
variant="outline"
color="primary"
size="small"
onPress={() => scrollable.close()}
onPress={() =>
scrollable.close(() => {
console.log('CLOSED')
})
}
label="Open basic dialog">
Close dialog
</Button>