@hifi/react-tos-modal
Advanced tools
Comparing version 1.0.10 to 1.0.12
/// <reference types="react" /> | ||
export default function TosModal({ children, config, modalButtonText, tosJsx, }: { | ||
export default function TosModal({ children, config, modalButtonOnClick, modalButtonText, tosJsx, }: { | ||
children: any; | ||
config: TosModalConfig; | ||
modalButtonOnClick: React.MouseEventHandler<HTMLButtonElement>; | ||
modalButtonText: string; | ||
@@ -6,0 +7,0 @@ tosJsx: any; |
@@ -113,3 +113,3 @@ "use strict"; | ||
}; | ||
function TosModal({ children, config, modalButtonText, tosJsx, }) { | ||
function TosModal({ children, config, modalButtonOnClick, modalButtonText, tosJsx, }) { | ||
const { backgroundColor, isScrollable, lightboxOpacity, modalHeight, modalHeightMobile, modalBorderRadius, modalWidth, scrollBarWidth, scrollTrackColor, scrollThumbColor, scrollThumbHoverColor, modalButtonHeight, modalButtonWidth, modalButtonFontSize, modalButtonColorEnabled, modalButtonColorHover, modalPaddingTopBottom, modalPaddingSides, } = config; | ||
@@ -121,3 +121,6 @@ const [agreed, setAgreed] = (0, react_1.useState)(() => { | ||
}); | ||
const handleAgree = () => setAgreed(JSON.stringify(true)); | ||
const handleAgree = (event) => { | ||
modalButtonOnClick(event); | ||
setAgreed(JSON.stringify(true)); | ||
}; | ||
(0, react_1.useEffect)(() => { | ||
@@ -124,0 +127,0 @@ localStorage.setItem("agreed", JSON.stringify(agreed)); |
{ | ||
"name": "@hifi/react-tos-modal", | ||
"description": "A React modal for displaying terms of service at the start of a session", | ||
"version": "1.0.10", | ||
"version": "1.0.12", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Hifi", |
Sorry, the diff of this file is not supported yet
13876
209