All files / src/components/charts ChartTitle.tsx

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

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      20x       6x                      
import React from "react";
 
/** A chart's title, and a note on how to read it. */
export const ChartTitle: React.FC<{ title: string; note?: string }> = ({
  title,
  note,
}) => (
  <div className="mb-1">
    <div className="text-[10px] uppercase tracking-wide font-medium text-gray-400 dark:text-gray-500">
      {title}
    </div>
    {note && (
      <p className="text-[11px] text-gray-400 dark:text-gray-500">{note}</p>
    )}
  </div>
);
 
export default ChartTitle;