fix(docs): restore button, toggle and nav demos to the pinned cn baseline
- button-group: restore all 9 cn demos incl. merge dropdown menu copy, custom-styles merge dropdown, sizes variant=secondary, orientation icon groups, full-width second group and the disabled child override - toggle-button / toggle-button-group: restore cn copy, structure, button counts, theme custom-styles classes and aria-labels - accordion-custom-styles: restore the 3-item collectibles scenario with the original 3dicons images, surface variant, selectors and hover motion - disclosure-group-controlled: restore HeroUI Native / Expo copy and image semantics (Expo brand icon adapted to Tabler IconBrandReactNative) - button-basic / button-loading-state: converge to baseline (console report, no added status paragraph) keeping the duplicate-trigger guard - restore per-demo root gap/alignment/wrap classes instead of demo-row - icon semantics per task card: search glyph kept on 搜索 buttons, rotate-back glyph restored (IconRefresh), person-search glyph restored (IconUserSearch); accordion item icons sized to the baseline 16px
This commit is contained in:
@@ -1,29 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ButtonGroup,
|
||||
Button,
|
||||
ButtonGroup,
|
||||
ButtonGroupSeparator,
|
||||
} from "@heroui-vue/components";
|
||||
|
||||
const sizes = [
|
||||
{ size: "sm", label: "Small" },
|
||||
{ size: "md", label: "Medium (default)" },
|
||||
{ size: "lg", label: "Large" },
|
||||
] as const;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex w-full flex-col gap-6">
|
||||
<div v-for="item in sizes" :key="item.size" class="flex flex-col gap-2">
|
||||
<p class="text-sm font-medium text-muted">{{ item.label }}</p>
|
||||
<ButtonGroup :size="item.size">
|
||||
<Button>First</Button>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col items-start gap-2">
|
||||
<p class="text-sm text-muted">小</p>
|
||||
<ButtonGroup size="sm" variant="secondary">
|
||||
<Button>第一项</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
Second
|
||||
第二项
|
||||
</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
Third
|
||||
第三项
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
<div class="flex flex-col items-start gap-2">
|
||||
<p class="text-sm text-muted">中(默认)</p>
|
||||
<ButtonGroup size="md" variant="secondary">
|
||||
<Button>第一项</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
第二项
|
||||
</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
第三项
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
<div class="flex flex-col items-start gap-2">
|
||||
<p class="text-sm text-muted">大</p>
|
||||
<ButtonGroup size="lg" variant="secondary">
|
||||
<Button>第一项</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
第二项
|
||||
</Button>
|
||||
<Button>
|
||||
<ButtonGroupSeparator />
|
||||
第三项
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user