@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
40 lines (39 loc) • 1.14 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { hrefProp, labelProp, quoteProp, variantQuoteProp } from "../../props";
import { BaseController } from "../base-controller";
import { quotePropsConfig } from "./api";
export class QuoteController extends BaseController {
constructor(stateAccess) {
super(stateAccess, quotePropsConfig);
}
componentWillLoad(props) {
const { href, label, quote, variant } = props;
this.watchHref(href);
this.watchLabel(label);
this.watchQuote(quote);
this.watchVariant(variant);
}
watchHref(value) {
hrefProp.apply(value, (v) => {
this.setRenderProp('href', v);
});
}
watchLabel(value) {
labelProp.apply(value, (v) => {
this.setRenderProp('label', v);
});
}
watchQuote(value) {
quoteProp.apply(value, (v) => {
this.setRenderProp('quote', v);
});
}
watchVariant(value) {
variantQuoteProp.apply(value, (v) => {
this.setRenderProp('variant', v);
});
}
}
//# sourceMappingURL=controller.js.map