diff --git a/src/ReactCompareImage.tsx b/src/ReactCompareImage.tsx index 899ff37..3a06184 100644 --- a/src/ReactCompareImage.tsx +++ b/src/ReactCompareImage.tsx @@ -9,11 +9,13 @@ interface IProps { leftImageAlt?: string; leftImageCss?: object; leftImageLabel?: string; + leftImageLabelCss?: object; onSliderPositionChange?: (position: number) => void; rightImage: string; rightImageAlt?: string; rightImageCss?: object; rightImageLabel?: string; + rightImageLabelCss?: object; skeleton?: React.ReactNode; sliderLineColor?: string; sliderLineWidth?: number; @@ -29,10 +31,12 @@ const defaultProps = { leftImageAlt: '', leftImageCss: {}, leftImageLabel: null, + leftImageLabelCss: {}, onSliderPositionChange: () => {}, rightImageAlt: '', rightImageCss: {}, rightImageLabel: null, + rightImageLabelCss: {}, skeleton: null, sliderLineColor: '#ffffff', sliderLineWidth: 2, @@ -50,11 +54,13 @@ const ReactCompareImage: React.FC = props => { leftImageAlt, leftImageCss, leftImageLabel, + leftImageLabelCss, onSliderPositionChange, rightImage, rightImageAlt, rightImageCss, rightImageLabel, + rightImageLabelCss, skeleton, sliderLineColor, sliderLineWidth, @@ -422,12 +428,16 @@ const ReactCompareImage: React.FC = props => { {/* labels */} {leftImageLabel && (
-
{leftImageLabel}
+
+ {leftImageLabel} +
)} {rightImageLabel && (
-
{rightImageLabel}
+
+ {rightImageLabel} +
)}