Skip to content

Commit

Permalink
fix: fix auto align center on announcement in mobile environment
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Mar 10, 2024
1 parent 6d92ff7 commit 825009f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/components/app/Announcement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Announcement() {
</Button>
</AlertDialogTrigger>
<AlertDialogContent className={`announcement-dialog flex-dialog`}>
<AlertDialogHeader>
<AlertDialogHeader notTextCentered>
<AlertDialogTitle
className={"flex flex-row items-center select-none"}
>
Expand Down
6 changes: 4 additions & 2 deletions app/src/components/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;

const AlertDialogHeader = ({
className,
notTextCentered,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
}: React.HTMLAttributes<HTMLDivElement> & { notTextCentered?: boolean }) => (
<div
className={cn(
"flex flex-col space-y-2 text-center sm:text-left",
"flex flex-col space-y-2 sm:text-left",
!notTextCentered && "text-center",
className,
)}
{...props}
Expand Down

0 comments on commit 825009f

Please sign in to comment.