mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(types): add missing $$restProps
for Checkbox
, Filename
, FluidForm
(#1655)
* fix(types): add missing `$$restProps` for `Checkbox`, `Filename`, `FluidForm` * Run "yarn build:docs" * test: assert `$$restProps` for `Checkbox`, `Form`
This commit is contained in:
parent
2a8fc00a09
commit
6450e8b0b1
9 changed files with 22 additions and 8 deletions
|
@ -924,7 +924,7 @@
|
|||
{ "type": "forwarded", "name": "blur", "element": "input" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "InlineComponent", "name": "CheckboxSkeleton" }
|
||||
"rest_props": { "type": "Element", "name": "div" }
|
||||
},
|
||||
{
|
||||
"moduleName": "CheckboxSkeleton",
|
||||
|
@ -4399,7 +4399,7 @@
|
|||
{ "type": "forwarded", "name": "keydown", "element": "button" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "InlineComponent", "name": "Loading" }
|
||||
"rest_props": { "type": "Element", "name": "div | button | svg" }
|
||||
},
|
||||
{
|
||||
"moduleName": "FluidForm",
|
||||
|
@ -4416,7 +4416,7 @@
|
|||
{ "type": "forwarded", "name": "submit", "element": "Form" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "InlineComponent", "name": "Form" }
|
||||
"rest_props": { "type": "Element", "name": "form" }
|
||||
},
|
||||
{
|
||||
"moduleName": "Form",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
/**
|
||||
* @restProps {div}
|
||||
* @event {boolean} check
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* @restProps {div | button | svg}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specify the file name status
|
||||
* @type {"uploading" | "edit" | "complete"}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* @restProps {form}
|
||||
*/
|
||||
|
||||
import { setContext } from "svelte";
|
||||
import Form from "../Form/Form.svelte";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { Checkbox } from "../types";
|
||||
</script>
|
||||
|
||||
<Checkbox labelText="Label text" />
|
||||
<Checkbox labelText="Label text" style="margin: 1rem" />
|
||||
|
||||
<Checkbox labelText="Label text" checked />
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { FluidForm, TextInput, PasswordInput } from "../types";
|
||||
</script>
|
||||
|
||||
<FluidForm>
|
||||
<FluidForm action="" method="get">
|
||||
<TextInput labelText="User name" placeholder="Enter user name..." required />
|
||||
<PasswordInput
|
||||
required
|
||||
|
|
3
types/Checkbox/Checkbox.svelte.d.ts
vendored
3
types/Checkbox/Checkbox.svelte.d.ts
vendored
|
@ -1,7 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface CheckboxProps {
|
||||
export interface CheckboxProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Specify the value of the checkbox
|
||||
* @default ""
|
||||
|
|
5
types/FileUploader/Filename.svelte.d.ts
vendored
5
types/FileUploader/Filename.svelte.d.ts
vendored
|
@ -1,7 +1,10 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface FilenameProps {
|
||||
export interface FilenameProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]>,
|
||||
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]>,
|
||||
svelte.JSX.SVGAttributes<SVGSVGElement> {
|
||||
/**
|
||||
* Specify the file name status
|
||||
* @default "uploading"
|
||||
|
|
3
types/FluidForm/FluidForm.svelte.d.ts
vendored
3
types/FluidForm/FluidForm.svelte.d.ts
vendored
|
@ -1,7 +1,8 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface FluidFormProps {}
|
||||
export interface FluidFormProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["form"]> {}
|
||||
|
||||
export default class FluidForm extends SvelteComponentTyped<
|
||||
FluidFormProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue