/
githubmirror
/
ionic-framework
Обзор
Документация
Войти
/
githubmirror
/
ionic-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/utils/rtl/dir.ts
13 строк
378 B
Liam DeBeasi
lint(eslint): migrate to eslint and prettier (#25046)
04 апр 2022, 18:12
Не верифицирован
04 апр 2022, 18:12
5676bab
Код
Авторство
О чём код?
/** * Returns `true` if the document or host element * has a `dir` set to `rtl`. The host value will always * take priority over the root document value. */ export const isRTL = (hostEl?: Pick<HTMLElement, 'dir'>) => { if (hostEl) { if (hostEl.dir !== '') { return hostEl.dir.toLowerCase() === 'rtl'; } } return document?.dir.toLowerCase() === 'rtl'; };