🆙 Update Avatar-Editor, colors now also scale

This commit is contained in:
duckietm
2026-02-26 16:48:47 +01:00
parent 0678e86d3d
commit 359932f891
6 changed files with 33 additions and 11 deletions
+16
View File
@@ -18,6 +18,22 @@ const InfiniteGridRoot = <T,>(props: Props<T>) =>
const { items = [], columnCount = 4, overscan = 5, estimateSize = 45, squareItems = false, itemRender = null } = props;
const parentRef = useRef<HTMLDivElement>(null);
if(squareItems)
{
return (
<div ref={ parentRef } className="overflow-y-auto size-full">
<div className={ `grid grid-cols-${ columnCount } gap-1 w-full` }>
{ items.map((item, index) =>
{
if(!item) return <Fragment key={ `${ index }-empty` } />;
return <Fragment key={ `${ index }-item` }>{ itemRender(item, index % columnCount) }</Fragment>;
}) }
</div>
</div>
);
}
const virtualizer = useVirtualizer({
count: Math.ceil(items.length / columnCount),
overscan,