Skip to content

Commit 3449507

Browse files
committed
feat: add orbiting circle component
1 parent 0a75e7c commit 3449507

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

docs/src/example/orbitingCircles/OrbitingCircles.vue

+8-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<OrbitingCirclesProps>(), {
2020
const className = cn(
2121
'absolute flex size-full animate-reverse transform-gpu animate-orbit items-center justify-center rounded-full border bg-none [animation-delay:calc(var(--delay)*1000ms)]',
2222
props.className,
23-
// { 'animate-reverse': props.reverse },
23+
{ 'animate-orbit-reverse': props.reverse },
2424
)
2525
</script>
2626

@@ -36,7 +36,8 @@ const className = cn(
3636
'--duration': props.duration,
3737
'--radius': props.radius,
3838
'--delay': -props.delay,
39-
}" :class="className"
39+
}"
40+
:class="className"
4041
>
4142
<slot />
4243
</div>
@@ -56,16 +57,16 @@ const className = cn(
5657
animation: Orbit calc(var(--duration) * 1s) linear infinite;
5758
}
5859
59-
@keyframes Reverse {
60+
@keyframes OrbitReverse {
6061
0% {
61-
opacity: 1;
62+
transform: rotate(0deg) translateY(calc(var(--radius) * 1px)) rotate(0deg);
6263
}
6364
100% {
64-
opacity: 1;
65+
transform: rotate(-360deg) translateY(calc(var(--radius) * 1px)) rotate(360deg);
6566
}
6667
}
6768
68-
.animate-reverse {
69-
animation: Reverse var(--duration, 2s) ease-in-out reverse infinite;
69+
.animate-orbit-reverse {
70+
animation: OrbitReverse calc(var(--duration) * 1s) linear infinite;
7071
}
7172
</style>

docs/uno.config.ts

+1-14
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,7 @@ export default defineConfig({
4747
},
4848
],
4949
theme: {
50-
animation: {
51-
keyframes: {
52-
wiggle: '{0%,100% {transform:rotate(-3deg)} 50% {transform:rotate(30deg)}}',
53-
},
54-
durations: {
55-
wiggle: '1s',
56-
},
57-
timingFns: {
58-
wiggle: 'ease-in-out',
59-
},
60-
counts: {
61-
wiggle: 'infinite',
62-
},
63-
},
50+
animation: {},
6451

6552
},
6653
})

0 commit comments

Comments
 (0)