Skip to content

Commit

Permalink
fix: [Bubble] rest props
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Jan 11, 2022
1 parent c9893fc commit 2ada2a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Bubble/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';

export interface BubbleProps {
export interface BubbleProps extends React.HTMLAttributes<HTMLDivElement> {
type?: string;
content?: React.ReactNode;
}

export const Bubble: React.FC<BubbleProps> = (props) => {
const { type = 'text', content, children } = props;
const { type = 'text', content, children, ...other } = props;
return (
<div className={`Bubble ${type}`} data-type={type}>
<div className={`Bubble ${type}`} data-type={type} {...other}>
{content && <p>{content}</p>}
{children}
</div>
Expand Down

0 comments on commit 2ada2a6

Please sign in to comment.