File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
src/components/warning-callout Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 11import React , { HTMLProps } from 'react' ;
22import classNames from 'classnames' ;
33
4- const WarningCallout : React . FC < HTMLProps < HTMLDivElement > > = ( {
4+ interface WarningCalloutProps extends HTMLProps < HTMLDivElement > {
5+ labelProps : HTMLProps < HTMLHeadingElement > ;
6+ }
7+
8+ const WarningCallout : React . FC < WarningCalloutProps > = ( {
59 className,
610 label,
711 children,
12+ labelProps,
813 ...rest
914} ) => (
1015 < div className = { classNames ( 'nhsuk-warning-callout' , className ) } { ...rest } >
11- { label ? < h3 className = "nhsuk-warning-callout__label" > { label } </ h3 > : null }
16+ { label ? (
17+ < h3
18+ className = { classNames ( 'nhsuk-warning-callout__label' , labelProps . className ) }
19+ { ...labelProps }
20+ >
21+ { label }
22+ </ h3 >
23+ ) : null }
1224 { children }
1325 </ div >
1426) ;
1527
28+ WarningCallout . defaultProps = {
29+ labelProps : { } ,
30+ } ;
31+
1632export default WarningCallout ;
You can’t perform that action at this time.
0 commit comments