Skip to content

Commit 80cada6

Browse files
CR - Revert percentage injection for ionic theme
1 parent c033d7c commit 80cada6

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

core/src/components/range/range.tsx

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { isRTL } from '@utils/rtl';
88
import { createColorClasses, hostContext } from '@utils/theme';
99

1010
import { getIonTheme } from '../../global/ionic-global';
11-
import type { Color, Gesture, GestureDetail, Theme } from '../../interface';
11+
import type { Color, Gesture, GestureDetail } from '../../interface';
1212
import { roundToMaxDecimalPlaces } from '../../utils/floating-point';
1313

1414
import type {
@@ -570,9 +570,9 @@ export class Range implements ComponentInterface {
570570
this.value = !this.dualKnobs
571571
? valA
572572
: {
573-
lower: Math.min(valA, valB),
574-
upper: Math.max(valA, valB),
575-
};
573+
lower: Math.min(valA, valB),
574+
upper: Math.max(valA, valB),
575+
};
576576

577577
this.ionInput.emit({ value: this.value });
578578

@@ -637,8 +637,6 @@ export class Range implements ComponentInterface {
637637
inheritedAttributes,
638638
} = this;
639639

640-
const theme = getIonTheme(this);
641-
642640
let barStart = `${ratioLower * 100}%`;
643641
let barEnd = `${100 - ratioUpper * 100}%`;
644642

@@ -780,7 +778,6 @@ export class Range implements ComponentInterface {
780778
min,
781779
max,
782780
inheritedAttributes,
783-
theme,
784781
})}
785782

786783
{this.dualKnobs &&
@@ -796,7 +793,6 @@ export class Range implements ComponentInterface {
796793
min,
797794
max,
798795
inheritedAttributes,
799-
theme,
800796
})}
801797
</div>
802798
);
@@ -877,25 +873,11 @@ interface RangeKnob {
877873
pinFormatter: PinFormatter;
878874
inheritedAttributes: Attributes;
879875
handleKeyboard: (name: KnobName, isIncrease: boolean) => void;
880-
theme: Theme;
881876
}
882877

883878
const renderKnob = (
884879
rtl: boolean,
885-
{
886-
knob,
887-
value,
888-
ratio,
889-
min,
890-
max,
891-
disabled,
892-
pressed,
893-
pin,
894-
handleKeyboard,
895-
pinFormatter,
896-
inheritedAttributes,
897-
theme,
898-
}: RangeKnob
880+
{ knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes }: RangeKnob
899881
) => {
900882
const start = rtl ? 'right' : 'left';
901883

@@ -946,7 +928,7 @@ const renderKnob = (
946928
>
947929
{pin && (
948930
<div class="range-pin" role="presentation" part="pin">
949-
{pinFormatter(value) + (theme === 'ionic' ? '%' : '')}
931+
{pinFormatter(value)}
950932
</div>
951933
)}
952934
<div class="range-knob" role="presentation" part="knob" />

0 commit comments

Comments
 (0)