Skip to content

Commit 044419c

Browse files
committed
feat: add smooth chevron rotation animation
- Replace inline styles with Tailwind CSS classes for better maintainability - Add smooth 200ms transition when expanding/collapsing - Chevron rotates from right (→) to up (↑) matching the content position above - Consistent with other components like ApiConfigSelector
1 parent 156cbe7 commit 044419c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,9 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
234234
{displayText}
235235
</span>
236236
<span
237-
className={`codicon codicon-chevron-${isExpanded ? "up" : "right"}`}
238-
style={{
239-
flexShrink: 0,
240-
marginLeft: isExpanded ? "2px" : "-2px",
241-
}}
237+
className={`codicon codicon-chevron-right flex-shrink-0 transition-transform duration-200 ease-in-out ${
238+
isExpanded ? "-rotate-90 ml-[2px]" : "rotate-0 -ml-[2px]"
239+
}`}
242240
/>
243241
</div>
244242
</div>

0 commit comments

Comments
 (0)