mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Allow both React nodes and strings to be passed as TextProps
Looking at the library it's perfectly fine to pass a React node as a TextProp. The only exception to this is rowsText, since it's used inside of an <option> element where only a string can be passed. Also, because noDataText is wrapped in 'normalizeComponent' method, it can be passed both as a React component as well as a React node.
This commit is contained in:
committed by
Niels de Bruin
parent
f91a63c5e3
commit
8dc024a9c6
12
types/react-table/index.d.ts
vendored
12
types/react-table/index.d.ts
vendored
@@ -362,22 +362,22 @@ export interface ComponentProps {
|
||||
|
||||
export interface TextProps {
|
||||
/** Default: 'Previous' */
|
||||
previousText: string;
|
||||
previousText: React.ReactNode;
|
||||
|
||||
/** Default: 'Next' */
|
||||
nextText: string;
|
||||
nextText: React.ReactNode;
|
||||
|
||||
/** Default: 'Loading...' */
|
||||
loadingText: string;
|
||||
loadingText: React.ReactNode;
|
||||
|
||||
/** Default: 'No rows found' */
|
||||
noDataText: string;
|
||||
noDataText: React.ReactNode | React.ComponentType;
|
||||
|
||||
/** Default: 'Page' */
|
||||
pageText: string;
|
||||
pageText: React.ReactNode;
|
||||
|
||||
/** Default: 'of' */
|
||||
ofText: string;
|
||||
ofText: React.ReactNode;
|
||||
|
||||
/** Default: 'rows' */
|
||||
rowsText: string;
|
||||
|
||||
Reference in New Issue
Block a user