Skip to content

Commit

Permalink
fix(Readme): Added "Usage" section and changed "Props" section
Browse files Browse the repository at this point in the history
  • Loading branch information
nachovigilante committed Jul 25, 2022
1 parent d2258cb commit bf5cb86
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# React 7-Segment Display

A React component that simulates a 7-segment display.

![Display demo](./assets/Display.gif)

## Usage

### Installation

`npm install react-7-segment-display`

### Adding the component to your project

```jsx
import { Display } from 'react-7-segment-display';

const App = () => (
<Display count="2" value="77" />
);

export default App;
```

## Props
- `value` - value displayed on the component
- `color` - color of the display segments when turned on
- `height` - total height of the display digits
- `count` - amount of digits on the display
- `bakgroundColor` - color of the background

| Name | Decription | Type | Default value |
| -------------- | -------------------------------------------- | --------- | ------------- |
| value | Value displayed on the display | `any` | `null` |
| color | Color of the display segments when turned on | `string` | `"red"` |
| height | Total height of the display digits | `number` | `250` |
| count | Amount of digits on the display | `number` | `2` |
| bakgroundColor | Color of the background | `string?` | n/a |

## License
MIT

MIT License

0 comments on commit bf5cb86

Please sign in to comment.