Skip to content

Commit fc2d971

Browse files
committed
tweak(ui): pulse stop icon while streaming
1 parent b5ae24f commit fc2d971

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/ui/src/components/icon-button.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,24 @@
144144
}
145145
}
146146

147+
@media (prefers-reduced-motion: no-preference) {
148+
[data-component="icon-button"][data-icon="stop"] [data-slot="icon-svg"] rect {
149+
transform-origin: center;
150+
transform-box: fill-box;
151+
animation: stop-pulse 1.8s ease-in-out infinite;
152+
}
153+
}
154+
155+
@keyframes stop-pulse {
156+
0%,
157+
100% {
158+
transform: scale(0.95);
159+
}
160+
50% {
161+
transform: scale(1.12);
162+
}
163+
}
164+
147165
[data-component="icon-button"].titlebar-icon {
148166
width: 32px;
149167
height: 24px;

packages/ui/src/components/icon-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export function IconButton(props: ComponentProps<"button"> & IconButtonProps) {
1515
<Kobalte
1616
{...rest}
1717
data-component="icon-button"
18+
data-icon={props.icon}
1819
data-size={split.size || "normal"}
1920
data-variant={split.variant || "secondary"}
2021
classList={{

0 commit comments

Comments
 (0)