diff options
author | delucis | 2023-07-28 20:56:22 +0000 |
---|---|---|
committer | fredkbot | 2023-07-28 20:56:22 +0000 |
commit | 90141e98bea1dfca5e9f334bb4005a92531f5663 (patch) | |
tree | 0b52fef9bd2a673dc6065707be41664ff304c694 | |
parent | 1e0cd11567d6f1403df18ecdfe08673179cfb1da (diff) | |
download | IT.starlight-90141e98bea1dfca5e9f334bb4005a92531f5663.tar.gz IT.starlight-90141e98bea1dfca5e9f334bb4005a92531f5663.tar.bz2 IT.starlight-90141e98bea1dfca5e9f334bb4005a92531f5663.zip |
[ci] format
-rw-r--r-- | docs/src/components/icons-list.astro | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/docs/src/components/icons-list.astro b/docs/src/components/icons-list.astro index 13d8f81d..e8daaa3f 100644 --- a/docs/src/components/icons-list.astro +++ b/docs/src/components/icons-list.astro @@ -19,22 +19,22 @@ const icons = Object.keys(Icons) as (keyof typeof Icons)[]; </div> <script> - const icons = document.querySelectorAll('.icon-preview'); - icons.forEach((icon) => { - icon.addEventListener('click', () => { - const iconName = icon.dataset.name; - const copiedValue = `<Icon name="${iconName}" />`; - navigator.clipboard.writeText(copiedValue); + const icons = document.querySelectorAll('.icon-preview'); + icons.forEach((icon) => { + icon.addEventListener('click', () => { + const iconName = icon.dataset.name; + const copiedValue = `<Icon name="${iconName}" />`; + navigator.clipboard.writeText(copiedValue); - const iconLabel = icon.querySelector('[aria-live]'); - if (iconLabel) { - iconLabel.textContent = 'Copied!'; - setTimeout(() => { - iconLabel.textContent = iconName; - }, 1000); - } - }); - }); + const iconLabel = icon.querySelector('[aria-live]'); + if (iconLabel) { + iconLabel.textContent = 'Copied!'; + setTimeout(() => { + iconLabel.textContent = iconName; + }, 1000); + } + }); + }); </script> <style> @@ -58,7 +58,8 @@ const icons = Object.keys(Icons) as (keyof typeof Icons)[]; background: none; } - .icon-preview:hover, .icon-preview:focus { + .icon-preview:hover, + .icon-preview:focus { cursor: pointer; border: 1px solid var(--sl-color-gray-3); background: var(--sl-color-gray-7, var(--sl-color-gray-6)); |