Use b-card and b-button components

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-10-10 14:46:37 +09:00
parent 9c24371a0d
commit 3bdd6a45a8
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1
3 changed files with 17 additions and 20 deletions

View File

@ -1,10 +1,8 @@
= render "shared/vue/config_field" = render "shared/vue/config_field"
%script{type: "text/x-template", id: "vue-aws-credential"} %script{type: "text/x-template", id: "vue-aws-credential"}
.form-group.card.bg-light.mb-3 .form-group.mb-3
.card-body %b-card{"header" => "AWS credential", "bg-variant" => "light"}
%label{"for" => "aws-credential"}
AWS credential
%select{"id" => "aws-credential", %select{"id" => "aws-credential",
"class" => "form-control mb-3", "class" => "form-control mb-3",
"v-model" => "credentialType", "v-model" => "credentialType",

View File

@ -1,10 +1,10 @@
= render "shared/vue/grep_pattern" = render "shared/vue/grep_pattern"
%script{type: "text/x-template", id: "vue-grep-container"} %script{type: "text/x-template", id: "vue-grep-container"}
.form-group.card %b-card.form-group
.card-header %template{"slot" => "header"}
%a.btn.btn-xs{"v-on:click" => "add", "v-if" => "index == 0"} %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "index === 0"}
= icon("fa-plus") = icon("fa-plus")
%a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "index != 0"} %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "index !== 0"}
= icon("fa-minus") = icon("fa-minus")
%label %label
{{ containerType | humanize }} {{ containerType | humanize }}
@ -20,7 +20,6 @@
"v-bind:name" => "inputName(index)", "v-bind:name" => "inputName(index)",
"v-model" => "grepType"} "v-model" => "grepType"}
Exclude Exclude
.card-body
.row .row
%template{"v-for" => "(enabled, i) in patterns"} %template{"v-for" => "(enabled, i) in patterns"}
%grep-pattern.col-xl-3{"v-if" => "enabled", %grep-pattern.col-xl-3{"v-if" => "enabled",

View File

@ -1,8 +1,8 @@
%script{type: "text/x-template", id: "vue-grep-pattern"} %script{type: "text/x-template", id: "vue-grep-pattern"}
%div %div
%a.btn.btn-xs{"v-on:click" => "add", "v-if" => "subIndex == 0"} %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "subIndex === 0"}
= icon("fa-plus") = icon("fa-plus")
%a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "subIndex != 0"} %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "subIndex !== 0"}
= icon("fa-minus") = icon("fa-minus")
%label %label
{{ grepType | humanize }} {{ grepType | humanize }}