SHARE
TWEET

Untitled

a guest Feb 27th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private setColors(form: CustomForm) {
  2.     if (!this.el) return;
  3.  
  4.     this.el.nativeElement.style.setProperty(`--danger-color`, form.error_color);
  5.     if (this.data.contact_form_font_color) {
  6.       this.render.setStyle(this.el.nativeElement, 'color', this.data.contact_form_font_color);
  7.       return;
  8.     }
  9.  
  10.     if (this.data.dynamic_form_font_color || this.data.dynamic_form_error_color || this.data.dynamic_form_button_color) {
  11.       if (this.data.dynamic_form_font_color) {
  12.         this.render.setStyle(this.el.nativeElement, 'color', this.data.dynamic_form_font_color);
  13.       }
  14.  
  15.       if (this.data.dynamic_form_error_color) {
  16.         this.el.nativeElement.style.setProperty(`--danger-color`, this.data.dynamic_form_error_color);
  17.       }
  18.  
  19.       if (this.data.dynamic_form_button_color) {
  20.         this.render.setStyle(this.btnSubmit.nativeElement, 'color', this.data.dynamic_form_button_color);
  21.       }
  22.       return;
  23.     }
  24.  
  25.     this.render.setStyle(this.el.nativeElement, 'color', form.font_color);
  26.     this.render.setStyle(this.btnSubmit.nativeElement, 'color', form.button_font_color);
  27.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top