Skip to content

Instantly share code, notes, and snippets.

View GoodNew5's full-sized avatar
🏠
Working from home

GoodNew5 GoodNew5

🏠
Working from home
View GitHub Profile
@GoodNew5
GoodNew5 / Switch.vue
Created April 13, 2023 22:57
switch template
<script lang="ts" setup>
export interface Props {
disabled?: boolean
checked: boolean
}
defineProps<Props>()
const emit = defineEmits(['update:checked'])
const onInput = (event: Event) => {
@GoodNew5
GoodNew5 / Switch.scss
Created April 13, 2023 22:56
switch scss
.switch {
--track-size: calc(var(--thumb-size) * 2);
--track-padding: .2rem;
--track-inactive: hsl(80 0% 80%);
--track-active: hsl(80 60% 45%);
--track-color-inactive: var(--track-inactive);
--track-color-active: var(--track-active);
<template>
<swiper
class="profile-modal-tabs__slider"
:options="sliderOptions"
>
<div class="swiper-slide">
1
</div>
<div class="swiper-slide">
2
.circle {
--progress-width: 4px;
--progress-color: var(--ROUGE_SARDE);
--expires-color: var(--BLUE_PLAZA);
position: relative;
border-radius: 50%;
border: solid var(--progress-width) #aaa;
@include lg {
<template>
<div
class="circle"
:style="`--progress-value: ${percent};`"
>
<div class="circle__progress" />
</div>
</template>
<script>
.day-month-dropdown {
@include lg {
position: relative;
width: rem(100px);
}
}
.day-month-dropdown__list {
@include lg {
position: absolute;
<template>
<div
v-click-outside="clickOutside"
:class="[
'day-month-dropdown', {
'day-month-dropdown--opened': isOpened
}]"
>
<btn
ref="dropdownBtnRef"
<div v-bar="{
preventParentScroll: true,
}">
<div>
</div>
</div>
...mapActions('modal', { openModal: 'open' })
this.openModal({
name: 'activate-account-form',
props: {},
component: () => import(/* webpackChunkName: "auth" */ '@/components/activate-account-form')
})
.opacity-enter-active,
.opacity-leave-active {
transition: all .4s;
}
.opacity-enter-to,
.opacity-leave {
opacity: 1;
}