mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-12 01:11:36 +08:00
fix(theme-picker): Reformat invalid class names
This commit is contained in:
parent
9f4b9693ac
commit
4f11201ff7
2 changed files with 5 additions and 5 deletions
|
|
@ -99,7 +99,7 @@ class ThemeOption extends React.Component {
|
||||||
<div className="clickable-theme-option" onMouseDown={this.props.onSelect}>
|
<div className="clickable-theme-option" onMouseDown={this.props.onSelect}>
|
||||||
<EventedIFrame
|
<EventedIFrame
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
className={`theme-preview-${this.props.theme.name}`}
|
className={`theme-preview-${this.props.theme.name.replace(/\./g, '-')}`}
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
width="115px"
|
width="115px"
|
||||||
height="70px"
|
height="70px"
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,12 @@ class ThemePicker extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_rewriteIFrame(prevActiveTheme, activeTheme) {
|
_rewriteIFrame(prevActiveTheme, activeTheme) {
|
||||||
const prevActiveThemeDoc = document.querySelector(`.theme-preview-${prevActiveTheme}`).contentDocument;
|
const prevActiveThemeDoc = document.querySelector(`.theme-preview-${prevActiveTheme.replace(/\./g, '-')}`).contentDocument;
|
||||||
const prevActiveElement = prevActiveThemeDoc.querySelector(".theme-option.active-true");
|
const prevActiveElement = prevActiveThemeDoc.querySelector(".theme-option.active-true");
|
||||||
prevActiveElement.className = "theme-option active-false";
|
if (prevActiveElement) prevActiveElement.className = "theme-option active-false";
|
||||||
const activeThemeDoc = document.querySelector(`.theme-preview-${activeTheme}`).contentDocument;
|
const activeThemeDoc = document.querySelector(`.theme-preview-${activeTheme.replace(/\./g, '-')}`).contentDocument;
|
||||||
const activeElement = activeThemeDoc.querySelector(".theme-option.active-false");
|
const activeElement = activeThemeDoc.querySelector(".theme-option.active-false");
|
||||||
activeElement.className = "theme-option active-true";
|
if (activeElement) activeElement.className = "theme-option active-true";
|
||||||
}
|
}
|
||||||
|
|
||||||
_renderThemeOptions() {
|
_renderThemeOptions() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue