import React from "react";

const Box: React.FC<{
  children: React.ReactNode;
  style?: React.CSSProperties;
  className?: string; // 添加className属性
}> = ({ children, style, className }) => {
  return (
    <div
      className={`p-3 mb-3 rounded-xl bg-white ${className}`}
      style={{
        ...style,
      }}
    >
      {children}
    </div>
  );
};

export default Box;

// 定义一个 react 函数，返回一个 p 标签，其内容是 children 的值
// 用于 form 表单的 tips
export function Tips({
  children,
  style,
}: {
  children: React.ReactNode;
  style?: React.CSSProperties;
}) {
  return (
    <div style={{ color: "#666", fontSize: "13px", ...style }}>{children}</div>
  );
}
