chore: improve note from annotation button style
This commit is contained in:
parent
2b0ef07fee
commit
a138848c4f
|
|
@ -14,11 +14,30 @@ function registerReaderAnnotationButton() {
|
||||||
const annotationData = params.annotation;
|
const annotationData = params.annotation;
|
||||||
append(
|
append(
|
||||||
ztoolkit.UI.createElement(doc, "div", {
|
ztoolkit.UI.createElement(doc, "div", {
|
||||||
tag: "div",
|
|
||||||
classList: ["icon"],
|
classList: ["icon"],
|
||||||
properties: {
|
properties: {
|
||||||
innerHTML: ICONS.readerQuickNote,
|
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: [
|
listeners: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
|
|
@ -31,20 +50,6 @@ function registerReaderAnnotationButton() {
|
||||||
e.preventDefault();
|
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,
|
enableElementRecord: false,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue