mirror of
https://github.com/helix-editor/helix
synced 2026-07-27 11:10:52 +02:00
cd6a852c9e
This will be used by the cargo indent-check xtask to validate queries, similar to the existing indent tests in helix-core.
24 lines
421 B
TypeScript
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());
|