packages/ at markup-kit dd1e6eb5270e
A snapshot of packages/ in the Weft repository; the official packages are published from these commits. Markup-Kit-Commit: dd1e6eb5270e62e0c8b6c202b3d01f0da6e00ddc
This commit is contained in:
commit
306b143104
72 changed files with 10915 additions and 0 deletions
13
email/components/Img.weft
Normal file
13
email/components/Img.weft
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/// An image. Use an absolute URL, or `cid:<contentId>` for an attachment sent inline.
|
||||
import { isSafeUrl } from "../template"
|
||||
prop src: string
|
||||
prop alt: string
|
||||
prop width?: float
|
||||
---
|
||||
@if !isSafeUrl(src) {
|
||||
<Text>{alt}</Text>
|
||||
} @else if width != null {
|
||||
<Image src={src} label={alt} class="max-w-full h-auto" style={{ width }} />
|
||||
} @else {
|
||||
<Image src={src} label={alt} class="max-w-full h-auto" />
|
||||
}
|
||||
Loading…
Reference in a new issue