File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed
Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 2626 < label for ="name " class ="is-float-label bg-white text-gray-700 "> Name</ label >
2727 </ div >
2828 < div class ="has-float-label ">
29- < label for ="Login " class ="is-float-label bg-white text-gray-700 "> Login</ label >
29+ < label for ="Login " class ="is-float-label bg-white text-gray-700 "
30+ > Login (Always visible)</ label
31+ >
3032 < input
3133 type ="text "
3234 id ="Login "
3335 autocomplete ="off "
3436 placeholder ="Login "
3537 class ="control-with-float-label outline-none focus:shadow-outline border w-full px-1 text-base "
36- value ="Login "
38+ value =""
3739 />
3840 </ div >
3941 < div class ="has-float-label ">
Original file line number Diff line number Diff line change 11import { DeepPartial } from 'simplytyped' ;
22
3- const defaultConfig = {
4- control : 'pt-2 pb-1' ,
5- label : {
6- ...toObject ( 'leading-none text-xs px-1' ) ,
7- top : 'calc(-0.125rem * 3)' ,
8- left : '0.25rem' ,
9- } ,
10- } ;
11-
123export type Options = {
134 /**
145 * Custom styles for container.
@@ -27,7 +18,18 @@ export type Options = {
2718module . exports = floatLabelFactory ;
2819
2920export default function floatLabelFactory ( options ?: Options ) {
30- const config : Options = { ...defaultConfig , ...options } ;
21+ const config : Options = Object . assign (
22+ { } ,
23+ {
24+ control : 'py-1' , // after pt-2
25+ label : {
26+ ...toObject ( 'leading-none text-xs px-1' ) ,
27+ top : 'calc(-0.125rem * 3)' ,
28+ left : '0.25rem' ,
29+ } ,
30+ } ,
31+ options ,
32+ ) ;
3133
3234 return ( { addComponents } ) => {
3335 const container = config . container ? toObject ( config . container ) : { } ;
You can’t perform that action at this time.
0 commit comments