mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
* docs: link source code to folder for multiple components * chore(docs): remove unused `source` from frontmatter
36 lines
767 B
Text
36 lines
767 B
Text
<script>
|
|
import { ClickableTile } from "carbon-components-svelte";
|
|
import Preview from "../../components/Preview.svelte";
|
|
</script>
|
|
|
|
## Default
|
|
|
|
<ClickableTile href="https://www.carbondesignsystem.com/">
|
|
Carbon Design System
|
|
</ClickableTile>
|
|
|
|
## Prevent default behavior
|
|
|
|
Use the forwarded `click` event and invoke `e.preventDefault()` to prevent the native link behavior.
|
|
|
|
<ClickableTile
|
|
href="/"
|
|
on:click={(e) => {
|
|
e.preventDefault();
|
|
// custom behavior
|
|
}}
|
|
>
|
|
Carbon Design System
|
|
</ClickableTile>
|
|
|
|
## Light variant
|
|
|
|
<ClickableTile light href="https://www.carbondesignsystem.com/">
|
|
Carbon Design System
|
|
</ClickableTile>
|
|
|
|
## Disabled state
|
|
|
|
<ClickableTile disabled href="https://www.carbondesignsystem.com/">
|
|
Carbon Design System
|
|
</ClickableTile>
|