Skip to content

Commit

Permalink
fix: patch style sheet compose usage
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej.lodygowski committed Aug 23, 2024
1 parent e54d7aa commit 84826aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions package/src/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, {useState} from 'react';
import {
Image,
Platform,
StyleSheet,
AccessibilityActionEvent,
ViewProps,
ViewStyle,
Expand Down Expand Up @@ -230,7 +229,7 @@ const SliderComponent = (
const defaultStyle =
Platform.OS === 'ios' ? styles.defaultSlideriOS : styles.defaultSlider;
const sliderStyle = {zIndex: 1, width: width};
const style = StyleSheet.compose(props.style, defaultStyle);
const style = [props.style, defaultStyle];

const onValueChangeEvent = (event: Event) => {
onValueChange && onValueChange(event.nativeEvent.value);
Expand Down Expand Up @@ -287,7 +286,7 @@ const SliderComponent = (
onLayout={(event) => {
setWidth(event.nativeEvent.layout.width);
}}
style={[styles, style, {justifyContent: 'center'}]}>
style={[style, {justifyContent: 'center'}]}>
{props.StepMarker || !!props.renderStepNumber ? (
<StepsIndicator
options={options}
Expand Down

0 comments on commit 84826aa

Please sign in to comment.