Skip to content

Commit 81b259f

Browse files
committed
fix: type error
1 parent 09e762d commit 81b259f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/common/components/Button/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import type { HTMLAttributes, PropsWithChildren } from 'react';
2-
import * as s from './style.css';
32
import { cx } from '@styled-system/css';
43

4+
import * as s from './style.css';
5+
56
interface Props extends PropsWithChildren {
67
mode?: 'main' | 'default' | 'back' | 'disabled';
78
onClick?: () => void;
89
style?: HTMLAttributes<HTMLDivElement>['style'];
10+
className?: string;
911
}
10-
const Btn = ({ children, mode = 'default', onClick, style }: Props) => {
12+
const Btn = ({ children, mode = 'default', onClick, style, className }: Props) => {
1113
return (
12-
<div className={s.Button({ mode })} style={style} onClick={onClick}>
14+
<div className={cx(s.Button({ mode }), className)} style={style} onClick={onClick}>
1315
{children}
1416
</div>
1517
);

0 commit comments

Comments
 (0)