mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-15 11:25:17 +00:00
web/SectionHeading: added a new prop to disable the link
This commit is contained in:
parent
8c9f7ff36d
commit
06000cbc77
|
@ -8,6 +8,7 @@
|
||||||
export let title: string;
|
export let title: string;
|
||||||
export let sectionId: string;
|
export let sectionId: string;
|
||||||
export let beta = false;
|
export let beta = false;
|
||||||
|
export let nolink = false;
|
||||||
export let copyData = "";
|
export let copyData = "";
|
||||||
|
|
||||||
const sectionURL = `${$page.url.origin}${$page.url.pathname}#${sectionId}`;
|
const sectionURL = `${$page.url.origin}${$page.url.pathname}#${sectionId}`;
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if !nolink}
|
||||||
<button
|
<button
|
||||||
class="link-copy"
|
class="link-copy"
|
||||||
aria-label={copied
|
aria-label={copied
|
||||||
|
@ -44,6 +46,7 @@
|
||||||
>
|
>
|
||||||
<CopyIcon check={copied} regularIcon={!!copyData} />
|
<CopyIcon check={copied} regularIcon={!!copyData} />
|
||||||
</button>
|
</button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in a new issue