Skip to content

Commit

Permalink
Merge pull request #89 from FullMoon04/showCloseButton-prop
Browse files Browse the repository at this point in the history
add showCloseButton prop
  • Loading branch information
elrumordelaluz authored Dec 4, 2018
2 parents 4f3045e + b6169cc commit 858cb24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ const steps = [
| `rounded` | Beautify helper + mask with border-radius (in px) | `number` | `0` | |
| `scrollDuration` | Smooth scroll duration when positioning the target element | `number` | `1` | |
| `scrollOffset` | Offset when positioning the target element | `number` | calculates the vertical center of the page | |
| `showButtons` | Show **helper** navigation butons | `bool` | `true` | |
| `showButtons` | Show **helper** navigation buttons | `bool` | `true` | |
| `showCloseButton` | Show **helper** close button | `bool` | `true` | |
| `showNavigation` | Show **helper** navigation dots | `bool` | `true` | |
| `showNavigationNumber` | Show number when hovers on each navigation dots | `bool` | `true` | |
| `showNumber` | Show **helper** number badge | `bool` | `true` | |
Expand Down
5 changes: 4 additions & 1 deletion src/TourPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class TourPortal extends Component {
scrollDuration: PropTypes.number,
scrollOffset: PropTypes.number,
showButtons: PropTypes.bool,
showCloseButton: PropTypes.bool,
showNavigation: PropTypes.bool,
showNavigationNumber: PropTypes.bool,
showNumber: PropTypes.bool,
Expand Down Expand Up @@ -70,6 +71,7 @@ class TourPortal extends Component {
showNavigation: true,
showNavigationNumber: true,
showButtons: true,
showCloseButton: true,
showNumber: true,
scrollDuration: 1,
maskSpace: 10,
Expand Down Expand Up @@ -384,6 +386,7 @@ class TourPortal extends Component {
steps,
maskClassName,
showButtons,
showCloseButton,
showNavigation,
showNavigationNumber,
showNumber,
Expand Down Expand Up @@ -542,7 +545,7 @@ class TourPortal extends Component {
</Controls>
)}

<Close onClick={onRequestClose} />
{showCloseButton ? <Close onClick={onRequestClose} /> : null}
</Guide>
{this.props.children}
</div>
Expand Down

0 comments on commit 858cb24

Please sign in to comment.