Skip to content

Commit

Permalink
[WNMGDS-2779] Update wc snaps, add component logic to fix wc test (#3103
Browse files Browse the repository at this point in the history
)

update wc snaps, add component logic to fix wc test.
  • Loading branch information
zarahzachz authored and pwolfert committed Jun 3, 2024
1 parent 6c052ad commit 0b38d75
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
7 changes: 6 additions & 1 deletion packages/design-system/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,12 @@ export const Dropdown: React.FC<DropdownProps> = (props: DropdownProps) => {
...useLabelProps({
...props,
id,
labelClassName: classNames('ds-c-label', 'ds-c-dropdown__label', props.labelClassName),
labelClassName: classNames(
'ds-c-label',
'ds-c-dropdown__label',
props.inversed && 'ds-c-label--inverse',
props.labelClassName
),
}),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ exports[`Dropdown renders a dropdown 1`] = `
<div
class="ds-c-dropdown"
>
<label
class="ds-c-label"
id="dropdown__button--1__label"
<div
class="ds-c-label ds-c-dropdown__label"
id="dropdown--1__label"
>
Dropdown label
</label>
</div>
<div
aria-hidden="true"
data-a11y-ignore="aria-hidden-focus"
Expand Down Expand Up @@ -52,20 +52,20 @@ exports[`Dropdown renders a dropdown 1`] = `
</label>
</div>
<button
aria-controls="dropdown__button--1__menu"
aria-controls="dropdown--1__menu"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="listbox"
aria-invalid="false"
aria-labelledby="dropdown__button--1__button-content dropdown__button--1__label"
aria-labelledby="dropdown--1__button-content dropdown--1__label"
class="ds-c-dropdown__button ds-c-field"
id="dropdown__button--1"
id="dropdown--1"
parent="[object HTMLElement]"
type="button"
>
<span
class="ds-c-dropdown__label-text"
id="dropdown__button--1__button-content"
id="dropdown--1__button-content"
>
Option 1
</span>
Expand Down Expand Up @@ -98,12 +98,12 @@ exports[`Dropdown renders a dropdown using html options 1`] = `
<div
class="ds-c-dropdown"
>
<label
class="ds-c-label"
id="dropdown__button--5__label"
<div
class="ds-c-label ds-c-dropdown__label"
id="dropdown--5__label"
>
Dropdown label
</label>
</div>
<div
aria-hidden="true"
data-a11y-ignore="aria-hidden-focus"
Expand Down Expand Up @@ -146,20 +146,20 @@ exports[`Dropdown renders a dropdown using html options 1`] = `
</label>
</div>
<button
aria-controls="dropdown__button--5__menu"
aria-controls="dropdown--5__menu"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="listbox"
aria-invalid="false"
aria-labelledby="dropdown__button--5__button-content dropdown__button--5__label"
aria-labelledby="dropdown--5__button-content dropdown--5__label"
class="ds-c-dropdown__button ds-c-field"
id="dropdown__button--5"
id="dropdown--5"
parent="[object HTMLElement]"
type="button"
>
<span
class="ds-c-dropdown__label-text"
id="dropdown__button--5__button-content"
id="dropdown--5__button-content"
>
Option A-1
</span>
Expand Down

0 comments on commit 0b38d75

Please sign in to comment.