ProjectThumb

import { canPreview, ProjectThumb } from '@hanzo/ui/product'

No examples yet.

Types

export type ProjectThumbProps = {
name: string
/** The project whose capture to show. */
slug?: string | null
liveUrl?: string | null
/**
* Where the capture lives. Defaults to the same-origin cloud route, which is
* right for a site served beside the API and wrong for a desktop webview —
* so a caller that is not same-origin passes the absolute URL.
*/
shotUrl?: (slug: string) => string
/** Shown when there is no live URL and no capture. */
fallback?: ReactElement
/**
* Box shape when the parent sets no height (cards 16/9, heroes 16/10).
*
* A RATIO, not a class name. As a Tailwind utility this named a shape and
* delivered none: where the parent supplied a height it went unnoticed, and
* where it did not, `height: 100%` resolved against an auto-height box and the
* thumbnail collapsed to zero.
*/
aspect?: number
}

Exports

canPreviewProjectThumbtype ProjectThumbProps