diff --git a/apps/docs/src/common/component-stories.ts b/apps/docs/src/common/component-stories.ts index 01f0eae3..5e9f9d75 100644 --- a/apps/docs/src/common/component-stories.ts +++ b/apps/docs/src/common/component-stories.ts @@ -12,7 +12,8 @@ const storySources = [ require('../../../../components/timeline/spec/Timeline.stories.mdx'), require('../../../../components/date-time/spec/DateTime.stories.mdx'), require('../../../../components/date-display/spec/DateDisplay.stories.mdx'), - require('../../../../components/time/spec/Time.stories.mdx') + require('../../../../components/time/spec/Time.stories.mdx'), + require('../../../../components/timeout-modal/spec/TimeoutModal.stories.mdx') ]; export const stories = storySources.reduce(reduceToLookup, {}) diff --git a/components/timeout-modal/spec/TimeoutModal.stories.mdx b/components/timeout-modal/spec/TimeoutModal.stories.mdx index b256de41..e300e5e5 100644 --- a/components/timeout-modal/spec/TimeoutModal.stories.mdx +++ b/components/timeout-modal/spec/TimeoutModal.stories.mdx @@ -10,32 +10,30 @@ import readMe from '../README.md'; chromatic: { viewports: [640, 480] }, description: 'HODS timeout modal', jest: ['TimeoutModal'], - notes: readMe + notes: readMe, + docs: { + inlineStories: false, + iframeHeight: 500, + } } } /> # timeout-modal -HODS timeout modal +HODS Timeout Modal - + - + console.log("timed out")} + onContinue={() => console.log("continue")} + onSignout={() => console.log("sign out")} + /> - - -## Stories -### Standard - -A standard timeout-modal. - - - - - - diff --git a/components/timeout-modal/src/TimeoutModal.tsx b/components/timeout-modal/src/TimeoutModal.tsx index 5693629b..76578127 100644 --- a/components/timeout-modal/src/TimeoutModal.tsx +++ b/components/timeout-modal/src/TimeoutModal.tsx @@ -53,8 +53,8 @@ export const TimeoutModal: FC = ({ To protect your information, you will be signed out in .

- - Sign out + + Sign out
diff --git a/components/timeout-modal/src/Timer.tsx b/components/timeout-modal/src/Timer.tsx index 755fa758..9efbefb5 100644 --- a/components/timeout-modal/src/Timer.tsx +++ b/components/timeout-modal/src/Timer.tsx @@ -15,7 +15,7 @@ export const Timer: FC = ({ }) => { const [runTimer, setRunTimer] = useState(true) const [timer, setTimer] = useState(timerFrom); - let formattedTimer = timer < 60 ? Math.ceil(timer / 20) * 20 : Math.ceil(timer / 60); + let formattedTimer = timer < 61 ? Math.ceil(timer / 20) * 20 : Math.ceil(timer / 60); const interval = useRef(null); useEffect(() => { @@ -26,7 +26,7 @@ export const Timer: FC = ({ if(runTimer && timer == 0) { clearInterval(interval.current); - onTimeout; + onTimeout(); } return (