Improve styled icon

This commit is contained in:
Adrian Wozniak 2020-04-03 08:51:25 +02:00
parent cdf7787b2b
commit 33a8881cef
2 changed files with 10 additions and 2 deletions

View File

@ -107,10 +107,14 @@ pub fn view(_model: &Model, issue: &Issue, modal: &EditIssueModal) -> Node<Msg>
.build() .build()
.into_node(); .into_node();
let delete_button = StyledButton::build().primary().build().into_node(); let delete_button = StyledButton::build()
.empty()
.icon(Icon::Trash.into_styled_builder().size(19).build())
.build()
.into_node();
let close_button = StyledButton::build() let close_button = StyledButton::build()
.empty() .empty()
.icon(StyledIcon::build(Icon::Close).size(19).build()) .icon(Icon::Close.into_styled_builder().size(24).build())
.build() .build()
.into_node(); .into_node();

View File

@ -49,6 +49,10 @@ impl Icon {
_ => None, _ => None,
} }
} }
pub fn into_styled_builder(self) -> StyledIconBuilder {
StyledIcon::build(self)
}
} }
impl std::fmt::Display for Icon { impl std::fmt::Display for Icon {