fix style

This commit is contained in:
tommy
2025-11-07 14:44:41 +08:00
parent f5629c8a2b
commit 89b2d123fc
2 changed files with 34 additions and 2 deletions

View File

@@ -1134,6 +1134,26 @@
cursor: pointer;
}
.ui-select-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1rem;
height: 1rem;
color: hsl(var(--muted-foreground));
transition: transform 0.2s ease, color 0.2s ease;
}
.ui-select-icon svg {
width: 100%;
height: 100%;
}
.ui-select-trigger[data-open="true"] .ui-select-icon {
transform: rotate(180deg);
color: hsl(var(--foreground));
}
.ui-select-trigger:focus-visible,
.ui-dropdown-trigger:focus-visible {
outline: none;

View File

@@ -65,8 +65,20 @@ pub fn Select(
},
span { "{display_text}" }
span {
style: "font-size: 0.8rem; opacity: 0.7;",
if open() { "" } else { "" }
class: "ui-select-icon",
"aria-hidden": "true",
svg {
view_box: "0 0 16 16",
xmlns: "http://www.w3.org/2000/svg",
path {
d: "M4 6l4 4 4-4",
fill: "none",
stroke: "currentColor",
"stroke-width": "1.5",
"stroke-linecap": "round",
"stroke-linejoin": "round",
}
}
}
}
if open() {