-
Notifications
You must be signed in to change notification settings - Fork 7
Develop #59
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
Merged
Merged
Develop #59
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2aba4c3
feat - Heading 컴포넌트 TS 마이그레이션 - Issue #18
jhyj0521 a8878c4
feat: 스타일 Styled Component 방식으로 변경
jhyj0521 1c8d32e
Merge branch 'feature/Heading-Migration' into develop
jhyj0521 d97e988
Merge branch 'develop' of https://github.com/TeamCooks/TwoSpoon into …
jhyj0521 bc32123
fix: 환경 변경에 따른 충돌 해결
jhyj0521 1db0653
fix: Styled component에서 emotion으로 css 방식 변경에 따른 코드 수정
jhyj0521 9392176
feat: Storybook 적용
jhyj0521 828e6e8
Merge branch 'feature/Heading-Migration-Next' into develop
jhyj0521 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
| import { Heading } from './Heading'; | ||
|
|
||
| export default { | ||
| title: 'Heading', | ||
| component: Heading, | ||
| args: { | ||
| as: 'h1', | ||
| children: 'Heading Text', | ||
| }, | ||
| } as ComponentMeta<typeof Heading>; | ||
|
|
||
| const Template: ComponentStory<typeof Heading> = (args) => <Heading {...args} />; | ||
|
|
||
| export const Default = Template.bind({}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import styled from '@emotion/styled'; | ||
| import { pxToRem, media } from 'utils'; | ||
|
|
||
| export const StyledHeading = styled.h1` | ||
| font-size: ${pxToRem(32)}; | ||
| color: ${({ theme }) => theme.color.primaryOrange}; | ||
| font-weight: bold; | ||
| padding-top: ${pxToRem(16)}; | ||
|
|
||
| ${media.mobile} { | ||
| font-size: ${pxToRem(26)}; | ||
| } | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { HeadingProps } from './Heading.types'; | ||
| import { StyledHeading } from './Heading.styled'; | ||
|
|
||
| export const Heading = ({ as, className, children }: HeadingProps): JSX.Element => { | ||
| return ( | ||
| <StyledHeading as={as} className={className}> | ||
| {children} | ||
| </StyledHeading> | ||
| ); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| export interface HeadingProps { | ||
| as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; | ||
| className?: string; | ||
| children: React.ReactNode; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
className에 a11yHidden이 들어간경우를 제외하면 필요없을것 같다는 팀원들의 이야기가 있었음