Skip to content

Commit f93a231

Browse files
committed
improve looks
1 parent c4895cd commit f93a231

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

packages/preview-server/src/components/toolbar.tsx

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import * as Tabs from '@radix-ui/react-tabs';
44
import { LayoutGroup } from 'framer-motion';
55
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
6+
import type { ComponentProps } from 'react';
67
import * as React from 'react';
78
import type { CompatibilityCheckingResult } from '../actions/email-validation/check-compatibility';
89
import { isBuilding } from '../app/env';
@@ -183,7 +184,7 @@ const ToolbarInner = ({
183184
(activeTab === 'compatibility' &&
184185
'The Compatibility tab shows how well the HTML/CSS is supported across mail clients like Outlook, Gmail, etc. Powered by Can I Email.') ||
185186
(activeTab === 'resend' &&
186-
"The Resend tab allows you to upload your React Email code using the Resend Templates API.") ||
187+
'The Resend tab allows you to upload your React Email code using the Resend Templates API.') ||
187188
'Info'
188189
}
189190
>
@@ -288,8 +289,11 @@ const ToolbarInner = ({
288289
) : (
289290
<SuccessWrapper>
290291
<SuccessTitle>Connect to Resend</SuccessTitle>
291-
<SuccessDescription>
292-
Run <CodeSnippet>npx react-email resend setup</CodeSnippet>{' '}
292+
<SuccessDescription className="max-w-lg">
293+
Run{' '}
294+
<CodeSnippet>
295+
npx react-email@latest resend setup
296+
</CodeSnippet>{' '}
293297
on your terminal to connect your Resend account.
294298
</SuccessDescription>
295299
</SuccessWrapper>
@@ -340,15 +344,34 @@ const SuccessIcon = () => {
340344
);
341345
};
342346

343-
const SuccessTitle = ({ children }) => {
347+
const SuccessTitle = ({
348+
children,
349+
className,
350+
...props
351+
}: ComponentProps<'h3'>) => {
344352
return (
345-
<h3 className="text-slate-12 font-medium text-base mb-1">{children}</h3>
353+
<h3
354+
className={cn('text-slate-12 font-medium text-base mb-1', className)}
355+
{...props}
356+
>
357+
{children}
358+
</h3>
346359
);
347360
};
348361

349-
const SuccessDescription = ({ children }) => {
362+
const SuccessDescription = ({
363+
children,
364+
className,
365+
...props
366+
}: ComponentProps<'p'>) => {
350367
return (
351-
<p className="text-slate-11 text-sm text-center max-w-[320px]">
368+
<p
369+
className={cn(
370+
'text-slate-11 text-sm text-center max-w-[320px]',
371+
className,
372+
)}
373+
{...props}
374+
>
352375
{children}
353376
</p>
354377
);

0 commit comments

Comments
 (0)