Skip to content

Commit e3b19d6

Browse files
refactor: remove deprecated descriptionHtml prop from ShareDrawerDialog
- Eliminated the descriptionHtml prop in favor of using the description prop directly as a ReactNode. - Updated the rendering logic to simplify the component and enhance maintainability.
1 parent 299c764 commit e3b19d6

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

editor/components/dialogs/share-dialog.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ export function ShareDrawerDialog({
9191
labels,
9292
payload,
9393
description,
94-
/**
95-
* Deprecated: prefer `description` (ReactNode) to avoid HTML strings.
96-
* Kept for template convenience.
97-
*/
98-
descriptionHtml,
9994
actions,
10095
toastOnCopy = true,
10196
closeOnCopy = true,
@@ -108,7 +103,6 @@ export function ShareDrawerDialog({
108103
labels?: Partial<ShareDialogStrings>;
109104
payload: WebSharePayload | null | undefined;
110105
description?: React.ReactNode;
111-
descriptionHtml?: string;
112106
/**
113107
* Which share actions to show. Defaults to all.
114108
*/
@@ -170,16 +164,7 @@ export function ShareDrawerDialog({
170164
<DrawerTitle className="sr-only">Share</DrawerTitle>
171165
<DrawerContent>
172166
<div className="mx-auto w-full">
173-
{description ? (
174-
<div className="p-4">{description}</div>
175-
) : (
176-
descriptionHtml && (
177-
<article
178-
className="p-4 prose prose-sm dark:prose-invert"
179-
dangerouslySetInnerHTML={{ __html: descriptionHtml }}
180-
/>
181-
)
182-
)}
167+
{description && <div className="p-4">{description}</div>}
183168

184169
<section className="p-4 space-y-4">
185170
<div className="text-sm font-medium">{t.share}</div>

0 commit comments

Comments
 (0)