import { Text } from "../text"; import { makeStyles } from "../theme"; type FieldErrorsProps = { errors?: string[]; }; export default function FieldErrors({ errors }: FieldErrorsProps) { const styles = useStyles(); return errors?.map((error, index) => ( {error} )); } const useStyles = makeStyles((theme) => ({ error: { color: theme.colors.get("red"), fontSize: theme.fontSize("default") - 2, }, }));