mirror of
https://github.com/tabler/tabler.git
synced 2026-08-13 14:52:22 +04:00
22 lines
806 B
TypeScript
22 lines
806 B
TypeScript
import ResponsiveImage from '@/components/ResponsiveImage';
|
|
|
|
export default function EmailImage({ email, dark = false, full = false, ...props }) {
|
|
const width = full ? email.widthFull : email.width;
|
|
const height = full ? email.heightFull : email.height;
|
|
|
|
return (
|
|
<ResponsiveImage
|
|
src={`/img/tabler-emails/screenshots/${email.screenshot}${dark ? '-dark' : ''}${full ? '-full' : ''}.png`}
|
|
width={width}
|
|
height={height}
|
|
{...props}
|
|
/>
|
|
);
|
|
|
|
// return (
|
|
// <div className="rounded bg-white border-light" style={{ position: 'relative', paddingTop: `${height / width * 100}%`, overflow: 'hidden'}}>
|
|
// <div style={{ background: `url() no-repeat top center/cover`, position: 'absolute', top: -2, left: -2, right: -2, bottom: -2 }} />
|
|
// </div>
|
|
// )
|
|
}
|