2020-05-28 11:32:57 -04:00
|
|
|
import Component from "@ember/component";
|
|
|
|
|
|
|
|
export default Component.extend({
|
2019-10-10 21:26:01 -04:00
|
|
|
didInsertElement() {
|
|
|
|
this._super(...arguments);
|
|
|
|
this.cardElement.mount("#card-element");
|
2022-06-24 11:48:38 -04:00
|
|
|
this.setCardElementStyles();
|
|
|
|
},
|
|
|
|
|
|
|
|
setCardElementStyles() {
|
|
|
|
const root = document.querySelector(":root");
|
|
|
|
const computedStyle = getComputedStyle(root);
|
|
|
|
const primaryColor = computedStyle.getPropertyValue("--primary");
|
|
|
|
const placeholderColor =
|
|
|
|
computedStyle.getPropertyValue("--secondary-medium");
|
|
|
|
this.cardElement.update({
|
|
|
|
style: {
|
|
|
|
base: {
|
|
|
|
color: primaryColor,
|
|
|
|
"::placeholder": {
|
|
|
|
color: placeholderColor,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2019-10-10 21:26:01 -04:00
|
|
|
},
|
2020-09-16 10:53:50 -04:00
|
|
|
didDestroyElement() {},
|
2019-10-10 21:26:01 -04:00
|
|
|
});
|