makeSwitch function infrastructure

Last updated: 2026-03-01T23:25:47.092Z

Metrics

LOC: 10 Complexity: 4 Params: 2

Signature

makeSwitch(checked = false, disabled = false)

Source Code

function makeSwitch(checked = false, disabled = false) {
  const btn = document.createElement("button");
  btn.className = "ant-switch";
  if (checked) btn.classList.add("ant-switch-checked");
  if (disabled) btn.classList.add("ant-switch-disabled");
  btn.setAttribute("role", "switch");
  btn.setAttribute("aria-checked", checked ? "true" : "false");
  btn.id = "switch-1";
  return btn;
}

No outgoing dependencies.

Impact (Incoming)

graph LR makeSwitch["makeSwitch"] makeCheckboxGroup["makeCheckboxGroup"] makeCheckboxGroup -->|calls| makeSwitch style makeSwitch fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makeSwitch "0b116f397cb3bae4.html" click makeCheckboxGroup "8988d62b46d478d1.html"
SourceType
makeCheckboxGroup calls