Dashboard button #25
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
use leptos::prelude::*;
|
||||||
|
|
|||||||
|
#[component]
|
||||||
|
pub fn DashboardButton() -> impl IntoView {
|
||||||
|
view! {}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
mod action_button;
|
mod action_button;
|
||||||
mod checkbox;
|
mod checkbox;
|
||||||
|
mod chips;
|
||||||
|
mod dashboard_button;
|
||||||
mod loading;
|
mod loading;
|
||||||
mod multi_entry;
|
mod multi_entry;
|
||||||
mod panel;
|
mod panel;
|
||||||
@@ -7,9 +9,8 @@ mod radio;
|
|||||||
mod row;
|
mod row;
|
||||||
mod select;
|
mod select;
|
||||||
mod text_field;
|
mod text_field;
|
||||||
mod chips;
|
|
||||||
|
|
||||||
pub use self::{
|
pub use self::{
|
||||||
action_button::*, checkbox::*, loading::*, multi_entry::*, panel::*, radio::*, row::*,
|
action_button::*, checkbox::*, chips::*, loading::*, multi_entry::*, panel::*, radio::*,
|
||||||
select::*, text_field::*, chips::*
|
row::*, select::*, text_field::*,
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user
These should not be Optional values. When we use
#[prop(optional), it just means that we either have a value, or the default value. For something like this (a String) that would mean we either have a specific value passed in or just the empty string.Setting up the
#[prop]the right way above should mean that you just print the string value here, no mapping needed.Depending on your desired behavior, leaving this as an
Option<String>might be fine. What I'd like to know is the mindset behind it - if this is aNonevalue, how are you handling it? Should this even be optional at all? Why?I'd recommend documenting this properly (refer to Leptos documentation for how to add doc comments to components).
These props should also have comments. They just have the
/// commentone line above.There should always be a space after the
#in headers.