Skip to content

Commit 15f7858

Browse files
refactor: migrate row to typescript
1 parent 4a86e70 commit 15f7858

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

app/main/components/ResultsList/Row/index.js renamed to app/main/components/ResultsList/Row/index.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import React from 'react'
2-
import PropTypes from 'prop-types'
32
import SmartIcon from '../../SmartIcon'
43
import styles from './styles.module.css'
54

5+
interface RowProps {
6+
style?: any
7+
title?: string
8+
icon?: string
9+
selected?: boolean
10+
subtitle?: string
11+
onSelect?: () => void
12+
onMouseMove?: () => void
13+
}
14+
615
function Row({
716
selected, icon, title, onSelect, onMouseMove, subtitle, style
8-
}) {
17+
}: RowProps) {
918
const classNames = [styles.row, selected ? styles.selected : null].join(' ')
1019

1120
return (
@@ -27,14 +36,4 @@ function Row({
2736
)
2837
}
2938

30-
Row.propTypes = {
31-
style: PropTypes.object,
32-
title: PropTypes.string,
33-
icon: PropTypes.string,
34-
selected: PropTypes.bool,
35-
subtitle: PropTypes.string,
36-
onSelect: PropTypes.func,
37-
onMouseMove: PropTypes.func,
38-
}
39-
4039
export default Row

0 commit comments

Comments
 (0)