// Copyright 2023 System76 // Copyright 2019 Héctor Ramón, Iced contributors // SPDX-License-Identifier: MPL-2.0 AND MIT //! Displays a list of options in a popover menu on select. pub mod menu; pub use menu::Menu; pub mod multi; mod widget; pub use widget::*; /// Displays a list of options in a popover menu on select. pub fn dropdown< S: AsRef + std::clone::Clone + Send + Sync + 'static, Message: 'static + Clone, >( selections: &[S], selected: Option, on_selected: impl Fn(usize) -> Message + Send + Sync + 'static, ) -> Dropdown<'_, S, Message> { Dropdown::new(selections, selected, on_selected) }