@fluentui/react-northstar
Version:
A themable React component library.
27 lines (26 loc) • 915 B
JavaScript
import * as React from 'react';
export var rtlTextContainer = {
getAttributes: function getAttributes(_ref) {
var _ref$condition = _ref.condition,
condition = _ref$condition === void 0 ? true : _ref$condition,
_ref$forElements = _ref.forElements,
forElements = _ref$forElements === void 0 ? [] : _ref$forElements;
return condition && forElements.some(function (child) {
return child && typeof child === 'string';
}) ? {
dir: 'auto'
} : {};
},
createFor: function createFor(_ref2) {
var element = _ref2.element,
_ref2$condition = _ref2.condition,
condition = _ref2$condition === void 0 ? true : _ref2$condition;
if (condition && element && typeof element === 'string') {
return /*#__PURE__*/React.createElement("span", {
dir: "auto"
}, element);
}
return element;
}
};
//# sourceMappingURL=rtlTextContainer.js.map