UNPKG

wix-style-react

Version:
20 lines (18 loc) 521 B
var labelDriverFactory = function labelDriverFactory(_ref) { var element = _ref.element; return { exists: function exists() { return !!element; }, getContent: function getContent() { return element.innerHTML; }, getAttribute: function getAttribute(attributeName) { return element.getAttribute(attributeName); }, hasClass: function hasClass(className) { return element.getAttribute('class').indexOf(className) > -1; } }; }; export default labelDriverFactory;