Files
EvoFirewall/apps/web/src/components/rules/policy-set-icon.tsx
T
DenozordecandCursor 41e4ca1410
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m50s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped
feat(web): Lists/Rules UX parity с Агентами и правило kpi-hybrid
Hybrid row icons, row click, icon actions; DetailPanel header; ToggleGroup режима фильтра (settings-3).

Co-authored-by: Cursor <[email protected]>
2026-07-21 02:36:09 +07:00

31 lines
950 B
TypeScript

import { Shield } from 'lucide-react'
import { cn } from '@evofw/ui/lib/utils'
import { Item, ItemMedia } from '@evofw/ui/components/item'
type PolicySetIconProps = {
mode?: 'blacklist' | 'whitelist' | string | null
className?: string
}
/**
* KPI-style tile for policy set rows.
* Preview DNA: https://reui.io/preview/base/stats-12
*/
export function PolicySetIcon({ mode, className }: PolicySetIconProps) {
const isWhitelist = mode === 'whitelist'
return (
<Item
className={cn(
'border-background bg-muted flex size-10.5 shrink-0 items-center justify-center border-2 p-0 shadow-[0_1px_3px_0_rgba(0,0,0,0.14)] dark:border [&_svg]:size-4',
isWhitelist ? 'text-warning' : 'text-muted-foreground',
className,
)}
aria-label={isWhitelist ? 'Whitelist' : 'Blacklist'}
>
<ItemMedia variant="icon" className="size-auto">
<Shield aria-hidden />
</ItemMedia>
</Item>
)
}