summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src/components
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-11 12:01:37 -0600
committerAdam <[email protected]>2025-12-11 13:42:47 -0600
commit634fd62b25169619ffcbf87beec8777bf5a0d9bd (patch)
tree5a36d6aa115efbed5b1f7426fedd6a6b33b66f18 /packages/desktop/src/components
parente845eedbc325b05a19679bc439a57cc0fbf23aa3 (diff)
downloadopencode-634fd62b25169619ffcbf87beec8777bf5a0d9bd.tar.gz
opencode-634fd62b25169619ffcbf87beec8777bf5a0d9bd.zip
wip(desktop): progress
Diffstat (limited to 'packages/desktop/src/components')
-rw-r--r--packages/desktop/src/components/link.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/desktop/src/components/link.tsx b/packages/desktop/src/components/link.tsx
new file mode 100644
index 000000000..e13c31330
--- /dev/null
+++ b/packages/desktop/src/components/link.tsx
@@ -0,0 +1,17 @@
+import { ComponentProps, splitProps } from "solid-js"
+import { usePlatform } from "@/context/platform"
+
+export interface LinkProps extends ComponentProps<"button"> {
+ href: string
+}
+
+export function Link(props: LinkProps) {
+ const platform = usePlatform()
+ const [local, rest] = splitProps(props, ["href", "children"])
+
+ return (
+ <button class="text-text-strong underline" onClick={() => platform.openLink(local.href)} {...rest}>
+ {local.children}
+ </button>
+ )
+}