Files
vibetorrent/frontend/src/components/ui/drag_and_drop.rs
spinline 0b3d4d1fd4
All checks were successful
Build MIPS Binary / build (push) Successful in 5m21s
feat: improve toast animations and update to original Zinc color palette
2026-02-12 21:18:13 +03:00

25 lines
740 B
Rust

use leptos::prelude::*;
use leptos_ui::clx;
mod components {
use super::*;
clx! {Draggable, div, "flex flex-col gap-4 w-full max-w-4xl"}
clx! {DraggableZone, div, "dragabble__container", "bg-neutral-600 p-4 mt-4"}
// TODO. ItemRoot (needs `draggable` as clx attribute).
}
pub use components::*;
/* ========================================================== */
/* ✨ FUNCTIONS ✨ */
/* ========================================================== */
#[component]
pub fn DraggableItem(#[prop(into)] text: String) -> impl IntoView {
view! {
<div class="p-4 border cursor-move border-input bg-card draggable" draggable="true">
{text}
</div>
}
}