refactor(client): use css module

This commit is contained in:
syuilo 2023-03-05 20:28:39 +09:00
parent f8ab34734c
commit 4480fa1efe
1 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="vrtktovh" :class="{ first }">
<div class="label"><slot name="label"></slot></div>
<div class="main">
<div :class="[$style.root, { [$style.rootFirst]: first }]">
<div :class="[$style.label, { [$style.labelFirst]: first }]"><slot name="label"></slot></div>
<div :class="$style.main">
<slot></slot>
</div>
</div>
@ -13,12 +13,17 @@ defineProps<{
}>();
</script>
<style lang="scss" scoped>
.vrtktovh {
<style lang="scss" module>
.root {
border-top: solid 0.5px var(--divider);
//border-bottom: solid 0.5px var(--divider);
}
> .label {
.rootFirst {
border-top: none;
}
.label {
font-weight: bold;
padding: 1.5em 0 0 0;
margin: 0 0 16px 0;
@ -28,16 +33,11 @@ defineProps<{
}
}
> .main {
margin: 1.5em 0 0 0;
}
&.first {
border-top: none;
> .label {
.labelFirst {
padding-top: 0;
}
}
.main {
margin: 1.5em 0 0 0;
}
</style>