| 1 | import React from "react"; |
| 2 | import { Button } from "../ui"; |
| 3 | |
| 4 | interface RuleTemplateChipProps { |
| 5 | icon: React.ComponentType<{ className?: string }>; |
| 6 | text: string; |
| 7 | onClick: () => void; |
| 8 | } |
| 9 | |
| 10 | export function RuleTemplateChip({ |
| 11 | icon: Icon, |
| 12 | text, |
| 13 | onClick, |
| 14 | }: RuleTemplateChipProps) { |
| 15 | return ( |
| 16 | <Button |
| 17 | type="button" |
| 18 | onClick={onClick} |
| 19 | className="flex items-center gap-2" |
| 20 | variant="secondary" |
| 21 | > |
| 22 | <Icon className="h-3 w-3" /> |
| 23 | <span className="text-xs">{text}</span> |
| 24 | </Button> |
| 25 | ); |
| 26 | } |