All files / src/components/Tabs index.tsx

60% Statements 3/5
0% Branches 0/9
0% Functions 0/2
60% Lines 3/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  5x           5x                         5x      
import React, { FC } from 'react';
const styles = require('./Tabs.module.css')
 
export const Tab: FC<{
  current?: boolean;
  onClick?: () => void;
  classes?: string;
}> = ({
  current,
  onClick,
  classes,
  children
}) => {
  return (
    <button className={`${styles.Tab} ${classes ?? ''} ${current ? styles.current : ''}`} onClick={onClick}>
      {children}
    </button>
  );
};
 
export const Tabs: FC<{classes?: string, fullWidth?: boolean}> = ({ classes, fullWidth = true, children }) => {
  return <div className={`${styles.Tabs} ${fullWidth ? '' : styles.inline} ${classes ?? ''}`}>{children}</div>;
};