Skip to content

Commit 2855dd4

Browse files
committed
feat(api): Add api type label to detail page
1 parent 181ed67 commit 2855dd4

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed
+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<h1>{$ doc.name $}</h1>
2-
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
1+
<header class="api-header">
2+
<h1>{$ doc.name $}</h1>
3+
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
4+
</header>
35
{% block body %}{% endblock %}
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@import '../../../scss/variables.scss';
2+
3+
.api-header {
4+
display: flex;
5+
align-items: center;
6+
h1 {
7+
// Some spacing to the label
8+
margin-right: 20px;
9+
}
10+
}
11+
12+
.api-type-label {
13+
border-radius: 2px;
14+
color: $white-color;
15+
display: inline-block;
16+
font-size: 12px;
17+
font-weight: 600;
18+
line-height: 16px;
19+
text-align: center;
20+
text-transform: uppercase;
21+
padding: 2px 10px;
22+
@each $name, $symbol in $api-symbols {
23+
&.#{$name} {
24+
background: map-get($symbol, background);
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)