Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-light-tour

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-light-tour - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

4

dist/index.d.ts

@@ -8,3 +8,3 @@ import * as React from 'react';

type Steps = Step[];
declare const Tour: ({ isRun, steps, buttonsClassName, saveKey, nextText, previewText, doneText, }: {
declare const Tour: ({ isRun, steps, buttonsClassName, saveKey, nextText, previewText, doneText, bodyScrollDisable, scrollLogicalPosition, }: {
isRun: boolean;

@@ -20,4 +20,6 @@ steps: Steps;

doneText?: string;
bodyScrollDisable?: boolean;
scrollLogicalPosition?: ScrollLogicalPosition;
}) => React.JSX.Element;
export { type Step, type Steps, Tour as default };

@@ -37,3 +37,3 @@ 'use client';

const Tour = ({ isRun, steps, buttonsClassName, saveKey = 'tour-is-done', nextText = 'next', previewText = 'preview', doneText = 'done' })=>{
const Tour = ({ isRun, steps, buttonsClassName, saveKey = 'tour-is-done', nextText = 'next', previewText = 'preview', doneText = 'done', bodyScrollDisable = true, scrollLogicalPosition = 'center' })=>{
const [activeStep, setActiveStep] = React__namespace.useState(0);

@@ -50,5 +50,7 @@ const isTourAddedRef = React__namespace.useRef(false);

behavior: 'smooth',
block: 'center'
block: scrollLogicalPosition
});
document.body.style.overflow = 'hidden';
if (!bodyScrollDisable) {
document.body.style.overflow = 'hidden';
}
element.classList.add('active-tour');

@@ -68,3 +70,5 @@ const modal = document.createElement('div');

activeSection == null ? void 0 : activeSection.remove();
document.body.style.overflow = 'auto';
if (!bodyScrollDisable) {
document.body.style.overflow = 'auto';
}
});

@@ -105,3 +109,5 @@ const text = document.createElement('p');

localStorage.setItem(saveKey, 'true');
document.body.style.overflow = 'auto';
if (!bodyScrollDisable) {
document.body.style.overflow = 'auto';
}
}

@@ -108,0 +114,0 @@ });

{
"name": "react-light-tour",
"version": "0.0.5",
"version": "0.1.0",
"description": "lightweight onboarding tour for react",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc