Skip to content

Commit ed0c2c0

Browse files
feat(website): add size="s" to all content EuiText wrappers (#9078)
1 parent 62091a8 commit ed0c2c0

File tree

1 file changed

+32
-32
lines changed
  • packages/website/docs/components/display/tour

1 file changed

+32
-32
lines changed

packages/website/docs/components/display/tour/index.mdx

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [EuiTour, EuiTourStep, useEuiTour]
77
The tour components provided by EUI allow for a flexible and customizable way to showcase items on a page in an ordered manner by augmenting existing elements on the page without altering functionality.
88

99
:::note
10-
Examples on this page use localStorage to persist state.
10+
Examples on this page use `localStorage` to persist state.
1111
:::
1212

1313
## Usage
@@ -37,7 +37,7 @@ export default () => {
3737
<EuiSpacer size="m" />
3838
<EuiTourStep
3939
content={
40-
<EuiText>
40+
<EuiText size="s">
4141
<p>The tour step content.</p>
4242
</EuiText>
4343
}
@@ -88,7 +88,7 @@ export default () => {
8888
<EuiTourStep
8989
anchor={() => anchorRef.current}
9090
content={
91-
<EuiText>
91+
<EuiText size="s">
9292
<p>
9393
Popover is attached to the <EuiCode>anchorRef</EuiCode> button
9494
</p>
@@ -120,7 +120,7 @@ export default () => {
120120
<EuiTourStep
121121
anchor="#anchorTarget"
122122
content={
123-
<EuiText>
123+
<EuiText size="s">
124124
<p>
125125
Popover is attached to the <EuiCode>#anchorTarget</EuiCode> button
126126
</p>
@@ -149,7 +149,7 @@ export default () => {
149149

150150
### Guided tour
151151

152-
Uers proceed through tour steps without needing to complete actions on the underlying page. In this scenario, consider showing both **Close tour** and **Next** buttons.
152+
Users proceed through tour steps without needing to complete actions on the underlying page. In this scenario, consider showing both **Close tour** and **Next** buttons.
153153

154154
```tsx interactive
155155
import React, { useEffect, useState } from 'react';
@@ -162,34 +162,35 @@ import {
162162
EuiFlexItem,
163163
EuiPanel,
164164
EuiButtonIcon,
165+
EuiText,
165166
} from '@elastic/eui';
166167

167168
const demoTourSteps = [
168169
{
169170
step: 1,
170171
title: 'Preview mode',
171-
content: <p>See what your project looks like.</p>,
172+
content: <EuiText size="s"><p>See what your project looks like.</p></EuiText>,
172173
anchorRef: 'notActionDrivenStep1',
173174
iconType: 'eye',
174175
},
175176
{
176177
step: 2,
177178
title: 'Build Mode',
178-
content: <p>Build your project.</p>,
179+
content: <EuiText size="s"><p>Build your project.</p></EuiText>,
179180
anchorRef: 'notActionDrivenStep2',
180181
iconType: 'code',
181182
},
182183
{
183184
step: 3,
184185
title: 'Comment mode',
185-
content: <p>Collaborate with your colleagues.</p>,
186+
content: <EuiText size="s"><p>Collaborate with your colleagues.</p></EuiText>,
186187
anchorRef: 'notActionDrivenStep3',
187188
iconType: 'comment',
188189
},
189190
{
190191
step: 2,
191192
title: 'Share',
192-
content: <p>Share your project.</p>,
193+
content: <EuiText size="s"><p>Share your project.</p></EuiText>,
193194
anchorRef: 'notActionDrivenStep4',
194195
iconType: 'share',
195196
},
@@ -316,27 +317,27 @@ import {
316317
EuiSpacer,
317318
EuiTextArea,
318319
EuiTourStep,
320+
EuiText,
319321
} from '@elastic/eui';
320322

321323
const demoTourSteps = [
322324
{
323325
step: 1,
324326
title: 'Step 1',
325327
content: (
326-
<span>
328+
<EuiText size="s">
327329
<p>Copy and paste this sample query.</p>
328-
<EuiSpacer />
329330
<EuiCodeBlock language="html" paddingSize="s" isCopyable>
330-
{'SELECT email FROM kibana_sample_data_ecommerce'}
331+
{'SELECT email FROM "kibana_sample_data_ecommerce"'}
331332
</EuiCodeBlock>
332-
</span>
333+
</EuiText>
333334
),
334335
anchorRef: 'tourStep2',
335336
},
336337
{
337338
step: 2,
338339
title: 'Step 2',
339-
content: <p>Save your changes.</p>,
340+
content: <EuiText size="s"><p>Save your changes.</p></EuiText>,
340341
anchorRef: 'tourStep1',
341342
},
342343
];
@@ -469,27 +470,27 @@ import {
469470
EuiTextArea,
470471
EuiTourStep,
471472
useEuiTour,
473+
EuiText,
472474
} from '@elastic/eui';
473475

474476
const demoTourSteps = [
475477
{
476478
step: 1,
477479
title: 'Step 1',
478480
content: (
479-
<span>
481+
<EuiText size="s">
480482
<p>Copy and paste this sample query.</p>
481-
<EuiSpacer />
482483
<EuiCodeBlock language="html" paddingSize="s" isCopyable>
483-
{'SELECT email FROM kibana_sample_data_ecommerce'}
484+
{'SELECT email FROM "kibana_sample_data_ecommerce"'}
484485
</EuiCodeBlock>
485-
</span>
486+
</EuiText>
486487
),
487488
anchorPosition: 'rightUp',
488489
},
489490
{
490491
step: 2,
491492
title: 'Step 2',
492-
content: <p>Save your changes.</p>,
493+
content: <EuiText size="s"><p>Save your changes.</p></EuiText>,
493494
anchorPosition: 'rightUp',
494495
},
495496
];
@@ -585,27 +586,27 @@ import {
585586
EuiTextArea,
586587
EuiTour,
587588
EuiTourStep,
589+
EuiText,
588590
} from '@elastic/eui';
589591

590592
const demoTourSteps = [
591593
{
592594
step: 1,
593595
title: 'Step 1',
594596
content: (
595-
<span>
597+
<EuiText size="s">
596598
<p>Copy and paste this sample query.</p>
597-
<EuiSpacer />
598599
<EuiCodeBlock language="html" paddingSize="s" isCopyable>
599-
{'SELECT email FROM kibana_sample_data_ecommerce'}
600+
{'SELECT email FROM "kibana_sample_data_ecommerce"'}
600601
</EuiCodeBlock>
601-
</span>
602+
</EuiText>
602603
),
603604
anchorPosition: 'rightUp',
604605
},
605606
{
606607
step: 2,
607608
title: 'Step 2',
608-
content: <p>Save your changes.</p>,
609+
content: <EuiText size="s"><p>Save your changes.</p></EuiText>,
609610
anchorPosition: 'rightUp',
610611
},
611612
];
@@ -703,6 +704,7 @@ import {
703704
EuiTextArea,
704705
EuiTourStep,
705706
useEuiTour,
707+
EuiText,
706708
} from '@elastic/eui';
707709

708710
const demoTourSteps = [
@@ -714,12 +716,12 @@ const demoTourSteps = [
714716
step: 2,
715717
title: 'Step 2',
716718
anchorPosition: 'upCenter',
717-
content: <p>What is your favorite color?</p>,
719+
content: <EuiText size="s"><p>What is your favorite color?</p></EuiText>,
718720
},
719721
{
720722
step: 3,
721723
title: 'Step 3',
722-
content: <p>Click here for more cool things.</p>,
724+
content: <EuiText size="s"><p>Click here for more cool things.</p></EuiText>,
723725
anchorPosition: 'downRight',
724726
minWidth: 'auto',
725727
},
@@ -778,13 +780,12 @@ export default () => {
778780
{...euiTourStepOne}
779781
zIndex={1}
780782
content={
781-
<div>
783+
<EuiText size="s">
782784
<p>This is a neat thing. You enter queries here.</p>
783-
<EuiSpacer />
784785
<EuiButton color="primary" onClick={actions.incrementStep}>
785786
Ok, got it.
786787
</EuiButton>
787-
</div>
788+
</EuiText>
788789
}
789790
>
790791
<EuiTextArea
@@ -840,13 +841,12 @@ export default () => {
840841
{...euiTourStepFour}
841842
zIndex={1}
842843
content={
843-
<div>
844+
<EuiText size="s">
844845
<p>That about does it.</p>
845-
<EuiSpacer />
846846
<EuiButton color="primary" onClick={onReset}>
847847
Take me to the start.
848848
</EuiButton>
849-
</div>
849+
</EuiText>
850850
}
851851
>
852852
<div>

0 commit comments

Comments
 (0)