@markdijkstra/react-placeholder
v1.0.1
Published
React component which allows you to create dummy placeholders.
Maintainers
Readme
react-placeholder
React component which allows you to create dummy placeholders.
How install
npm i @markdijkstra/react-placeholderHow to use
import {Placeholder} from '@markdijkstra/react-placeholder'
const PlaceholderData = [
{
height : '150px',
width : '300px',
backgroundColor : '#eee',
borderColor : '#ccc',
textColor : '#aaa',
fontSize : '13px',
caption : 'placeholder caption'
}
];
<Placeholder options={PlaceholderData} className="my-placeholder"/>
Options
| option | default | | --------------- | -------------- | | height | 150px | | width | 300px | | backgroundColor | #eee | | borderColor | #ccc | | textColor | #aaa | | fontSize | 13px | | caption | height x width |
The value caption can be removed by setting it to 'false'.
