-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2123 from graygilmore/pills
Pill Component
- Loading branch information
Showing
47 changed files
with
512 additions
and
211 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
backend/app/assets/stylesheets/spree/backend/components/_pills.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.pill { | ||
display: inline-block; | ||
padding: 0.2em 0.9em; | ||
border-radius: 10px; | ||
font-size: $font-size-pill; | ||
background: $color-pill-neutral; | ||
color: $color-pill-neutral-text; | ||
white-space: nowrap; | ||
|
||
$states: ( | ||
complete: ( | ||
background: $color-pill-complete, | ||
color: $color-pill-complete-text | ||
), | ||
active: ( | ||
background: $color-pill-active, | ||
color: $color-pill-active-text | ||
), | ||
inactive: ( | ||
background: $color-pill-inactive, | ||
color: $color-pill-inactive-text | ||
), | ||
pending: ( | ||
background: $color-pill-pending, | ||
color: $color-pill-pending-text | ||
), | ||
warning: ( | ||
background: $color-pill-warning, | ||
color: $color-pill-warning-text | ||
), | ||
error: ( | ||
background: $color-pill-error, | ||
color: $color-pill-error-text | ||
) | ||
); | ||
|
||
@each $name, $colors in $states { | ||
&-#{$name} { | ||
background: map-get($colors, background); | ||
color: map-get($colors, color); | ||
} | ||
} | ||
} | ||
|
||
// Extend pill states for custom order, payment, and shipment state names | ||
.pill-address, | ||
.pill-awaiting, | ||
.pill-awaiting_return, | ||
.pill-backorder, | ||
.pill-backordered, | ||
.pill-balance_due, | ||
.pill-cart, | ||
.pill-checkout, | ||
.pill-confirm, | ||
.pill-credit_owed, | ||
.pill-delivery, | ||
.pill-in_transit, | ||
.pill-on_hand, | ||
.pill-partial, | ||
.pill-payment, | ||
.pill-processing, | ||
.pill-resumed { | ||
@extend .pill-pending; | ||
} | ||
|
||
.pill-authorized, | ||
.pill-canceled, | ||
.pill-completed, | ||
.pill-expired, | ||
.pill-given_to_customer, | ||
.pill-lost_in_transit, | ||
.pill-paid, | ||
.pill-received, | ||
.pill-reimbursed, | ||
.pill-returned, | ||
.pill-shipped, | ||
.pill-shipped_wrong_item, | ||
.pill-short_shipped, | ||
.pill-unexchanged, | ||
.pill-void { | ||
@extend .pill-complete; | ||
} | ||
|
||
.pill-failed { | ||
@extend .pill-warning; | ||
} | ||
|
||
.pill-errored, | ||
.pill-invalid { | ||
@extend .pill-error; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
backend/app/controllers/spree/admin/customer_returns_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ def index | |
'validation' | ||
], | ||
components: [ | ||
'pills', | ||
'tabs' | ||
], | ||
messaging: [ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.