@@ -7,12 +7,15 @@ export interface CFormLabelProps extends HTMLAttributes<HTMLLabelElement> {
7
7
* A string of all className you want applied to the component. [docs]
8
8
*/
9
9
className ?: string
10
- classNameParent ?: string
10
+ /**
11
+ * A string of all className you want to be applied to the component, and override standard className value. [docs]
12
+ */
13
+ customClassName ?: string
11
14
}
12
15
13
16
export const CFormLabel = forwardRef < HTMLLabelElement , CFormLabelProps > (
14
- ( { children, className, classNameParent , ...rest } , ref ) => {
15
- const _className = classNameParent ? classNameParent : classNames ( 'form-label' , className )
17
+ ( { children, className, customClassName , ...rest } , ref ) => {
18
+ const _className = customClassName ? customClassName : classNames ( 'form-label' , className )
16
19
return (
17
20
< label className = { _className } { ...rest } ref = { ref } >
18
21
{ children }
@@ -24,7 +27,7 @@ export const CFormLabel = forwardRef<HTMLLabelElement, CFormLabelProps>(
24
27
CFormLabel . propTypes = {
25
28
children : PropTypes . node ,
26
29
className : PropTypes . string ,
27
- classNameParent : PropTypes . string ,
30
+ customClassName : PropTypes . string ,
28
31
}
29
32
30
33
CFormLabel . displayName = 'CFormLabel'
0 commit comments