Skip to content

fix(Wizard deprecated): added wrapper for step name #11761

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

Merged
merged 1 commit into from
Apr 15, 2025
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 @@ -89,18 +89,20 @@ export const WizardNavItem: React.FunctionComponent<WizardNavItemProps> = ({
{...(isExpandable && { 'aria-expanded': isExpanded })}
{...ouiaProps}
>
{isExpandable ? (
<>
<span className={css(styles.wizardNavLinkText)}>{content}</span>
<span className={css(styles.wizardNavLinkToggle)}>
<span className={css(styles.wizardNavLinkToggleIcon)}>
<AngleRightIcon />
<span className={css(styles.wizardNavLinkMain)}>
{isExpandable ? (
<>
<span className={css(styles.wizardNavLinkText)}>{content}</span>
<span className={css(styles.wizardNavLinkToggle)}>
<span className={css(styles.wizardNavLinkToggleIcon)}>
<AngleRightIcon />
</span>
</span>
</span>
</>
) : (
content
)}
</>
) : (
content
)}
</span>
</NavItemComponent>
{children}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ exports[`WizardNavItem should match snapshot (auto-generated) 1`] = `
data-ouia-component-type="PF6/WizardNavItem"
data-ouia-safe="true"
type="button"
/>
>
<span
class="pf-v6-c-wizard__nav-link-main"
/>
</button>
ReactNode
</li>
</DocumentFragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
data-ouia-safe="true"
type="button"
>
A
<span
class="pf-v6-c-wizard__nav-link-main"
>
A
</span>
</button>
</li>
<li
Expand All @@ -136,29 +140,33 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
type="button"
>
<span
class="pf-v6-c-wizard__nav-link-text"
>
B
</span>
<span
class="pf-v6-c-wizard__nav-link-toggle"
class="pf-v6-c-wizard__nav-link-main"
>
<span
class="pf-v6-c-wizard__nav-link-toggle-icon"
class="pf-v6-c-wizard__nav-link-text"
>
B
</span>
<span
class="pf-v6-c-wizard__nav-link-toggle"
>
<svg
aria-hidden="true"
class="pf-v6-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 256 512"
width="1em"
<span
class="pf-v6-c-wizard__nav-link-toggle-icon"
>
<path
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
/>
</svg>
<svg
aria-hidden="true"
class="pf-v6-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 256 512"
width="1em"
>
<path
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
/>
</svg>
</span>
</span>
</span>
</button>
Expand All @@ -177,7 +185,11 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
data-ouia-safe="true"
type="button"
>
B-1
<span
class="pf-v6-c-wizard__nav-link-main"
>
B-1
</span>
</button>
</li>
<li
Expand All @@ -191,7 +203,11 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
data-ouia-safe="true"
type="button"
>
B-2
<span
class="pf-v6-c-wizard__nav-link-main"
>
B-2
</span>
</button>
</li>
</ol>
Expand All @@ -207,7 +223,11 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
data-ouia-safe="true"
type="button"
>
C
<span
class="pf-v6-c-wizard__nav-link-main"
>
C
</span>
</button>
</li>
<li
Expand All @@ -221,7 +241,11 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
data-ouia-safe="true"
type="button"
>
D
<span
class="pf-v6-c-wizard__nav-link-main"
>
D
</span>
</button>
</li>
</ol>
Expand Down Expand Up @@ -432,7 +456,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-A"
type="button"
>
A
<span
class="pf-v6-c-wizard__nav-link-main"
>
A
</span>
</button>
</li>
<li
Expand All @@ -447,7 +475,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-B"
type="button"
>
B
<span
class="pf-v6-c-wizard__nav-link-main"
>
B
</span>
</button>
<ol
class="pf-v6-c-wizard__nav-list"
Expand All @@ -465,7 +497,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-B-1"
type="button"
>
B-1
<span
class="pf-v6-c-wizard__nav-link-main"
>
B-1
</span>
</button>
</li>
<li
Expand All @@ -480,7 +516,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-B-2"
type="button"
>
B-2
<span
class="pf-v6-c-wizard__nav-link-main"
>
B-2
</span>
</button>
</li>
</ol>
Expand All @@ -497,7 +537,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-C"
type="button"
>
C
<span
class="pf-v6-c-wizard__nav-link-main"
>
C
</span>
</button>
</li>
<li
Expand All @@ -512,7 +556,11 @@ exports[`Wizard Wizard should match snapshot 1`] = `
id="step-D"
type="button"
>
D
<span
class="pf-v6-c-wizard__nav-link-main"
>
D
</span>
</button>
</li>
</ol>
Expand Down Expand Up @@ -672,7 +720,11 @@ exports[`Wizard bare wiz 1`] = `
data-ouia-safe="true"
type="button"
>
A
<span
class="pf-v6-c-wizard__nav-link-main"
>
A
</span>
</button>
</li>
</ol>
Expand Down
Loading