Skip to content

Commit

Permalink
feat(ui) Tag 컴포넌트에 ...restProps를 추가합니다. (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokyeom authored Nov 22, 2024
1 parent 3686c5d commit 6ae2c68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-owls-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sopt-makers/ui': patch
---

Add restProps in Tag Component.
4 changes: 2 additions & 2 deletions packages/ui/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export interface TagProps extends HTMLAttributes<HTMLDivElement> {
}

export const Tag = forwardRef<HTMLDivElement, TagProps>((props, forwardedRef) => {
const { children, size = 'sm', shape = 'rect', variant = 'default', type = 'solid' } = props;
const { children, size = 'sm', shape = 'rect', variant = 'default', type = 'solid', ...restProps } = props;
const style = createTagStyle(type, variant, shape, size);

return (
<div className={`${S.root} ${style}`} ref={forwardedRef}>
<div className={`${S.root} ${style}`} ref={forwardedRef} {...restProps}>
{children}
</div>
);
Expand Down

0 comments on commit 6ae2c68

Please sign in to comment.