refactor(client): use css module

This commit is contained in:
syuilo 2023-03-05 20:28:39 +09:00
parent f8ab34734c
commit 4480fa1efe

View file

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