blob: bb6874c748e1cfc04e4d41dc7e9e0c9d5aa14936 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
---
interface Props {
header: string;
margin?: string;
class?: string;
}
const { header, margin = "-1px", class: htmlClass } = Astro.props;
---
<div class="section" style={`margin: ${margin};`} class={htmlClass}>
<span class="tag">{header}</span>
<slot />
</div>
<style>
.section {
position: relative;
padding: 0.8rem;
padding-top: 0.85rem;
display: flex;
border-style: solid;
border-width: 1px;
border-color: var(--alt);
}
.tag {
position: absolute;
top: -0.6rem;
left: 0.5rem;
background-color: var(--background);
padding-right: 0.5rem;
padding-left: 0.5rem;
font-size: 0.8rem;
color: var(--alt);
}
</style>
|