Skip to content

Commit

Permalink
style(blog): tag 컴포넌트 style props 추가 및 transition 스타일 추가 #37
Browse files Browse the repository at this point in the history
  • Loading branch information
nyeoni authored and JaeSeoKim committed Apr 26, 2022
1 parent b45beac commit c2d338c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/blog/components/Tag/Tag.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ const Styled = {
align-items: center;
justify-content: center;
width: fit-content;
height: fit-content;
cursor: pointer;
transition: all 0.2s ease-in;
${({ view }: SProps) =>
view &&
css`
Expand Down
5 changes: 3 additions & 2 deletions packages/blog/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ export interface TagProps extends SProps {
name: string
onClick: MouseEventHandler<HTMLButtonElement> &
((event: React.MouseEventHandler<HTMLButtonElement>) => void | undefined)
style?: React.CSSProperties
}

const Tag: React.FC<TagProps> = ({ name, onClick, view }) => (
<Styled.tag view={view} onClick={onClick}>
const Tag: React.FC<TagProps> = ({ name, onClick, view, style }) => (
<Styled.tag view={view} onClick={onClick} style={style}>
{name}
</Styled.tag>
)
Expand Down

0 comments on commit c2d338c

Please sign in to comment.