navTabs.tsx 473 B

12345678910111213141516171819
  1. import * as React from 'react';
  2. import classnames from 'classnames';
  3. type Props = {
  4. className?: string;
  5. underlined?: boolean;
  6. };
  7. type NavProps = Omit<React.HTMLProps<HTMLUListElement>, keyof Props> & Props;
  8. function NavTabs({underlined, className, ...tabProps}: NavProps) {
  9. const mergedClassName = classnames('nav nav-tabs', className, {
  10. 'border-bottom': underlined,
  11. });
  12. return <ul className={mergedClassName} {...tabProps} />;
  13. }
  14. export default NavTabs;