A snapshot of packages/ in the Weft repository; the official packages are published from these commits. Markup-Kit-Commit: dd1e6eb5270e62e0c8b6c202b3d01f0da6e00ddc
8 lines
310 B
Text
8 lines
310 B
Text
/// A link. An address that isn't `http`, `https`, `mailto`, `tel` or `cid` renders as its text.
|
|
import { isSafeUrl } from "../template"
|
|
prop href: string
|
|
prop children: Snippet
|
|
---
|
|
@if isSafeUrl(href) {<Link
|
|
to={Route.url(href)}
|
|
class="underline">@render children()</Link>} @else {@render children()}
|