UNPKG

wix-style-react

Version:
25 lines (21 loc) 678 B
import { StylableDOMUtil } from '@stylable/dom-test-kit'; import style from './Heading.st.css'; var headingDriverFactory = function headingDriverFactory(factoryParams) { var stylableDOMUtil = new StylableDOMUtil(style); var element = factoryParams.element; return { exists: function exists() { return !!element; }, getText: function getText() { return element.innerHTML; }, getAppearance: function getAppearance() { return stylableDOMUtil.getStyleState(element, 'appearance'); }, isLight: function isLight() { return stylableDOMUtil.hasStyleState(element, 'light'); } }; }; export default headingDriverFactory;