From d783a64741e0ba98cab068ad4818004235505ae6 Mon Sep 17 00:00:00 2001 From: MoIzadloo Date: Sat, 16 Sep 2023 14:58:50 +0330 Subject: [PATCH] :sparkles: feat: Collapse user-select disabled --- CHANGELOG.md | 6 ++++-- src/lib/navbar/items/items.props.ts | 3 ++- src/lib/navbar/nav/nav.less | 8 ++++++++ src/lib/navbar/navbar.md | 26 ++++++++++++++------------ 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4260968..1eefacc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # [v3.1.0](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/compare/v3.0.0...v3.1.0) (2023-09-14) ## ✨ New Features -- [`2615785`](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/commit/2615785) feat: Items component modified to support elements as input + +- [`2615785`](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/commit/2615785) feat: Items component modified to support elements as input # [v3.0.0](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/compare/v2.0.0...v3.0.0) (2023-09-13) ## 💥 Breaking Changes -- [`87315e5`](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/commit/87315e5) feat: Many problems have been solved + +- [`87315e5`](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/commit/87315e5) feat: Many problems have been solved # [v2.0.0](https://github.com/MoIzadloo/ultimate-react-multilevel-menu/compare/v1.0.0...v2.0.0) (2023-09-10) diff --git a/src/lib/navbar/items/items.props.ts b/src/lib/navbar/items/items.props.ts index 0896706..0ed7f62 100644 --- a/src/lib/navbar/items/items.props.ts +++ b/src/lib/navbar/items/items.props.ts @@ -1,6 +1,7 @@ import { ReactNode, ElementType } from 'react' -interface ItemsProps extends Partial, 'title'>> { +interface ItemsProps + extends Partial, 'title'>> { children?: ReactNode title?: ElementType | string href?: string diff --git a/src/lib/navbar/nav/nav.less b/src/lib/navbar/nav/nav.less index 65c5aad..73cbf9f 100644 --- a/src/lib/navbar/nav/nav.less +++ b/src/lib/navbar/nav/nav.less @@ -26,6 +26,14 @@ display: none; flex-direction: column; } + .item, + .logo-container { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: -moz-none; + -o-user-select: none; + user-select: none; + } } .show{ diff --git a/src/lib/navbar/navbar.md b/src/lib/navbar/navbar.md index 4ba9a91..8da617b 100644 --- a/src/lib/navbar/navbar.md +++ b/src/lib/navbar/navbar.md @@ -166,38 +166,40 @@ import classnames from 'classnames' ```tsx static import { Navbar, Collapse, Item, Items, Logo } from '../' -import classnames from 'classnames'; +import classnames from 'classnames' - - +; ``` ### Fixed top ```tsx static import { Navbar, Collapse, Item, Items, Logo } from '../' -import classnames from 'classnames'; +import classnames from 'classnames' - - +; ``` ### Fixed bottom ```tsx static import { Navbar, Collapse, Item, Items, Logo } from '../' -import classnames from 'classnames'; +import classnames from 'classnames' - - +; ``` ### Sticky Top ```tsx static import { Navbar, Collapse, Item, Items, Logo } from '../' -import classnames from 'classnames'; +import classnames from 'classnames' - - +; ```