canHealUI / src /components /chat /QuickActions.tsx
gpt-engineer-app[bot]
feat: Design chatbot UI
fee5554
raw
history blame contribute delete
775 Bytes
import { Button } from "@/components/ui/button";
interface QuickActionsProps {
actions: string[];
onActionClick: (action: string) => void;
}
const QuickActions = ({ actions, onActionClick }: QuickActionsProps) => {
if (!actions.length) return null;
return (
<div className="flex flex-wrap gap-2 mb-4 pl-11">
{actions.map((action, index) => (
<Button
key={index}
variant="outline"
size="sm"
onClick={() => onActionClick(action)}
className="bg-quick-action-bg text-quick-action-fg border-quick-action-border hover:bg-quick-action-hover transition-colors text-xs px-3 py-1 h-auto rounded-full"
>
{action}
</Button>
))}
</div>
);
};
export default QuickActions;