Skip to content

Commit

Permalink
Rename Header to MainHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
olmoh committed Jan 10, 2025
1 parent ba18a98 commit ea75d4b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 33 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './header';
export * from './main-header';
export * from './navigation-header';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';
import { Colors, Spacings } from '../../../foundations';
import { TransientProps } from '../../../types';
import { Flex } from '../../layout';
import { HeaderMainRow, HeaderSubRow } from './components';
import { MainHeaderIconButton } from './components';

export type HeaderProps = React.PropsWithChildren<{
size?: '1' | '2';
Expand Down Expand Up @@ -31,7 +31,7 @@ const StyledHeader = styled.header<TransientProps<HeaderProps>>(
}),
);

const Header = ({ size = '1', variant = 'default', children, ...props }: HeaderProps) => {
const MainHeader = ({ size = '1', variant = 'default', children, ...props }: HeaderProps) => {
return (
<StyledHeader $size={size} $variant={variant} {...props}>
<Flex
Expand All @@ -48,9 +48,8 @@ const Header = ({ size = '1', variant = 'default', children, ...props }: HeaderP
);
};

const HeaderNamespace = Object.assign(Header, {
MainRow: HeaderMainRow,
SubRow: HeaderSubRow,
const MainHeaderNamespace = Object.assign(MainHeader, {
IconButton: MainHeaderIconButton,
});

export { HeaderNamespace as Header };
export { MainHeaderNamespace as MainHeader };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { IconButton, IconButtonProps } from '../../../molecules';

export const MainHeaderIconButton = (props: IconButtonProps) => {
return <IconButton variant="secondary" {...props} />;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './MainHeaderIconButton';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './MainHeader';

0 comments on commit ea75d4b

Please sign in to comment.