@acodez/menu 中文文档教程

发布于 3年前 浏览 17 更新于 3年前

@acodez/menu

npm_version license

React menu component with dark & 浅色主题和更多定制。



Installation

npm install @acodez/menu

Props API

PropertyTypeRequiredDescription
themestringnonav theme dark or light
directionstringnonav item alignment vertical or horizontal
borderstringnonav item divider blank or divider
hoverStylestringnonav item hover style button or plain
linkstringyesmenu link
labelstringnomenu label
imageSrcstringnoicon image src
cornerstringnoitem border radius, square or round

Usage

import NavList from "@acodez/menu";

<NavList theme="dark" direction="horizontal" border="divider" hoverStyle="button"
    items={[
    {
        link: "/link1", // link
        label: "Dashboard", // text
        imageSrc: ItemIcon, // icon src - url
        corner: "round", // border radius
    },
    {
        link: "/link2",
        label: "Students",
        imageSrc: ItemIcon,
    },
    {
        link: "/link3",
        label: "Exams",
        imageSrc: ItemIcon,
    },
    {
        link: "/link4",
        label: "Settings",
        imageSrc: ItemIcon,
    },
    ]}
/>

@acodez/menu

npm_version license

React menu component with dark & light theme, and more customizations.



Installation

npm install @acodez/menu

Props API

PropertyTypeRequiredDescription
themestringnonav theme dark or light
directionstringnonav item alignment vertical or horizontal
borderstringnonav item divider blank or divider
hoverStylestringnonav item hover style button or plain
linkstringyesmenu link
labelstringnomenu label
imageSrcstringnoicon image src
cornerstringnoitem border radius, square or round

Usage

import NavList from "@acodez/menu";

<NavList theme="dark" direction="horizontal" border="divider" hoverStyle="button"
    items={[
    {
        link: "/link1", // link
        label: "Dashboard", // text
        imageSrc: ItemIcon, // icon src - url
        corner: "round", // border radius
    },
    {
        link: "/link2",
        label: "Students",
        imageSrc: ItemIcon,
    },
    {
        link: "/link3",
        label: "Exams",
        imageSrc: ItemIcon,
    },
    {
        link: "/link4",
        label: "Settings",
        imageSrc: ItemIcon,
    },
    ]}
/>
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文