mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-27 22:54:18 +00:00
* feat: added toggle-group component * fix(components): ran build:registry script * fix(components): fixed colors in toggle-group - Dark mode border color is now consistent with the toggle component * fix(components): fixed component.json toggle-group - Added the content field to `components.json` for toggle-group - Ran build:registry again * feat(toggle-group): simplify implementation --------- Co-authored-by: shadcn <m@shadcn.com>
23 lines
657 B
TypeScript
23 lines
657 B
TypeScript
import { Bold, Italic, Underline } from "lucide-react"
|
|
|
|
import {
|
|
ToggleGroup,
|
|
ToggleGroupItem,
|
|
} from "@/registry/default/ui/toggle-group"
|
|
|
|
export default function ToggleGroupDemo() {
|
|
return (
|
|
<ToggleGroup type="single">
|
|
<ToggleGroupItem value="bold" aria-label="Toggle bold">
|
|
<Bold className="h-4 w-4" />
|
|
</ToggleGroupItem>
|
|
<ToggleGroupItem value="italic" aria-label="Toggle italic">
|
|
<Italic className="h-4 w-4" />
|
|
</ToggleGroupItem>
|
|
<ToggleGroupItem value="strikethrough" aria-label="Toggle strikethrough">
|
|
<Underline className="h-4 w-4" />
|
|
</ToggleGroupItem>
|
|
</ToggleGroup>
|
|
)
|
|
}
|