Skip to content

Commit

Permalink
Fix docs and types
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Sep 11, 2024
1 parent 8ee561a commit 6bf66ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/gilbarbara/react-joyride/blob/main/src/types/components.ts" target="_blank">here</a>.{% endhint %}

**beaconComponent** `ElementType<BeaconRenderProps>`
A React component to use instead of the default Beacon. Check [custom components](custom-components.md) for details.
Expand Down Expand Up @@ -35,7 +35,7 @@ Disable the fix to handle "unused" overflow parents.
**floaterProps** `Partial<FloaterProps>`
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**
Expand All @@ -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`
Expand Down Expand Up @@ -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<Step>` - **required**
The tour's steps.
Expand Down
6 changes: 3 additions & 3 deletions docs/step.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -53,10 +53,10 @@ The beacon's placement can be top, bottom, left, or right. If nothing is passed,
**styles** `Partial<Styles>`
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
Expand Down
2 changes: 1 addition & 1 deletion src/types/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*/
Expand Down

0 comments on commit 6bf66ca

Please sign in to comment.