Skip to content

Commit

Permalink
WRR-4972: Fixed PageViews dot indicator to be centered
Browse files Browse the repository at this point in the history
Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
  • Loading branch information
juwonjeong committed Oct 9, 2024
1 parent b10fe56 commit 2618b25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions PageViews/PageViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ const PageViewsBase = kind({
return (
<>
{pageIndicatorType !== 'number' ?
<Row className={classNames(css.steps, {[css.hidden]: !isStepVisible})}>
<Row className={classNames(css.stepsRow, {[css.hidden]: !isStepVisible})}>
<Steps
css={css}
current={index + 1}
currentIcon="circle"
futureIcon="circle"
Expand All @@ -260,7 +261,7 @@ const PageViewsBase = kind({
size={30}
/>
</Row> :
<Row className={css.steps}>
<Row className={css.stepsRow}>
<Cell className={css.navButton} shrink>
{isPrevButtonVisible ? <Button aria-label={$L('Previous')} icon="arrowlargeleft" iconFlip="auto" id="PrevNavButton" onClick={onPrevClick} size="small" /> : null}
</Cell>
Expand Down
12 changes: 9 additions & 3 deletions PageViews/PageViews.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
width: @sand-pageviews-number-navigation-button-area-width;
}

.steps {
.stepsRow {
align-items: center;
justify-content: center;
text-align: center;
Expand All @@ -38,7 +38,7 @@
}
}

&.number .steps {
&.number .stepsRow {
min-height: @sand-pageviews-number-steps-area-min-height;
.pageNumber {
width: @sand-pageviews-number-steps-number-width;
Expand All @@ -49,10 +49,16 @@
}

&.dot .steps {
display: flex;
min-height: @sand-pageviews-dot-steps-area-min-height;
align-items: center;
.step {
line-height: @sand-pageviews-dot-steps-area-min-height;
height: @sand-pageviews-dot-steps-area-min-height
}
}

&.fullContents .steps {
&.fullContents .stepsRow {
position: absolute;
align-self: center;
bottom: @sand-pageviews-full-steps-position-bottom;
Expand Down
2 changes: 1 addition & 1 deletion styles/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@
// PageViews
// ---------------------------------------
@sand-pageviews-navigation-button-area-width: 216px;
@sand-pageviews-steps-area-min-height: 132px;
@sand-pageviews-steps-area-min-height: 114px;
@sand-pageviews-dot-steps-area-min-height: @sand-pageviews-steps-area-min-height;
@sand-pageviews-full-steps-area-min-height: @sand-pageviews-steps-area-min-height;
@sand-pageviews-full-steps-position-bottom: 0;
Expand Down

0 comments on commit 2618b25

Please sign in to comment.