kenneth-gray / react-aria-accordion

React accordion component that follows WAI-ARIA practices
MIT License
12 stars 2 forks source link

TypeScript export component prop types #8

Open danielwaltz opened 4 years ago

danielwaltz commented 4 years ago

When creating light wrapper components it would be lovely to be able to import prop definitions from the library to use on wrapping components, like this:

import React, { FC } from 'react';
import { Header, HeaderProps } from 'react-aria-accordion';

const MyHeader: FC<HeaderProps> = ({children, ...rest}) => {
  <Header {...rest}>
    ...
  </Header>
};
kenneth-gray commented 4 years ago

Sounds reasonable. I can add them to the next release.