UNPKG

wix-style-react

Version:
18 lines 836 B
import inputWithOptionsDriverFactory from '../InputWithOptions/InputWithOptions.driver'; const multiSelectCheckboxDriverFactory = ({ element }) => { const { driver, inputDriver, dropdownLayoutDriver } = inputWithOptionsDriverFactory({ element }); const getLabels = (delimiter = `, `) => inputDriver.getValue().split(delimiter); const multiSelectCheckboxDriver = Object.assign(driver, { getNumOfLabels: () => getLabels().length, getLabels: delimiter => getLabels(delimiter), getLabelAt: (index, delimiters) => getLabels(delimiters)[index], }); return { exists: () => !!element, driver: multiSelectCheckboxDriver, inputDriver, dropdownLayoutDriver, }; }; export default multiSelectCheckboxDriverFactory; //# sourceMappingURL=MultiSelectCheckbox.driver.js.map