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

chore(TMC-28658): Add a data attribute to detect DS drawer when open #5324

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/quiet-tigers-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@talend/design-system": patch
---

Design system drawer now has a data attribute to identify when it is opened
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`FloatingDrawer should render a11y html 1`] = `
<div
aria-label="label is required"
class="theme-drawer"
data-drawer-visible="true"
data-test="drawer"
data-testid="drawer"
id="drawer-42"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useEffect, useState, cloneElement } from 'react';
import { cloneElement, useEffect, useState } from 'react';
import type { CSSProperties, HTMLAttributes, ReactElement, ReactNode } from 'react';
import { Transition } from 'react-transition-group';

import { useId } from '../../../../useId';
import { PrimitiveDrawer } from '../../Primitive/PrimitiveDrawer';

import theme from './FloatingDrawer.module.scss';
import { useId } from '../../../../useId';

type WithDisclosure = {
disclosure: ReactElement;
Expand Down Expand Up @@ -90,6 +91,7 @@ export const FloatingDrawer = ({
<div
data-test="drawer"
data-testid="drawer"
data-drawer-visible
id={uuid}
role="dialog"
aria-label={props['aria-label']}
Expand Down
Loading