-
Notifications
You must be signed in to change notification settings - Fork 14
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: add standalone navigation #693
Conversation
Preview is ready. |
@@ -21,7 +22,7 @@ const NavigationItem: React.FC<NavigationItemProps> = ({ | |||
...props | |||
}: NavigationItemProps) => { | |||
const {type = NavigationItemType.Link} = data; | |||
const {navItemMap} = useContext(InnerContext); | |||
const navItemMap = useNavItemMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion:
const navItemMap = useNavItemMap(); | |
const navItemMap = useNavigationItemMap(); |
|
||
import Navigation, {NavigationProps} from './../../components/Navigation/Navigation'; | ||
|
||
const Standalone = (props: NavigationProps) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is const exists and its name Standalone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I called it so because you can import and use this Navigation component regardless of constructor itself
This case requires an addition of g-root
class to parent , thats why this component exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add to readme the example of how to import navigation and use it with theme please?
No description provided.