Skip to content

Commit 5ff66ad

Browse files
committed
refactor(CFormLabel): improve and clean-up syntax
1 parent b44ba7e commit 5ff66ad

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/coreui-react/src/components/form/CFormLabel.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export interface CFormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
1616
export const CFormLabel = forwardRef<HTMLLabelElement, CFormLabelProps>(
1717
({ children, className, customClassName, ...rest }, ref) => {
1818
return (
19-
<label
20-
className={customClassName ? customClassName : classNames('form-label', className)}
21-
{...rest}
22-
ref={ref}
23-
>
19+
<label className={customClassName ?? classNames('form-label', className)} {...rest} ref={ref}>
2420
{children}
2521
</label>
2622
)

0 commit comments

Comments
 (0)