mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
fix(app): keep slowmode reset visible and localize markers (#1586)
This commit is contained in:
1 parent
27f459e6bd
commit
ab46d16d12
4 files changed
+21
-25
No files matched your search
@@ -51,6 +51,7 @@
|
||||
|
||||
.resetButton:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.resetRow {
|
||||
|
||||
@@ -67,6 +67,7 @@ export function SliderResetControls({
|
||||
canReset={canReset}
|
||||
onReset={onReset}
|
||||
ariaLabel={inlineLabel}
|
||||
alwaysVisible={true}
|
||||
dataFlx="ui.slider.slider-reset-controls.reset-button"
|
||||
data-flx="ui.slider.slider-reset-controls.slider-reset-icon-button"
|
||||
/>
|
||||
|
||||
@@ -13,6 +13,7 @@ interface SliderResetIconButtonProps {
|
||||
className?: string;
|
||||
iconSize?: number;
|
||||
dataFlx?: string;
|
||||
alwaysVisible?: boolean;
|
||||
}
|
||||
|
||||
export function canResetSliderValue(value: number, factoryDefaultValue: number, disabled = false): boolean {
|
||||
@@ -26,13 +27,15 @@ export function SliderResetIconButton({
|
||||
className,
|
||||
iconSize = 14,
|
||||
dataFlx = 'ui.slider.slider-reset-icon-button.button',
|
||||
alwaysVisible = false,
|
||||
}: SliderResetIconButtonProps): React.ReactElement | null {
|
||||
if (!canReset) return null;
|
||||
if (!canReset && !alwaysVisible) return null;
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(styles.resetButton, className)}
|
||||
onClick={onReset}
|
||||
disabled={!canReset}
|
||||
aria-label={ariaLabel}
|
||||
data-flx={dataFlx}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user