Skip to main content

euv_ui/component/form/view/
struct.rs

1use super::*;
2
3/// Props for the [`euv_form`] component.
4///
5/// The component only owns the form shell: the fields themselves are passed
6/// in as children, so the caller decides which controls the form holds.
7#[derive(Clone, CustomDebug, Default)]
8pub struct EuvFormProps {
9    /// The label of the submit button.
10    ///
11    /// An empty string renders the form without a submit button, which is
12    /// the right choice for a form that submits itself.
13    pub submit_label: &'static str,
14    /// The callback invoked when the form is submitted.
15    #[debug(skip)]
16    pub on_submit: Option<Rc<dyn Fn()>>,
17}