/** * Showcase · case5 — Security / two-factor settings (Bảo mật · Xác thực hai lớp) * * The CORRECT build of the screen that keeps getting hand-rolled wrong. Every defect from the * freelanced version is fixed here by following rules that ALREADY exist in the godx-ui MCP: * * ✗ wrong (hand-rolled) ✓ here (rule) * ───────────────────────────────────────────────────────────────────────────────────────── * factor row = a centered
with the ListRow — leading icon · title/description · * title duplicated as its own description trailing action (no redundant copy) * "Xoá" rendered as plain black text destructive-toned ghost button — delete is a * destructive action, color carries intent * every action a full-width stacked bar right-aligned, auto-width actions; ONE primary * (rule 217 explicitly forbids this) per card, secondary = outline (rule 217) * 📱 / ✉️ emoji as "icons" lucide icons (no emoji in product UI) (anti-tell) * brand glyph = a styled (size/radius Avatar primitive — real brand mark * baked as literals) * * Built ENTIRELY from real @godxjp/ui primitives. reference-design DNA: small headings, 14/1.7 body, * one --primary action, 1px-border surfaces, no resting shadow, quiet factual copy, no emoji. */ import { KeyRound, Mail, ShieldCheck, Smartphone } from "lucide-react"; import { Button, Text } from "@godxjp/ui/general"; import { Avatar, AvatarFallback, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ListRow, } from "@godxjp/ui/data-display"; import { Flex, PageContainer } from "@godxjp/ui/layout"; // A row-level delete is destructive but low-emphasis — a ghost button toned destructive (color // carries the intent without a heavy solid-red fill). This is the canonical "delete in a list" action. function DeleteAction({ label }: { label: string }) { return ( ); } export default function SecurityMfaShowcase() { return ( {/* Account identity — the brand mark is an Avatar primitive, not a styled span. */} T Tài khoản godx tu-phuc-vu@famgia.com {/* Two-factor authentication. Enrolled factors are ListRows; add/manage actions live in the * trailing slot per row — NOT a stack of full-width bars. */} Xác thực hai lớp Yêu cầu xác minh thêm khi đăng nhập. {/* Recovery codes — a card whose single action sits in a right-aligned footer (rule 217: * primary rightmost, never a centered/full-width bar). */} Mã khôi phục Dùng khi bạn không truy cập được thiết bị xác thực. Còn lại 8 mã chưa dùng. ); }