navTabs.tsx 490 B

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