@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
34 lines (33 loc) • 1.06 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { labelWithExpertSlotProp, levelProp, secondaryHeadlineProp } from "../../props";
import { BaseController } from "../base-controller";
import { headingPropsConfig } from "./api";
export class HeadingController extends BaseController {
constructor(stateAccess) {
super(stateAccess, headingPropsConfig);
}
componentWillLoad(props) {
const { label, level, secondaryHeadline } = props;
this.watchLabel(label);
this.watchLevel(level);
this.watchSecondaryHeadline(secondaryHeadline);
}
watchLabel(value) {
labelWithExpertSlotProp.apply(value, (v) => {
this.setRenderProp('label', v);
});
}
watchLevel(value) {
levelProp.apply(value, (v) => {
this.setRenderProp('level', v);
});
}
watchSecondaryHeadline(value) {
secondaryHeadlineProp.apply(value, (v) => {
this.setRenderProp('secondaryHeadline', v);
});
}
}
//# sourceMappingURL=controller.js.map