mirror of https://github.com/docusealco/docuseal
				
				
				
			
							parent
							
								
									712107ba5a
								
							
						
					
					
						commit
						ce4e55f387
					
				| @ -0,0 +1,15 @@ | ||||
| <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.5vw]', 'lg:text-base'); | ||||
|           this.field.classList.add('text-[1.0vw]', 'lg:text-[0.70rem]'); | ||||
|         } | ||||
|       } | ||||
|       get field() { | ||||
|         return this.closest('field-value'); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| </script> | ||||
					Loading…
					
					
				
		Reference in new issue