Skip to content

Commit

Permalink
fix(Dialog): move QA props to DialogOwnProps (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
shbov authored Jul 1, 2024
1 parent 8af4f99 commit fc33ba7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import './Dialog.scss';

const b = block('dialog');

interface DialogOwnProps {
interface DialogOwnProps extends QAProps {
open: boolean;
children: React.ReactNode;
onEscapeKeyDown?: ModalProps['onEscapeKeyDown'];
Expand Down Expand Up @@ -52,7 +52,7 @@ interface DialogDefaultProps {
}

export type DialogProps = DialogOwnProps & Partial<DialogDefaultProps>;
type DialogInnerProps = DialogOwnProps & DialogDefaultProps & QAProps;
type DialogInnerProps = DialogOwnProps & DialogDefaultProps;

export class Dialog extends React.Component<DialogInnerProps> {
static defaultProps: DialogDefaultProps = {
Expand Down
1 change: 1 addition & 0 deletions src/components/Dialog/__stories__/DialogShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function OtherDialog() {
hasCloseButton
keepMounted
onEnterKeyDown={handleApply}
qa="darthVader"
onTransitionEntered={() => {
selectRef?.current?.focus();
setTimeout(() => setOpenSelect(true), 0);
Expand Down

0 comments on commit fc33ba7

Please sign in to comment.