Skip to content

Commit

Permalink
feat: add qa attribute for action panel item (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marginy605 authored Sep 28, 2023
1 parent 71b155d commit 3a52024
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ActionPanel/ActionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type ActionPanelItem = {
title: string;
onClick?: () => void;
className?: string;
qa?: string;
};

export type ActionPanelProps = {
Expand All @@ -29,6 +30,7 @@ export const ActionPanel = (props: ActionPanelProps) => {
className={b('item', item.className)}
key={`dk-action-panel-${item.id}`}
onClick={item.onClick}
data-qa={item.qa}
>
<div className={b('icon')}>{item.icon}</div>
<div className={b('title')} title={item.title}>
Expand Down
2 changes: 2 additions & 0 deletions src/components/DashKit/__stories__/DashKitShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,13 @@ export class DashKitShowcase extends React.Component<{}, DashKitDemoState> {
icon: <Icon data={ChartColumn} />,
title: 'Chart',
className: 'test',
qa: 'chart',
},
{
id: 'selector',
icon: <Icon data={Sliders} />,
title: 'Selector',
qa: 'selector',
},
{
id: 'text',
Expand Down

0 comments on commit 3a52024

Please sign in to comment.