Skip to content

Commit

Permalink
Center fullscreen images
Browse files Browse the repository at this point in the history
  • Loading branch information
shiro committed Apr 26, 2024
1 parent 621b9f0 commit e665dca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DialogImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DialogImage: Component<Props> = (props) => {
/>
<div class="fixed inset-0 z-50 flex items-center justify-center">
<Dialog.Content class="flex max-h-[90vh] items-center justify-center s:max-w-[90vw]">
<Dialog.CloseButton>
<Dialog.CloseButton class="flex justify-center">
<props.image
class={cn(_FullscreenImage, "overflow-hidden object-contain")}
alt={alt}
Expand All @@ -53,7 +53,8 @@ const DialogImage: Component<Props> = (props) => {
const _Thumbnail = css``;

const _FullscreenImage = css`
--h_limit: 90vh;
--w_limit: 90vw !important;
--h_limit: 90vh !important;
`;

export default withStyle(DialogImage, { Thumbnail: _Thumbnail });

0 comments on commit e665dca

Please sign in to comment.