Merge branch 'master' into chore

This commit is contained in:
metonym 2022-03-16 07:31:38 -07:00 committed by GitHub
commit 83fa7fa604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 167 additions and 81 deletions

View file

@ -2180,6 +2180,28 @@
"moduleName": "CopyButton",
"filePath": "src/CopyButton/CopyButton.svelte",
"props": [
{
"name": "feedback",
"kind": "let",
"description": "Set the feedback text shown after clicking the button",
"type": "string",
"value": "\"Copied!\"",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": false
},
{
"name": "feedbackTimeout",
"kind": "let",
"description": "Set the timeout duration (ms) to display feedback text",
"type": "number",
"value": "2000",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": false
},
{
"name": "iconDescription",
"kind": "let",
@ -2216,16 +2238,12 @@
"moduleExports": [],
"slots": [],
"events": [
{ "type": "forwarded", "name": "click", "element": "Copy" },
{ "type": "forwarded", "name": "animationend", "element": "Copy" },
{ "type": "forwarded", "name": "click", "element": "button" },
{ "type": "forwarded", "name": "animationend", "element": "button" },
{ "type": "dispatched", "name": "copy" }
],
"typedefs": [],
"rest_props": { "type": "InlineComponent", "name": "Copy" },
"extends": {
"interface": "CopyProps",
"import": "\"../Copy/Copy.svelte\""
}
"rest_props": { "type": "Element", "name": "button" }
},
{
"moduleName": "DataTable",
@ -9221,6 +9239,17 @@
"moduleName": "Search",
"filePath": "src/Search/Search.svelte",
"props": [
{
"name": "value",
"kind": "let",
"description": "Specify the value of the search input",
"type": "any",
"value": "\"\"",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": true
},
{
"name": "small",
"kind": "let",
@ -9308,28 +9337,6 @@
"constant": false,
"reactive": true
},
{
"name": "value",
"kind": "let",
"description": "Specify the value of the search input",
"type": "string",
"value": "\"\"",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": true
},
{
"name": "type",
"kind": "let",
"description": "Specify the `type` attribute of the search input",
"type": "string",
"value": "\"text\"",
"isFunction": false,
"isFunctionDeclaration": false,
"constant": false,
"reactive": false
},
{
"name": "placeholder",
"kind": "let",

View file

@ -60,3 +60,17 @@ components: ["Form", "FormGroup"]
</FormGroup>
<Button type="submit">Submit</Button>
</Form>
### Prevent default behavior
The forwarded `submit` event is not modified. Use `e.preventDefault()` to prevent the native form submission behavior.
```
<Form on:submit={e => {
e.preventDefault();
console.log("submit", e);
}}>
<Checkbox id="checkbox-0" labelText="Checkbox Label" checked />
<Button type="submit">Submit</Button>
</Form>
```