diff --git a/docs/props.md b/docs/props.md index 37d46997..b2aa6f07 100644 --- a/docs/props.md +++ b/docs/props.md @@ -3,7 +3,7 @@ The only required prop is `steps` with an array of [steps](step.md). Below is the complete list of possible props and options: -{% hint style="info" %} ▶︎ indicates the default value if there's one. You can check the definition of the type for the props [here](https://github.com/gilbarbara/react-joyride/blob/main/src/types/components.ts) {% endhint %} +{% hint style="info" %} ▶︎ indicates the default value if there's one. You can check the definition of the type for the props here.{% endhint %} **beaconComponent** `ElementType` A React component to use instead of the default Beacon. Check [custom components](custom-components.md) for details. @@ -35,7 +35,7 @@ Disable the fix to handle "unused" overflow parents. **floaterProps** `Partial` Options to be passed to [react-floater](https://github.com/gilbarbara/react-floater). -**getHelpers** `() => StoreHelpers` +**getHelpers** `(helpers: StoreHelpers) => void` Get the store methods to control the tour programmatically. `prev, next, go, close, skip, reset, info`. **hideBackButton** `boolean` ▶︎ **false** @@ -44,7 +44,7 @@ Hide the **Back** button. **hideCloseButton** `boolean` ▶︎ **false** Hide the **Close** button. -**locale** `Locale` ▶︎ **{ back: 'Back', close: 'Close', last: 'Last', next: 'Next', open: 'Open the dialog', skip: 'Skip' }** +**locale** `Locale` ▶︎ **{ back: 'Back', close: 'Close', last: 'Last', next: 'Next', nextLabelWithProgress: 'Next (Step {step} of {steps})', open: 'Open the dialog', skip: 'Skip' }** The strings used in the tooltip. **nonce** `string` @@ -79,7 +79,7 @@ Setting a number here will turn Joyride into `controlled` mode. You'll have to keep an internal state and update it with the events in the `callback`. -> **Do not use this if you don't need it.** +> **Do not use it if you don't need it.** **steps** `Array` - **required** The tour's steps. diff --git a/docs/step.md b/docs/step.md index 3ccbebdd..02c61fde 100644 --- a/docs/step.md +++ b/docs/step.md @@ -13,7 +13,7 @@ The step is a plain object that only requires two properties to be valid: `targe {% hint style="info" %} ▶︎ indicates the default value if there's one {% endhint %} -**content** `React.Node` +**content** `ReactNode` The tooltip's body. **data** `any` @@ -53,10 +53,10 @@ The beacon's placement can be top, bottom, left, or right. If nothing is passed, **styles** `Partial` Override the [styling](styling.md) of the step's Tooltip -**target** `HTMLElement\|string` - **required** +**target** `HTMLElement|string` - **required** The target for the step. It can be a [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) or an HTMLElement directly \(but using refs created in the same render would require an additional render to be set\). -**title** `React.Node` +**title** `ReactNode` The tooltip's title. ## Common Props Inheritance diff --git a/src/types/components.ts b/src/types/components.ts index ae7ae0de..0a6e61a5 100644 --- a/src/types/components.ts +++ b/src/types/components.ts @@ -169,7 +169,7 @@ export type Props = Simplify< /** * Get the store methods to control the tour programmatically. `prev, next, go, close, skip, reset, info` */ - getHelpers?: (helpers: StoreHelpers) => any; + getHelpers?: (helpers: StoreHelpers) => void; /** * A nonce value for inline styles (Content Security Policy - CSP) */