Skip to content

Commit

Permalink
fix: adds attributes to color
Browse files Browse the repository at this point in the history
  • Loading branch information
KovaCro committed Jan 1, 2024
1 parent 1cc3745 commit d05c6c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/docs/Form fields/color.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
| id | | `string` | id of the form control |
| label | | `string` | text right to the color picker |
| value | | `string`| value of the color picker |
| disabled | | `boolean`| determines if an input is disabled |


### Slots
Expand Down
4 changes: 3 additions & 1 deletion packages/lib/src/form-fields/color.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
export let name;
export let value = 'e65100';
export let label = ''
export let disabled = false;
export const getValue = () => value;
Expand All @@ -35,7 +37,7 @@
</script>

<div>
<input type="color" {id} {name} bind:value />
<input type="color" {id} {name} {disabled} bind:value />
{#if label}
<!-- svelte-ignore a11y-label-has-associated-control -->
<label>{label}</label>
Expand Down

0 comments on commit d05c6c7

Please sign in to comment.