mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(checkbox): do not set title attribute if already provided (#1323)
* fix(checkbox): do not set title attribute if already provided * Run "yarn build:docs"
This commit is contained in:
parent
f431104057
commit
c90594002a
3 changed files with 3 additions and 3 deletions
|
@ -452,6 +452,7 @@ None.
|
||||||
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
|
||||||
| :------------ | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | ------------------------------------------------- |
|
| :------------ | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | ------------------------------------------------- |
|
||||||
| ref | No | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
| ref | No | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
||||||
|
| title | No | <code>let</code> | Yes | <code>string</code> | <code>undefined</code> | Specify the title attribute for the label element |
|
||||||
| group | No | <code>let</code> | Yes | <code>any[]</code> | <code>undefined</code> | Specify the bound group |
|
| group | No | <code>let</code> | Yes | <code>any[]</code> | <code>undefined</code> | Specify the bound group |
|
||||||
| checked | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Specify whether the checkbox is checked |
|
| checked | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Specify whether the checkbox is checked |
|
||||||
| value | No | <code>let</code> | No | <code>any</code> | <code>""</code> | Specify the value of the checkbox |
|
| value | No | <code>let</code> | No | <code>any</code> | <code>""</code> | Specify the value of the checkbox |
|
||||||
|
@ -463,7 +464,6 @@ None.
|
||||||
| labelText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the label text |
|
| labelText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the label text |
|
||||||
| hideLabel | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to visually hide the label text |
|
| hideLabel | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to visually hide the label text |
|
||||||
| name | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Set a name for the input element |
|
| name | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Set a name for the input element |
|
||||||
| title | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the title attribute for the label element |
|
|
||||||
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the input label |
|
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the input label |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
|
@ -866,7 +866,7 @@
|
||||||
"isFunctionDeclaration": false,
|
"isFunctionDeclaration": false,
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": false
|
"reactive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
let refLabel = null;
|
let refLabel = null;
|
||||||
|
|
||||||
$: isTruncated = refLabel?.offsetWidth < refLabel?.scrollWidth;
|
$: isTruncated = refLabel?.offsetWidth < refLabel?.scrollWidth;
|
||||||
$: title = isTruncated ? refLabel?.innerText : title;
|
$: title = !title && isTruncated ? refLabel?.innerText : title;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue