-
Notifications
You must be signed in to change notification settings - Fork 22
fix: navigation import and types #76
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
Conversation
|
Preview is ready. |
src/components/index.ts
Outdated
| export {default as Header} from './navigation/components/Header/Header'; | ||
| export * as Navigation from './navigation/components/index'; | ||
|
|
||
| export * from './navigation/components/index'; |
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 do we need to export all navigation items from this file?
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.
Fix
| const b = block('logo'); | ||
|
|
||
| export interface LogoProps extends NavigationLogo { | ||
| export interface LogoProps extends NavigationLogoProps { |
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.
what is the difference between LogoProps and NavigationLogoProps, it adds a little mess
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.
LogoProps has className, rename NavigationLogoProps to NavigationLogoData
| logo: NavigationLogo; | ||
| data: HeaderData; | ||
| logo: NavigationLogoProps; | ||
| data: HeaderDataProps; |
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.
usually we use props in naming for react components props. Try to use another naming
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.
Returned previous naming
| import { | ||
| NavigationItem as NavigationItemModel, | ||
| NavigationDropdownItem, | ||
| NavigationItemProps as NavigationItemModel, |
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.
same as above
| import { | ||
| NavigationDropdownItem, | ||
| NavigationItem as NavigationItemModel, | ||
| NavigationDropdownItemProps, |
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.
same as above
src/models/navigation.ts
Outdated
| } | ||
|
|
||
| export interface NavigationLinkItem extends NavigationItemBase { | ||
| export interface NavigationLinkItemProps extends NavigationItemBaseProps { |
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.
try not to use props here - there are models for navigation data in config
No description provided.