-
Notifications
You must be signed in to change notification settings - Fork 8
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: added AsideHeaderContext #79
Conversation
b43ae3b
to
addb8f9
Compare
Preview is ready. |
addb8f9
to
4e242e9
Compare
FooterItem and ActionBar stories don't work |
c66ce24
to
c75549d
Compare
size: number; | ||
} | ||
|
||
const AsideHeaderContext = React.createContext<AsideHeaderContextType>({ |
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.
Let's move the context to a separate file
size: ASIDE_HEADER_COMPACT_WIDTH, | ||
}); | ||
|
||
export const AsideHeaderContextProvider = AsideHeaderContext.Provider; |
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.
Check these exports in src/components/index.ts
988cdf0
to
ebffad7
Compare
@@ -17,6 +17,7 @@ import controlMenuButtonIcon from '../../../assets/icons/control-menu-button.svg | |||
import headerDividerCollapsedIcon from '../../../assets/icons/divider-collapsed.svg'; | |||
|
|||
import './AsideHeader.scss'; | |||
import {AsideHeaderContextProvider} from './AsideHeaderContext'; |
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.
Let's move the import up
@@ -4,16 +4,12 @@ import {LogoProps} from '../types'; | |||
import {Button, Icon} from '@gravity-ui/uikit'; | |||
|
|||
import './Logo.scss'; | |||
import {useAsideHeaderContext} from '../AsideHeader/AsideHeaderContext'; |
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.
Up
@@ -7,6 +7,7 @@ import {ASIDE_HEADER_COMPACT_WIDTH, ASIDE_HEADER_EXPANDED_WIDTH} from '../../con | |||
import settingsIcon from '../../../../.storybook/assets/settings.svg'; | |||
|
|||
import './FooterItemShowcase.scss'; | |||
import {AsideHeaderContextProvider} from '../../AsideHeader/AsideHeaderContext'; |
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.
Up
@@ -14,6 +14,7 @@ import { | |||
} from '../constants'; | |||
|
|||
import './Item.scss'; | |||
import {useAsideHeaderContext} from '../../AsideHeader/AsideHeaderContext'; |
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.
Up
No description provided.