generated from telbby/react-recoil-emotion-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
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
chat main component (after #4 merged) #6
Open
jiyong1
wants to merge
28
commits into
dev
Choose a base branch
from
feature/#5
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c104852
[#3] chore: swc 설정
jiyong1 833de9d
[#3] chore: storybook, chromatic 패키지 추가
jiyong1 4f95645
[#3] chore: webpack 설정 변경 및 필요없는 패키지 제거
jiyong1 b513be8
[#3] chore: storybook 환경 설정
jiyong1 360230f
[#3] feature: feedback item & list component 추가
jiyong1 55cde3e
[#3] feature: feedback item & list component story 추가
jiyong1 7e790e6
[#3] chore: chromatic github action setup
jiyong1 b9c3d12
[#5] chore: TellbyChatClient컴포넌트 TelbbyChat으로 이름 변경
jiyong1 4488deb
[#3] refactor: style, tag name 변경 & feedback props 변경
jiyong1 279daf3
Merge branch 'feature/#3' of https://github.com/telbby/telbby-chat in…
jiyong1 9e611fc
[#5] feature: x 버튼, 뒤로가기 버튼 컴포넌트
jiyong1 6b2d879
[#5] feature: chat main component 초안
jiyong1 5831d1f
[#5] style: primary에 따른 theme 분리
jiyong1 40c677a
[#5] refactor: theme 분리에 따른 코드 수정
jiyong1 9da58fc
[#3] refactor: project type을 root type(@types)에서 type 디렉토리로 변경
jiyong1 ec9221f
[#3] refactor: FeedbackItem을 FeedbackListItem으로 이름 변경
jiyong1 eb68302
[#3] refactor: FeedbackList css속성을 함수로 변경
jiyong1 8d3579b
Merge pull request #4 from telbby/feature/#3
jiyong1 6d756fa
[#5] chore: TellbyChatClient컴포넌트 TelbbyChat으로 이름 변경
jiyong1 79950c9
[#5] feature: x 버튼, 뒤로가기 버튼 컴포넌트
jiyong1 bc60a6c
[#5] feature: chat main component 초안
jiyong1 be31e2a
[#5] style: primary에 따른 theme 분리
jiyong1 8e6b36f
[#5] refactor: theme 분리에 따른 코드 수정
jiyong1 b0599e9
[#5] refactor: lint props spreading을 허용해주고 그 방식으로 수정
jiyong1 faad7e5
[#5] chore: #3 merge conflict 해결
jiyong1 c8399a8
[#5] refactor: 각 theme에 defaultTheme을 spread 하는 방식으로 수정
jiyong1 7a8e45b
[#5] refactor: type directory import 변경 & totalFeedbackCount로 name 변경…
jiyong1 c50588d
[#5] style: main logo image border와 background 추가
jiyong1 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 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
This file contains 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 @@ | ||
name: 'Storybook Deployment' | ||
|
||
# Event for the workflow | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: yarn | ||
- uses: chromaui/action@v1 | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
token: ${{ secrets.GH_TOKEN }} |
This file contains 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,25 @@ | ||
const custom = require('../config/webpack/webpack.common'); | ||
|
||
module.exports = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
framework: '@storybook/react', | ||
core: { | ||
builder: 'webpack5', | ||
}, | ||
webpackFinal: async (config) => { | ||
const { | ||
module: { rules }, | ||
resolve: { alias }, | ||
} = custom; | ||
|
||
return { | ||
...config, | ||
module: { ...config.module, rules }, | ||
resolve: { | ||
...config.resolve, | ||
alias, | ||
}, | ||
}; | ||
}, | ||
}; |
This file contains 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,26 @@ | ||
import { RecoilRoot } from 'recoil'; | ||
import { ThemeProvider } from '@emotion/react'; | ||
import GlobalStyle from '../src/styles/GlobalStyle'; | ||
|
||
import { primaryTheme } from '../src/styles/theme'; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}; | ||
|
||
export const decorators = [ | ||
(Story) => ( | ||
<RecoilRoot> | ||
<ThemeProvider theme={primaryTheme}> | ||
<GlobalStyle /> | ||
<Story /> | ||
</ThemeProvider> | ||
</RecoilRoot> | ||
), | ||
]; |
This file contains 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,23 @@ | ||
{ | ||
"jsc": { | ||
"transform": { | ||
"react": { | ||
"runtime": "automatic", | ||
"throwIfNamespace": true, | ||
"importSource": "@emotion/react" | ||
} | ||
}, | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true, | ||
"decorators": false, | ||
"dynamicImport": false | ||
} | ||
}, | ||
"env": { | ||
"targets": ">= 1%, not dead", | ||
"mode": "usage", | ||
"coreJs": 3 | ||
}, | ||
"minify": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,4 @@ | ||
declare module '*.png' { | ||
const value: string; | ||
export default value; | ||
} |
This file contains 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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import React, { FC } from 'react'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { ThemeProvider } from '@emotion/react'; | ||
|
||
import TelbbyServiceClient from './components/TelbbyServiceClient'; | ||
import { primaryTheme, subTheme } from './styles/theme'; | ||
import GlobalStyle from './styles/GlobalStyle'; | ||
import TelbbyChat from './components/TelbbyChat'; | ||
|
||
const App: FC = () => { | ||
return <TelbbyServiceClient />; | ||
// @TODO: primary 정보를 가져와 어떤 theme을 전달할지 결정해야 합니다. | ||
const isPrimary = true; | ||
return ( | ||
<BrowserRouter> | ||
<RecoilRoot> | ||
<ThemeProvider theme={isPrimary ? primaryTheme : subTheme}> | ||
<GlobalStyle /> | ||
<TelbbyChat /> | ||
</ThemeProvider> | ||
</RecoilRoot> | ||
</BrowserRouter> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains 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,26 @@ | ||
import React, { FC } from 'react'; | ||
|
||
import { | ||
mainBottomSectionStyle, | ||
mainBottomButtonWrapperStyle, | ||
mainBottomButtonStyle, | ||
} from './style'; | ||
|
||
const BottomButton: FC = () => { | ||
// @TODO: 버튼 클릭시 채팅 컴포넌트로 넘어가도록 해야합니다. | ||
|
||
return ( | ||
<div css={mainBottomSectionStyle}> | ||
<div css={mainBottomButtonWrapperStyle}> | ||
<p> | ||
나도 프로젝트 피드백 남기고 <br /> 베스트 리뷰어 되기 | ||
</p> | ||
<button css={mainBottomButtonStyle} type="button"> | ||
GO | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BottomButton; |
This file contains 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,30 @@ | ||
import React, { FC } from 'react'; | ||
import { useTheme } from '@emotion/react'; | ||
|
||
import ExitBtn from '@/components/common/ExitBtn'; | ||
|
||
import { mainNavStyle } from './style'; | ||
|
||
type NavProps = { | ||
handleExit: () => void; | ||
image: string; | ||
name: string; | ||
}; | ||
|
||
const Nav: FC<NavProps> = ({ handleExit, image, name }) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<nav css={mainNavStyle}> | ||
<img src={image} alt={`${name} logo`} /> | ||
<ExitBtn | ||
width="14px" | ||
height="14px" | ||
color={theme.colorReverse} | ||
onClick={handleExit} | ||
/> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default Nav; |
This file contains 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,41 @@ | ||
import React, { FC } from 'react'; | ||
|
||
import { chatMainWrapperStyle } from './style'; | ||
import Nav from './Nav'; | ||
import ProjectIntro from './ProjectIntro'; | ||
import BottomButton from './BottomButton'; | ||
import FeedbackList from '@/components/feedback/FeedbackList'; | ||
|
||
import type { Project } from '@/types/project'; | ||
|
||
type PresentationalMainProps = { | ||
project: Project; | ||
handleExit: () => void; | ||
}; | ||
|
||
const PresentationalMain: FC<PresentationalMainProps> = ({ | ||
project, | ||
handleExit, | ||
}) => { | ||
const { | ||
name, | ||
image, | ||
description, | ||
feedbackList: feedbacks, | ||
totalFeedbackCount, | ||
} = project; | ||
|
||
return ( | ||
<div css={chatMainWrapperStyle}> | ||
<Nav name={name} image={image} handleExit={handleExit} /> | ||
<ProjectIntro name={name} description={description} /> | ||
<FeedbackList | ||
feedbacks={feedbacks} | ||
totalFeedbackCount={totalFeedbackCount} | ||
/> | ||
<BottomButton /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PresentationalMain; |
Oops, something went wrong.
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.
ThemeProvider 좋네용 !!! 👍🏻👍🏻👍🏻