import { ThemePreview } from '@automattic/design-picker'; import clsx from 'clsx'; import { useTranslate } from 'i18n-calypso'; import photon from 'photon'; import AnimatedFullscreen from './animated-fullscreen'; interface SitePreviewProps { url: string; siteInfo?: { title: string; tagline: string; }; inlineCss?: string; isFullscreen?: boolean; animated?: boolean; isExternallyManaged?: boolean; screenshot?: string; title: string; recordDeviceClick: ( device: string ) => void; } const SitePreview: React.FC< SitePreviewProps > = ( { url, siteInfo, inlineCss = '', isFullscreen, animated, isExternallyManaged, screenshot, title, recordDeviceClick, } ) => { const translate = useTranslate(); if ( isExternallyManaged ) { if ( screenshot === undefined ) { return null; } const width = 1000; const photonSrc = screenshot && photon( screenshot, { width } ); const scrSet = photonSrc && `${ photon( screenshot, { width, zoom: 2 } ) } 2x, ${ photon( screenshot, { width, zoom: 3 } ) } 3x`; return (
{
); } return ( ); }; export default SitePreview;