Skip to content

Commit

Permalink
fix(html): fix toolbar and tabstrip scrollingPosition prop
Browse files Browse the repository at this point in the history
  • Loading branch information
TeyaVes committed Jan 24, 2025
1 parent be66f43 commit 9f2b06b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/html/src/tabstrip/tabstrip.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type KendoTabStripProps = KendoTabStripOptions & {
tabStripItems?: React.JSX.Element | React.JSX.Element[];
scrollable?: boolean;
scrollButtons?: "around" | "start" | "end" | "hidden";
scrollingPosition?: "start" | "end";
scrollingPosition?: "start" | "end" | "both";
dir?: "rtl" | "ltr";
};

Expand Down Expand Up @@ -80,7 +80,7 @@ export const TabStrip = (
[`${TABSTRIP_CLASSNAME}-${position}`]: position,
[`${TABSTRIP_CLASSNAME}-scrollable`]: scrollable,
[`${TABSTRIP_CLASSNAME}-scrollable-overlay`]: (scrollable && (scrollButtons === 'hidden' || !scrollButtons) ),
[`${TABSTRIP_CLASSNAME}-scrollable-${scrollingPosition}`]: scrollingPosition,
[`${TABSTRIP_CLASSNAME}-scrollable-${scrollingPosition}`]: scrollingPosition && scrollingPosition !== 'both',
},
optionClassNames(TABSTRIP_CLASSNAME, {size})
)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default () => (


<section>
<TabStripScrollableButtonsHidden scrollingPosition={null}
<TabStripScrollableButtonsHidden scrollingPosition="both"
tabStripItems={
<>
<TabStripItem first value="First" />
Expand Down Expand Up @@ -117,7 +117,7 @@ export default () => (


<section>
<TabStripScrollableButtonsHidden position="left" scrollingPosition={null}
<TabStripScrollableButtonsHidden position="left" scrollingPosition="both"
tabStripItems={
<>
<TabStripItem first value="First" />
Expand Down Expand Up @@ -182,7 +182,7 @@ export default () => (


<section>
<TabStripScrollableButtonsHidden scrollingPosition={null} dir="rtl"
<TabStripScrollableButtonsHidden scrollingPosition="both" dir="rtl"
tabStripItems={
<>
<TabStripItem first value="First" />
Expand Down
2 changes: 1 addition & 1 deletion packages/html/src/toolbar/tests/toolbar-fill-modes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default () =>(
</section>
<span className="k-colspan-all k-col-span-full">{fillMode} with overlay</span>
<section className="k-colspan-all k-col-span-full">
<ToolbarScrollableButtonsHidden fillMode={fillMode}>
<ToolbarScrollableButtonsHidden scrollingPosition="both" fillMode={fillMode}>
<Button icon="arrow-rotate-ccw" fillMode={fillMode}></Button>
<Button icon="arrow-rotate-cw" fillMode={fillMode}></Button>
<ToolbarSeparator></ToolbarSeparator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ export default () =>(

<span className="k-colspan-all k-col-span-full">Toolbar Hidden Buttons Scroll Middle</span>
<section className="k-colspan-all k-col-span-full">
<ToolbarScrollableButtonsHidden scrollingPosition={null} />
<ToolbarScrollableButtonsHidden scrollingPosition="both" />
</section>

<span className="k-colspan-all k-col-span-full">Toolbar Hidden Buttons Scroll Middle RTL</span>
<section className="k-colspan-all k-col-span-full" dir="rtl">
<ToolbarScrollableButtonsHidden scrollingPosition={null} />
<ToolbarScrollableButtonsHidden scrollingPosition="both" />
</section>

</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/html/src/toolbar/toolbar.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type KendoToolbarProps = KendoToolbarOptions & {
resizable?: boolean;
scrollable?: boolean;
scrollButtons?: 'hidden' | 'start' | 'end' | 'around';
scrollingPosition?: 'start' | 'end';
scrollingPosition?: 'start' | 'end' | 'both';
section?: boolean;
};

Expand Down Expand Up @@ -192,7 +192,7 @@ export const Toolbar = (
[`${TOOLBAR_CLASSNAME}-resizable`]: resizable,
[`${TOOLBAR_CLASSNAME}-scrollable`]: scrollable,
[`${TOOLBAR_CLASSNAME}-scrollable-overlay`]: (scrollable && scrollButtons === 'hidden'),
[`${TOOLBAR_CLASSNAME}-scrollable-${scrollingPosition}`]: scrollingPosition,
[`${TOOLBAR_CLASSNAME}-scrollable-${scrollingPosition}`]: scrollingPosition && scrollingPosition !== 'both',
[`${TOOLBAR_CLASSNAME}-section`]: section,
}
)}
Expand Down

0 comments on commit 9f2b06b

Please sign in to comment.