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.
		
		
		
		
		
			
		
			
				
					
					
						
							16 lines
						
					
					
						
							491 B
						
					
					
				
			
		
		
	
	
							16 lines
						
					
					
						
							491 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.5vw]', 'lg:text-base');
 | 
						|
          this.field.classList.add('text-[1.0vw]', 'lg:text-[0.70rem]');
 | 
						|
        }
 | 
						|
      }
 | 
						|
      get field() {
 | 
						|
        return this.closest('field-value');
 | 
						|
      }
 | 
						|
    });
 | 
						|
  }
 | 
						|
</script>
 |