import React from "react";
import { Text, TextProps, TextStyle } from "react-native";

import { monoFamily } from "@/constants/typography";

interface MonoProps extends TextProps {
  size?: number;
  weight?: TextStyle["fontWeight"];
  color?: string;
}

export function Mono({
  size = 14,
  weight = "500",
  color,
  style,
  ...rest
}: MonoProps) {
  return (
    <Text
      {...rest}
      style={[
        {
          fontFamily: monoFamily,
          fontSize: size,
          fontWeight: weight,
          color,
          letterSpacing: -0.2,
        },
        style,
      ]}
    />
  );
}
