mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Merge pull request #254 from josefaidt/253-anchor-href-prop
fix(tile): add href prop
This commit is contained in:
commit
fd79a5ce87
1 changed files with 7 additions and 0 deletions
|
@ -10,6 +10,12 @@
|
|||
* @type {boolean} [light=false]
|
||||
*/
|
||||
export let light = false;
|
||||
|
||||
/**
|
||||
* Set the `href`
|
||||
* @type {string} [href]
|
||||
*/
|
||||
export let href = undefined;
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
|
@ -19,6 +25,7 @@
|
|||
class:bx--tile--is-clicked="{clicked}"
|
||||
class:bx--tile--light="{light}"
|
||||
{...$$restProps}
|
||||
href="{href}"
|
||||
on:click
|
||||
on:click="{() => {
|
||||
clicked = !clicked;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue