All files / src/components/TitleClient index.tsx

100% Statements 18/18
100% Branches 1/1
100% Functions 1/1
100% Lines 18/18

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 25 26 27 28 29 30 31 32 33      1x                 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x 1x   1x   1x  
import { ElementType } from 'react';
 
// Utils
import { combineClasses } from '@shared/utils';
 
interface TitleClientProps {
  children: React.ReactNode;
  tag?: ElementType;
  className?: string;
  totalWidth?: number;
}
 
const TitleClient = ({
  children,
  tag: Tag = 'h2',
  className,
  totalWidth = 0,
}: TitleClientProps) => {
  return (
    <div
      className={combineClasses(
        'text-3.25xl md:text-3.5xl leading-2md tracking-[8.6px] md:tracking-[14px] uppercase text-primary-150 mt-2.75',
        className,
      )}
      style={{ width: `${totalWidth}px` }}
    >
      <Tag className="mt-0 mb-3 text-left">{children}</Tag>
    </div>
  );
};
 
export default TitleClient;