mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-12-01 16:56:34 +01:00
- 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
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import {
|
|
Button,
|
|
ButtonGroup,
|
|
Field,
|
|
FieldDescription,
|
|
FieldLabel,
|
|
Icon,
|
|
Popover,
|
|
PopoverContent,
|
|
PopoverDescription,
|
|
PopoverHeader,
|
|
PopoverTitle,
|
|
PopoverTrigger,
|
|
TextInput,
|
|
} from "@lcui/react";
|
|
|
|
export default function Example() {
|
|
return (
|
|
<ButtonGroup>
|
|
<Button variant="outline">
|
|
<Icon name="bot" />
|
|
Copilot
|
|
</Button>
|
|
<Popover>
|
|
<PopoverTrigger>
|
|
<Button variant="outline" size="icon" aria-label="Open Popover">
|
|
<Icon name="chevron-down" />
|
|
</Button>
|
|
</PopoverTrigger>
|
|
<PopoverContent align="end" className="rounded-xl text-sm">
|
|
<PopoverHeader>
|
|
<PopoverTitle>Start a new task with Copilot</PopoverTitle>
|
|
<PopoverDescription>
|
|
Describe your task in natural language.
|
|
</PopoverDescription>
|
|
</PopoverHeader>
|
|
<Field>
|
|
<FieldLabel htmlFor="task" className="sr-only">
|
|
Task Description
|
|
</FieldLabel>
|
|
<TextInput
|
|
id="task"
|
|
placeholder="I need to..."
|
|
className="min-h-16 resize-none"
|
|
/>
|
|
<FieldDescription>
|
|
Copilot will open a pull request for review.
|
|
</FieldDescription>
|
|
</Field>
|
|
</PopoverContent>
|
|
</Popover>
|
|
</ButtonGroup>
|
|
);
|
|
}
|