-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
토픽생성 - 이미지 업로드 추가, 버튼 디자인 변경 추가 (#234)
* fix: modal 컴포넌트로 변경 * feat: 토픽 생성 이미지 추가 기능 * feat: 이미지 api 추가 * feat: 토픽생성 버튼 변경 * fix: enterkey 기능 제거 * fix: build error
- Loading branch information
1 parent
d5a8598
commit 3dee843
Showing
12 changed files
with
243 additions
and
97 deletions.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,59 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
import { colors } from '@styles/theme'; | ||
|
||
import { DotIcon } from '@icons/index'; | ||
|
||
import { Row } from '../Flex/Flex'; | ||
import Text from '../Text/Text'; | ||
|
||
interface TopicCreateButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { | ||
onClick: () => void; | ||
topicType: 'A' | 'B'; | ||
disabled: boolean; | ||
title: string; | ||
step?: 1 | 2; | ||
} | ||
|
||
const TopicCreateButton = ({ | ||
onClick, | ||
disabled, | ||
title, | ||
topicType, | ||
step, | ||
...rest | ||
}: TopicCreateButtonProps) => { | ||
return ( | ||
<StyledButton topicType={topicType} onClick={onClick} disabled={disabled} {...rest}> | ||
{step && disabled ? ( | ||
<Row gap={8}> | ||
<Text size={16} weight={700} color={colors.white_60} align="start"> | ||
{title} | ||
</Text> | ||
<DotIcon /> | ||
<Text size={16} weight={700} color={colors.white_60} align="start"> | ||
{step === 1 ? '1/2' : '2/2'} | ||
</Text> | ||
</Row> | ||
) : ( | ||
<Text size={16} weight={700} color={colors.white}> | ||
{title} | ||
</Text> | ||
)} | ||
</StyledButton> | ||
); | ||
}; | ||
|
||
const StyledButton = styled.button<{ topicType: 'A' | 'B' }>` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
height: 52px; | ||
color: ${colors.white}; | ||
cursor: pointer; | ||
background-color: ${(props) => (props.topicType === 'A' ? colors.A : colors.B)}; | ||
border-radius: 10px; | ||
`; | ||
|
||
export default TopicCreateButton; |
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
Oops, something went wrong.