How to replace StyleSheet

I’m using the " 0.13.0-dev " branch and trying to follow an example that uses the StyleSheet trait for styling its Button widdgets, but this trait has apparently been removed.

How can I duplicate the behaviour which used to have methods to return a style for “active”, “hovered” etc.?

I found that this is done by calling the

pub fn style(
        mut self,
        style: impl Fn(&Theme, Status) -> Appearance + 'a,
    ) -> Self { = Box::new(style);

and within the function/closure using the Status to work out what Appearance to return. eg

match status {
        Status::Active => {
            Appearance {
                background: Some(Background::from(Color::from_rgb(0.8, 0.1, 0.1))),
                text_color: Color::BLACK,
                border: Border::default().with_width(Pixels::from(2)).with_color(Color::BLACK),
                shadow: Default::default()