@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
20 lines (19 loc) • 756 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { watchValidator } from "../utils";
import { isString } from "../validators";
export const validateIconsInputCheckbox = (component, value) => {
watchValidator(component, '_icons', (value) => typeof value === 'object' &&
value !== null &&
(isString(value.checked, 1) ||
isString(value.indeterminate, 1) ||
isString(value.unchecked, 1)), new Set(['InputCheckboxIcons']), value, {
hooks: {
beforePatch: (nextValue, nextState, component) => {
nextState.set('_icons', Object.assign(Object.assign({}, component.state._icons), nextValue));
},
},
});
};
//# sourceMappingURL=icons-input-checkbox.js.map