From 8e6e9056a09b583458f8cd858576c6fd7c9b9a15 Mon Sep 17 00:00:00 2001 From: Anthony Dodd Date: Sat, 17 Oct 2020 19:12:31 -0500 Subject: [PATCH] Update to HTML disabled attr instead of is-disabled CSS class Update README to point to Bulma 0.9.1 --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- README.md | 2 +- src/elements/button.rs | 19 ++++--------------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6af6c13..a1f9fee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This changelog follows the patterns described here: https://keepachangelog.com/e ## Unreleased +## 0.1.5 +### fixed +- Fixed a few of the button & button-like components to use the HTML `disabled` attribute instead of the Bulma `is-disabled` CSS class. The latter has been deprecated for some time. +- Update docs in the README to point to the latest Bulma 0.9.1 release. + ## 0.1.4 ### added - Add prop `padded` to Navbar. Setting this to true will wrap the contents of the navbar in a container to add padding to the contents under some circumstances. diff --git a/Cargo.toml b/Cargo.toml index ff66f70..73d7f73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ybc" -version = "0.1.4" +version = "0.1.5" description = "A Yew component library based on the Bulma CSS framework." authors = ["Anthony Dodd "] edition = "2018" diff --git a/README.md b/README.md index a9b8b1e..81b7351 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ ybc = "*" ### add bulma #### add bulma css (no customizations) -This project works perfectly well if you just include the Bulma CSS in your HTML, [as described here](https://bulma.io/documentation/overview/start/). The following link in your HTML head should do the trick: ``. +This project works perfectly well if you just include the Bulma CSS in your HTML, [as described here](https://bulma.io/documentation/overview/start/). The following link in your HTML head should do the trick: ``. #### add bulma sass (allows customization & themes) However, if you want to customize Bulma to match your style guidelines, then you will need to have a copy of the Bulma SASS locally, and then import Bulma after you've defined your customizations, [as described here](https://bulma.io/documentation/customize/). diff --git a/src/elements/button.rs b/src/elements/button.rs index f6a3d53..dd6f66e 100644 --- a/src/elements/button.rs +++ b/src/elements/button.rs @@ -124,11 +124,8 @@ impl Component for Button { if self.props.r#static { classes.push("is-static") } - if self.props.disabled { - classes.push("is-disabled") - } html! { - } @@ -325,9 +322,6 @@ impl Component for ButtonAnchor { if self.props.r#static { classes.push("is-static") } - if self.props.disabled { - classes.push("is-disabled") - } html! { {self.props.children.clone()} @@ -397,11 +392,8 @@ impl Component for ButtonInputSubmit { if self.props.r#static { classes.push("is-static") } - if self.props.disabled { - classes.push("is-disabled") - } html! { - + } } } @@ -461,11 +453,8 @@ impl Component for ButtonInputReset { if self.props.r#static { classes.push("is-static") } - if self.props.disabled { - classes.push("is-disabled") - } html! { - + } } }