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

Tooltip: Remove useless data-state #164

Merged
merged 2 commits into from
May 2, 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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exports[`ActionInput > renders 1`] = `
aria-controls=":r0:"
aria-label="Click me!"
class="_action_1689d3"
data-state="closed"
type="button"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ exports[`PasswordControl > switches the input type > invisible 1`] = `
aria-controls=":r0:"
aria-label="Show"
class="_action_1689d3"
data-state="closed"
type="button"
>
<svg
Expand Down Expand Up @@ -52,7 +51,6 @@ exports[`PasswordControl > switches the input type > invisible 2`] = `
aria-describedby=":r3:"
aria-label="Show"
class="_action_1689d3"
data-state="open"
type="button"
>
<svg
Expand Down Expand Up @@ -89,7 +87,6 @@ exports[`PasswordControl > switches the input type > visible 1`] = `
aria-describedby=":r3:"
aria-label="Hide"
class="_action_1689d3"
data-state="open"
type="button"
>
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ function TooltipAnchor({ children }: Readonly<PropsWithChildren>): JSX.Element {
context.getReferenceProps({
ref,
...children.props,
"data-state": context.open ? "open" : "closed",
}),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ exports[`Tooltip > opens tooltip on focus where trigger is non interactive 1`] =
style="padding: 100px;"
>
<span
data-state="closed"
tabindex="0"
>
<button
Expand Down Expand Up @@ -134,7 +133,6 @@ exports[`Tooltip > overrides default tab index for non interactive triggers 1`]
style="padding: 100px;"
>
<span
data-state="closed"
tabindex="-1"
>
<button
Expand Down Expand Up @@ -179,9 +177,7 @@ exports[`Tooltip > renders closed by default 1`] = `
<div
style="padding: 100px;"
>
<span
data-state="closed"
>
<span>
No tooltip to see here
</span>
</div>
Expand Down Expand Up @@ -237,7 +233,6 @@ exports[`Tooltip > renders open by default 1`] = `
<button
aria-describedby=":r2:"
class="_icon-button_e3253e"
data-state="open"
data-testid="testbutton"
role="button"
style="--cpd-icon-button-size: 32px;"
Expand Down Expand Up @@ -319,7 +314,6 @@ exports[`Tooltip > renders with caption 1`] = `
>
<button
class="_icon-button_e3253e"
data-state="closed"
data-testid="testbutton"
role="button"
style="--cpd-icon-button-size: 32px;"
Expand Down
Loading