-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Readme): Added "Usage" section and changed "Props" section
- Loading branch information
1 parent
d2258cb
commit bf5cb86
Showing
1 changed file
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
 | ||
|
||
## 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 |