Skip to content

Commit

Permalink
chore(html): pass other props in slider helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
zhpenkov committed Jan 30, 2024
1 parent aa95194 commit 8de86a6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
21 changes: 12 additions & 9 deletions packages/html/src/slider/slider-tick.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ export const SliderTick = (
label = defaultProps.label,
orientation,
large,
text
text,
...other
} = props;

return (
<li className={classNames(
props.className,
SLIDER_TICK_CLASSNAME,
{
[`k-tick-${orientation}`]: orientation,
'k-tick-large': large
}
)} style={style} >
<li
{...other}
className={classNames(
props.className,
SLIDER_TICK_CLASSNAME,
{
[`k-tick-${orientation}`]: orientation,
'k-tick-large': large
}
)} style={style} >
{label && <span className="k-label">{text}</span>}
</li>
);
Expand Down
31 changes: 17 additions & 14 deletions packages/html/src/slider/slider.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export const Slider = (
focus,
active,
trackStyle,
dir
dir,
...other
} = props;

let iconIncrease;
Expand All @@ -67,19 +68,21 @@ export const Slider = (
}

return (
<div className={classNames(
SLIDER_CLASSNAME,
props.className,
stateClassNames(SLIDER_CLASSNAME, {
readonly,
disabled
}),
{
[`k-slider-${orientation}`]: orientation,
'k-colorgradient-slider': type === 'gradient',
'k-range-slider': type === 'range'
}
)} dir={dir} >
<div
{...other}
className={classNames(
SLIDER_CLASSNAME,
props.className,
stateClassNames(SLIDER_CLASSNAME, {
readonly,
disabled
}),
{
[`k-slider-${orientation}`]: orientation,
'k-colorgradient-slider': type === 'gradient',
'k-range-slider': type === 'range'
}
)} dir={dir} >
{ showButtons && <Button className="k-button-decrease" rounded="full" icon={iconDecrease} /> }
<div className="k-slider-track-wrap">
{
Expand Down

0 comments on commit 8de86a6

Please sign in to comment.