-
+
+
+ { props.button.clone().map(Html::from).unwrap_or_default() }
+
{
if let Some(parsed) = props.parsed.as_ref() {
match parsed {
@@ -380,6 +394,8 @@ pub struct ButtonProps {
pub disabled: bool,
#[prop_or(false)]
pub loading: bool,
+ #[prop_or(false)]
+ pub input_group: bool,
pub title: Option<&'static str>,
pub icon: Option
>,
#[prop_or_default]
@@ -395,6 +411,7 @@ pub fn button(props: &ButtonProps) -> Html {
props.style.to_string(),
if props.disabled { Some("disabled") } else { None },
if props.loading { Some("loading" )} else { None },
+ if props.input_group { Some("input-group-btn") } else { None }
)}
disabled={props.disabled}
onclick={props.onclick.clone()}
diff --git a/web/src/state.rs b/web/src/state.rs
index eed8d07..0379218 100644
--- a/web/src/state.rs
+++ b/web/src/state.rs
@@ -1,5 +1,6 @@
use serde::{Deserialize, Serialize};
use std::num::ParseFloatError;
+use svgtypes::Length;
use yewdux::prelude::{BasicStore, Persistent, PersistentStore};
#[derive(Debug, Clone)]
@@ -56,10 +57,11 @@ pub struct AppState {
pub svgs: Vec