From d3b150e8f17449fd2dfa7bdee552d79dc63466a7 Mon Sep 17 00:00:00 2001 From: mhe Date: Mon, 28 Oct 2019 12:42:18 +0100 Subject: [PATCH] Refactor and document OcStar(Toggle) --- src/elements/OCStar.vue | 5 +-- src/elements/OcButton.vue | 2 +- src/elements/OcStarToggle.vue | 65 +++++++++++++++++++++++++++++++++ src/styles/theme/helper.scss | 8 ++++ src/styles/theme/oc-button.scss | 4 ++ 5 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 src/elements/OcStarToggle.vue diff --git a/src/elements/OCStar.vue b/src/elements/OCStar.vue index dd84e24bb..f1c85b479 100644 --- a/src/elements/OCStar.vue +++ b/src/elements/OCStar.vue @@ -1,8 +1,5 @@ + + ```jsx +

OcStarToggle initially not checked

+ +

OcStarToggle initially checked

+ + ``` +
diff --git a/src/styles/theme/helper.scss b/src/styles/theme/helper.scss index 43604e5ad..a0b5ddbd2 100644 --- a/src/styles/theme/helper.scss +++ b/src/styles/theme/helper.scss @@ -2,6 +2,14 @@ cursor: pointer; } +.oc-button-reset { + @extend .uk-padding-remove; + -webkit-appearance: none; + background: transparent; + font: inherit; + border: none; +} + .oc-align-self-center { align-self: center; } diff --git a/src/styles/theme/oc-button.scss b/src/styles/theme/oc-button.scss index 598d96fff..baa6a834c 100644 --- a/src/styles/theme/oc-button.scss +++ b/src/styles/theme/oc-button.scss @@ -46,3 +46,7 @@ } } } + +.oc-button.uk-button-raw { + @extend .oc-button-reset; +}