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"
%script{type: "text/x-template", id: "vue-aws-credential"}
.form-group.card.bg-light.mb-3
.card-body
%label{"for" => "aws-credential"}
AWS credential
.form-group.mb-3
%b-card{"header" => "AWS credential", "bg-variant" => "light"}
%select{"id" => "aws-credential",
"class" => "form-control mb-3",
"v-model" => "credentialType",

View File

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

View File

@ -1,8 +1,8 @@
%script{type: "text/x-template", id: "vue-grep-pattern"}
%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")
%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")
%label
{{ grepType | humanize }}