UNPKG

@gechiui/dom

Version:
26 lines (21 loc) 611 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isRTL; var _getComputedStyle = _interopRequireDefault(require("./get-computed-style")); /** * Internal dependencies */ /** * Whether the element's text direction is right-to-left. * * @param {Element} element The element to check. * * @return {boolean} True if rtl, false if ltr. */ function isRTL(element) { return (0, _getComputedStyle.default)(element).direction === 'rtl'; } //# sourceMappingURL=is-rtl.js.map