Skip to content

Commit

Permalink
つまみにチェックマークを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
takusea committed Oct 6, 2024
1 parent 3ae63fa commit 32d15f0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/Base/BaseSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<div class="root">
<div class="label">{{ checked ? checkedLabel : uncheckedLabel }}</div>
<SwitchRoot :id v-model:checked="checked" :disabled class="SwitchRoot">
<SwitchThumb class="SwitchThumb" />
<SwitchThumb class="SwitchThumb">
<QIcon class="check" name="check" />
</SwitchThumb>
</SwitchRoot>
</div>
</template>
Expand Down Expand Up @@ -52,18 +54,23 @@ const checked = defineModel<boolean>("checked", { required: true });
}
.SwitchThumb {
display: block;
display: grid;
place-items: center;
color: transparent;
width: 20px;
height: 20px;
background-color: white;
border-radius: 50%;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
transition: transform vars.$transition-duration;
transition:
transform vars.$transition-duration,
color vars.$transition-duration;
will-change: transform;
}
.SwitchThumb[data-state="checked"] {
transform: translateX(16px);
color: colors.$primary;
}
.label {
Expand Down

0 comments on commit 32d15f0

Please sign in to comment.