@cristianchaparroa/simple-dyamond
Version:
A simple, customizable diamond-shaped React component
42 lines (32 loc) • 967 B
Markdown
# Simple Dyamond
A simple, customizable diamond-shaped React component.
## Installation
```bash
npm install @cristianchaparroa/simple-dyamond
```
# Usage
```javascript
import React from 'react';
import SimpleDyamond from '@cristianchaparroa/simple-dyamond';
function App() {
return (
<div>
<SimpleDyamond
size={120}
color="#e74c3c"
borderColor="#c0392b"
content="💎"
/>
</div>
);
}
```
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `size` | `number` | `100` | Size of the diamond (width and height in px) |
| `color` | `string` | `"#3498db"` | Background color of the diamond |
| `borderColor` | `string` | `"#2980b9"` | Border color of the diamond |
| `borderWidth` | `number` | `2` | Border width in pixels |
| `content` | `string` | `""` | Content to display inside the diamond |
| `contentColor` | `string` | `"#fff"` | Color of the content text |