import React, { FC } from "react";
import { IUser } from "../types/Types";
import App from "../App";
interface UserItemProps {
user: IUser;
ClassName: React.CSSProperties;
}
const UserItem: FC<UserItemProps> = ({ user }) => {
return (
<div ClassName="UserPage">
{user.id}.{user.name}.{user.email} lives {user.address.city} street{" "}
{user.address.street}
</div>
);
};
export default UserItem;
CSS系统
.UserPage{
width:1400px;
height:hug 164px;
border-radius:8px;
padding:24px, 16px, 24px, 16px;
gap:32px;
}
错误:键入“{ children:(字符串|编号)[];类名:“string; }"无法分配给类型”“。属性”“类名”“在类型”“上不存在。您的意思是”“类名”“吗?”
我如何声明CSS类型?
1条答案
按热度按时间o8x7eapl1#
在div组件中,您使用了className(带有大写C),需要将其写成
className