UNPKG

@universal-material/web

Version:
27 lines 906 B
// @ts-ignore export const mixinAttributeProperties = (base, ...properties) => { // @ts-ignore class AttributeProperties extends base { constructor() { super(); for (const property of properties) { const propertyKey = property .split('-') .map((segment, index) => index ? `${segment[0].toUpperCase()}${segment.substring(1)}` : segment) .join(''); Object.defineProperty(this, property, { get() { return this[propertyKey]; }, set(value) { this[propertyKey] = value; }, }); } } } return AttributeProperties; }; //# sourceMappingURL=mixin-attribute-properties.js.map