// rocie - An enterprise grocery management system - Web app // // Copyright (C) 2026 Benedikt Peetz // SPDX-License-Identifier: GPL-3.0-or-later // // This file is part of Rocie. // // You should have received a copy of the License along with this program. // If not, see . use leptos::{ IntoView, component, error::Error, html::Input, prelude::{ ClassAttribute, CollectView, ElementChild, Get, GlobalAttributes, LocalResource, NodeRef, NodeRefAttribute, OnAttribute, OnTargetAttribute, PropAttribute, Set, Show, WriteSignal, signal, }, view, }; use log::{error, info}; use crate::components::get_id; #[component] #[expect(clippy::too_many_lines)] pub fn InputPlaceholder( input_type: &'static str, label: &'static str, node_ref: NodeRef, #[prop(default = None)] initial_value: Option, #[prop(default = None)] reactive: Option>>, #[prop(default = None)] auto_complete: Option< LocalResource>, Error>>, >, ) -> impl IntoView { let id = get_id(); let (autocomplete_signal, autocomplete_set) = signal(String::new()); view! {
// TODO: Reference `var(--tw-border-2)` instead of the `2 px` <2025-10-01>