File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
libs/flowbite-angular/form/src Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import { injectFlowbiteHelperConfig } from '../config/helper-config' ;
22import { injectFlowbiteFormFieldState } from '../form-field/form-field-state' ;
3+ import type { FlowbiteFormFieldColors } from '../form-field/theme' ;
34import { flowbiteHelperState , provideFlowbiteHelperState } from './helper-state' ;
45
56import { colorToTheme , mergeDeep } from 'flowbite-angular' ;
@@ -31,7 +32,7 @@ export class Helper {
3132 /**
3233 * @see {@link injectFlowbiteHelperConfig }
3334 */
34- readonly color = input ( this . formFieldState ( ) . color ( ) ) ;
35+ readonly color = input < keyof FlowbiteFormFieldColors > ( ) ;
3536
3637 /**
3738 * @see {@link injectFlowbiteHelperConfig }
@@ -46,7 +47,7 @@ export class Helper {
4647 root : twMerge (
4748 mergedTheme . host . base ,
4849 mergedTheme . host . transition ,
49- colorToTheme ( mergedTheme . host . color , this . state . color ( ) )
50+ colorToTheme ( mergedTheme . host . color , this . state . color ( ) ?? this . formFieldState ( ) . color ( ) )
5051 ) ,
5152 } ,
5253 } ;
Original file line number Diff line number Diff line change 11import { injectFlowbiteLabelConfig } from '../config/label-config' ;
22import { injectFlowbiteFormFieldState } from '../form-field/form-field-state' ;
3+ import type { FlowbiteFormFieldColors } from '../form-field/theme' ;
34import { flowbiteLabelState , provideFlowbiteLabelState } from './label-state' ;
45
56import { colorToTheme , mergeDeep } from 'flowbite-angular' ;
@@ -31,7 +32,7 @@ export class Label {
3132 /**
3233 * @see {@link injectFlowbiteLabelConfig }
3334 */
34- readonly color = input ( this . formFieldState ( ) . color ( ) ) ;
35+ readonly color = input < keyof FlowbiteFormFieldColors > ( ) ;
3536
3637 /**
3738 * @see {@link injectFlowbiteLabelConfig }
@@ -46,7 +47,7 @@ export class Label {
4647 root : twMerge (
4748 mergedTheme . host . base ,
4849 mergedTheme . host . transition ,
49- colorToTheme ( mergedTheme . host . color , this . state . color ( ) ) ,
50+ colorToTheme ( mergedTheme . host . color , this . state . color ( ) ?? this . formFieldState ( ) . color ( ) ) ,
5051 mergedTheme . host . mode [ this . formFieldState ( ) . mode ( ) ]
5152 ) ,
5253 } ,
You can’t perform that action at this time.
0 commit comments