File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export const Checkbox: FC<CheckboxProps> = (props) => {
3232 cols,
3333 elementRef,
3434 inputRef,
35+ children,
3536 ...rprops
3637 } = props ;
3738 const { grouped } = useContext ( CheckboxGroupContext ) ;
@@ -41,7 +42,7 @@ export const Checkbox: FC<CheckboxProps> = (props) => {
4142 < label className = { checkClassNames } >
4243 < input ref = { inputRef } type = 'checkbox' { ...rprops } />
4344 < span className = 'slds-checkbox_faux' />
44- < span className = 'slds-form-element__label' > { label } </ span >
45+ < span className = 'slds-form-element__label' > { label || children } </ span >
4546 </ label >
4647 ) ;
4748 return grouped ? (
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export const Radio: FC<RadioProps> = ({
2323 value,
2424 inputRef,
2525 onChange : onChange_ ,
26+ children,
2627 ...props
2728} ) => {
2829 const { name : grpName , onValueChange } = useContext ( RadioGroupContext ) ;
@@ -46,7 +47,7 @@ export const Radio: FC<RadioProps> = ({
4647 { ...props }
4748 />
4849 < span className = 'slds-radio_faux' />
49- < span className = 'slds-form-element__label' > { label } </ span >
50+ < span className = 'slds-form-element__label' > { label || children } </ span >
5051 </ label >
5152 ) ;
5253} ;
You can’t perform that action at this time.
0 commit comments