feat(ui): gallery minSize tweak

- Set min size for floating gallery panel
- Correct the default pinned width (it cannot be less than the min width and this was sometimes happening during window resize)
This commit is contained in:
psychedelicious 2023-07-01 20:27:52 +10:00
parent 3aa6a7e7df
commit f46c50f69a
2 changed files with 6 additions and 2 deletions

View File

@ -120,7 +120,7 @@ const GalleryDrawer = () => {
isResizable={true}
isOpen={shouldShowGallery}
onClose={handleCloseGallery}
minWidth={200}
minWidth={337}
>
<ImageGalleryContent />
</ResizableDrawer>

View File

@ -200,7 +200,11 @@ const InvokeTabs = () => {
onResize={handleResizeGallery}
id="gallery"
order={3}
defaultSize={galleryMinSizePct}
defaultSize={
galleryMinSizePct > DEFAULT_GALLERY_PCT
? galleryMinSizePct
: DEFAULT_GALLERY_PCT
}
minSize={galleryMinSizePct}
maxSize={50}
>