mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Remove clipboard-copy dependency from CodeSnippet, CopyButton (#726)
* chore(deps): remove clipboard-copy * feat: add copy prop, use navigator.clipboard API * docs: add clipboard-copy back to docsite for more browser support * docs(component-api): use outbound link * docs: add override/prevent copy examples
This commit is contained in:
parent
6ed4aaa86e
commit
921c3e121a
19 changed files with 163 additions and 68 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
import {
|
||||
Link,
|
||||
OutboundLink,
|
||||
StructuredList,
|
||||
StructuredListHead,
|
||||
StructuredListRow,
|
||||
|
@ -43,10 +44,9 @@
|
|||
|
||||
<p style="margin-bottom: var(--cds-layout-02)">
|
||||
Source code:
|
||||
<Link inline size="lg" href="{source}" target="_blank">
|
||||
<OutboundLink inline href="{source}">
|
||||
{component.filePath}
|
||||
<Launch16 />
|
||||
</Link>
|
||||
</OutboundLink>
|
||||
</p>
|
||||
|
||||
<h3 id="props">Props</h3>
|
||||
|
@ -94,14 +94,12 @@
|
|||
Carbon Svelte icon
|
||||
</TooltipDefinition>
|
||||
{:else if type.startsWith("HTML")}
|
||||
<Link
|
||||
<OutboundLink
|
||||
href="{mdn_api}{type}"
|
||||
target="_blank"
|
||||
style="white-space: nowrap"
|
||||
>
|
||||
{type}
|
||||
<Launch16 />
|
||||
</Link>
|
||||
</OutboundLink>
|
||||
{:else if type in typeMap}
|
||||
<code>{typeMap[type]}</code>
|
||||
{:else if type.startsWith("(")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue