Skip to content

Commit 0deab67

Browse files
committed
Prefer IconButton styling for scroll to top
1 parent 3c125de commit 0deab67

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/app/components/site/ScrollToTop.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback, useEffect } from "react";
22
import classNames from "classnames";
33
import { siteSpecific } from "../../services";
4-
import { Button } from "reactstrap";
4+
import { IconButton } from "../elements/AffixButton";
55

66
export const ScrollToTop = ({mainContent}: {mainContent: React.MutableRefObject<HTMLElement | null>}) => {
77
const [sticky, setSticky] = React.useState(false);
@@ -18,16 +18,15 @@ export const ScrollToTop = ({mainContent}: {mainContent: React.MutableRefObject<
1818
}, [isSticky]);
1919

2020
return siteSpecific(
21-
<Button
21+
<IconButton
2222
color="keyline"
23+
icon="icon-chevron-up"
2324
className={classNames("scroll-btn d-print-none p-2", {"is-sticky": sticky})}
2425
onClick={() => mainContent.current?.scrollIntoView({behavior: 'smooth'})}
2526
tabIndex={sticky ? 0 : -1}
2627
aria-label="Scroll to top of page"
2728
data-bs-theme="neutral"
28-
>
29-
<i className="icon icon-chevron-up"/>
30-
</Button>,
29+
/>,
3130

3231
<button
3332
onClick={() => mainContent.current?.scrollIntoView({behavior: 'smooth'})}

0 commit comments

Comments
 (0)