Skip to content

Commit 1d645c9

Browse files
committed
style: lint
1 parent 699ce97 commit 1d645c9

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

core/src/components/segment-button/segment-button.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ export class SegmentButton implements ComponentInterface, ButtonInterface {
166166
</span>
167167
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
168168
</button>
169-
<div
170-
part="indicator"
171-
class="segment-button-indicator segment-button-indicator-animated"
172-
>
169+
<div part="indicator" class="segment-button-indicator segment-button-indicator-animated">
173170
<div part="indicator-background" class="segment-button-indicator-background"></div>
174171
</div>
175172
</Host>

core/src/components/segment-view/segment-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class SegmentView implements ComponentInterface {
3939
// Emit the scroll direction and distance
4040
this.ionSegmentViewScroll.emit({
4141
scrollDirection,
42-
scrollDistance
42+
scrollDistance,
4343
});
4444

4545
const atSnappingPoint = scrollLeft % offsetWidth === 0;

core/src/components/segment-view/test/disabled/segment-view.e2e.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
6565
await expect(segmentContent).toBeInViewport();
6666
});
6767

68-
test('should scroll to the third content and update the segment value when the second segment content is disabled', async ({ page }) => {
68+
test('should scroll to the third content and update the segment value when the second segment content is disabled', async ({
69+
page,
70+
}) => {
6971
await page.setContent(
7072
`
7173
<ion-segment>

core/src/components/segment/segment.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ export class Segment implements ComponentInterface {
374374

375375
// Calculate the max and min allowed transformations based on the scroll direction
376376
const maxTransform = scrollDirection === 'left' ? 0 : segmentRect.width - buttonRect.width;
377-
const minTransform = scrollDirection === 'left' ?
378-
-(segmentRect.width - buttonRect.width) : 0;
377+
const minTransform = scrollDirection === 'left' ? -(segmentRect.width - buttonRect.width) : 0;
379378

380379
// Clamp the transform value to ensure it doesn't go out of bounds
381380
const clampedTransform = Math.max(minTransform, Math.min(transformValue, maxTransform));

0 commit comments

Comments
 (0)