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
18
email/components/Button.weft
Normal file
18
email/components/Button.weft
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/// A button. In the text version it is its label and its address.
|
||||
import type { Color } from "std/color"
|
||||
import { isSafeUrl } from "../template"
|
||||
prop url: string
|
||||
prop label: string
|
||||
prop color: Color = "#111111"
|
||||
prop textColor: Color = "#ffffff"
|
||||
---
|
||||
@if isSafeUrl(url) {
|
||||
<Box class="my-5">
|
||||
<Box class="inline-block rounded-md" style={{ background: color }}>
|
||||
<Link to={Route.url(url)} class="inline-block px-5 py-3 no-underline font-semibold"><Text
|
||||
style={{ color: textColor }}>{label}</Text></Link>
|
||||
</Box>
|
||||
</Box>
|
||||
} @else {
|
||||
<Box class="mb-4">{label}</Box>
|
||||
}
|
||||
Loading…
Reference in a new issue