Skip to content

Commit dca1433

Browse files
committed
Change footer forward button to primary and backward button to tertiary in the tour guide modal
1 parent 743725a commit dca1433

File tree

2 files changed

+42
-38
lines changed

2 files changed

+42
-38
lines changed

plugins/woocommerce-admin/client/products/tour/components/guide/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Modal, Button } from '@wordpress/components';
1111
*/
1212
import PageControl from './page-control';
1313
import type { GuideProps } from './types';
14+
import './style.scss';
1415

1516
/*
1617
* This component was copied from @wordpress/components since we needed
@@ -90,6 +91,7 @@ function Guide( {
9091
{ canGoBack && (
9192
<Button
9293
className="components-guide__back-button"
94+
variant="tertiary"
9395
onClick={ goBack }
9496
>
9597
{ __( 'Previous', 'woocommerce' ) }
@@ -98,6 +100,7 @@ function Guide( {
98100
{ canGoForward && (
99101
<Button
100102
className="components-guide__forward-button"
103+
variant="primary"
101104
onClick={ goForward }
102105
>
103106
{ __( 'Next', 'woocommerce' ) }
@@ -106,6 +109,7 @@ function Guide( {
106109
{ ! canGoForward && (
107110
<Button
108111
className="components-guide__finish-button"
112+
variant="primary"
109113
href={ finishButtonLink }
110114
target={ finishButtonLink ? '_blank' : undefined }
111115
rel={ finishButtonLink ? 'noopener' : undefined }

plugins/woocommerce-admin/client/products/tour/components/guide/style.scss

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,43 @@
6363
padding: 0 $grid-unit-40;
6464
position: relative;
6565
width: 100%;
66+
67+
.components-button {
68+
&.components-guide__back-button,
69+
&.components-guide__forward-button,
70+
&.components-guide__finish-button {
71+
height: 30px;
72+
position: absolute;
73+
font-weight: inherit;
74+
75+
&.is-primary {
76+
color: var(--wp-components-color-accent-inverted, #fff);
77+
}
78+
79+
&:hover {
80+
text-decoration: none;
81+
}
82+
}
83+
84+
&.components-guide__back-button,
85+
&.components-guide__forward-button {
86+
font-size: $default-font-size;
87+
padding: 4px 2px;
88+
89+
&.has-text svg {
90+
margin: 0;
91+
}
92+
}
93+
94+
&.components-guide__back-button {
95+
left: $grid-unit-40;
96+
}
97+
98+
&.components-guide__forward-button,
99+
&.components-guide__finish-button {
100+
right: $grid-unit-40;
101+
}
102+
}
66103
}
67104

68105
&__page-control {
@@ -88,45 +125,8 @@
88125
height: 80vh;
89126
max-height: 575px;
90127

91-
@media ( max-width: $break-small ) {
128+
@media (max-width: $break-small) {
92129
margin: auto;
93130
max-width: calc(100vw - #{$grid-unit-20} * 2);
94131
}
95132
}
96-
97-
.components-button {
98-
&.components-guide__back-button,
99-
&.components-guide__forward-button,
100-
&.components-guide__finish-button {
101-
height: 30px;
102-
position: absolute;
103-
}
104-
105-
&.components-guide__back-button,
106-
&.components-guide__forward-button {
107-
font-size: $default-font-size;
108-
padding: 4px 2px;
109-
110-
&.has-text svg {
111-
margin: 0;
112-
}
113-
114-
&:hover {
115-
text-decoration: underline;
116-
}
117-
}
118-
119-
&.components-guide__back-button {
120-
left: $grid-unit-40;
121-
}
122-
123-
&.components-guide__forward-button {
124-
right: $grid-unit-40;
125-
color: #1386bf;
126-
font-weight: bold;
127-
}
128-
129-
&.components-guide__finish-button {
130-
right: $grid-unit-40;
131-
}
132-
}

0 commit comments

Comments
 (0)