(el: HTMLElement)
| 1 | const isElementHidden = (el: HTMLElement) => { |
| 2 | if (el.nodeName === "SLOT") { |
| 3 | return false; |
| 4 | } |
| 5 | |
| 6 | const computedStyle = window.getComputedStyle(el); |
| 7 | |
| 8 | return (computedStyle.display !== "contents" && (el.offsetWidth <= 0 && el.offsetHeight <= 0)) || (computedStyle.visibility === "hidden"); |
| 9 | }; |
| 10 | |
| 11 | export default isElementHidden; |
no outgoing calls
no test coverage detected
searching dependent graphs…