From ee9ee7f3ffcb862acec372729de6a9d4d14fd51a Mon Sep 17 00:00:00 2001 From: Tristan Grayford Date: Tue, 26 Nov 2024 17:12:40 +0000 Subject: [PATCH] [COR-481][BpkDrawer] Drawer Ipad Setting Fix (#3682) * Update BpkJourneyArrow.module.scss * Update drawer to tsx * Update BpkJourneyArrow.module.scss * Update BpkDrawer.tsx * Update BpkDrawerContent.tsx * Importing types for drawer * Type imports updated * Drawer snapshot update * Param setup * Fix className * Updating transition * Test fix * Restoring className * Transition * Update BpkDrawerContent.module.scss * Animation correction and state management fix * Update BpkDrawerContent.tsx * Fixing ipad set to true in Drawer --------- Co-authored-by: tristan-grayford Co-authored-by: Ollie Curtis <8831547+olliecurtis@users.noreply.github.com> --- packages/bpk-component-drawer/src/BpkDrawer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/bpk-component-drawer/src/BpkDrawer.tsx b/packages/bpk-component-drawer/src/BpkDrawer.tsx index b480ce042b..d6c02fe62b 100644 --- a/packages/bpk-component-drawer/src/BpkDrawer.tsx +++ b/packages/bpk-component-drawer/src/BpkDrawer.tsx @@ -21,7 +21,7 @@ import type { ReactNode } from 'react'; import { useState, useEffect } from 'react'; -import { Portal, isDeviceIphone } from '../../bpk-react-utils'; +import { Portal, isDeviceIpad, isDeviceIphone } from '../../bpk-react-utils'; import { withScrim } from '../../bpk-scrim-utils'; import BpkDrawerContent from './BpkDrawerContent'; @@ -47,6 +47,7 @@ export type Props = { closeLabel?: string | null, closeText?: string, hideTitle?: boolean, + isIpad?: boolean, isIphone?: boolean, padded?: boolean, mobileModalDisplay?: boolean, @@ -62,6 +63,7 @@ const BpkDrawer = ({ getApplicationElement, hideTitle = false, id, + isIpad = isDeviceIpad(), isIphone = isDeviceIphone(), isOpen, mobileModalDisplay = false, @@ -105,7 +107,7 @@ const BpkDrawer = ({ onClose={hide} onCloseAnimationComplete={onCloseAnimationComplete} closeOnScrimClick - isIpad + isIpad={isIpad} isIphone={isIphone} padded={padded} mobileModalDisplay={mobileModalDisplay}