Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: Alert icon overlapping with the text on Firefox (#684)

Anurag Singh13f4a796a895
diff --git a/apps/admin/src/app/report/[id]/page.tsx b/apps/admin/src/app/report/[id]/page.tsx
index 55f6dfcf..2efbe8c2 100644
--- a/apps/admin/src/app/report/[id]/page.tsx
+++ b/apps/admin/src/app/report/[id]/page.tsx
@@ -73,9 +73,9 @@ const Report = async function (props: Props) {
{report.moderator ? (
<Alert className="mt-4" variant="destructive">
- <div className="flex items-center gap-2">
+ <div className="mb-0.5 flex items-center gap-2">
<AlertCircle className="h-[1.25rem]" />
- <AlertTitle>Action already taken</AlertTitle>
+ <AlertTitle className="mb-0">Action already taken</AlertTitle>
</div>
<AlertDescription>
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index 46d067e0..3ca444bc 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -1,7 +1,7 @@
// NOTE: this whole package is bugged and once they fix this we can remove this workaround
// eslint-disable-next-line import/no-unresolved
-import bundleAnalyzer from '@next/bundle-analyzer';
import vercelToolbar from '@vercel/toolbar/plugins/next';
+import bundleAnalyzer from '@next/bundle-analyzer';
// eslint-disable-next-line import/no-unresolved
import million from 'million/compiler';
diff --git a/apps/web/src/app/[locale]/waitlist/_components/waitlist-form.tsx b/apps/web/src/app/[locale]/waitlist/_components/waitlist-form.tsx
index 4fb503bf..01fb6ad0 100644
--- a/apps/web/src/app/[locale]/waitlist/_components/waitlist-form.tsx
+++ b/apps/web/src/app/[locale]/waitlist/_components/waitlist-form.tsx
@@ -174,7 +174,9 @@ export function AlertDestructive({
return (
<Alert className="dark:bg-[#230808]" variant="destructive">
<AlertCircle className="h-4 w-4" />
- <AlertDescription className="text-left text-black dark:text-white">{text}</AlertDescription>
+ <AlertDescription className="pl-7 text-left text-black dark:text-white">
+ {text}
+ </AlertDescription>
</Alert>
);
}
@@ -183,7 +185,7 @@ export function AlertSuccess() {
return (
<Alert variant="success">
<MailCheck className="h-4 w-4" />
- <AlertDescription className="text-left text-white">
+ <AlertDescription className="pl-7 text-left text-white">
Thanks for signing up for the waitlist! Consider{' '}
<a
className="underline"
diff --git a/packages/ui/src/components/alert.tsx b/packages/ui/src/components/alert.tsx
index 9d4131e9..69e8bffc 100644
--- a/packages/ui/src/components/alert.tsx
+++ b/packages/ui/src/components/alert.tsx
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '../cn';
const alertVariants = cva(
- 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
+ 'relative w-full rounded-lg border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
{
variants: {
variant: {