ksylvest/tights

View on GitHub
src/help.tsx

Summary

Maintainability
A
3 hrs
Test Coverage
A
100%
import { clsx } from "clsx";
import type { ComponentProps, FC } from "react";

import type { Color } from "./types/color";

type Props = {
  color?: Color;
};

export const Help: FC<Omit<ComponentProps<"p">, keyof Props> & Props> = ({
  color,
  className,
  ...props
}) => (
  <p {...props} className={clsx("help", color && `is-${color}`, className)} />
);