Skip to content

Commit 869857f

Browse files
📝 Docs updates for pro beta setup/usage (#2928)
1 parent 3bd735a commit 869857f

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

docs-src/src/content/docs/guides/install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ We strive to make it easy to use Shepherd in all the major frameworks, and have
6464

6565
- [angular-shepherd](https://github.com/shepherd-pro/angular-shepherd)
6666
- [ember-shepherd](https://github.com/shepherd-pro/ember-shepherd)
67-
- [react-shepherd](https://github.com/shepherd-pro/react-shepherd)
67+
- [react-shepherd](https://github.com/shepherd-pro/shepherd/tree/main/packages/react)
6868
- [vue-shepherd](https://github.com/shepherd-pro/vue-shepherd)

docs-src/src/content/docs/guides/setup.mdx

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Using Shepherd Pro
3-
description: A guide to using the Pro feature of Shepherd.
3+
description: A guide to using Shepherd Pro
44
---
55
import { Tabs, TabItem } from '@astrojs/starlight/components';
66

@@ -35,31 +35,36 @@ First, you'll need to install the Pro package:
3535
</Tabs>
3636

3737

38-
Before you create a new `Tour` instance, add your key via the `init` method:
38+
To get started, add your key via the `init` method:
3939

4040
```javascript
4141
import Shepherd from '@shepherdpro/pro-js';
4242

4343
Shepherd.init({YOUR API KEY});
44-
45-
const journey = new Shepherd.Tour({
46-
...
47-
});
4844
```
4945

50-
The second thing needed is to create an instance in the Pro portal, which will give you an ID to add to the tour.
46+
Then, if you've created journeys in the application and added targeting that is
47+
met, a journey will be shown to your user. Otherwise, you can also still programmatically
48+
start a journey in your application by using the `startJourney` method and passing the ID
49+
of the journey.
5150

5251
```javascript
53-
const journey = new Shepherd.Tour({
54-
id: 'custom-123',
55-
defaultStepOptions: {
56-
cancelIcon: {
57-
enabled: true
58-
},
59-
classes: 'my-custom-class'
60-
},
61-
useModalOverlay: true
62-
});
52+
Shepherd.`startJourney`('custom-UUID');
6353
```
6454

65-
Then you just need to add steps to the journey instance and trigger the start method to begin. Shepherd Pro will take care of the rest and capture events in the portal.
55+
### startJourney()
56+
57+
> **startJourney**(`id`): `Promise`\<`Tour | undefined`\>
58+
59+
Start the journey by ID, if found
60+
61+
#### Parameters
62+
63+
**id**: `string`
64+
65+
#### Returns
66+
67+
`Promise`\<`Tour | undefined`\>
68+
69+
70+
***

0 commit comments

Comments
 (0)