mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-10-30 23:37:28 +03:00 
			
		
		
		
	feat: enable menuToggle by default
This commit is contained in:
		
							parent
							
								
									4bb59d5d4d
								
							
						
					
					
						commit
						5d81abeb28
					
				|  | @ -36,12 +36,12 @@ export interface RedocRawOptions { | ||||||
|   expandDefaultServerVariables?: boolean; |   expandDefaultServerVariables?: boolean; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function argValueToBoolean(val?: string | boolean): boolean { | function argValueToBoolean(val?: string | boolean, defaultValue?: boolean): boolean { | ||||||
|   if (val === undefined) { |   if (val === undefined) { | ||||||
|     return false; |     return defaultValue || false; | ||||||
|   } |   } | ||||||
|   if (typeof val === 'string') { |   if (typeof val === 'string') { | ||||||
|     return true; |     return val === 'false' ? false : true; | ||||||
|   } |   } | ||||||
|   return val; |   return val; | ||||||
| } | } | ||||||
|  | @ -177,7 +177,7 @@ export class RedocNormalizedOptions { | ||||||
|     this.onlyRequiredInSamples = argValueToBoolean(raw.onlyRequiredInSamples); |     this.onlyRequiredInSamples = argValueToBoolean(raw.onlyRequiredInSamples); | ||||||
|     this.showExtensions = RedocNormalizedOptions.normalizeShowExtensions(raw.showExtensions); |     this.showExtensions = RedocNormalizedOptions.normalizeShowExtensions(raw.showExtensions); | ||||||
|     this.hideSingleRequestSampleTab = argValueToBoolean(raw.hideSingleRequestSampleTab); |     this.hideSingleRequestSampleTab = argValueToBoolean(raw.hideSingleRequestSampleTab); | ||||||
|     this.menuToggle = argValueToBoolean(raw.menuToggle); |     this.menuToggle = argValueToBoolean(raw.menuToggle, true); | ||||||
|     this.jsonSampleExpandLevel = RedocNormalizedOptions.normalizeJsonSampleExpandLevel( |     this.jsonSampleExpandLevel = RedocNormalizedOptions.normalizeJsonSampleExpandLevel( | ||||||
|       raw.jsonSampleExpandLevel, |       raw.jsonSampleExpandLevel, | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user