Skip to content

Commit 7af3184

Browse files
committed
Support displaying scroll buttons below teaser list
REDMINE-20981
1 parent 1634eb7 commit 7af3184

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

entry_types/scrolled/package/src/contentElements/externalLinkList/frontend/ExternalLinkList.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useContentElementEditorState,
77
useContentElementLifecycle,
88
useDarkBackground,
9+
useTheme,
910
contentElementWidthName,
1011
contentElementWidths
1112
} from 'pageflow-scrolled/frontend';
@@ -29,6 +30,7 @@ export function ExternalLinkList(props) {
2930
const linkList = props.configuration.links || [];
3031
const {shouldLoad} = useContentElementLifecycle();
3132
const darkBackground = useDarkBackground();
33+
const theme = useTheme();
3234

3335
const {setTransientState, isSelected} = useContentElementEditorState();
3436
const [selectedItemId, setSelectedItemId] = useState();
@@ -80,7 +82,8 @@ export function ExternalLinkList(props) {
8082
const linkAlignment = scrollerEnabled ? 'left' : props.configuration.linkAlignment;
8183

8284
return (
83-
<div className={classNames({[styles.contentMargin]: props.customMargin || fullWidth})}>
85+
<div className={classNames({[styles.contentMargin]: props.customMargin || fullWidth},
86+
styles[`scrollButtons-${theme.options.teasersScrollButtons}`])}>
8487
<Scroller enabled={scrollerEnabled}>
8588
{({scrollerRef, handleScroll}) =>
8689
<div className={classNames(styles.container, {[styles.fullContainer]: fullWidth})}>

entry_types/scrolled/package/src/contentElements/externalLinkList/frontend/ExternalLinkList.module.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
grid-column: 1;
2222
}
2323

24+
.scrollButtons-below > button:first-child,
25+
.scrollButtons-below > button {
26+
grid-column: 2;
27+
grid-row: 2;
28+
justify-self: end;
29+
width: auto;
30+
}
31+
32+
.scrollButtons-below > button:first-child {
33+
justify-self: start;
34+
}
35+
2436
.container {
2537
grid-column: 2;
2638
container-type: inline-size;

0 commit comments

Comments
 (0)