File tree Expand file tree Collapse file tree 3 files changed +42
-6
lines changed Expand file tree Collapse file tree 3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change 77	export  let  description =  ' '  
88	export  let  containerStyle =  ' '  
99	export  let  placeholder =  ' '  
10+ 	export  let  disabled =  false ; 
1011	type  Options  =  
1112		|  { 
1213				label:  string ; 
2526	<label  for ={id }>{label }</label >
2627{/if }
2728{#if  description }
28- 	<div  class =" fg:white/.6" Description of input </div >
29+ 	<div  class ="fg:white/.6" >{ description } </div >
2930{/if }
3031<div  class ={`  bg:rgb(8,19,33) flex align-items:center mt:10 mb:30  `  +  '  ' +  containerStyle }>
3132	<select  {id } class ={className  +  '  ' +  mcss } {name } bind:value  on:change  {placeholder }>
3233		{#if  options }
3334			{#each  options  as  option }
34- 				<option  value ={option .value }>{option .label }</option >
35+ 				<option  value ={option .value } { disabled } >{option .label }</option >
3536			{/each }
3637		{:else }
3738			<slot  name =" options" 
Original file line number Diff line number Diff line change 11<script  lang =" ts" 
22	import  randomString  from  ' $lib/utils/randomString'  
3+ 	import  { slide  } from  ' svelte/transition'  
34	export  let  value =  ' '  
45	export  let  name =  ' '  
56	export  { className  as  class  }; 
67	export  let  label =  ' '  
78	export  let  description =  ' '  
89	export  let  placeholder =  ' '  
9- 	let  className =  
10- 		' w:full h:full p:16 outline:4|solid|rgb(8,19,33) outline:4|solid|orange:focus ~outline|0.5s r:7 '  
10+ 	export  let  error =  ' '  
11+ 	export  let  type =  ' text'  
12+ 	let  className =  ` w:full h:full p:16 outline:4|solid|rgb(8,19,33) outline:4|solid|orange:focus ~outline|0.5s r:7 ` ; 
1113
1214	const =  randomString (7 ); 
1315script >
1820{#if  description }
1921	<div  class ="fg:white/.6" >{description }</div >
2022{/if }
21- <div  class =" bg:rgb(8,19,33) mt:10 mb:30" 
22- 	<input  {id } class ={className } type ="text"  {name } bind:value  {placeholder } />
23+ <div  class =" mb:30" 
24+ 	<div 
25+ 		class ={` bg:rgb(8,19,33) mt:10  ${ 
26+ 			error  ?  ' bg:red-20 outline:4|solid|red>input mb:10' :  ' mb:30'  
27+ 		} ` }
28+ 	>
29+ 		{#if  type  ===  ' email' 
30+ 			<input 
31+ 				{id }
32+ 				class ={className }
33+ 				type =" email" 
34+ 				{name }
35+ 				bind:value 
36+ 				{placeholder }
37+ 				on:change ={() =>  (error  =  ' ' 
38+ 			/>
39+ 		{:else }
40+ 			<input 
41+ 				{id }
42+ 				class ={className }
43+ 				type =" text" 
44+ 				{name }
45+ 				bind:value 
46+ 				{placeholder }
47+ 				on:change ={() =>  (error  =  ' ' 
48+ 			/>
49+ 		{/if }
50+ 	</div >
51+ 	{#if  error }
52+ 		<div  class ="fg:red"  transition:slide ={{ delay : 50 , duration : 150 , axis : ' y' 
53+ 			{error }
54+ 		</div >
55+ 	{/if }
2356</div >
Original file line number Diff line number Diff line change 77	export  let  maxlength =  5000 ; 
88	export  let  label =  ' '  
99	export  let  description =  ' '  
10+ 	export  let  placeholder =  ' '  
1011	export  { className  as  class  }; 
1112
1213	const =  randomString (7 ); 
3940		bind:this ={textarea }
4041		bind:value 
4142		on:input ={textareaResize }
43+ 		{placeholder }
4244	/>
4345	{#if  value .length  >  0 }
4446		<div 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments