From 28f076afca411f0ed7e7343bf1b37833738e527c Mon Sep 17 00:00:00 2001 From: Ollie Curtis <8831547+olliecurtis@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:54:56 +0100 Subject: [PATCH] [NO JIRA][BpkFloatingNotification]: Update floating notification dismiss timeout (#3623) --- .../examples.tsx | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/examples/bpk-component-floating-notification/examples.tsx b/examples/bpk-component-floating-notification/examples.tsx index ba5a9ff97d..a2878c16c4 100644 --- a/examples/bpk-component-floating-notification/examples.tsx +++ b/examples/bpk-component-floating-notification/examples.tsx @@ -20,25 +20,16 @@ import BpkFloatingNotification from '../../packages/bpk-component-floating-notif import BpkIconHeart from '../../packages/bpk-component-icon/sm/heart'; import BpkIconInformationCircle from '../../packages/bpk-component-icon/sm/information-circle'; -const hideAfterHack = { - // Apply a exceptionally large number to hideAfter to effectively keep the UI around forever - hideAfter: 2_147_483_647, // largest 32 bit signed integer, maximum value for setTimeout. Around 28 days. :) -}; - const DefaultExample = () => ( - + ); const IconExample = () => ( - + ); const CtaExample = () => ( - + ); const CtaIconLongTextExample = () => ( @@ -46,7 +37,7 @@ const CtaIconLongTextExample = () => ( ctaText="View" icon={BpkIconHeart} text="Killer Combo saved to New York and Miami 🎉" - {...hideAfterHack} + hideAfter={8000} /> ); @@ -55,7 +46,9 @@ const VisualTestExample = () => ( animateOnEnter animateOnExit ctaText="View" - {...hideAfterHack} + // Apply a exceptionally large number to hideAfter to effectively keep the UI around forever + // largest 32 bit signed integer, maximum value for setTimeout. Around 28 days. :) + hideAfter={2_147_483_647} icon={BpkIconInformationCircle} text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." />