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

[Navigation] Nav renderWrapper has not hover style in Nav.Sub #2690

Open
1 task done
YannLynn opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2691
Open
1 task done

[Navigation] Nav renderWrapper has not hover style in Nav.Sub #2690

YannLynn opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2691
Assignees
Labels
bug Something isn't working

Comments

@YannLynn
Copy link
Collaborator

YannLynn commented Jan 26, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

Navigation

Semi Version

latest

Current Behavior

Nav.Sub 在 renderWrapper 下没有 hover 高亮样式
Image

Expected Behavior

Nav.Sub 在 renderWrapper 下有 hover 高亮样式

Image

Steps To Reproduce

No response

ReproducibleCode

import React from 'react';
import { Nav } from '@douyinfe/semi-ui';

class NavApp extends React.Component {
    render() {
        return (
            <Nav
            renderWrapper={({ itemElement, isSubNav, isInSubNav, props }) => {
                const routerMap = {
                    Home: "/",
                    About: "/about",
                    Dashboard: "/dashboard",
                    "Nothing Here": "/nothing-here"
                };
                return (
                    <a
                        style={{ textDecoration: "none" }}
                        to={routerMap[props.itemKey]}
                    >
                        {itemElement}
                    </a>
                );
            }}
            items={[
                { itemKey: "Home", text: "Home" },
                { itemKey: "About", text: "About" },
                {
                    text: "Sub",
                    itemKey: "Sub",
                    items: ["Dashboard", "Nothing Here"]
                }
            ]}
        ></Nav>
        );
    }
}

Environment

- OS:
- browser:

Anything else?

No response

@YannLynn YannLynn self-assigned this Jan 26, 2025
@YannLynn YannLynn added the bug Something isn't working label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant