react-shepherd 5.0.2 → 5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +941 -855
- package/dist/index.umd.cjs +10 -10
- package/package.json +5 -5
- package/src/index.tsx +2 -4
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ that can be passed into props for dynamic interactivity.
|
|
|
11
11
|
Use this simple NPM command or whatever package manager is your favorite.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install --save
|
|
14
|
+
npm install --save react-shepherd
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
@@ -33,8 +33,8 @@ const tourOptions = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
function Button() {
|
|
36
|
-
const
|
|
37
|
-
const tour =
|
|
36
|
+
const Shepherd = useShepherd();
|
|
37
|
+
const tour = new Shepherd.Tour({
|
|
38
38
|
...tourOptions,
|
|
39
39
|
steps: newSteps
|
|
40
40
|
});
|
|
@@ -59,7 +59,7 @@ export default function App() {
|
|
|
59
59
|
|
|
60
60
|
## Configuration
|
|
61
61
|
|
|
62
|
-
The following configuration options for a tour can be set on the `useShepherd` hook to control the way that Shepherd is used. This is simply a POJO passed to Shepherd to use the options noted in the Shepherd Tour [options](https://
|
|
62
|
+
The following configuration options for a tour can be set on the `useShepherd` hook to control the way that Shepherd is used. This is simply a POJO passed to Shepherd to use the options noted in the Shepherd Tour [options](https://docs.shepherdpro.com/api/tour/classes/tour/). You can also pass an API Key to use [Shepherd Pro](https://shepherdpro.com) features for analytics related events tracking.
|
|
63
63
|
|
|
64
64
|
### apiKey
|
|
65
65
|
|
|
@@ -68,7 +68,7 @@ Used to connect your tours to a Pro instance to get additional user information
|
|
|
68
68
|
|
|
69
69
|
## Steps
|
|
70
70
|
|
|
71
|
-
The options are the same as Shepherd [options](https://
|
|
71
|
+
The options are the same as Shepherd [options](https://docs.shepherdpro.com/api/step/classes/step/).
|
|
72
72
|
|
|
73
73
|
## License
|
|
74
74
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Context } from 'react';
|
|
|
3
3
|
import { default as default_2 } from 'shepherd.js';
|
|
4
4
|
import { FC } from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import { ShepherdPro } from '
|
|
6
|
+
import { ShepherdPro } from 'shepherd.js/dist/cjs/tour';
|
|
7
7
|
|
|
8
8
|
export declare const JourneyMethods: Consumer<ShepherdContextType | undefined>;
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ export declare const ShepherdJourneyContext: Context<ShepherdContextType | undef
|
|
|
16
16
|
export declare const ShepherdJourneyProvider: FC<ShepherdProviderProps>;
|
|
17
17
|
|
|
18
18
|
declare interface ShepherdProviderProps {
|
|
19
|
-
apiKey
|
|
19
|
+
apiKey?: string;
|
|
20
20
|
apiPath?: string;
|
|
21
21
|
properties?: Record<string, unknown>;
|
|
22
22
|
children?: ReactNode;
|