feat: add theming support
This commit is contained in:
@@ -1,21 +1,34 @@
|
||||
<script lang="ts">
|
||||
export let title = "Details";
|
||||
export let transparent = false;
|
||||
</script>
|
||||
|
||||
<details>
|
||||
<details class:transparent>
|
||||
<summary>{title}</summary>
|
||||
|
||||
<slot />
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<style>
|
||||
details {
|
||||
padding: 1em;
|
||||
color: white;
|
||||
color: var(--text-color);
|
||||
padding-left: 20px;
|
||||
background-color: #202020;
|
||||
outline: solid 0.1px white;
|
||||
border-radius: 2px;
|
||||
font-weight: 300;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
details.transparent {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-left: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user