Add dropdown "primary" style with blue instead of white

This commit is contained in:
Matt-Yorkley
2022-01-29 18:05:32 +00:00
parent 6459d9ea36
commit fedfeb6dd3
3 changed files with 24 additions and 2 deletions

View File

@@ -11,7 +11,8 @@
= select_tag "adjustment[tax_category_id]",
options_from_collection_for_select(Spree::TaxCategory.all, :id, :name),
prompt: t(:none),
"data-controller": "tom-select"
"data-controller": "tom-select",
class: "primary"
= f.error_message_on :tax_category
.row

View File

@@ -19,6 +19,27 @@
background-color: $white;
}
.ts-wrapper.primary.focus .ts-control,
.ts-wrapper.primary .ts-control {
background-color: $spree-blue;
border-color: $spree-blue;
color: $white;
&:after {
border-color: $white transparent transparent transparent;
}
}
.ts-wrapper.dropdown-active.primary .ts-control {
background-color: $spree-green;
border-color: $spree-green;
color: $white;
&:after {
border-color: transparent transparent $white transparent;
}
}
.dropdown-input-wrap {
padding: 0.2em;

View File

@@ -38,7 +38,7 @@ describe '
click_link 'New Adjustment'
fill_in 'adjustment_amount', with: 110
fill_in 'adjustment_label', with: 'Late fee'
select2_select 'GST', from: 'adjustment_tax_category_id'
select 'GST', from: 'adjustment_tax_category_id'
click_button 'Continue'
# Then I should see the adjustment, with the correct tax