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(Nav): Added default nav item wrapper. Added support for nav item icons #10687

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

tlabaj
Copy link
Contributor

@tlabaj tlabaj commented Jul 1, 2024

What: Closes #9755 #10685

Additional issues:

@tlabaj tlabaj requested review from a team, wise-king-sullyman, kmcfaul, mattnolting and thatblindgeye and removed request for a team July 1, 2024 21:30
@patternfly-build
Copy link
Contributor

patternfly-build commented Jul 1, 2024

Copy link
Collaborator

@andrew-ronaldson andrew-ronaldson left a comment

Choose a reason for hiding this comment

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

B-E-A-uuuuutiful!

Copy link
Contributor

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

One nit, but other than that looks great!

@@ -193,8 +193,8 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
{...(hasFlyout && { ...ariaFlyoutProps })}
{...props}
>
{hasNavLinkWrapper ? <span className={css(`${styles.nav}__link-text`)}>{children}</span> : children}
{flyout && flyoutButton}
{icon && <span className={css(`${styles.nav}__link-icon`)}>{icon}</span>}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{icon && <span className={css(`${styles.nav}__link-icon`)}>{icon}</span>}
{icon && <span className={css(styles.navLinkIcon)}>{icon}</span>}

@@ -193,8 +193,8 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
{...(hasFlyout && { ...ariaFlyoutProps })}
{...props}
>
{hasNavLinkWrapper ? <span className={css(`${styles.nav}__link-text`)}>{children}</span> : children}
{flyout && flyoutButton}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will need to be added back in. Right now the Flyout example doesn't render the icon to indicate the item has any sort of interaction (item "Flyout link 3" in the following screenshot):

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops that was a paste mistake! good catch!

Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@wise-king-sullyman wise-king-sullyman merged commit 2b5338b into patternfly:v6 Jul 11, 2024
13 checks passed
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@6.0.0-alpha.81
  • @patternfly/react-core@6.0.0-alpha.81
  • @patternfly/react-docs@7.0.0-alpha.88
  • @patternfly/react-drag-drop@6.0.0-alpha.63
  • @patternfly/react-integration@6.0.0-alpha.41
  • demo-app-ts@5.1.1-alpha.80
  • @patternfly/react-table@6.0.0-alpha.82
  • @patternfly/react-templates@6.0.0-alpha.31

Thanks for your contribution! 🎉

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.

V6 Nav- Add support for icon in nav item Nav - add wrapper to Nav link item text by default
7 participants