fix(docs): restore related showcases and correct CSS customization examples
This commit is contained in:
@@ -132,11 +132,12 @@ Vue 使用 `asChild` 合并根容器属性,默认插槽必须只有一个自
|
||||
```css
|
||||
@layer components {
|
||||
.hv-switch {
|
||||
@apply inline-flex items-center gap-3;
|
||||
--switch-control-bg: var(--default);
|
||||
--switch-control-bg-checked: var(--accent);
|
||||
}
|
||||
|
||||
.hv-switch__control {
|
||||
@apply h-5 w-8 bg-gray-400 data-[selected=true]:bg-blue-500;
|
||||
@apply h-5 w-8;
|
||||
}
|
||||
|
||||
.hv-switch__thumb {
|
||||
@@ -144,7 +145,7 @@ Vue 使用 `asChild` 合并根容器属性,默认插槽必须只有一个自
|
||||
}
|
||||
|
||||
.hv-switch__content {
|
||||
@apply flex flex-col gap-1;
|
||||
@apply inline-flex items-center gap-3;
|
||||
}
|
||||
|
||||
.hv-switch__icon {
|
||||
@@ -164,7 +165,7 @@ HeroUI 遵循 [BEM](https://getbem.com/) 方法论,确保组件变体与状态
|
||||
Switch 组件使用以下 CSS 类([查看源码样式](https://github.com/heroui-inc/heroui/blob/v3/packages/styles/components/switch.css)):
|
||||
|
||||
- `.hv-switch` - Switch 根容器(字段)
|
||||
- `.hv-switch__content` - 包裹控件与标签文本的可点击 label
|
||||
- `.hv-switch__content` - 包裹控件与标签文本的 `button[role="switch"]`
|
||||
- `.hv-switch__control` - Switch 轨道
|
||||
- `.hv-switch__thumb` - 可移动的滑块
|
||||
- `.hv-switch__icon` - 滑块内可选图标
|
||||
|
||||
Reference in New Issue
Block a user