@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
15 lines (14 loc) • 536 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { alignPropTypeOptions } from "../../schema";
import { createPropDefinition } from "./helpers/factory";
import { normalizeString } from "./helpers/normalizers";
export const alignProp = createPropDefinition('align', 'top', (value) => {
const str = normalizeString(value);
if (alignPropTypeOptions.includes(str)) {
return str;
}
throw new Error(`Invalid align value: ${str}`);
}, (v) => alignPropTypeOptions.includes(v));
//# sourceMappingURL=align.js.map