Skip to content

Commit 7ed91e7

Browse files
committed
Fix Select
1 parent 6b49a15 commit 7ed91e7

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/select/src/Select.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const LiveExample: StoryFn<SelectProps> = ({
143143
}: SelectProps) => (
144144
<Select
145145
{...args}
146-
data-test="hello-world"
146+
data-testid="hello-world"
147147
className={cx(
148148
css`
149149
min-width: 200px;

packages/select/src/Select/Select.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(
542542
<div className={labelDescriptionContainerStyle}>
543543
{label && (
544544
<Label
545-
data-lgid={lgIds.root}
546-
data-testid={lgIds.root}
545+
data-lgid={lgIds.label}
546+
data-testid={lgIds.label}
547547
htmlFor={menuButtonId}
548548
id={labelId}
549549
darkMode={darkMode}
@@ -574,8 +574,8 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(
574574

575575
{description && (
576576
<Description
577-
data-lgid={lgIds.root}
578-
data-testid={lgIds.root}
577+
data-lgid={lgIds.description}
578+
data-testid={lgIds.description}
579579
id={descriptionId}
580580
darkMode={darkMode}
581581
disabled={disabled}

packages/select/src/utils/getLgIds.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const getLgIds = (root: LgIdString = DEFAULT_LGID_ROOT) => {
99
popover: `${root}-popover`,
1010
trigger: `${root}-trigger`,
1111
buttonText: `${root}-button_text`,
12+
label: `${root}-label`,
13+
description: `${root}-description`,
1214
} as const;
1315
return ids;
1416
};

0 commit comments

Comments
 (0)