mirror of
				https://github.com/Foundry376/Mailspring.git
				synced 2025-10-31 16:42:26 +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}> | ||||
|         <EventedIFrame | ||||
|           ref="iframe" | ||||
|           className={`theme-preview-${this.props.theme.name}`} | ||||
|           className={`theme-preview-${this.props.theme.name.replace(/\./g, '-')}`} | ||||
|           frameBorder="0" | ||||
|           width="115px" | ||||
|           height="70px" | ||||
|  |  | |||
|  | @ -38,12 +38,12 @@ class ThemePicker extends React.Component { | |||
|   } | ||||
| 
 | ||||
|   _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"); | ||||
|     prevActiveElement.className = "theme-option active-false"; | ||||
|     const activeThemeDoc = document.querySelector(`.theme-preview-${activeTheme}`).contentDocument; | ||||
|     if (prevActiveElement) prevActiveElement.className = "theme-option active-false"; | ||||
|     const activeThemeDoc = document.querySelector(`.theme-preview-${activeTheme.replace(/\./g, '-')}`).contentDocument; | ||||
|     const activeElement = activeThemeDoc.querySelector(".theme-option.active-false"); | ||||
|     activeElement.className = "theme-option active-true"; | ||||
|     if (activeElement) activeElement.className = "theme-option active-true"; | ||||
|   } | ||||
| 
 | ||||
|   _renderThemeOptions() { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue