From 7b1d5d480b8428935e83ed73ee64a0d67872fa74 Mon Sep 17 00:00:00 2001 From: Kelsey Jackson Date: Fri, 21 Jun 2024 13:30:24 -0500 Subject: [PATCH] updated usage example --- docs/docs/components/color-picker.md | 2 +- docs/docs/usage.md | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/docs/components/color-picker.md b/docs/docs/components/color-picker.md index baf5547cf..689f28c6a 100644 --- a/docs/docs/components/color-picker.md +++ b/docs/docs/components/color-picker.md @@ -45,7 +45,7 @@ To prevent users from toggling the format themselves, add the `no-format-toggle` ### Swatches -Use the `swatches` attribute to add convenient presets to the color picker. Any format the color picker can parse is acceptable (including CSS color names), but each value must be separated by a semicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript. +Use the `swatches` attribute to add convenient presets to the color picker. Any format the color picker can parse is acceptable (including [CSS color names](https://www.w3schools.com/colors/colors_names.asp)), but each value must be separated by a semicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript. ```html {.example} Click me ``` -In rare cases, a property may require an array, an object, or a function. For example, to customize the color picker's list of preset swatches, you set the `swatches` property to an array of colors. This must be done with JavaScript. - -```html - - - -``` - -Refer to a component's documentation for a complete list of its properties. - ## Events You can listen for standard events such as `click`, `mouseover`, etc. as you normally would. However, it's important to note that many events emitted within a component's shadow root will be [retargeted](https://dom.spec.whatwg.org/#retarget) to the host element. This may result in, for example, multiple `click` handlers executing even if the user clicks just once. Furthermore, `event.target` will point to the host element, making things even more confusing.