✨ (tps) add option to hide text
This commit is contained in:
9
main.ts
9
main.ts
@@ -21,7 +21,7 @@ if (size === "small") {
|
|||||||
|
|
||||||
const focusElements = params.getAll("focus")
|
const focusElements = params.getAll("focus")
|
||||||
|
|
||||||
if (focusElements.length >= 0) {
|
if (focusElements.length > 0) {
|
||||||
const focusables = document.querySelectorAll(".focusable")
|
const focusables = document.querySelectorAll(".focusable")
|
||||||
|
|
||||||
focusables.forEach((focusable) => {
|
focusables.forEach((focusable) => {
|
||||||
@@ -34,3 +34,10 @@ if (focusElements.length >= 0) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const textHide = params.get("text")
|
||||||
|
|
||||||
|
if (textHide === "hide") {
|
||||||
|
const focusables = document.querySelectorAll(".focusable")
|
||||||
|
focusables.forEach((focusable) => focusable.classList.add("text-hide"))
|
||||||
|
}
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ li {
|
|||||||
background-color: var(--background-color-no-focus);
|
background-color: var(--background-color-no-focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-hide {
|
||||||
|
color: var(--background-color);
|
||||||
|
}
|
||||||
|
|
||||||
.customer-satisfaction-roof {
|
.customer-satisfaction-roof {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user