react image filler
1.0.0

React Image Filler是一个方便的React组件,可让您生成具有可自定义属性(例如宽度,高度,文本,颜色和背景颜色)的占位符图像。在您需要为尚未加载或可选的图像保留空间的情况下,这特别有用。
目录
npm install react-image-filler --save
# or
yarn add react-image-filler import ImageFiller from 'react-image-filler' ;
const App = ( ) => {
return (
< div >
< ImageFiller width = { 200 } height = { 200 } />
</ div >
) ;
} | 支柱 | 类型 | 默认 | 描述 |
|---|---|---|---|
width | 数字 | 100 | 图像的宽度 |
height | 数字 | 100 | 图像的高度 |
text | 细绳 | 占位符 | 图像的文字 |
color | 细绳 | #6A6A6A | 图像的文字颜色 |
background | 细绳 | #DDDDDD | 图像的背景颜色 |
为诸如React-Image-Filler之类的开源项目做出贡献可能是一个有意义的体验。您不仅可以提高您的编码技巧,还可以为更广泛的开发人员社区做出贡献。
如果您有兴趣为该项目做出贡献(无论是通过改进,错误修复还是新功能),则需要以下步骤:
git checkout -b feature/AmazingFeature 。git commit -m 'Add some AmazingFeature' 。git push origin feature/AmazingFeature 。