Skip to content

Commit

Permalink
refactor: HomeHeader에 디자인 시스템 적용 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeml06 committed Jul 28, 2024
1 parent d72f16c commit c1f7f07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { css } from '@emotion/react';
import { css, Theme } from '@emotion/react';

export const headerStyle = css`
padding: 14px 22px;
`;

export const logoStyle = css`
font-size: 22px;
font-weight: 700;
export const logoStyle = (props: { theme: Theme }) => css`
${props.theme.typography.h5}
`;
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { PropsWithChildren } from 'react';
import * as S from './HomeHeader.style';
import { useTheme } from '@emotion/react';

export default function HomeHeader(props: PropsWithChildren) {
const { children } = props;
const theme = useTheme();

return (
<header css={S.headerStyle}>
<h1 css={S.logoStyle}>{children}</h1>
<h1 css={S.logoStyle({ theme })}>{children}</h1>
</header>
);
}

0 comments on commit c1f7f07

Please sign in to comment.