src/lib/ui/components/devtools/action-card.tsx
Architecture violations
- [warning] function-camel-case: 'ActionCard' does not match naming convention /^[a-z][a-zA-Z0-9]*$/
- [warning] max-parameters: 'ActionCard' has 8 parameters (max 5)
Symbols by Kind
interface
1
function
1
All Symbols
| Name | Kind | Visibility | Status | Lines | Signature |
|---|---|---|---|---|---|
| ActionCardProps | interface | exported- | 7-15 | interface ActionCardProps |
|
| ActionCard | function | exported- | 17-37 | ActionCard({
icon,
label,
desc,
variant,
active = false,
id,
onClick,
}: ActionCardProps) |
Full Source
/**
* ActionCard — Botão de ação do painel de actions do DevTools.
*/
import { h } from "preact";
export interface ActionCardProps {
icon: string;
label: string;
desc: string;
variant: "primary" | "secondary" | "outline" | "ai";
id?: string;
active?: boolean;
onClick: () => void;
}
export function ActionCard({
icon,
label,
desc,
variant,
active = false,
id,
onClick,
}: ActionCardProps) {
return (
<button
class={`action-card ${variant}${active ? " active" : ""}`}
id={id}
onClick={onClick}
>
<span class="card-icon">{icon}</span>
<span class="card-label">{label}</span>
<span class="card-desc">{desc}</span>
</button>
);
}