mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 11:51:13 +01:00
Track dialogs
This commit is contained in:
@@ -6,6 +6,7 @@ import { Prompt } from './Prompt';
|
||||
export function usePrompt() {
|
||||
const dialog = useDialog();
|
||||
return ({
|
||||
id,
|
||||
title,
|
||||
description,
|
||||
name,
|
||||
@@ -13,9 +14,11 @@ export function usePrompt() {
|
||||
defaultValue,
|
||||
placeholder,
|
||||
confirmLabel,
|
||||
}: Pick<DialogProps, 'title' | 'description'> & Omit<PromptProps, 'onResult' | 'onHide'>) =>
|
||||
}: Pick<DialogProps, 'title' | 'description'> &
|
||||
Omit<PromptProps, 'onResult' | 'onHide'> & { id: string }) =>
|
||||
new Promise((onResult: PromptProps['onResult']) => {
|
||||
dialog.show({
|
||||
id,
|
||||
title,
|
||||
description,
|
||||
hideX: true,
|
||||
|
||||
Reference in New Issue
Block a user