{
  "name": "FileTypeIcon",
  "package": "@magicblocksai/ui",
  "file": "packages/ui/src/components/FileTypeIcon.tsx",
  "chapterTag": "03 Icons",
  "chapter": "03-icons.html",
  "sectionId": "file-type",
  "elName": "File-type set &amp; FileTypeIcon dispatcher",
  "demoUrl": "https://brand.magicblocks.ai/components/03-icons#file-type",
  "hasLiveDemo": false,
  "description": "`<FileTypeIcon contentType=\"…\" />` — picks the right kit file-type glyph\nfrom a MIME string. Forwards every standard icon prop (`size`,\n`className`, `aria-label`, native SVG attributes, etc.) to the resolved\nicon. Spark Round R24.",
  "useClient": false,
  "interactivity": "display",
  "namedExports": [
    {
      "name": "FileTypeIcon",
      "isPrincipal": true,
      "isType": false
    },
    {
      "name": "getFileTypeIcon",
      "isPrincipal": false,
      "isType": false
    },
    {
      "name": "getFileTypeKind",
      "isPrincipal": false,
      "isType": false
    },
    {
      "name": "FileTypeIconProps",
      "isPrincipal": false,
      "isType": true
    },
    {
      "name": "FileTypeKind",
      "isPrincipal": false,
      "isType": false
    }
  ],
  "importStatement": "import { FileTypeIcon } from \"@magicblocksai/ui\";",
  "props": [
    {
      "name": "contentType",
      "optional": false,
      "type": "string | null | undefined",
      "doc": "MIME / content-type string for the file (e.g. `\"image/png\"`, `\"application/pdf\"`, `\"text/csv\"`). The kit normalises to lowercase + trims whitespace before mapping. Pass `null`, `undefined`, or `\"\"` to render the generic `<FileIcon>`."
    }
  ],
  "classesUsed": [],
  "examples": {
    "react": "// In an attachment row\n  <FileTypeIcon contentType={file.content_type} size={18} />",
    "html": "<div class=\"ic-strip\" role=\"list\">\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><path d=\"M6 9.5H12\"/><path d=\"M6 11.75H12\"/><path d=\"M6 14H10.5\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileTextIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><circle cx=\"6.75\" cy=\"9.5\" r=\"0.75\"/><path d=\"M4.5 14L7.5 11.5L9.5 12.75L13 10\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileImageIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><text x=\"9\" y=\"13.6\" text-anchor=\"middle\" stroke=\"none\" fill=\"currentColor\" style=\"font: 600 4.25px/1 ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em;\">PDF</text></svg>\n            </span>\n            <span class=\"ic-cell-name\">FilePdfIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><path d=\"M7.5 9.75L11.5 12L7.5 14.25Z\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileVideoIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><circle cx=\"7.5\" cy=\"13.75\" r=\"1\"/><path d=\"M8.5 13.75V8.5C10 8.75 11 10 10.5 11.5\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileAudioIcon</span>\n          </div>\n          <div class=\"ic-cell\" role=\"listitem\">\n            <span class=\"ic-cell-glyph\" aria-hidden=\"true\">\n              <svg width=\"32\" height=\"32\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><path d=\"M9 5.5V15.75\"/><path d=\"M8 8H10\"/><path d=\"M8 10H10\"/><path d=\"M8 12H10\"/><path d=\"M8 14H10\"/></svg>\n            </span>\n            <span class=\"ic-cell-name\">FileArchiveIcon</span>\n          </div>\n        </div>\n        <div class=\"ic-dispatch\" role=\"list\">\n          <div class=\"ic-dispatch-row\" role=\"listitem\">\n            <span class=\"ic-dispatch-ct\">application/pdf</span>\n            <span class=\"ic-dispatch-arrow\" aria-hidden=\"true\">&rarr;</span>\n            <span class=\"ic-dispatch-resolved\">FilePdfIcon</span>\n            <span class=\"ic-dispatch-glyph\" aria-hidden=\"true\">\n              <svg width=\"24\" height=\"24\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><text x=\"9\" y=\"13.6\" text-anchor=\"middle\" stroke=\"none\" fill=\"currentColor\" style=\"font: 600 4.25px/1 ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em;\">PDF</text></svg>\n            </span>\n          </div>\n          <div class=\"ic-dispatch-row\" role=\"listitem\">\n            <span class=\"ic-dispatch-ct\">image/png</span>\n            <span class=\"ic-dispatch-arrow\" aria-hidden=\"true\">&rarr;</span>\n            <span class=\"ic-dispatch-resolved\">FileImageIcon</span>\n            <span class=\"ic-dispatch-glyph\" aria-hidden=\"true\">\n              <svg width=\"24\" height=\"24\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><circle cx=\"6.75\" cy=\"9.5\" r=\"0.75\"/><path d=\"M4.5 14L7.5 11.5L9.5 12.75L13 10\"/></svg>\n            </span>\n          </div>\n          <div class=\"ic-dispatch-row\" role=\"listitem\">\n            <span class=\"ic-dispatch-ct\">application/zip</span>\n            <span class=\"ic-dispatch-arrow\" aria-hidden=\"true\">&rarr;</span>\n            <span class=\"ic-dispatch-resolved\">FileArchiveIcon</span>\n            <span class=\"ic-dispatch-glyph\" aria-hidden=\"true\">\n              <svg width=\"24\" height=\"24\" viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 2.75A1 1 0 0 1 5 1.75H10.5L14 5.25V15.25A1 1 0 0 1 13 16.25H5A1 1 0 0 1 4 15.25Z\"/><path d=\"M10.5 1.75V5.25H14\"/><path d=\"M9 5.5V15.75\"/><path d=\"M8 8H10\"/><path d=\"M8 10H10\"/><path d=\"M8 12H10\"/><path d=\"M8 14H10\"/></svg>\n            </span>\n          </div>\n        </div>",
    "css": null
  }
}
