← Files DataARCHIVED FILE

output_formats/html/src/ui/primitives/ControlIcon.jsx

499 Bytes · Nov 27, 2026 · 12:12 UTC

↓ Download file

import React from "react";
import { SvgIcon } from "./SvgIcon.jsx";
import check from "./icons/dashboard-icon-check.svg";
import chevronDown from "./icons/dashboard-icon-chevronDown.svg";

// Explicit assets let small control consumers use the same icons without a Vite glob.
const icons = { check, chevronDown };
export function ControlIcon({ name, ...props }) {
  if (!icons[name]) throw new Error(`Unknown control icon: ${name}`);
  return <SvgIcon name={name} src={icons[name]} {...props} />;
}

SHA-256: 4c4d28088b21da37787c37dbbfc5892c3100a054d717cbc027126be41f1b76a4