@@ -74,13 +74,23 @@ export function renderPopover(element: Element, step: DriveStep) {
74
74
disableButtons,
75
75
showProgress,
76
76
77
- nextBtnText = getConfig ( "nextBtnText" ) || "Next → " ,
78
- prevBtnText = getConfig ( "prevBtnText" ) || "← Previous" ,
77
+ nextBtnText = getConfig ( "nextBtnText" ) || "Next" ,
78
+ prevBtnText = getConfig ( "prevBtnText" ) || "Previous" ,
79
79
progressText = getConfig ( "progressText" ) || "{current} of {total}" ,
80
80
} = step . popover || { } ;
81
81
82
+ const rightArrow = document . createElement ( "span" ) ;
83
+ rightArrow . setAttribute ( "aria-hidden" , "true" ) ;
84
+ rightArrow . innerHTML = " →" ;
85
+
86
+ const leftArrow = document . createElement ( "span" ) ;
87
+ leftArrow . setAttribute ( "aria-hidden" , "true" ) ;
88
+ leftArrow . innerHTML = "← " ;
89
+
82
90
popover . nextButton . innerHTML = nextBtnText ;
91
+ popover . nextButton . appendChild ( rightArrow ) ;
83
92
popover . previousButton . innerHTML = prevBtnText ;
93
+ popover . previousButton . insertBefore ( leftArrow , popover . previousButton . firstChild ) ;
84
94
popover . progress . innerHTML = progressText ;
85
95
86
96
if ( title ) {
@@ -632,21 +642,13 @@ function createPopover(): PopoverDOM {
632
642
previousButton . classList . add ( "driver-popover-prev-btn" ) ;
633
643
previousButton . innerHTML = "← Previous" ;
634
644
635
- const previousBtnSpan = document . createElement ( "span" ) ;
636
- previousBtnSpan . setAttribute ( "aria-hidden" , "true" ) ;
637
- previousBtnSpan . appendChild ( previousButton ) ;
638
-
639
645
const nextButton = document . createElement ( "button" ) ;
640
646
nextButton . type = "button" ;
641
647
nextButton . classList . add ( "driver-popover-next-btn" ) ;
642
648
nextButton . innerHTML = "Next →" ;
643
-
644
- const nextBtnSpan = document . createElement ( "span" ) ;
645
- nextBtnSpan . setAttribute ( "aria-hidden" , "true" ) ;
646
- nextBtnSpan . appendChild ( nextButton ) ;
647
649
648
- footerButtons . appendChild ( previousBtnSpan ) ;
649
- footerButtons . appendChild ( nextBtnSpan ) ;
650
+ footerButtons . appendChild ( previousButton ) ;
651
+ footerButtons . appendChild ( nextButton ) ;
650
652
footer . appendChild ( progress ) ;
651
653
footer . appendChild ( footerButtons ) ;
652
654
0 commit comments