(hostEl?: Pick<HTMLElement, 'dir'>)
| 4 | * take priority over the root document value. |
| 5 | */ |
| 6 | export const isRTL = (hostEl?: Pick<HTMLElement, 'dir'>) => { |
| 7 | if (hostEl) { |
| 8 | if (hostEl.dir !== '') { |
| 9 | return hostEl.dir.toLowerCase() === 'rtl'; |
| 10 | } |
| 11 | } |
| 12 | return document?.dir.toLowerCase() === 'rtl'; |
| 13 | }; |
no outgoing calls
no test coverage detected