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

feat(Toc): added additional data-qa attributes inside component #1425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vrozaev
Copy link
Contributor

@vrozaev vrozaev commented Mar 15, 2024

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@@ -29,6 +29,7 @@ export const Toc = React.forwardRef<HTMLElement, TocProps>(function Toc(props, r
content={content}
value={value}
href={href}
qa={qa ? `${qa}-item` : ''}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be undefined by default, empty string results in attribute presence

@@ -46,6 +47,7 @@ export const Toc = React.forwardRef<HTMLElement, TocProps>(function Toc(props, r
value={childrenValue}
href={childrenHref}
childItem={true}
qa={qa ? `${qa}-item` : ''}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@@ -44,5 +45,15 @@ export const TocItem = (props: TocItemProps) => {
</a>
);

return <div className={b('section', {child: childItem, active})}>{item}</div>;
let testId = '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants