siyuan/app/src/mobile/util/showKeyboardToolbar.ts

21 lines
671 B
TypeScript
Raw Normal View History

export const showKeyboardToolbar = (bottom = 0) => {
const toolbarElement = document.getElementById("keyboardToolbar");
toolbarElement.classList.remove("fn__none");
toolbarElement.style.bottom = bottom + "px";
}
export const hideKeyboardToolbar = () => {
const toolbarElement = document.getElementById("keyboardToolbar");
toolbarElement.classList.add("fn__none");
}
export const initKeyboardToolbar = () => {
const toolbarElement = document.getElementById("keyboardToolbar");
toolbarElement.addEventListener("click", (event) => {
const target = event.target as HTMLElement
if (target.tagName === "svg") {
}
})
}