From 61789c8e8462313f9fc7adf64679db94bfff017d Mon Sep 17 00:00:00 2001 From: SpikeySanju Date: Sun, 10 Nov 2024 23:37:06 +0530 Subject: [PATCH] fix: update README formatting and improve code readability --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d24284c..4b1535c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # SvelteDnD -[![npm version](https://img.shields.io/npm/v/@thisux/sveltednd.svg)](https://www.npmjs.com/package/@thisux/sveltednd) - A lightweight drag and drop library for Svelte 5 applications. Built with TypeScript and Svelte's new runes system. ## Installation @@ -264,19 +262,21 @@ interface DragDropState { // Handle the drop action // For example, move the item to a different category or list - items = items.map(item => + items = items.map((item) => item.id === draggedItem.id ? { ...item, category: targetContainer } : item ); } -
+
{#each items as item}
{item.name}