Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SideNav): Implementation, Documentation, Tests #2167

Merged
merged 104 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 93 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
988aa5f
poc
saurabhdaware Apr 29, 2024
6e22172
Merge branch 'master' of github.com:razorpay/blade into sidenav/poc
saurabhdaware May 3, 2024
608db13
feat: create L1 menu
saurabhdaware May 3, 2024
400f65a
feat: add basic L2
saurabhdaware May 6, 2024
f59cf7c
feat: attempt l2
saurabhdaware May 7, 2024
ed733d9
fix: no clue what I am doing
saurabhdaware May 8, 2024
3ccf7f5
feat: finally made l1 active states work correctly
saurabhdaware May 8, 2024
79d3080
feat: add mutation observer
saurabhdaware May 9, 2024
224f75a
current page check
saurabhdaware May 9, 2024
69e7f14
feat: isCurrentPage implementation
saurabhdaware May 9, 2024
83c0733
feat: get implementation working with isCurrentPage
saurabhdaware May 9, 2024
47de76c
feat: get level 1 hover working
saurabhdaware May 10, 2024
e2157b8
feat: add collapse animation
saurabhdaware May 10, 2024
87766fb
feat: add animation
saurabhdaware May 10, 2024
1eaadee
feat: add animations
saurabhdaware May 10, 2024
7a8d22f
fix: remove unused navlink
saurabhdaware May 10, 2024
bd0de18
fix: types
saurabhdaware May 10, 2024
e6a8d2b
fix: remove unused code
saurabhdaware May 10, 2024
ea78144
feat: add mobile sidenav with drawer
saurabhdaware May 10, 2024
e956888
fix: click to open again in l2 trigger
saurabhdaware May 10, 2024
6d66f67
feat: add basic l3
saurabhdaware May 13, 2024
7517c16
feat: get l3 working in example
saurabhdaware May 13, 2024
8b5c2c9
fix: background color in collapsible
saurabhdaware May 13, 2024
370f104
fix: ts errors and add collapsible
saurabhdaware May 14, 2024
1278b79
feat: add footer
saurabhdaware May 14, 2024
0683e56
refactor: move items to separate dir
saurabhdaware May 15, 2024
8271a1c
fix: drawer heading, add header
saurabhdaware May 15, 2024
bfca5b7
Merge branch 'master' of github.com:razorpay/blade into sidenav/impl-…
saurabhdaware May 15, 2024
56acece
feat: add collapsed state for show more link
saurabhdaware May 15, 2024
7ba2ded
fix: transition delay
saurabhdaware May 15, 2024
4516515
feat: add l2 drawer heading
saurabhdaware May 15, 2024
12a49e0
feat: add titleSuffix and trailing
saurabhdaware May 16, 2024
a65a553
feat: add tooltip to item
saurabhdaware May 16, 2024
b59d546
fix: mobile check
saurabhdaware May 16, 2024
504d6dc
feat: add active line
saurabhdaware May 16, 2024
808aa4e
fix: active link animation on page load
saurabhdaware May 16, 2024
4ba0980
fix: initial focus
saurabhdaware May 16, 2024
b79a05f
hide open nav button in mobile
saurabhdaware May 16, 2024
6a0e68e
fix: perf, refactor code
saurabhdaware May 16, 2024
0788048
fix: matchPath logic
saurabhdaware May 17, 2024
b671958
fix: responsiveness in docs
saurabhdaware May 17, 2024
18d9d24
feat: add comment
saurabhdaware May 17, 2024
f9927e6
Merge branch 'sidenav/impl-iscurrentpage' of github.com:razorpay/blad…
saurabhdaware May 17, 2024
eb749fc
feat: add new json
saurabhdaware May 17, 2024
51e3498
fix: latest documentation
saurabhdaware May 21, 2024
a9573e8
fix: selected state when items are collapsed
saurabhdaware May 21, 2024
d8792c3
feat: add SideNavItem component
saurabhdaware May 21, 2024
0e51f07
feat: add jsdoc
saurabhdaware May 21, 2024
1b39e72
docs: add dashboard template example
saurabhdaware May 21, 2024
eef79b8
fix: ts
saurabhdaware May 21, 2024
246bfb5
feat: export SideNav
saurabhdaware May 21, 2024
5d1b61f
feat: add v6 docs
saurabhdaware May 21, 2024
c3e9cda
feat: remove StrictMode
saurabhdaware May 21, 2024
bf4efa3
feat: add tests
saurabhdaware May 22, 2024
4c4051a
refactor: move example out of test
saurabhdaware May 22, 2024
1073559
feat: add interaction test
saurabhdaware May 22, 2024
13566ff
feat: add kitchensink
saurabhdaware May 22, 2024
4e7c0ed
fix: ts
saurabhdaware May 22, 2024
7cc0ae3
fix: SideNav snapshots
saurabhdaware May 22, 2024
3b7d070
feat: prettify route output
saurabhdaware May 22, 2024
a14dedf
fix: remove unused variable
saurabhdaware May 22, 2024
501b448
fix: resolve anurag's amazing comments
saurabhdaware May 22, 2024
e0d72ef
feat: add comment for isFirstRender
saurabhdaware May 22, 2024
d3eb28a
fix: tests
saurabhdaware May 22, 2024
3721b55
fix: remove flaky sidenav test
saurabhdaware May 22, 2024
3e54fd6
fix: animations and layout shift padding
saurabhdaware May 23, 2024
c546b29
fix: tests
saurabhdaware May 23, 2024
576754d
fix: edgecases
saurabhdaware May 23, 2024
d30ca1d
feat: add activation card
saurabhdaware May 23, 2024
63267a8
fix: snapshots
saurabhdaware May 23, 2024
9d59b35
fix: react-router example
saurabhdaware May 23, 2024
3d42c87
docs: divide sandbox code in multiple files
saurabhdaware May 23, 2024
043740e
fix: add comments to router example
saurabhdaware May 23, 2024
159e3ac
feat: add url bar to stackblitz
saurabhdaware May 23, 2024
ac459cd
feat: add alert in usage
saurabhdaware May 23, 2024
655a578
fix: text
saurabhdaware May 23, 2024
11b4e79
add link playground
saurabhdaware May 23, 2024
3f28657
fix: remove unused code
saurabhdaware May 23, 2024
e6a8eee
tests: fix snapshots
saurabhdaware May 24, 2024
a3c83e3
feat: add ham menu in mobile stories
saurabhdaware May 24, 2024
1648a47
feat: add mobile sidenav
saurabhdaware May 24, 2024
88ee6f6
fix: add ham menu button in examples
saurabhdaware May 24, 2024
a66528e
fix: broken types
saurabhdaware May 24, 2024
a81d049
fix: snapshots
saurabhdaware May 24, 2024
5b91533
fix: missing skeleton in dashboard layout
saurabhdaware May 24, 2024
22cc967
feat: add jsdoc
saurabhdaware May 24, 2024
76a7a58
Merge branch 'master' of github.com:razorpay/blade into sidenav/impl-…
saurabhdaware May 24, 2024
c5d95fb
Create red-bats-allow.md
saurabhdaware May 24, 2024
2105a11
fix: Drawer tests for back button
saurabhdaware May 24, 2024
d1c9e44
Merge branch 'sidenav/impl-iscurrentpage' of github.com:razorpay/blad…
saurabhdaware May 24, 2024
09d3a48
fix: interaction tests for safari
saurabhdaware May 24, 2024
b74bc69
fix: sidenav mobile test
saurabhdaware May 24, 2024
0a37c4a
feat: add background transition to items and make show more link area…
saurabhdaware May 27, 2024
1b92dfb
feat: add delay in exit, fix ui panic
saurabhdaware May 27, 2024
48e830c
docs: add comment to SideNavLevel
saurabhdaware May 27, 2024
f0dc2d7
fix: snapshots
saurabhdaware May 27, 2024
aca570f
fix: small mobile scroll
saurabhdaware May 28, 2024
1845d05
feat: add error for L4 items
saurabhdaware May 28, 2024
d90568e
fix: typecheck
saurabhdaware May 28, 2024
1c8cb43
docs: resolve chaitanya's comment
saurabhdaware May 28, 2024
6cd8b06
Merge branch 'master' of github.com:razorpay/blade into sidenav/impl-…
saurabhdaware May 28, 2024
0121f5d
fix: snapshots
saurabhdaware May 28, 2024
db7ff61
fix: drawer interaction test
saurabhdaware May 28, 2024
436face
fix: spacing right
saurabhdaware May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/red-bats-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@razorpay/blade": minor
---

feat(SideNav): add SideNav component

Checkout [SideNav Documentation](https://blade.razorpay.com/?path=/docs/components-sidenav--docs)
3 changes: 2 additions & 1 deletion packages/blade/.storybook/react/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ const StoryCanvas = styled.div<{ context }>(
context.kind.includes('/Dropdown/With Button') ||
context.kind.includes('/Dropdown/With AutoComplete') ||
context.kind.includes('/Carousel') ||
context.kind.includes('/Examples')
context.kind.includes('/Examples') ||
context.kind.includes('/SideNav')
? '0rem'
: '2rem'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const AccordionItem = ({
onExpandChange={handleExpandChange}
// Accordion has its own width restrictions
_shouldApplyWidthRestrictions={false}
_dangerouslyDisableValidations={true}
>
<AccordionButton
index={_index}
Expand Down
11 changes: 8 additions & 3 deletions packages/blade/src/components/Collapsible/Collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ type CollapsibleProps = {
*/
onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;

/**
* **Internal**: disables trigger validations. Used for AccordionButton and SideNavLink internally
*/
_dangerouslyDisableValidations?: boolean;
/**
* **Internal**: used to override responsive width restrictions
*/
Expand All @@ -67,6 +71,7 @@ const Collapsible = ({
onExpandChange,
testID,
_shouldApplyWidthRestrictions = true,
_dangerouslyDisableValidations = false,
...styledProps
}: CollapsibleProps): ReactElement => {
const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);
Expand Down Expand Up @@ -110,9 +115,9 @@ const Collapsible = ({
!(
isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||
isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||
isValidAllowedChildren(child, MetaConstants.CollapsibleLink) ||
isValidAllowedChildren(child, MetaConstants.AccordionButton)
)
isValidAllowedChildren(child, MetaConstants.CollapsibleLink)
) &&
!_dangerouslyDisableValidations
) {
throwBladeError({
message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,
Expand Down
19 changes: 9 additions & 10 deletions packages/blade/src/components/Collapsible/CollapsibleBody.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import type { ReactElement, ReactNode } from 'react';
import type { ReactElement } from 'react';
import { CollapsibleBodyContent } from './CollapsibleBodyContent';
import { useCollapsible } from './CollapsibleContext';
import type { BaseBoxProps } from '~components/Box/BaseBox';
import type { CollapsibleBodyProps } from './types';
import BaseBox from '~components/Box/BaseBox';
import type { TestID } from '~utils/types';
import { metaAttribute, MetaConstants } from '~utils/metaAttribute';
import { makeAccessible } from '~utils/makeAccessible';
import { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';

type CollapsibleBodyProps = {
children: ReactNode;
width?: BaseBoxProps['width'];
} & TestID;

const _CollapsibleBody = ({ children, testID, width }: CollapsibleBodyProps): ReactElement => {
const _CollapsibleBody = ({
children,
testID,
width,
_hasMargin = true,
}: CollapsibleBodyProps): ReactElement => {
const { collapsibleBodyId, isExpanded } = useCollapsible();
return (
<BaseBox
Expand All @@ -22,7 +21,7 @@ const _CollapsibleBody = ({ children, testID, width }: CollapsibleBodyProps): Re
{...makeAccessible({ role: 'region', hidden: !isExpanded })}
{...metaAttribute({ name: MetaConstants.CollapsibleBody, testID })}
>
<CollapsibleBodyContent>{children}</CollapsibleBodyContent>
<CollapsibleBodyContent _hasMargin={_hasMargin}>{children}</CollapsibleBodyContent>
</BaseBox>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ const AnimatedStyledCollapsibleBodyContent = styled(
};
});

const CollapsibleBodyContent = ({ children }: CollapsibleBodyContentProps): ReactElement => {
const CollapsibleBodyContent = ({
children,
_hasMargin,
}: CollapsibleBodyContentProps): ReactElement => {
const { isExpanded, direction } = useCollapsible();
const { theme } = useTheme();

Expand Down Expand Up @@ -125,7 +128,7 @@ const CollapsibleBodyContent = ({ children }: CollapsibleBodyContentProps): Reac
: nativeStyles.collapsibleBodyCollapsed
}
>
<Box {...getCollapsibleBodyContentBoxProps({ direction })}>{children}</Box>
<Box {...getCollapsibleBodyContentBoxProps({ direction, _hasMargin })}>{children}</Box>
</View>
</AnimatedStyledCollapsibleBodyContent>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ const StyledCollapsibleBodyContent = styled(BaseBox)<StyledCollapsibleBodyConten
};
});

const CollapsibleBodyContent = ({ children }: CollapsibleBodyContentProps): ReactElement => {
const CollapsibleBodyContent = ({
children,
_hasMargin,
}: CollapsibleBodyContentProps): ReactElement => {
const { isExpanded, defaultIsExpanded, direction } = useCollapsible();
const collapsibleBodyContentRef = useRef<HTMLDivElement>(null);

Expand Down Expand Up @@ -126,7 +129,7 @@ const CollapsibleBodyContent = ({ children }: CollapsibleBodyContentProps): Reac
defaultIsExpanded={defaultIsExpanded}
onTransitionEnd={onTransitionEnd}
>
<Box {...getCollapsibleBodyContentBoxProps({ direction })}>{children}</Box>
<Box {...getCollapsibleBodyContentBoxProps({ direction, _hasMargin })}>{children}</Box>
</StyledCollapsibleBodyContent>
);
};
Expand Down
11 changes: 9 additions & 2 deletions packages/blade/src/components/Collapsible/CollapsibleLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ import type { LinkProps } from '~components/Link';
import { MetaConstants } from '~utils/metaAttribute';
import { BaseLink } from '~components/Link/BaseLink';
import { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';
import type { StyledPropsBlade } from '~components/Box/styledProps';
import { getStyledProps } from '~components/Box/styledProps';

type CollapsibleLinkProps = Pick<
LinkProps,
'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'
>;
'color' | 'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'
> &
StyledPropsBlade;

const _CollapsibleLink = ({
children,
size,
color = 'primary',
isDisabled,
testID,
accessibilityLabel,
...styledProps
}: CollapsibleLinkProps): ReactElement => {
const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();

Expand All @@ -30,6 +35,7 @@ const _CollapsibleLink = ({
<BaseLink
variant="button"
size={size}
color={color}
icon={CollapsibleChevronIcon}
iconPosition="right"
isDisabled={isDisabled}
Expand All @@ -40,6 +46,7 @@ const _CollapsibleLink = ({
controls: collapsibleBodyId,
expanded: isExpanded,
}}
{...getStyledProps(styledProps)}
>
{children}
</BaseLink>
Expand Down
25 changes: 17 additions & 8 deletions packages/blade/src/components/Collapsible/commonStyles.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
import type { CollapsibleProps } from './Collapsible';
import type { CollapsibleBodyProps } from './types';
import type { Theme } from '~components/BladeProvider';
import type { BoxProps } from '~components/Box';
import { makeMotionTime } from '~utils';

const getCollapsibleBodyContentBoxProps = ({
direction,
_hasMargin,
}: {
direction: CollapsibleProps['direction'];
}): BoxProps => ({
/**
* Need a margin inside the outside wrapper so this is
* included in height calculations and prevents jank
*/
marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',
marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',
});
_hasMargin: CollapsibleBodyProps['_hasMargin'];
}): BoxProps => {
if (!_hasMargin) {
return {};
}

return {
/**
* Need a margin inside the outside wrapper so this is
* included in height calculations and prevents jank
*/
marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',
marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',
};
};

const getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);

Expand Down
18 changes: 17 additions & 1 deletion packages/blade/src/components/Collapsible/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
import type { ReactNode } from 'react';
import type { BaseBoxProps } from '~components/Box/BaseBox';
import type { TestID } from '~utils/types';

export type CollapsibleBodyContentProps = {
type CollapsibleBodyProps = {
children: ReactNode;
width?: BaseBoxProps['width'];
/**
* Internal
*
* Set to false to remove margin of CollapsibleBody
*/
_hasMargin?: boolean;
} & TestID;

type CollapsibleBodyContentProps = {
children: ReactNode;
_hasMargin?: CollapsibleBodyProps['_hasMargin'];
};

export type { CollapsibleBodyProps, CollapsibleBodyContentProps };
26 changes: 19 additions & 7 deletions packages/blade/src/components/Drawer/Drawer.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const _Drawer = ({
accessibilityLabel,
showOverlay = true,
initialFocusRef,
isLazy = true,
testID,
}: DrawerProps): React.ReactElement => {
const closeButtonRef = React.useRef<HTMLDivElement>(null);
Expand All @@ -87,18 +88,18 @@ const _Drawer = ({
const drawerId = useId('drawer');
const { drawerStack, addToDrawerStack, removeFromDrawerStack } = useDrawerStack();

const { isMounted, isVisible } = usePresence(isOpen, {
const { isMounted, isVisible, isExiting } = usePresence(isOpen, {
enterTransitionDuration: theme.motion.duration.gentle,
exitTransitionDuration: theme.motion.duration.xmoderate,
initialEnter: true,
});

const { stackingLevel, isFirstDrawerInStack } = React.useMemo(() => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
const level = drawerStack.indexOf(drawerId) + 1;
const level = Object.keys(drawerStack).indexOf(drawerId) + 1;
return {
stackingLevel: level,
isFirstDrawerInStack: level === 1 && drawerStack.length > 1,
isFirstDrawerInStack: level === 1 && Object.keys(drawerStack).length > 1,
};
}, [drawerId, drawerStack]);

Expand All @@ -108,9 +109,9 @@ const _Drawer = ({

React.useEffect(() => {
if (isOpen) {
addToDrawerStack(drawerId);
addToDrawerStack({ elementId: drawerId, onDismiss });
saurabhdaware marked this conversation as resolved.
Show resolved Hide resolved
} else {
removeFromDrawerStack(drawerId);
removeFromDrawerStack({ elementId: drawerId });
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOpen]);
Expand All @@ -123,12 +124,23 @@ const _Drawer = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isMounted]);

const contextValue = React.useMemo(
() => ({
close: onDismiss,
closeButtonRef,
stackingLevel,
isExiting,
}),
[isExiting, onDismiss, stackingLevel],
);

return (
<DrawerContext.Provider value={{ close: onDismiss, closeButtonRef }}>
<DrawerContext.Provider value={contextValue}>
<FloatingPortal>
{isMounted ? (
{isMounted || !isLazy ? (
<FloatingFocusManager context={context} initialFocus={initialFocusRef ?? closeButtonRef}>
<BaseBox
display={isLazy ? undefined : isMounted ? 'block' : 'none'}
position="fixed"
{...metaAttribute({
name: MetaConstants.Drawer,
Expand Down
11 changes: 9 additions & 2 deletions packages/blade/src/components/Drawer/DrawerContext.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react';

const DrawerContext = React.createContext<{
type DrawerContextType = {
close: () => void;
closeButtonRef?: React.MutableRefObject<any>;
stackingLevel?: number;
isExiting: boolean;
};

const DrawerContext = React.createContext<DrawerContextType>({
// eslint-disable-next-line @typescript-eslint/no-empty-function
}>({ close: () => {} });
close: () => {},
isExiting: false,
});

export { DrawerContext };
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { drawerComponentIds } from './drawerComponentIds';
import { DrawerContext } from './DrawerContext';
import type { DrawerHeaderProps } from './types';
import { useDrawerStack } from './StackProvider';
import { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';
import { Box } from '~components/Box';
import { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';
Expand All @@ -13,13 +14,28 @@ const _DrawerHeader = ({
trailing,
titleSuffix,
}: DrawerHeaderProps): React.ReactElement => {
const { close, closeButtonRef } = React.useContext(DrawerContext);
const { close, closeButtonRef, stackingLevel, isExiting } = React.useContext(DrawerContext);
const { drawerStack } = useDrawerStack();
const closeAllDrawers = (): void => {
for (const onDismiss of Object.values(drawerStack)) {
onDismiss();
}
};

const isStackedDrawer = stackingLevel && stackingLevel > 1;

const isAtleastOneDrawerOpen = Object.keys(drawerStack).length > 0;
// This condition is to avoid back button disappear while stacked drawer is in the exiting transition
saurabhdaware marked this conversation as resolved.
Show resolved Hide resolved
const isDrawerExiting = isAtleastOneDrawerOpen && isExiting && stackingLevel !== 1;

return (
<BaseHeader
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
showBackButton={isStackedDrawer || isDrawerExiting}
showCloseButton={true}
closeButtonRef={closeButtonRef}
onCloseButtonClick={() => close()}
onCloseButtonClick={() => closeAllDrawers()}
onBackButtonClick={() => close()}
title={title}
titleSuffix={titleSuffix}
subtitle={subtitle}
Expand Down Expand Up @@ -47,9 +63,11 @@ const DrawerHeader = assignWithoutSideEffects(_DrawerHeader, {
componentId: drawerComponentIds.DrawerHeader,
});

const drawerPadding = 'spacing.6';

const _DrawerBody = ({ children }: { children: React.ReactNode }): React.ReactElement => {
return (
<Box padding="spacing.6" overflow="auto" flex="1">
<Box padding={drawerPadding} overflow="auto" flex="1">
{children}
</Box>
);
Expand All @@ -58,4 +76,4 @@ const DrawerBody = assignWithoutSideEffects(_DrawerBody, {
componentId: drawerComponentIds.DrawerBody,
});

export { DrawerHeader, DrawerBody };
export { DrawerHeader, DrawerBody, drawerPadding };
Loading
Loading