fix(clickable-tile): explicitly type restProps (#831)

This commit is contained in:
Eric Liu 2021-09-28 08:55:16 -07:00 committed by GitHub
commit ee9bb22768
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View file

@ -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",

View file

@ -1,4 +1,6 @@
<script>
/** @restProps {a | p} */
/** Set to `true` to click the tile */
export let clicked = false;

View file

@ -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>

View file

@ -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