docs: fix command bar position outside modal in category images guide (#13987)
This commit is contained in:
@@ -1385,54 +1385,51 @@ Finally, you'll render the modal. Replace the `// TODO render modal` comment wit
|
||||
|
||||
```tsx title="src/admin/components/category-media/category-media-modal.tsx"
|
||||
return (
|
||||
<>
|
||||
{/* TODO show command bar */}
|
||||
<FocusModal open={open} onOpenChange={handleOpenChange}>
|
||||
<FocusModal.Trigger asChild>
|
||||
<Button size="small" variant="secondary">
|
||||
Edit
|
||||
</Button>
|
||||
</FocusModal.Trigger>
|
||||
|
||||
<FocusModal open={open} onOpenChange={handleOpenChange}>
|
||||
<FocusModal.Trigger asChild>
|
||||
<Button size="small" variant="secondary">
|
||||
Edit
|
||||
</Button>
|
||||
</FocusModal.Trigger>
|
||||
<FocusModal.Content>
|
||||
<FocusModal.Header>
|
||||
<Heading>Edit Media</Heading>
|
||||
</FocusModal.Header>
|
||||
|
||||
<FocusModal.Content>
|
||||
<FocusModal.Header>
|
||||
<Heading>Edit Media</Heading>
|
||||
</FocusModal.Header>
|
||||
|
||||
<FocusModal.Body className="flex h-full overflow-hidden">
|
||||
<div className="flex w-full h-full flex-col-reverse lg:grid lg:grid-cols-[1fr_560px]">
|
||||
<CategoryImageGallery
|
||||
existingImages={existingImages}
|
||||
uploadedFiles={uploadedFiles}
|
||||
currentThumbnailId={currentThumbnailId}
|
||||
/>
|
||||
<CategoryImageUpload
|
||||
fileInputRef={fileInputRef}
|
||||
isUploading={uploadFilesMutation.isPending}
|
||||
onFileSelect={handleUploadFile}
|
||||
/>
|
||||
</div>
|
||||
</FocusModal.Body>
|
||||
<FocusModal.Footer>
|
||||
<div className="flex items-center justify-end gap-x-2">
|
||||
<FocusModal.Close asChild>
|
||||
<Button size="small" variant="secondary">
|
||||
Cancel
|
||||
</Button>
|
||||
</FocusModal.Close>
|
||||
<Button
|
||||
size="small"
|
||||
onClick={handleSave}
|
||||
isLoading={isSaving}
|
||||
>
|
||||
Save
|
||||
<FocusModal.Body className="flex h-full overflow-hidden">
|
||||
<div className="flex w-full h-full flex-col-reverse lg:grid lg:grid-cols-[1fr_560px]">
|
||||
<CategoryImageGallery
|
||||
existingImages={existingImages}
|
||||
uploadedFiles={uploadedFiles}
|
||||
currentThumbnailId={currentThumbnailId}
|
||||
/>
|
||||
<CategoryImageUpload
|
||||
fileInputRef={fileInputRef}
|
||||
isUploading={uploadFilesMutation.isPending}
|
||||
onFileSelect={handleUploadFile}
|
||||
/>
|
||||
</div>
|
||||
{/* TODO show command bar */}
|
||||
</FocusModal.Body>
|
||||
<FocusModal.Footer>
|
||||
<div className="flex items-center justify-end gap-x-2">
|
||||
<FocusModal.Close asChild>
|
||||
<Button size="small" variant="secondary">
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
</FocusModal.Footer>
|
||||
</FocusModal.Content>
|
||||
</FocusModal>
|
||||
</>
|
||||
</FocusModal.Close>
|
||||
<Button
|
||||
size="small"
|
||||
onClick={handleSave}
|
||||
isLoading={isSaving}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</div>
|
||||
</FocusModal.Footer>
|
||||
</FocusModal.Content>
|
||||
</FocusModal>
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -6614,7 +6614,7 @@ export const generatedEditDates = {
|
||||
"app/data-model-repository-reference/methods/upsertWithReplace/page.mdx": "2025-10-28T16:02:30.479Z",
|
||||
"app/how-to-tutorials/tutorials/agentic-commerce/page.mdx": "2025-10-09T11:25:48.831Z",
|
||||
"app/storefront-development/production-optimizations/page.mdx": "2025-10-03T13:28:37.909Z",
|
||||
"app/how-to-tutorials/tutorials/category-images/page.mdx": "2025-10-15T08:57:05.566Z",
|
||||
"app/how-to-tutorials/tutorials/category-images/page.mdx": "2025-11-06T14:14:45.465Z",
|
||||
"app/infrastructure-modules/caching/page.mdx": "2025-10-13T11:46:36.452Z",
|
||||
"app/troubleshooting/subscribers/not-working/page.mdx": "2025-10-16T09:25:57.376Z",
|
||||
"references/js_sdk/admin/RefundReason/methods/js_sdk.admin.RefundReason.create/page.mdx": "2025-10-21T08:10:56.630Z",
|
||||
|
||||
Reference in New Issue
Block a user