-
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.
Merge remote-tracking branch 'origin/feat/v2' into feat/issue-86
- Loading branch information
Showing
77 changed files
with
1,950 additions
and
1,084 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
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,56 @@ | ||
import { vars } from '@/styles/theme.css'; | ||
import { style, styleVariants } from '@vanilla-extract/css'; | ||
|
||
export const container = style({ | ||
display: 'flex', | ||
gap: 8, | ||
}); | ||
|
||
export const uploadLabelBase = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
width: 80, | ||
height: 80, | ||
borderRadius: 6, | ||
cursor: 'pointer', | ||
}); | ||
|
||
export const uploadLabel = styleVariants({ | ||
default: [uploadLabelBase, { backgroundColor: vars.colors.background.category }], | ||
uploaded: [ | ||
uploadLabelBase, | ||
{ backgroundColor: vars.colors.background.default, border: `1px solid ${vars.colors.border.default}` }, | ||
], | ||
}); | ||
|
||
export const uploadInput = style({ | ||
display: 'none', | ||
}); | ||
|
||
export const imageWrapper = style({ | ||
position: 'relative', | ||
width: 80, | ||
height: 80, | ||
}); | ||
|
||
export const image = style({ | ||
objectFit: 'cover', | ||
borderRadius: 6, | ||
}); | ||
|
||
export const deleteButton = style({ | ||
position: 'absolute', | ||
top: 4, | ||
right: 4, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
width: 18, | ||
height: 18, | ||
borderRadius: '50%', | ||
backgroundColor: vars.colors.black, | ||
opacity: 0.5, | ||
cursor: 'pointer', | ||
}); |
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 |
---|---|---|
@@ -1,38 +1,24 @@ | ||
import { Badge } from '@fun-eat/design-system'; | ||
import styled from 'styled-components'; | ||
import { tag, tagList } from './tagList.css'; | ||
import Text from '../Text/Text'; | ||
|
||
import type { Tag } from '@/types/common'; | ||
import { convertTagColor } from '@/utils/convertTagColor'; | ||
|
||
interface TagListProps { | ||
tags: Tag[]; | ||
} | ||
|
||
const TagList = ({ tags }: TagListProps) => { | ||
return ( | ||
<TagListContainer> | ||
{tags.map((tag) => { | ||
const tagColor = convertTagColor(tag.tagType); | ||
return ( | ||
<li key={tag.id}> | ||
<TagBadge element="p" color={tagColor} textColor="black"> | ||
{tag.name} | ||
</TagBadge> | ||
</li> | ||
); | ||
})} | ||
</TagListContainer> | ||
<ul className={tagList}> | ||
{tags.map(({ id, name }) => ( | ||
<li key={id} className={tag}> | ||
<Text as="span" color="info" size="caption2" weight="medium"> | ||
{name} | ||
</Text> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
}; | ||
|
||
export default TagList; | ||
|
||
const TagListContainer = styled.ul` | ||
display: flex; | ||
margin: 12px 0; | ||
column-gap: 8px; | ||
`; | ||
|
||
const TagBadge = styled(Badge)` | ||
font-weight: bold; | ||
`; |
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,17 @@ | ||
import { vars } from '@/styles/theme.css'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const tagList = style({ | ||
display: 'flex', | ||
gap: 4, | ||
}); | ||
|
||
export const tag = style({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
height: 23, | ||
padding: '0 6px', | ||
textAlign: 'center', | ||
borderRadius: 4, | ||
backgroundColor: vars.colors.background.category, | ||
}); |
Oops, something went wrong.