Skip to content

Commit

Permalink
Add gray button
Browse files Browse the repository at this point in the history
  • Loading branch information
rayc2045 committed May 11, 2024
1 parent 4938d2d commit da68ef2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const style = {
get light() {
return `${this.raw} text-zinc-700 bg-zinc-100 border-zinc-100 hover:brightness-95`;
},
get gray() {
return this.light.replaceAll('zinc-100', 'zinc-200');
},
get outlined() {
return `${this.raw} text-zinc-700 bg-zinc-100 border-zinc-600 hover:brightness-95`;
},
Expand All @@ -51,6 +54,9 @@ const style = {
get roundedLight() {
return this.light.replace(this.raw, this.roundedRaw);
},
get roundedGray() {
return this.gray.replace(this.raw, this.roundedRaw);
},
get roundedOutlined() {
return this.outlined.replace(this.raw, this.roundedRaw);
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/product-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
id="cart-button"
x-html="svg('bag')"
class="mt-4 ml-1"
:class="btn.roundedLight"
:class="btn.roundedGray"
@click="cart.addItem({
name: product.name,
color: currentColor,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/shop/shop.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}"
x-text="`${length} product${length > 1 ? 's' : ''}`"
></div>
<button :class="btn.roundedLight" @click="filter.hide()"></button>
<button :class="btn.roundedGray" @click="filter.hide()"></button>
</section>
<div
x-html="component('products-filter')"
Expand Down

0 comments on commit da68ef2

Please sign in to comment.