mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 20:59:20 +00:00
Merge branch 'master' into chore
This commit is contained in:
commit
83fa7fa604
10 changed files with 167 additions and 81 deletions
|
@ -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",
|
||||
|
|
|
@ -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>
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue