Files
Liu 029d5c4e22 feat(widgets): add button group widget
- add button-group, button-group-text and button-group-separator
  prototypes with orientation and separator APIs
- mark direct children as geometry items, keep select, popover and
  dropdown wrappers out of the border geometry and clean up on unlink
- theme the group for the nova style, covering nested groups, select,
  input group and first/last edge rules
- add integration tests for factories, marking, geometry, input flex
  and trigger wrappers
- add zh-CN documentation, field tables, sidebar entry and C/XML/TSX
  examples for every section
2026-11-08 00:20:39 +08:00

40 lines
1.0 KiB
TypeScript

import {
Button,
ButtonGroup,
Icon,
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
TextInput,
} from "@lcui/react";
export default function Example() {
return (
<ButtonGroup className="w-[384px]">
<ButtonGroup className="flex-1 min-w-0 clip-safe">
<Select defaultValue="$">
<SelectTrigger className="font-mono">
<SelectValue placeholder="$" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="$">$ US Dollar</SelectItem>
<SelectItem value="EUR">EUR Euro</SelectItem>
<SelectItem value="GBP">GBP British Pound</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
<TextInput placeholder="10.00" />
</ButtonGroup>
<ButtonGroup className="clip-safe">
<Button variant="outline" size="icon">
<Icon name="arrow-right" />
</Button>
</ButtonGroup>
</ButtonGroup>
);
}