Skip to content

Commit 1c0fe12

Browse files
authored
Update README.md
1 parent 20a4ba0 commit 1c0fe12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,18 @@ Possible values for tabsRole are:
363363
- Tab
364364
- TabPanel
365365
- TabList
366+
- Tabs
366367
367368
#### Pass through properties
368369
369370
Note: Because of how react-tabs works internally (it uses cloning to opaquely control various parts of the tab state), you need to pass any incoming props to the component you're wrapping. The easiest way to do this is to use the rest and spread operators, e.g. see `{...otherProps}` below.
370371
371-
```javascript
372+
```tsx
372373
import { Tabs, TabList, Tab, TabPanel } from 'react-tabs';
374+
import type { ReactTabsFunctionComponent, TabProps } from 'react-tabs';
373375
374376
// All custom elements should pass through other props
375-
const CustomTab = ({ children, ...otherProps }) => (
377+
const CustomTab = ({ children, ...otherProps }): ReactTabsFunctionComponent<TabProps> => (
376378
<Tab {...otherProps}>
377379
<h1>{children}</h1>
378380
</Tab>

0 commit comments

Comments
 (0)