feat(ui): gallery minSize tweak (#3618)

- 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:
blessedcoolant 2023-07-01 22:37:08 +12:00 committed by GitHub
commit 96212bb35f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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}
>