Skip to content

Commit 3d7a2c0

Browse files
committed
feat: Add restProps in Tag Component
1 parent 3686c5d commit 3d7a2c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ui/Tag/Tag.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export interface TagProps extends HTMLAttributes<HTMLDivElement> {
1111
}
1212

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

1717
return (
18-
<div className={`${S.root} ${style}`} ref={forwardedRef}>
18+
<div className={`${S.root} ${style}`} ref={forwardedRef} {...restProps}>
1919
{children}
2020
</div>
2121
);

0 commit comments

Comments
 (0)