releasebird-javascript-sdk 1.0.83 → 1.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,7 +162,7 @@ export class RbirdFormManager {
162
162
  ` : ''}
163
163
  <div class="rbird-form-body">
164
164
  ${form.title ? `<h3 class="rbird-form-title" style="${this.getTitleStyles(theme)}">${this.escapeHtml(form.title)}</h3>` : ''}
165
- ${form.description ? `<p class="rbird-form-description" style="${this.getDescriptionStyles()}">${this.escapeHtml(form.description)}</p>` : ''}
165
+ ${form.description ? `<p class="rbird-form-description" style="${this.getDescriptionStyles(theme)}">${this.escapeHtml(form.description)}</p>` : ''}
166
166
  <form class="rbird-form-fields" data-form-id="${form.id}">
167
167
  ${fieldsHtml}
168
168
  <button type="submit" class="rbird-form-submit" style="${this.getSubmitButtonStyles(theme)}">
@@ -206,7 +206,7 @@ export class RbirdFormManager {
206
206
  let html = `<div class="rbird-form-field" style="margin-bottom: 16px;">`;
207
207
 
208
208
  if (field.label) {
209
- html += `<label style="${this.getLabelStyles()}">${this.escapeHtml(field.label)} ${requiredMark}</label>`;
209
+ html += `<label style="${this.getLabelStyles(theme)}">${this.escapeHtml(field.label)} ${requiredMark}</label>`;
210
210
  }
211
211
 
212
212
  switch (field.type) {
@@ -416,26 +416,26 @@ export class RbirdFormManager {
416
416
  getTitleStyles(theme) {
417
417
  return `
418
418
  margin: 0 0 8px 0;
419
- font-size: 20px;
419
+ font-size: ${theme.titleFontSize || '20px'};
420
420
  font-weight: 600;
421
421
  color: ${theme.primaryColor || '#1f2937'};
422
422
  `;
423
423
  }
424
424
 
425
- getDescriptionStyles() {
425
+ getDescriptionStyles(theme) {
426
426
  return `
427
427
  margin: 0 0 20px 0;
428
- font-size: 14px;
428
+ font-size: ${theme.descriptionFontSize || '14px'};
429
429
  color: #6b7280;
430
430
  line-height: 1.5;
431
431
  `;
432
432
  }
433
433
 
434
- getLabelStyles() {
434
+ getLabelStyles(theme) {
435
435
  return `
436
436
  display: block;
437
437
  margin-bottom: 6px;
438
- font-size: 14px;
438
+ font-size: ${theme.labelFontSize || '14px'};
439
439
  font-weight: 500;
440
440
  color: #374151;
441
441
  `;