feat: enhance icon button and quantity selector styles for improved UI and functionality
This commit is contained in:
@@ -12,14 +12,18 @@
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-size: 20px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: color 0.15s ease-in-out, transform 0.1s ease-in-out;
|
transition: color 0.15s ease-in-out, transform 0.1s ease-in-out;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
font-size: 13px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,3 +66,11 @@
|
|||||||
:host(.hover-preview) .icon-btn--trash:not(:disabled) {
|
:host(.hover-preview) .icon-btn--trash:not(:disabled) {
|
||||||
color: var(--tenant-danger);
|
color: var(--tenant-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-btn--user {
|
||||||
|
i {
|
||||||
|
width: 23px;
|
||||||
|
height: 23px;
|
||||||
|
font-size: 23px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="quantity-selector" [class.quantity-selector--small]="size() === 'small'" aria-label="Selector de cantidad">
|
<div class="quantity-selector d-inline-flex align-items-center overflow-hidden rounded" [class.quantity-selector--small]="size() === 'small'" aria-label="Selector de cantidad">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="quantity-selector__button"
|
class="quantity-selector__button border-0 p-0 fw-bold lh-1"
|
||||||
aria-label="Disminuir cantidad"
|
aria-label="Disminuir cantidad"
|
||||||
[disabled]="quantity() <= min()"
|
[disabled]="quantity() <= min()"
|
||||||
(click)="onDecrease()"
|
(click)="onDecrease()"
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
-
|
-
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span class="quantity-selector__value">{{ quantity() }}</span>
|
<span class="quantity-selector__value flex-grow-1 min-w-0 text-center fw-bold lh-1 user-select-none">{{ quantity() }}</span>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="quantity-selector__button"
|
class="quantity-selector__button border-0 p-0 fw-bold lh-1"
|
||||||
aria-label="Aumentar cantidad"
|
aria-label="Aumentar cantidad"
|
||||||
[disabled]="quantity() >= max()"
|
[disabled]="quantity() >= max()"
|
||||||
(click)="onIncrease()"
|
(click)="onIncrease()"
|
||||||
|
|||||||
@@ -3,24 +3,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.quantity-selector {
|
.quantity-selector {
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
border: 1px solid #d8d8d8;
|
border: 1px solid #d8d8d8;
|
||||||
border-radius: 6px;
|
width: 78px;
|
||||||
overflow: hidden;
|
height: 40px;
|
||||||
min-height: 44px;
|
min-height: 40px;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
&__button {
|
&__button {
|
||||||
width: 25px;
|
width: 24px;
|
||||||
height: 44px;
|
height: 100%;
|
||||||
padding: 0;
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
color: #6f6f6f;
|
color: #6f6f6f;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
border: 0;
|
|
||||||
transition: background-color 0.2s ease, color 0.2s ease;
|
transition: background-color 0.2s ease, color 0.2s ease;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@@ -30,30 +25,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
opacity: 0.4;
|
color: #A0A0A0;
|
||||||
|
opacity: 1;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__value {
|
&__value {
|
||||||
min-width: 35px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
color: #6f6f6f;
|
color: #6f6f6f;
|
||||||
user-select: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&--small {
|
&--small {
|
||||||
min-height: 18px;
|
width: 46px;
|
||||||
border-radius: 0px;
|
height: 21px;
|
||||||
|
min-height: 21px;
|
||||||
border: 1px solid #cfcfcf;
|
border: 1px solid #cfcfcf;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|
||||||
.quantity-selector__button {
|
.quantity-selector__button {
|
||||||
width: 18px;
|
width: 15px;
|
||||||
height: 18px;
|
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@@ -64,7 +55,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.quantity-selector__value {
|
.quantity-selector__value {
|
||||||
min-width: 18px;
|
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user