Skip to content

Commit dffe2e0

Browse files
📝 Add docstrings to fix-typo-preview
Docstrings generation was requested by @lorenzocorallo. * #8 (comment) The following files were modified: * `src/components/create-url-dialog.tsx`
1 parent 86bc59e commit dffe2e0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/create-url-dialog.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ interface CreateUrlDialogProps {
2727
onSuccess: () => void
2828
}
2929

30+
/**
31+
* Renders a modal dialog that lets the user create a shortened URL with an optional custom short code.
32+
*
33+
* The dialog contains fields for the target URL and an optional short code, a live preview using the app domain, and actions to cancel or submit the form.
34+
*
35+
* @param open - Whether the dialog is visible.
36+
* @param onOpenChange - Callback invoked with the new open state when the dialog visibility changes.
37+
* @param onSuccess - Callback invoked after a submit attempt completes (called regardless of success or error).
38+
* @returns The dialog component markup for creating a short URL.
39+
*/
3040
export function CreateUrlDialog({
3141
open,
3242
onOpenChange,
@@ -137,4 +147,4 @@ export function CreateUrlDialog({
137147
</DialogContent>
138148
</Dialog>
139149
)
140-
}
150+
}

0 commit comments

Comments
 (0)