Buckets:
| import { ComponentProps, splitProps } from "solid-js" | |
| import { usePlatform } from "@/context/platform" | |
| export interface LinkProps extends Omit<ComponentProps<"a">, "href"> { | |
| href: string | |
| } | |
| export function Link(props: LinkProps) { | |
| const platform = usePlatform() | |
| const [local, rest] = splitProps(props, ["href", "children", "class"]) | |
| return ( | |
| <a | |
| href={local.href} | |
| class={`text-text-strong underline ${local.class ?? ""}`} | |
| onClick={(event) => { | |
| if (!local.href) return | |
| event.preventDefault() | |
| platform.openLink(local.href) | |
| }} | |
| {...rest} | |
| > | |
| {local.children} | |
| </a> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 645 Bytes
- Xet hash:
- b2d9aedd459012100743d632ca3389be9645c99a038c445f5c3a93e0372759aa
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.