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>
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user