1
0
mirror of https://github.com/helix-editor/helix synced 2026-07-27 11:10:52 +02:00
Files
helix/tests/indent/tsx.tsx
Blaž Hrastnik cd6a852c9e Add indent corpus
This will be used by the cargo indent-check xtask to validate queries,
similar to the existing indent tests in helix-core.
2026-06-07 21:29:01 +09:00

24 lines
421 B
TypeScript

interface Props {
title: string;
count: number;
}
function Widget({ title, count }: Props): JSX.Element {
return (
<div className="widget">
<span>{title}</span>
{count > 0 && (
<ul>
{Array.from({ length: count }).map((_, i) => (
<li key={i}>{i}</li>
))}
</ul>
)}
</div>
);
}
const data = service
.fetch()
.then((res) => res.json());