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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 2x 2x 2x 2x 3x | import { Typography } from "@mui/material"; import Alert from "components/Alert"; import MarkdownInput from "components/MarkdownInput"; import React, { ReactNode } from "react"; import { Control } from "react-hook-form"; interface ProfileMarkdownInputProps { className?: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any control: Control<any>; defaultValue?: string; id: string; label: string; name: string; warning?: boolean; helperText?: string | ReactNode; description?: ReactNode; placeholder?: string; } export default function ProfileMarkdownInput({ className, control, defaultValue = "", id, label, name, warning, description, helperText, placeholder, }: ProfileMarkdownInputProps) { return ( <div className={className}> <Typography variant="h2" id={`${id}-label`}> {label} </Typography> {warning && helperText && ( <Alert severity="warning" data-testid={`${id}-input-helper-text`}> {helperText} </Alert> )} {description} <MarkdownInput control={control} defaultValue={defaultValue} id={id} labelId={`${id}-label`} name={name} placeholder={placeholder} /> </div> ); } |