11---
22import type { HTMLAttributes } from ' astro/types' ;
3+ import type { NotesTypeType } from ' @src/utils/types' ;
34
45interface Props extends HTMLAttributes <' div' > {
5- type? : ' info ' | ' warning ' | ' important ' | ' tip ' ;
6+ type? : NotesTypeType ;
67}
78
89const { type = ' info' , class : className, ... rest } = Astro .props ;
@@ -16,6 +17,7 @@ const { type = 'info', class: className, ...rest } = Astro.props;
1617 ' note-warning' : type === ' warning' ,
1718 ' note-important' : type === ' important' ,
1819 ' note-tip' : type === ' tip' ,
20+ ' note-needs_checking' : type === ' needs_checking' ,
1921 },
2022 className
2123 ]}
@@ -61,6 +63,16 @@ const { type = 'info', class: className, ...rest } = Astro.props;
6163 </span >
6264 )}
6365
66+ { type === ' needs_checking' && (
67+ <span style = " font-size: 1.2rem;" ><strong >This article needs checking:</strong ></span >
68+ <span class = " note-icon" aria-label = " Important" >
69+ <svg width = " 28" height = " 28" viewBox = " 0 0 20 20" fill = " none" aria-hidden = " true" >
70+ <circle cx = " 10" cy = " 10" r = " 10" fill = " #008dd4" />
71+ <text x = " 10" y = " 15" text-anchor = " middle" font-size = " 14" fill = " #fff" font-family = " Arial" font-weight = " bold" >!</text >
72+ </svg >
73+ </span >
74+ )}
75+
6476 <slot />
6577</div >
6678
@@ -78,7 +90,8 @@ const { type = 'info', class: className, ...rest } = Astro.props;
7890.custom-note-box.note-info,
7991.custom-note-box.note-warning,
8092.custom-note-box.note-important,
81- .custom-note-box.note-tip {
93+ .custom-note-box.note-tip,
94+ .custom-note-box.note-needs_checking {
8295 padding-left: 3.5rem;
8396 padding-right: 1.25rem;
8497}
@@ -99,6 +112,10 @@ const { type = 'info', class: className, ...rest } = Astro.props;
99112 border-left-color: #4caf50;
100113}
101114
115+ .custom-note-box.note-needs_checking {
116+ border-left-color: #008dd4;
117+ }
118+
102119.note-icon {
103120 position: absolute;
104121 top: 50%;
0 commit comments