Skip to content

Commit 70c64ea

Browse files
committed
1 parent 00c6bd6 commit 70c64ea

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

app/components/Button/index.ts

-1
This file was deleted.

app/components/Button/index.tsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Tooltip } from "../Tooltip";
2+
import { Button as ButtonBase, type ButtonProps } from "./button";
3+
4+
export const Button = ({ tooltip, children, props }: ButtonProps) => {
5+
if (tooltip) {
6+
return (
7+
<Tooltip
8+
trigger={<ButtonBase {...props}>{children}</ButtonBase>}
9+
content={tooltip}
10+
/>
11+
);
12+
}
13+
14+
return <ButtonBase {...props}>{children}</ButtonBase>;
15+
};
16+
17+
export * from "./button";

0 commit comments

Comments
 (0)