Skip to content

Commit

Permalink
[COR-481][BpkDrawer] Drawer Ipad Setting Fix (#3682)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Ollie Curtis <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent 5c3bfec commit ee9ee7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/bpk-component-drawer/src/BpkDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -47,6 +47,7 @@ export type Props = {
closeLabel?: string | null,
closeText?: string,
hideTitle?: boolean,
isIpad?: boolean,
isIphone?: boolean,
padded?: boolean,
mobileModalDisplay?: boolean,
Expand All @@ -62,6 +63,7 @@ const BpkDrawer = ({
getApplicationElement,
hideTitle = false,
id,
isIpad = isDeviceIpad(),
isIphone = isDeviceIphone(),
isOpen,
mobileModalDisplay = false,
Expand Down Expand Up @@ -105,7 +107,7 @@ const BpkDrawer = ({
onClose={hide}
onCloseAnimationComplete={onCloseAnimationComplete}
closeOnScrimClick
isIpad
isIpad={isIpad}
isIphone={isIphone}
padded={padded}
mobileModalDisplay={mobileModalDisplay}
Expand Down

0 comments on commit ee9ee7f

Please sign in to comment.