File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed
src/components/warning-callout Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,21 @@ const WarningCallout: React.FC<WarningCalloutProps> = ({
1111 children,
1212 labelProps,
1313 ...rest
14- } ) => (
15- < div className = { classNames ( 'nhsuk-warning-callout' , className ) } { ...rest } >
16- { label ? (
17- < h3
18- className = { classNames ( 'nhsuk-warning-callout__label' , labelProps ?. className ) }
19- { ...labelProps }
20- >
21- { label }
22- </ h3 >
23- ) : null }
24- { children }
25- </ div >
26- ) ;
14+ } ) => {
15+ const { labelClassName : className , ...restLabelProps } = labelProps || { } ;
16+ return (
17+ < div className = { classNames ( 'nhsuk-warning-callout' , className ) } { ...rest } >
18+ { label ? (
19+ < h3
20+ className = { classNames ( 'nhsuk-warning-callout__label' , labelClassName ) }
21+ { ...restLabelProps }
22+ >
23+ { label }
24+ </ h3 >
25+ ) : null }
26+ { children }
27+ </ div >
28+ ) ;
29+ }
2730
2831export default WarningCallout ;
You can’t perform that action at this time.
0 commit comments