Skip to content
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

Merged
merged 9 commits into from
Aug 15, 2023
Merged

Conversation

sunduckcow
Copy link
Collaborator

No description provided.

@sunduckcow sunduckcow force-pushed the feat-aside-header-context branch from b43ae3b to addb8f9 Compare August 14, 2023 12:41
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@sunduckcow sunduckcow force-pushed the feat-aside-header-context branch from addb8f9 to 4e242e9 Compare August 14, 2023 12:48
@Lunory
Copy link
Collaborator

Lunory commented Aug 14, 2023

FooterItem and ActionBar stories don't work
https://preview.gravity-ui.com/navigation/79/?path=/story/components-actionbar--single-section

@sunduckcow sunduckcow force-pushed the feat-aside-header-context branch from c66ce24 to c75549d Compare August 15, 2023 09:14
size: number;
}

const AsideHeaderContext = React.createContext<AsideHeaderContextType>({
Copy link
Collaborator

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;
Copy link
Collaborator

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

@sunduckcow sunduckcow force-pushed the feat-aside-header-context branch from 988cdf0 to ebffad7 Compare August 15, 2023 10:11
@@ -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';
Copy link
Collaborator

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';
Copy link
Collaborator

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';
Copy link
Collaborator

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';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up

@sunduckcow sunduckcow merged commit 4bac263 into main Aug 15, 2023
@sunduckcow sunduckcow deleted the feat-aside-header-context branch August 15, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants