fix; compressoor steppers
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
border: var(--border-width) solid var(--border-hairline);
|
border: var(--border-width) solid var(--border-hairline);
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
@@ -23,7 +22,6 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
color: var(--accent-brand);
|
color: var(--accent-brand);
|
||||||
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
@@ -44,7 +42,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
padding-right: 1%;
|
padding-right: 1%;
|
||||||
@@ -52,7 +49,6 @@
|
|||||||
|
|
||||||
.choice-stepper__arrow-btn {
|
.choice-stepper__arrow-btn {
|
||||||
height: 50%;
|
height: 50%;
|
||||||
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,10 @@ function ChoiceStepperList<T>({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`choice-stepper ${className ?? ''}`} data-disabled={disabled || undefined}>
|
<div
|
||||||
|
className={`choice-stepper ${className ?? ''}`}
|
||||||
|
data-disabled={disabled || undefined}
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
id={id}
|
id={id}
|
||||||
className="choice-stepper__input"
|
className="choice-stepper__input"
|
||||||
@@ -171,7 +174,10 @@ function ChoiceStepperRange({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`choice-stepper ${className ?? ''}`} data-disabled={disabled || undefined}>
|
<div
|
||||||
|
className={`choice-stepper ${className ?? ''}`}
|
||||||
|
data-disabled={disabled || undefined}
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
id={id}
|
id={id}
|
||||||
className="choice-stepper__input"
|
className="choice-stepper__input"
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
gap: 1cqh;
|
gap: 1cqh;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compressor-panel__stepper-item {
|
.compressor-panel__stepper-item {
|
||||||
@@ -119,6 +120,14 @@
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compressor-panel__stepper {
|
||||||
|
display: flex;
|
||||||
|
font-size: 4cqh;
|
||||||
|
text-align: center;
|
||||||
|
align-items: stretch;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.compressor-panel__cell {
|
.compressor-panel__cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -220,3 +229,15 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compressor-panel__stepper--centered .choice-stepper__input {
|
||||||
|
text-align: center;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compressor-panel__stepper--centered .choice-stepper__arrows {
|
||||||
|
flex: 0 0 20%;
|
||||||
|
width: 20%;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ function CompressorPanel({
|
|||||||
<div className="compressor-panel__cell compressor-panel__cell--steppers">
|
<div className="compressor-panel__cell compressor-panel__cell--steppers">
|
||||||
<div className="compressor-panel__stepper-item">
|
<div className="compressor-panel__stepper-item">
|
||||||
<ChoiceStepper
|
<ChoiceStepper
|
||||||
|
className="compressor-panel__stepper compressor-panel__stepper--centered"
|
||||||
value={comp.ratio}
|
value={comp.ratio}
|
||||||
values={RATIO_ORDER}
|
values={RATIO_ORDER}
|
||||||
formatLabel={(v) => RATIO_LABEL[v]}
|
formatLabel={(v) => RATIO_LABEL[v]}
|
||||||
@@ -88,12 +89,13 @@ function CompressorPanel({
|
|||||||
onLiveValue(channel, 'ratio', value);
|
onLiveValue(channel, 'ratio', value);
|
||||||
commit({ ratio: value });
|
commit({ ratio: value });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div className="compressor-panel__cell-label">Ratio</div>
|
<div className="compressor-panel__cell-label">Ratio</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="compressor-panel__stepper-item">
|
<div className="compressor-panel__stepper-item">
|
||||||
<ChoiceStepper
|
<ChoiceStepper
|
||||||
|
className="compressor-panel__stepper compressor-panel__stepper--centered"
|
||||||
value={comp.knee}
|
value={comp.knee}
|
||||||
values={KNEE_VALUES}
|
values={KNEE_VALUES}
|
||||||
formatLabel={(v) => `${v} dB`}
|
formatLabel={(v) => `${v} dB`}
|
||||||
@@ -101,7 +103,7 @@ function CompressorPanel({
|
|||||||
onLiveValue(channel, 'knee', value);
|
onLiveValue(channel, 'knee', value);
|
||||||
commit({ knee: value });
|
commit({ knee: value });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div className="compressor-panel__cell-label">Knee</div>
|
<div className="compressor-panel__cell-label">Knee</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user