Skip to content

Commit

Permalink
update examples with generic string array data type
Browse files Browse the repository at this point in the history
  • Loading branch information
berkinanik committed Feb 27, 2023
1 parent cddad8e commit 3339b6e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const styles: Record<string, React.CSSProperties> = {
};

export default function CSVReader() {
const { CSVReader } = useCSVReader<void, HTMLButtonElement>();
const { CSVReader } = useCSVReader<string[][], HTMLButtonElement>();

return (
<CSVReader
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/screens/indexes/LocalFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const styles: Record<string, React.CSSProperties> = {
};
export default function CSVReader() {
const { CSVReader } = useCSVReader<void, HTMLButtonElement>();
const { CSVReader } = useCSVReader<string[][], HTMLButtonElement>();
return (
<CSVReader
Expand Down
2 changes: 1 addition & 1 deletion examples/CSVReaderBasicUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const styles: Record<string, React.CSSProperties> = {
};

export default function CSVReader() {
const { CSVReader } = useCSVReader<void, HTMLButtonElement>();
const { CSVReader } = useCSVReader<string[][], HTMLButtonElement>();

return (
<CSVReader
Expand Down
2 changes: 1 addition & 1 deletion src/useCSVReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ function useCSVReaderComponent<
* @example HTMLButtonElement as the input element
* ```tsx
* import { useCSVReader } from 'react-papaparse';
* const { CSVReader } = useCSVReader<void, HTMLButtonElement>();
* const { CSVReader } = useCSVReader<string[][], HTMLButtonElement>();
* ```
*
* @see {@link https://react-papaparse.js.org/docs#local-files Usage with Local Files}
Expand Down
2 changes: 1 addition & 1 deletion test/CustomReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface CustomReaderProps {
const CustomReader: React.FC<CustomReaderProps> = (
props: CustomReaderProps
) => {
const { CSVReader } = useCSVReader<void, HTMLButtonElement>();
const { CSVReader } = useCSVReader<string[][], HTMLButtonElement>();
const { onUploadAccepted, label } = props;

return (
Expand Down

0 comments on commit 3339b6e

Please sign in to comment.