Skip to content

Commit 166b442

Browse files
committed
perf: optimization IxCyberpunkGlitch component
1 parent 677c4f4 commit 166b442

File tree

1 file changed

+13
-11
lines changed
  • packages/components/src/components/CyberpunkGlitch/src

1 file changed

+13
-11
lines changed

packages/components/src/components/CyberpunkGlitch/src/index.vue

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
1313
.text {
1414
15-
&>.text-before,
16-
&>.text-after {
15+
&>.text-glitch,
16+
&>.text-glitch-blur {
1717
--uno: pa top-0 right-0 bottom-0 left-0;
1818
text-shadow: var(--slice-shadow-1);
1919
clip-path: var(--slice-0);
2020
}
2121
22-
&>.text-after {
22+
&>.text-glitch-blur {
2323
--uno: blur-2;
2424
}
2525
2626
&.animate-glitch {
2727
28-
&>.text-before,
29-
&>.text-after {
28+
&>.text-glitch,
29+
&>.text-glitch-blur {
3030
animation: glitch .3s infinite steps(1, end);
3131
}
3232
}
@@ -69,17 +69,19 @@
6969
</style>
7070

7171
<template>
72-
<div class="text-container" pr text-8>
72+
<div class="text-container" pr>
7373
<div
7474
pr class="text"
7575
:class="isPlaying ? 'animate-glitch animate-flash animate-duration-300 animate-count-infinite' : ''"
7676
>
77-
<slot :class="props.contentClass" />
78-
<div class="text-before" :class="props.contentClass">
79-
<slot />
77+
<div :class="props.contentClass">
78+
<slot :is-playing />
8079
</div>
81-
<div class="text-after" :class="props.contentClass">
82-
<slot />
80+
<div class="text-glitch" :class="props.contentClass">
81+
<slot :is-playing />
82+
</div>
83+
<div class="text-glitch-blur" :class="props.contentClass">
84+
<slot :is-playing />
8385
</div>
8486
</div>
8587
<slot name="background" :is-playing />

0 commit comments

Comments
 (0)