mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(clickable-tile): explicitly type restProps (#831)
This commit is contained in:
parent
007796f881
commit
ee9bb22768
4 changed files with 12 additions and 3 deletions
|
@ -932,7 +932,7 @@
|
|||
{ "type": "forwarded", "name": "mouseleave", "element": "Link" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "InlineComponent", "name": "Link" }
|
||||
"rest_props": { "type": "Element", "name": "a | p" }
|
||||
},
|
||||
{
|
||||
"moduleName": "CodeSnippet",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script>
|
||||
/** @restProps {a | p} */
|
||||
|
||||
/** Set to `true` to click the tile */
|
||||
export let clicked = false;
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
Carbon Design System
|
||||
</ClickableTile>
|
||||
|
||||
<ClickableTile light href="https://www.carbondesignsystem.com/">
|
||||
<ClickableTile
|
||||
light
|
||||
href="https://www.carbondesignsystem.com/"
|
||||
title=""
|
||||
target="_blank"
|
||||
>
|
||||
Carbon Design System
|
||||
</ClickableTile>
|
||||
|
|
4
types/Tile/ClickableTile.d.ts
vendored
4
types/Tile/ClickableTile.d.ts
vendored
|
@ -1,7 +1,9 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface ClickableTileProps {
|
||||
export interface ClickableTileProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]>,
|
||||
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["p"]> {
|
||||
/**
|
||||
* Set to `true` to click the tile
|
||||
* @default false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue