File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ import DocLink from " ./DocLink.astro" ;
3+
4+ interface Props {
5+ name: string ;
6+ bold? : boolean ;
7+ displayName? : string ;
8+ nolink? : boolean ;
9+ }
10+
11+ const { name, bold, displayName, nolink } = Astro .props ;
12+ const src = ` /cpp/named_req/${name } ` ;
13+
14+ const text = displayName ?? name ;
15+
16+ const As = nolink ? Fragment : DocLink ;
17+ const asProps = nolink ? {} : { src };
18+ ---
19+
20+ <As {... asProps }>
21+ <span class =`named-req${bold ? " -bold" : " " }` >
22+ { text }
23+ </span >
24+ </As >
25+
26+ <style >
27+ .named-req {
28+ font-weight: normal;
29+ font-style: italic;
30+ font-family: Georgia, "DejaVu Serif", serif;
31+ }
32+ .named-req-bold {
33+ font-weight: bold;
34+ font-style: italic;
35+ font-family: Georgia, "DejaVu Serif", serif;
36+ }
37+ </style >
You can’t perform that action at this time.
0 commit comments