35 | Do 36 |
37 |52 | Don't 53 |
54 |8 | Text 9 |
10 |18 | Text 19 |
20 |19 | TestHeading 20 |
21 |- {children}
11 | 14 | 17 | Important: 18 | 19 | School, nursery or work 20 | 21 |
22 |23 | Stay away from school, nursery or work until all the spots have crusted over. This is usually 5 days after the spots first appeared. 24 |
25 |-
18 | List
19 |
39 | Title 40 |
41 |
29 |
30 |
31 | );
32 | }
33 | return
26 |
8 | Text 9 |
10 |8 | Text 9 |
10 |{children}
; 25 | case 'h2': 26 | return{children}
; 27 | case 'h3': 28 | return{children}
; 29 | case 'h4': 30 | return{children}
; 31 | case 'h5': 32 | return{children}
; 33 | case 'h6': 34 | return{children}
; 35 | default: 36 | console.error(`HeadingLevel: Invalid headingLevel prop: ${headingLevel}`); 37 | return{children}
; 38 | } 39 | }; 40 | 41 | export default HeadingLevel; 42 | -------------------------------------------------------------------------------- /src/components/utils/LabelBlock.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC } from 'react'; 2 | import HintText, { HintTextProps } from '../form-elements/hint-text/HintText'; 3 | import Label, { LabelProps } from '../form-elements/label/Label'; 4 | import ErrorMessage, { ErrorMessageProps } from '../form-elements/error-message/ErrorMessage'; 5 | 6 | interface LabelBlockProps { 7 | elementId?: string; 8 | label?: string; 9 | labelProps?: LabelProps; 10 | hint?: string; 11 | hintProps?: HintTextProps; 12 | error?: string | boolean; 13 | errorProps?: ErrorMessageProps; 14 | } 15 | 16 | const LabelBlock: FCHeading
11 |9 | Heading 10 |
11 |Child
47 |- {children}
17 | {lastReviewed ? `Page last reviewed: ${lastReviewed}` : null}
18 | {lastReviewed && nextReview ?
: null}
19 | {nextReview ? `Next review due: ${nextReview}` : null}
20 |
11 | You can report any suspected side effect to the{' '} 12 | 13 | UK safety scheme 14 | 15 | . 16 |
17 |19 | Stay away from school, nursery or work until all the spots have crusted over. This is 20 | usually 5 days after the spots first appeared. 21 |
22 |35 | Stay away from school, nursery or work until all the spots have crusted over. This is 36 | usually 5 days after the spots first appeared. 37 |
38 |49 | Stay away from school, nursery or work until all the spots have crusted over. This is 50 | usually 5 days after the spots first appeared. 51 |
52 |60 | Stay away from school, nursery or work until all the spots have crusted over. This is 61 | usually 5 days after the spots first appeared. 62 |
63 |