Support styling for Button in iced_web

This commit is contained in:
Héctor Ramón Jiménez 2020-02-05 01:04:46 +01:00
parent 0030bcbd33
commit 28fd9feb40
5 changed files with 45 additions and 26 deletions

View file

@ -117,7 +117,10 @@ impl<'a, Message> Widget<Message> for Text {
use dodrio::builder::*;
let content = bumpalo::format!(in bump, "{}", self.content);
let color = css::color(self.color.unwrap_or(Color::BLACK));
let color = self
.color
.map(css::color)
.unwrap_or(String::from("inherit"));
let width = css::length(self.width);
let height = css::length(self.height);