All files / app/features/profile ProfileMarkdownInput.tsx

100% Statements 5/5
0% Branches 0/1
100% Functions 1/1
100% Lines 5/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 25 26 27 28 29 30 31 32 33 34 35 36 37 382x 2x 2x                       2x               215x                              
import { Typography } from "@material-ui/core";
import MarkdownInput from "components/MarkdownInput";
import React from "react";
import { Control } from "react-hook-form";
 
interface ProfileMarkdownInputProps {
  className?: string;
  control: Control;
  defaultValue?: string;
  id: string;
  label: string;
  name: string;
}
 
export default function ProfileMarkdownInput({
  className,
  control,
  defaultValue = "",
  id,
  label,
  name,
}: ProfileMarkdownInputProps) {
  return (
    <div className={className}>
      <Typography variant="h2" id={`${id}-label`}>
        {label}
      </Typography>
      <MarkdownInput
        control={control}
        defaultValue={defaultValue}
        id={id}
        labelId={`${id}-label`}
        name={name}
      />
    </div>
  );
}