Skip to content

Commit 7c3a684

Browse files
committed
refactor(carousel): migrate carousel button to new HDS button
HCRC-178
1 parent 9309852 commit 7c3a684

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/core/carousel/components/CarouselSlider.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Button } from 'hds-react';
2+
import { Button, ButtonVariant, LoadingSpinner } from 'hds-react';
33

44
import styles from '../carousel.module.scss';
55
import { splitArrayIntoChunksOfLen, getLoadMoreKey } from '../utils/utils';
@@ -20,15 +20,16 @@ function useCarouselSliderRegionAriaLabel() {
2020

2121
function CarouselLoadMoreButton() {
2222
const { onLoadMore, loading, loadMoreButtonLabelText } = useCarouselContext();
23+
const iconStart = loading ? <LoadingSpinner small /> : null;
2324
return (
2425
<div className={styles.onLoadMoreContainer}>
2526
<Button
26-
isLoading={loading}
27+
iconStart={iconStart}
2728
onClick={onLoadMore}
28-
variant="primary"
29+
variant={ButtonVariant.Primary}
2930
role="button"
3031
>
31-
{loadMoreButtonLabelText}
32+
{String(loadMoreButtonLabelText)}
3233
</Button>
3334
</div>
3435
);

0 commit comments

Comments
 (0)