1
0

feat: abstract BaseCheckbox

This commit is contained in:
Dominik Pschenitschni
2023-03-07 17:59:12 +01:00
parent 7d3b97d422
commit 8fc254d2db
12 changed files with 193 additions and 112 deletions

View File

@ -6,13 +6,11 @@ declare global {
}
}
const cypressDirective: Directive = {
mounted(el, {value}) {
if (
(window.Cypress || import.meta.env.DEV) &&
value
) {
el.setAttribute('data-cy', value)
const cypressDirective = <Directive<HTMLElement,string>>{
mounted(el, {arg, value}) {
const testingId = arg || value
if ((window.Cypress || import.meta.env.DEV) && testingId) {
el.setAttribute('data-cy', testingId)
}
},
beforeUnmount(el) {