From 981361c479d8bc77e008c3e60de2a5450414d888 Mon Sep 17 00:00:00 2001 From: Stephen Lee Date: Wed, 12 Feb 2025 14:31:20 -0800 Subject: [PATCH] Rename LGIDS_DRAWER to LGIDs --- packages/drawer/src/Drawer/Drawer.constants.ts | 2 +- packages/drawer/src/Drawer/Drawer.tsx | 4 ++-- packages/drawer/src/Drawer/index.ts | 2 +- packages/drawer/src/index.ts | 2 +- packages/drawer/src/utils/getTestUtils.tsx | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/drawer/src/Drawer/Drawer.constants.ts b/packages/drawer/src/Drawer/Drawer.constants.ts index 1623b23b9d..c036cca051 100644 --- a/packages/drawer/src/Drawer/Drawer.constants.ts +++ b/packages/drawer/src/Drawer/Drawer.constants.ts @@ -1,6 +1,6 @@ const LGID_ROOT = 'lg-drawer'; -export const LGIDS_DRAWER = { +export const LGIDs = { root: LGID_ROOT, } as const; diff --git a/packages/drawer/src/Drawer/Drawer.tsx b/packages/drawer/src/Drawer/Drawer.tsx index e29987daf3..f4caec3505 100644 --- a/packages/drawer/src/Drawer/Drawer.tsx +++ b/packages/drawer/src/Drawer/Drawer.tsx @@ -9,7 +9,7 @@ import LeafyGreenProvider, { import { BaseFontSize } from '@leafygreen-ui/tokens'; import { Body } from '@leafygreen-ui/typography'; -import { LGIDS_DRAWER } from './Drawer.constants'; +import { LGIDs } from './Drawer.constants'; import { getDrawerStyles, getHeaderStyles } from './Drawer.styles'; import { DrawerProps } from './Drawer.types'; @@ -18,7 +18,7 @@ export const Drawer = forwardRef( { children, className, - 'data-lgid': dataLgId = LGIDS_DRAWER.root, + 'data-lgid': dataLgId = LGIDs.root, id: idProp, open = false, setOpen, diff --git a/packages/drawer/src/Drawer/index.ts b/packages/drawer/src/Drawer/index.ts index ae3865c88f..d3ff7eac8a 100644 --- a/packages/drawer/src/Drawer/index.ts +++ b/packages/drawer/src/Drawer/index.ts @@ -1,3 +1,3 @@ export { Drawer } from './Drawer'; -export { LGIDS_DRAWER } from './Drawer.constants'; +export { LGIDs } from './Drawer.constants'; export { type DrawerProps } from './Drawer.types'; diff --git a/packages/drawer/src/index.ts b/packages/drawer/src/index.ts index 6782a169ff..39a22d6eac 100644 --- a/packages/drawer/src/index.ts +++ b/packages/drawer/src/index.ts @@ -1,2 +1,2 @@ -export { Drawer, type DrawerProps, LGIDS_DRAWER } from './Drawer'; +export { Drawer, type DrawerProps, LGIDs } from './Drawer'; export { getTestUtils } from './utils'; diff --git a/packages/drawer/src/utils/getTestUtils.tsx b/packages/drawer/src/utils/getTestUtils.tsx index 1a1db9f760..508ac11343 100644 --- a/packages/drawer/src/utils/getTestUtils.tsx +++ b/packages/drawer/src/utils/getTestUtils.tsx @@ -1,11 +1,11 @@ import { getByLgId } from '@lg-tools/test-harnesses'; -import { LGIDS_DRAWER } from '../Drawer'; +import { LGIDs } from '../Drawer'; import { GetTestUtilsReturnType } from './getTestUtils.types'; export const getTestUtils = ( - lgId: string = LGIDS_DRAWER.root, + lgId: string = LGIDs.root, ): GetTestUtilsReturnType => { /** * Queries the DOM for the element using the `data-lgid` data attribute.