Skip to content

Commit

Permalink
chore: fix lint and tests (#3128)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak authored Mar 23, 2022
1 parent 807179a commit 30a4e27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/DataTable/DataTableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,20 @@ type Props = $RemoveChildren<typeof TouchableRipple> & {
* MD Guidelines (https://github.com/callstack/react-native-paper/issues/2381).
*/

const DataTableCell = ({ children, textStyle, style, numeric, ...rest }: Props) => (
const DataTableCell = ({
children,
textStyle,
style,
numeric,
...rest
}: Props) => (
<TouchableRipple
{...rest}
style={[styles.container, numeric && styles.right, style]}
>
<Text style={textStyle} numberOfLines={1}>{children}</Text>
<Text style={textStyle} numberOfLines={1}>
{children}
</Text>
</TouchableRipple>
);

Expand Down
5 changes: 5 additions & 0 deletions src/components/__tests__/__snapshots__/DataTable.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ exports[`renders data table header 1`] = `
Object {
"color": "rgba(0, 0, 0, 0.6)",
},
undefined,
],
]
}
Expand Down Expand Up @@ -163,6 +164,7 @@ exports[`renders data table header 1`] = `
Object {
"color": "rgba(0, 0, 0, 0.6)",
},
undefined,
],
]
}
Expand Down Expand Up @@ -1476,6 +1478,7 @@ exports[`renders data table title with press handler 1`] = `
Object {
"marginLeft": 8,
},
undefined,
],
]
}
Expand Down Expand Up @@ -1565,6 +1568,7 @@ exports[`renders data table title with sort icon 1`] = `
Object {
"marginLeft": 8,
},
undefined,
],
]
}
Expand Down Expand Up @@ -1672,6 +1676,7 @@ exports[`renders right aligned data table title 1`] = `
Object {
"color": "rgba(0, 0, 0, 0.6)",
},
undefined,
],
]
}
Expand Down

0 comments on commit 30a4e27

Please sign in to comment.