问题描述
如何在库react-rainbow-component中手动自定义头像的大小?我使用了大小道具并将其设置为大,但对我来说太小了,因此我想将其设置为自定义大小。
解决方法
您可以使用className
或style
道具来自定义尺寸,例如使用style
<Avatar
style={{width: 100,height: 100}}
src="images/user/user1.jpg"
title=“John Doe" />
您可以在此处查看示例 https://react-rainbow.io/#!/Avatar/9