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,31 +13,31 @@ 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 {
font-weight: bold; border-top: none;
padding: 1.5em 0 0 0; }
margin: 0 0 16px 0;
&:empty { .label {
display: none; font-weight: bold;
} padding: 1.5em 0 0 0;
} margin: 0 0 16px 0;
> .main { &:empty {
margin: 1.5em 0 0 0; display: none;
}
&.first {
border-top: none;
> .label {
padding-top: 0;
}
} }
} }
.labelFirst {
padding-top: 0;
}
.main {
margin: 1.5em 0 0 0;
}
</style> </style>