New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hifi/react-tos-modal

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hifi/react-tos-modal - npm Package Compare versions

Comparing version 1.0.6 to 1.0.8

8

dist/TosModal.js

@@ -100,3 +100,3 @@ "use strict";

`;
const Modal = ({ handleAgree, isScrollable, backgroundColor, modalBorderRadius, modalHeight, modalHeightMobile, modalWidth, scrollBarWidth, scrollTrackColor, scrollThumbColor, scrollThumbHoverColor, tosJsx, modalButtonHeight, modalButtonWidth, modalButtonFontSize, modalButtonColorEnabled, modalButtonColorHover, modalPaddingTopBottom, modalPaddingSides, }) => {
const Modal = ({ handleAgree, isScrollable, backgroundColor, modalBorderRadius, modalHeight, modalHeightMobile, modalWidth, scrollBarWidth, scrollTrackColor, scrollThumbColor, scrollThumbHoverColor, tosJsx, modalButtonHeight, modalButtonWidth, modalButtonFontSize, modalButtonColorEnabled, modalButtonColorHover, modalButtonText, modalPaddingTopBottom, modalPaddingSides, }) => {
const [disabled, setDisabled] = (0, react_1.useState)(isScrollable);

@@ -112,6 +112,6 @@ const handleScroll = (event) => {

};
return ((0, jsx_runtime_1.jsx)(ModalBackground, { children: (0, jsx_runtime_1.jsx)(ModalForeground, Object.assign({ backgroundColor: backgroundColor, modalBorderRadius: modalBorderRadius, modalHeight: modalHeight, modalHeightMobile: modalHeightMobile, modalWidth: modalWidth, modalPaddingTopBottom: modalPaddingTopBottom, modalPaddingSides: modalPaddingSides }, { children: (0, jsx_runtime_1.jsxs)(ModalBody, { children: [(0, jsx_runtime_1.jsx)(ModalContent, Object.assign({ isScrollable: isScrollable, onScroll: handleScroll, scrollBarWidth: scrollBarWidth, scrollTrackColor: scrollTrackColor, scrollThumbColor: scrollThumbColor, scrollThumbHoverColor: scrollThumbHoverColor }, { children: tosJsx })), (0, jsx_runtime_1.jsx)(ModalButton, Object.assign({ disabled: disabled, onClick: handleAgree, modalButtonHeight: modalButtonHeight, modalButtonWidth: modalButtonWidth, modalButtonFontSize: modalButtonFontSize, modalButtonColorEnabled: modalButtonColorEnabled, modalButtonColorHover: modalButtonColorHover, id: "accept" }, { children: "I Agree" }))] }) })) }));
return ((0, jsx_runtime_1.jsx)(ModalBackground, { children: (0, jsx_runtime_1.jsx)(ModalForeground, Object.assign({ backgroundColor: backgroundColor, modalBorderRadius: modalBorderRadius, modalHeight: modalHeight, modalHeightMobile: modalHeightMobile, modalWidth: modalWidth, modalPaddingTopBottom: modalPaddingTopBottom, modalPaddingSides: modalPaddingSides }, { children: (0, jsx_runtime_1.jsxs)(ModalBody, { children: [(0, jsx_runtime_1.jsx)(ModalContent, Object.assign({ isScrollable: isScrollable, onScroll: handleScroll, scrollBarWidth: scrollBarWidth, scrollTrackColor: scrollTrackColor, scrollThumbColor: scrollThumbColor, scrollThumbHoverColor: scrollThumbHoverColor }, { children: tosJsx })), (0, jsx_runtime_1.jsx)(ModalButton, Object.assign({ disabled: disabled, onClick: handleAgree, modalButtonHeight: modalButtonHeight, modalButtonWidth: modalButtonWidth, modalButtonFontSize: modalButtonFontSize, modalButtonColorEnabled: modalButtonColorEnabled, modalButtonColorHover: modalButtonColorHover, id: "accept" }, { children: modalButtonText }))] }) })) }));
};
function TosModal({ children, config, tosJsx }) {
const { backgroundColor, isScrollable, modalHeight, modalHeightMobile, modalBorderRadius, modalWidth, scrollBarWidth, scrollTrackColor, scrollThumbColor, scrollThumbHoverColor, modalButtonHeight, modalButtonWidth, modalButtonFontSize, modalButtonColorEnabled, modalButtonColorHover, modalPaddingTopBottom, modalPaddingSides, } = config;
const { backgroundColor, isScrollable, modalHeight, modalHeightMobile, modalBorderRadius, modalWidth, scrollBarWidth, scrollTrackColor, scrollThumbColor, scrollThumbHoverColor, modalButtonHeight, modalButtonWidth, modalButtonFontSize, modalButtonColorEnabled, modalButtonColorHover, modalButtonText, modalPaddingTopBottom, modalPaddingSides, } = config;
const [agreed, setAgreed] = (0, react_1.useState)(() => {

@@ -126,4 +126,4 @@ const cached = localStorage.getItem("agreed") || JSON.parse("false");

}, [agreed]);
return ((0, jsx_runtime_1.jsxs)("div", { children: [!agreed && ((0, jsx_runtime_1.jsx)(Modal, { handleAgree: handleAgree, backgroundColor: backgroundColor, isScrollable: isScrollable, modalBorderRadius: modalBorderRadius, modalHeight: modalHeight, modalHeightMobile: modalHeightMobile, modalWidth: modalWidth, scrollBarWidth: scrollBarWidth, scrollTrackColor: scrollTrackColor, scrollThumbColor: scrollThumbColor, scrollThumbHoverColor: scrollThumbHoverColor, tosJsx: tosJsx, modalButtonHeight: modalButtonHeight, modalButtonWidth: modalButtonWidth, modalButtonFontSize: modalButtonFontSize, modalButtonColorEnabled: modalButtonColorEnabled, modalButtonColorHover: modalButtonColorHover, modalPaddingTopBottom: modalPaddingTopBottom, modalPaddingSides: modalPaddingSides })), children] }));
return ((0, jsx_runtime_1.jsxs)("div", { children: [!agreed && ((0, jsx_runtime_1.jsx)(Modal, { handleAgree: handleAgree, backgroundColor: backgroundColor, isScrollable: isScrollable, modalBorderRadius: modalBorderRadius, modalHeight: modalHeight, modalHeightMobile: modalHeightMobile, modalWidth: modalWidth, scrollBarWidth: scrollBarWidth, scrollTrackColor: scrollTrackColor, scrollThumbColor: scrollThumbColor, scrollThumbHoverColor: scrollThumbHoverColor, tosJsx: tosJsx, modalButtonHeight: modalButtonHeight, modalButtonWidth: modalButtonWidth, modalButtonFontSize: modalButtonFontSize, modalButtonColorEnabled: modalButtonColorEnabled, modalButtonColorHover: modalButtonColorHover, modalButtonText: modalButtonText, modalPaddingTopBottom: modalPaddingTopBottom, modalPaddingSides: modalPaddingSides })), children] }));
}
exports.default = TosModal;

@@ -6,2 +6,3 @@ /// <reference types="react" />

tosJsx: any;
modalButtonText: string;
} & ModalButtonProps & ModalContentProps & ModalForegroundProps;

@@ -31,3 +32,5 @@ declare type ModalButtonProps = {

};
declare type TosModalConfig = ModalButtonProps & ModalContentProps & ModalForegroundProps;
declare type TosModalConfig = ModalButtonProps & ModalContentProps & ModalForegroundProps & {
modalButtonText: string;
};
//# sourceMappingURL=types.d.ts.map
{
"name": "@hifi/react-tos-modal",
"description": "A React modal for displaying terms of service at the start of a session",
"version": "1.0.6",
"version": "1.0.8",
"author": {

@@ -6,0 +6,0 @@ "name": "Hifi",

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