From 2309c80d55cf0abdd0fdb6a318aa280ab6ebca63 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Sat, 28 Jan 2017 13:00:32 -0600 Subject: [PATCH] fix disabling/enabling --- build.gradle | 2 +- .../sanity/kweb/dom/element/modification/modification.kt | 4 ++-- .../kweb/plugins/materialdesignlite/typography/typography.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 75bcbd2a66..8df12877c7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group 'com.github.sanity' -version '0.0.18' +version '0.0.19' buildscript { ext.kotlin_version = '1.1.0-beta-17' diff --git a/src/main/kotlin/com/github/sanity/kweb/dom/element/modification/modification.kt b/src/main/kotlin/com/github/sanity/kweb/dom/element/modification/modification.kt index e3ef1abed1..08c0c15f7a 100644 --- a/src/main/kotlin/com/github/sanity/kweb/dom/element/modification/modification.kt +++ b/src/main/kotlin/com/github/sanity/kweb/dom/element/modification/modification.kt @@ -78,12 +78,12 @@ fun Element.deactivate(): Element { } fun Element.disable(): Element { - addClasses("disabled") + setAttribute("disabled", true) return this } fun Element.enable(): Element { - removeClasses("disabled") + setAttribute("disabled", false) return this } diff --git a/src/main/kotlin/com/github/sanity/kweb/plugins/materialdesignlite/typography/typography.kt b/src/main/kotlin/com/github/sanity/kweb/plugins/materialdesignlite/typography/typography.kt index a57ca7524e..eecc0679e6 100644 --- a/src/main/kotlin/com/github/sanity/kweb/plugins/materialdesignlite/typography/typography.kt +++ b/src/main/kotlin/com/github/sanity/kweb/plugins/materialdesignlite/typography/typography.kt @@ -5,7 +5,7 @@ import com.github.sanity.kweb.dom.element.modification.addClasses import com.github.sanity.kweb.plugins.materialdesignlite.materialDesignLite /** - * Created by ian on 1/21/17. + * See https://material.io/guidelines/style/typography.html#typography-styles */ fun Element.typography(style: TypographyStyles): Element {