chore: improve note from annotation button style

This commit is contained in:
windingwind 2025-01-06 12:07:33 +01:00
parent 2b0ef07fee
commit a138848c4f

View File

@ -14,11 +14,30 @@ function registerReaderAnnotationButton() {
const annotationData = params.annotation;
append(
ztoolkit.UI.createElement(doc, "div", {
tag: "div",
classList: ["icon"],
properties: {
innerHTML: ICONS.readerQuickNote,
title: "Create note from annotation",
},
children: [
{
tag: "style",
properties: {
innerHTML: `
.icon {
border-radius: 4px;
}
.icon:hover {
background-color: var(--fill-quinary);
outline: 2px solid var(--fill-quinary);
}
.icon:active {
background-color: var(--fill-quarternary);
}
`,
},
},
],
listeners: [
{
type: "click",
@ -31,20 +50,6 @@ function registerReaderAnnotationButton() {
e.preventDefault();
},
},
{
type: "mouseover",
listener: (e) => {
(e.target as HTMLElement).style.backgroundColor = "#F0F0F0";
},
},
{
type: "mouseout",
listener: (e) => {
(e.target as HTMLElement).style.removeProperty(
"background-color",
);
},
},
],
enableElementRecord: false,
}),