Skip to content

Commit 8212ec3

Browse files
committed
Add Types to IconButon
1 parent 761c612 commit 8212ec3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

components/theme/IconButton.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
import React from 'react'
22
import { Button } from './Button'
33
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
4+
import { ColorTypes } from './colors'
5+
type Props = {
6+
color: ColorTypes
7+
tooltipTitle: string
8+
placement: any
9+
icon: any
10+
delay: any
11+
tabIndex?: string
12+
className?: string
13+
onClick?: React.MouseEventHandler<HTMLButtonElement>
14+
}
415

5-
export default function IconButton({
16+
const IconButton: React.FC<Props> = ({
617
color,
718
placement,
819
tooltipTitle,
920
icon,
1021
delay,
1122
...extras
12-
}) {
23+
}) => {
1324
return tooltipTitle ? (
1425
<OverlayTrigger
1526
placement={placement}
@@ -30,3 +41,5 @@ export default function IconButton({
3041
</Button>
3142
)
3243
}
44+
45+
export default IconButton

0 commit comments

Comments
 (0)