mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							20 lines
						
					
					
						
							646 B
						
					
					
				
			
		
		
	
	
							20 lines
						
					
					
						
							646 B
						
					
					
				| <script>
 | |
|   if (!window.customElements.get('autosize-field')) {
 | |
|     window.customElements.define('autosize-field', class extends HTMLElement {
 | |
|       connectedCallback() {
 | |
|         if (this.field.scrollHeight > this.field.clientHeight) {
 | |
|           this.field.classList.remove('text-[1.6vw]', 'lg:text-base');
 | |
|           this.field.classList.add('text-[1.0vw]', 'lg:text-[0.70rem]');
 | |
| 
 | |
|           if (this.field.scrollHeight > this.field.clientHeight) {
 | |
|             this.field.classList.add('text-[0.8vw]', 'lg:text-[0.50rem]');
 | |
|           }
 | |
|         }
 | |
|       }
 | |
|       get field() {
 | |
|         return this.closest('field-value');
 | |
|       }
 | |
|     });
 | |
|   }
 | |
| </script>
 |