import { View } from "@tarojs/components";
import React, { CSSProperties, ReactNode, useState } from "react";

interface OuiLabelProps {
  size?: number;
  color?: string;
  children?: ReactNode;
  style?: CSSProperties;
}

interface OuiLabelStyle {
  fontSize: string;
  color: string;
}

function OuiLabel({
  size = 12,
  color = "#141414",
  style,
  children,
}: OuiLabelProps) {
  const [ouiLabelStyle] = useState<OuiLabelStyle>({
    fontSize: `${size}px`,
    color: color,
  });
  return <View style={{ ...ouiLabelStyle, ...style }}>{children}</View>;
}

export default OuiLabel;
