MCPcopy Create free account
hub / github.com/bvaughn/react-window / createElement

Function createElement

lib/components/list/getRowElements.test.ts:4–10  ·  view source on GitHub ↗
(attributes: Record<string, string> = {})

Source from the content-addressed store, hash-verified

2import { getRowElements } from "./getRowElements";
3
4function createElement(attributes: Record<string, string> = {}) {
5 const element = document.createElement("div");
6 for (const [name, value] of Object.entries(attributes)) {
7 element.setAttribute(name, value);
8 }
9 return element;
10}
11
12function createRow(index: number, rowCount: number = 10) {
13 return createElement({

Callers 4

ListComponentFunction · 0.70
createRowFunction · 0.70
GridComponentFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected