Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Make entire CommitButton clickable
Merged did:key:z6MkkfM3...sVz5 opened 2 years ago

Instead of having the Link component inside the Button component, we should do it the other way around, that way the entire Button is clickable and links somewhere.

check check-visual check-unit-test check-httpd-api-unit-test check-e2e check-build

👉 Preview 👉 Workflow runs 👉 Branch on GitHub

1 file changed +15 -15 f50521ca 230243e7
modified src/views/projects/components/CommitButton.svelte
@@ -26,24 +26,24 @@
  }
</style>

-
<Button
-
  title="Current HEAD"
-
  variant="not-selected"
-
  styleBorderRadius={styleRoundBorders
-
    ? "var(--border-radius-tiny)"
-
    : "0 var(--border-radius-tiny) var(--border-radius-tiny) 0"}>
-
  <Link
-
    route={{
-
      resource: "project.commit",
-
      project: projectId,
-
      node: baseUrl,
-
      commit: commit.id,
-
    }}>
+
<Link
+
  route={{
+
    resource: "project.commit",
+
    project: projectId,
+
    node: baseUrl,
+
    commit: commit.id,
+
  }}>
+
  <Button
+
    title="Current HEAD"
+
    variant="not-selected"
+
    styleBorderRadius={styleRoundBorders
+
      ? "var(--border-radius-tiny)"
+
      : "0 var(--border-radius-tiny) var(--border-radius-tiny) 0"}>
    <div class="commit">
      <div class="identifier global-commit">
        {commitShortId}
      </div>
      <span>{commit.summary}</span>
    </div>
-
  </Link>
-
</Button>
+
  </Button>
+
</Link>