@@ -14,7 +14,7 @@ export interface DFormContextData {
1414 formBreakpointMatchs : DBreakpoints [ ] ;
1515 formLabelWidth : number | string ;
1616 formLabelColon : boolean ;
17- formCustomLabel : NonNullable < DFormProps [ 'dCustomLabel ' ] > ;
17+ formRequiredType : NonNullable < DFormProps [ 'dRequiredType ' ] > ;
1818 formLayout : NonNullable < DFormProps [ 'dLayout' ] > ;
1919 formInlineSpan : number | true ;
2020 formFeedbackIcon : NonNullable < DFormProps [ 'dFeedbackIcon' ] > ;
@@ -25,7 +25,7 @@ export interface DFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
2525 dForm : DFormInstance ;
2626 dLabelWidth ?: number | string ;
2727 dLabelColon ?: boolean ;
28- dCustomLabel ?: 'required' | 'optional' | 'hidden' ;
28+ dRequiredType ?: 'required' | 'optional' | 'hidden' ;
2929 dLayout ?: 'horizontal' | 'vertical' | 'inline' ;
3030 dInlineSpan ?: number | true ;
3131 dFeedbackIcon ?:
@@ -37,7 +37,7 @@ export interface DFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
3737 pending ?: React . ReactNode ;
3838 } ;
3939 dSize ?: 'smaller' | 'larger' ;
40- dResponsiveProps ?: Record < DBreakpoints , Pick < DFormProps , 'dLabelWidth' | 'dCustomLabel ' | 'dLayout' | 'dInlineSpan' > > ;
40+ dResponsiveProps ?: Record < DBreakpoints , Pick < DFormProps , 'dLabelWidth' | 'dRequiredType ' | 'dLayout' | 'dInlineSpan' > > ;
4141}
4242
4343const { COMPONENT_NAME } = generateComponentMate ( 'DForm' ) ;
@@ -46,7 +46,7 @@ export function DForm(props: DFormProps) {
4646 dForm,
4747 dLabelWidth,
4848 dLabelColon,
49- dCustomLabel = 'required' ,
49+ dRequiredType = 'required' ,
5050 dLayout = 'horizontal' ,
5151 dInlineSpan = 6 ,
5252 dFeedbackIcon = false ,
@@ -89,7 +89,7 @@ export function DForm(props: DFormProps) {
8989 formBreakpointMatchs : mediaMatch ,
9090 formLabelWidth : dLabelWidth ?? 150 ,
9191 formLabelColon : dLabelColon ?? true ,
92- formCustomLabel : dCustomLabel ,
92+ formRequiredType : dRequiredType ,
9393 formLayout : dLayout ,
9494 formInlineSpan : dInlineSpan ,
9595 formFeedbackIcon : dFeedbackIcon ,
@@ -104,7 +104,7 @@ export function DForm(props: DFormProps) {
104104 for ( const breakpoint of mediaMatch ) {
105105 if ( breakpoint in dResponsiveProps ) {
106106 mergeProps ( breakpoint , 'formLabelWidth' , 'dLabelWidth' ) ;
107- mergeProps ( breakpoint , 'formCustomLabel ' , 'dCustomLabel ' ) ;
107+ mergeProps ( breakpoint , 'formRequiredType ' , 'dRequiredType ' ) ;
108108 mergeProps ( breakpoint , 'formLayout' , 'dLayout' ) ;
109109 mergeProps ( breakpoint , 'formInlineSpan' , 'dInlineSpan' ) ;
110110 break ;
@@ -115,7 +115,7 @@ export function DForm(props: DFormProps) {
115115 contextValue . formLabelColon = dLabelColon ?? ( contextValue . formLayout === 'vertical' ? false : true ) ;
116116
117117 return contextValue ;
118- } , [ dCustomLabel , dFeedbackIcon , dForm , dInlineSpan , dLabelColon , dLabelWidth , dLayout , dResponsiveProps , mediaMatch ] ) ;
118+ } , [ dRequiredType , dFeedbackIcon , dForm , dInlineSpan , dLabelColon , dLabelWidth , dLayout , dResponsiveProps , mediaMatch ] ) ;
119119
120120 return (
121121 < DGeneralStateContext . Provider value = { generalStateContextValue } >
0 commit comments