fix: Guide formatting
All checks were successful
Deploy to Staging / Build Images (push) Successful in 1m11s
Deploy to Staging / Deploy to Staging (push) Successful in 42s
Deploy to Staging / Verify Staging (push) Successful in 4s
Deploy to Staging / Notify Staging Ready (push) Successful in 3s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
All checks were successful
Deploy to Staging / Build Images (push) Successful in 1m11s
Deploy to Staging / Deploy to Staging (push) Successful in 42s
Deploy to Staging / Verify Staging (push) Successful in 4s
Deploy to Staging / Notify Staging Ready (push) Successful in 3s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
type GuideScreenshotSize = 'wide' | 'narrow';
|
||||
|
||||
interface GuideScreenshotProps {
|
||||
src: string;
|
||||
alt: string;
|
||||
caption?: string;
|
||||
mobile?: boolean;
|
||||
size?: GuideScreenshotSize;
|
||||
}
|
||||
|
||||
export const GuideScreenshot = ({ src, alt, caption, mobile }: GuideScreenshotProps) => {
|
||||
const SIZE_CLASS: Record<GuideScreenshotSize, string> = {
|
||||
wide: 'max-w-4xl',
|
||||
narrow: 'max-w-lg',
|
||||
};
|
||||
|
||||
export const GuideScreenshot = ({ src, alt, caption, mobile, size = 'wide' }: GuideScreenshotProps) => {
|
||||
const widthClass = mobile ? 'max-w-[375px]' : SIZE_CLASS[size];
|
||||
return (
|
||||
<figure className={`my-6 ${mobile ? 'max-w-[375px]' : 'max-w-4xl'} mx-auto`}>
|
||||
<figure className={`my-6 ${widthClass} mx-auto`}>
|
||||
<div className="rounded-lg overflow-hidden border border-white/10 shadow-lg shadow-black/20">
|
||||
<img
|
||||
src={src}
|
||||
alt={alt}
|
||||
loading="lazy"
|
||||
className="w-full h-auto"
|
||||
className="max-w-full h-auto"
|
||||
/>
|
||||
</div>
|
||||
{caption && (
|
||||
|
||||
Reference in New Issue
Block a user