Skip to content

Commit

Permalink
Use theme icons for default navigation scroll buttons
Browse files Browse the repository at this point in the history
REDMINE-20674
  • Loading branch information
tf committed Jul 15, 2024
1 parent 8e9cd19 commit 3dbb1ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, {useRef} from 'react';
import classNames from 'classnames';

import ChevronLeftIcon from './icons/chevronLeft.svg';
import ChevronRightIcon from './icons/chevronRight.svg';
import {ThemeIcon} from 'pageflow-scrolled/frontend';

import styles from './ScrollButton.module.css';

Expand All @@ -19,7 +18,7 @@ export function ScrollButton({type, contentRect, onStep}) {
[styles.visible]: visible})}
onMouseDown={handleMouseDown}
onKeyPress={handleKeyPress}>
{type === 'start' ? <ChevronLeftIcon /> : <ChevronRightIcon />}
<ThemeIcon name={type === 'start' ? 'arrowLeft' : 'arrowRight'} />
</button>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
}

.button svg {
width: 18px;
height: 18px;
width: 30px;
height: 30px;
color: var(--theme-widget-primary-color);
flex-shrink: 0;
}

.visible {
Expand Down

0 comments on commit 3dbb1ce

Please sign in to comment.